Struct ncollide::query::RayIntersection [] [src]

pub struct RayIntersection<V> where
    V: Vector
{ pub toi: <V as InnerSpace>::Real, pub normal: V, pub uvs: Option<Point<<V as InnerSpace>::Real, U2>>, }

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.

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

Methods

impl<V> RayIntersection<V> where
    V: Vector
[src]

Creates a new RayIntersection.

Creates a new RayIntersection.