[][src]Struct amethyst_core::geometry::Ray

pub struct Ray<T> where
    T: RealField
{ pub origin: Point3<T>, pub direction: Vector3<T>, }

A Ray represents and infinite half-line starting at origin and going in specified unit length direction.

Fields

origin: Point3<T>

The origin point of the ray

direction: Vector3<T>

The normalized direction vector of the ray

Methods

impl<T> Ray<T> where
    T: RealField
[src]

pub fn intersect_plane(&self, plane: &Plane<T>) -> Option<T>[src]

Returns the distance along the ray which intersects with the provided Plane1

pub fn at_distance(&self, z: T) -> Point3<T>[src]

Returns a Point along the ray at a distance t from it's origin.

Trait Implementations

impl<T: Clone> Clone for Ray<T> where
    T: RealField
[src]

impl<T: PartialEq> PartialEq<Ray<T>> for Ray<T> where
    T: RealField
[src]

impl<T: Copy> Copy for Ray<T> where
    T: RealField
[src]

impl<T: Debug> Debug for Ray<T> where
    T: RealField
[src]

impl<T> Serialize for Ray<T> where
    T: RealField,
    T: Serialize
[src]

impl<'de, T> Deserialize<'de> for Ray<T> where
    T: RealField,
    T: Deserialize<'de>, 
[src]

Auto Trait Implementations

impl<T> Send for Ray<T> where
    T: Scalar

impl<T> Unpin for Ray<T> where
    T: Scalar + Unpin

impl<T> Sync for Ray<T> where
    T: Scalar

impl<T> UnwindSafe for Ray<T> where
    T: Scalar + UnwindSafe

impl<T> RefUnwindSafe for Ray<T> where
    T: RefUnwindSafe + Scalar

Blanket Implementations

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<SS, SP> SupersetOf<SS> for SP where
    SS: SubsetOf<SP>, 
[src]

impl<T> DeserializeOwned for T where
    T: Deserialize<'de>, 
[src]

impl<T> Scalar for T where
    T: Copy + PartialEq<T> + Any + Debug
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> Resource for T where
    T: Any + Send + Sync

impl<T> Event for T where
    T: Send + Sync + 'static, 

impl<T> Any for T where
    T: Any