Struct parry2d::query::Ray[][src]

pub struct Ray {
    pub origin: Point<Real>,
    pub dir: Vector<Real>,
}

A Ray.

Fields

origin: Point<Real>

Starting point of the ray.

dir: Vector<Real>

Direction of the ray.

Implementations

impl Ray[src]

pub fn new(origin: Point<Real>, dir: Vector<Real>) -> Ray[src]

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

pub fn transform_by(&self, m: &Isometry<Real>) -> Self[src]

Transforms this ray by the given isometry.

pub fn inverse_transform_by(&self, m: &Isometry<Real>) -> Self[src]

Transforms this ray by the inverse of the given isometry.

pub fn translate_by(&self, v: Vector<Real>) -> Self[src]

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

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

Computes the point at the given parameter on this line.

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

Trait Implementations

impl Clone for Ray[src]

impl Copy for Ray[src]

impl Debug for Ray[src]

Auto Trait Implementations

impl RefUnwindSafe for Ray

impl Send for Ray

impl Sync for Ray

impl Unpin for Ray

impl UnwindSafe for Ray

Blanket Implementations

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

impl<T> Az for T[src]

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

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

impl<T> CheckedAs for T[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<Src, Dst> LosslessTryInto<Dst> for Src where
    Dst: LosslessTryFrom<Src>, 
[src]

impl<Src, Dst> LossyInto<Dst> for Src where
    Dst: LossyFrom<Src>, 
[src]

impl<T> OverflowingAs for T[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> SaturatingAs for T[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<T> UnwrappedAs for T[src]

impl<T> WrappingAs for T[src]