Struct ncollide2d::query::RayIntersection [−][src]
Structure containing the result of a successful ray cast.
Fields
toi: N
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.
normal: Vector<N>
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]
impl<N: Real> RayIntersection<N>
pub fn new(toi: N, normal: Vector<N>) -> RayIntersection<N>
[src]
pub fn new(toi: N, normal: Vector<N>) -> RayIntersection<N>
Creates a new RayIntersection
.
Auto Trait Implementations
impl<N> Send for RayIntersection<N>
impl<N> Send for RayIntersection<N>
impl<N> Sync for RayIntersection<N>
impl<N> Sync for RayIntersection<N>