Struct ncollide2d::query::RayIntersection[][src]

pub struct RayIntersection<N: Real> {
    pub toi: N,
    pub normal: Vector<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: 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.

Methods

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

Creates a new RayIntersection.

Auto Trait Implementations

impl<N> Send for RayIntersection<N>

impl<N> Sync for RayIntersection<N>