[][src]Struct ncollide3d::query::ray_internal::RayIntersection

pub struct RayIntersection<N: Real> {
    pub toi: N,
    pub normal: Vector<N>,
    pub feature: FeatureId,
    pub uvs: Option<Point2<N>>,
}

Structure containing the result of a successful ray cast.

Fields

The time of impact of the ray with the object. The exact contact point can be computed with: ray.point_at(toi) or equivalently origin + dir * toi where origin is the origin of the ray; dir is its direction and toi is the value of this field.

The normal at the intersection point.

If the toi is exactly zero, the normal might not be reliable.

Feature at the intersection point.

The textures coordinates at the intersection point. This is an Option because some shape do not support texture coordinates.

Methods

impl<N: Real> RayIntersection<N>
[src]

Creates a new RayIntersection.

Creates a new RayIntersection.

Auto Trait Implementations

impl<N> Send for RayIntersection<N> where
    N: Scalar

impl<N> Sync for RayIntersection<N> where
    N: Scalar

Blanket Implementations

impl<T> From for T
[src]

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

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

🔬 This is a nightly-only experimental API. (try_from)

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, U> TryInto for T where
    U: TryFrom<T>, 
[src]

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

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

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

impl<T> Downcast for T where
    T: Any

impl<T> Same for T

Should always be Self