[][src]Struct ncollide_geometry::query::Ray

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

A Ray.

Fields

origin: P

Starting point of the ray.

dir: P::Vector

Direction of the ray.

Methods

impl<P: Point> Ray<P>[src]

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

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

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

Transforms this ray by the given isometry.

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

Transforms this ray by the inverse of the given isometry.

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

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

Trait Implementations

impl<P: Copy + Point> Copy for Ray<P> where
    P::Vector: Copy
[src]

impl<P: Clone + Point> Clone for Ray<P> where
    P::Vector: Clone
[src]

fn clone_from(&mut self, source: &Self)
1.0.0
[src]

Performs copy-assignment from source. Read more

impl<P: Debug + Point> Debug for Ray<P> where
    P::Vector: Debug
[src]

Auto Trait Implementations

impl<P> Send for Ray<P> where
    <P as Point>::Vector: Send

impl<P> Sync for Ray<P> where
    <P as Point>::Vector: Sync

Blanket Implementations

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

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

type Owned = T

The resulting type after obtaining ownership.

impl<T> From for T[src]

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

type Error = Infallible

The type returned in the event of a conversion error.

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

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

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

impl<T, U> TryInto 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<SS, SP> SupersetOf for SP where
    SS: SubsetOf<SP>, 
[src]

impl<T> Same for T

type Output = T

Should always be Self