[][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

Implementations

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: Copy> Copy for Ray<T> where
    T: RealField, 
[src]

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

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

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

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

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

Auto Trait Implementations

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

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

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

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

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

Blanket Implementations

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

impl<T> Any for T where
    T: Any

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

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

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

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

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

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

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

impl<T> Same<T> for T

type Output = T

Should always be Self

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

impl<SS, SP> SupersetOf<SS> for SP where
    SS: SubsetOf<SP>, 

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

type Owned = T

The resulting type after obtaining ownership.

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<V, T> VZip<V> for T where
    V: MultiLane<T>,