Struct rin::scene::physics::Ray[][src]

pub struct Ray<N> where
    N: RealField
{ pub origin: Point<N, U3>, pub dir: Matrix<N, U3, U1, <DefaultAllocator as Allocator<N, U3, U1>>::Buffer>, }

A Ray.

Fields

origin: Point<N, U3>

Starting point of the ray.

dir: Matrix<N, U3, U1, <DefaultAllocator as Allocator<N, U3, U1>>::Buffer>

Direction of the ray.

Implementations

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

pub fn new(
    origin: Point<N, U3>,
    dir: Matrix<N, U3, U1, <DefaultAllocator as Allocator<N, U3, U1>>::Buffer>
) -> Ray<N>
[src]

Creates a new ray starting from origin and with the direction dir. dir must be normalized.

pub fn transform_by(&self, m: &Isometry<N, U3, Unit<Quaternion<N>>>) -> Ray<N>[src]

Transforms this ray by the given isometry.

pub fn inverse_transform_by(
    &self,
    m: &Isometry<N, U3, Unit<Quaternion<N>>>
) -> Ray<N>
[src]

Transforms this ray by the inverse of the given isometry.

pub fn translate_by(
    &self,
    v: Matrix<N, U3, U1, <DefaultAllocator as Allocator<N, U3, U1>>::Buffer>
) -> Ray<N>
[src]

Translates this ray by the given vector. Its direction is left unchanged.

pub fn point_at(&self, t: N) -> Point<N, U3>[src]

Computes the point at the given parameter on this line.

This computes self.origin + self.dir * t.

Trait Implementations

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

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

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

Auto Trait Implementations

impl<N> RefUnwindSafe for Ray<N> where
    N: RefUnwindSafe

impl<N> Send for Ray<N>

impl<N> Sync for Ray<N>

impl<N> Unpin for Ray<N> where
    N: Unpin

impl<N> UnwindSafe for Ray<N> where
    N: UnwindSafe

Blanket Implementations

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

impl<T> Any for T where
    T: Any
[src]

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

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

impl<T> Downcast for T where
    T: Any
[src]

impl<T> DowncastSync for T where
    T: Any + Send + Sync
[src]

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

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

impl<V> IntoPnt<V> for V[src]

impl<V> IntoVec<V> for V[src]

impl<T> Pointable for T[src]

type Init = T

The type for initializers.

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

type Output = T

Should always be Self

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

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

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

impl<T> Slottable for T where
    T: Copy
[src]