[src]

Trait ncollide2df64::ray::RayCast

pub trait RayCast {
    fn toi_and_normal_with_ray(&self, ray: &Ray) -> Option<(N, V)>;

    fn toi_with_ray(&self, ray: &Ray) -> Option<N> { ... }
    fn intersects_ray(&self, ray: &Ray) -> bool { ... }
    fn toi_with_transform_and_ray(&self, m: &M, ray: &Ray) -> Option<N> { ... }
    fn toi_and_normal_with_transform_and_ray(&self, m: &M, ray: &Ray) -> Option<(N, V)> { ... }
    fn intersects_with_transform_and_ray(&self, m: &M, ray: &Ray) -> bool { ... }
}

Traits of objects which can be tested for intersection with a ray.

Required Methods

fn toi_and_normal_with_ray(&self, ray: &Ray) -> Option<(N, V)>

Computes the intersection point between this geometry and a ray.

Provided Methods

fn toi_with_ray(&self, ray: &Ray) -> Option<N>

Computes the time of impact between this geometry and a ray

fn intersects_ray(&self, ray: &Ray) -> bool

Tests whether a ray intersects this geometry.

fn toi_with_transform_and_ray(&self, m: &M, ray: &Ray) -> Option<N>

Computes the time of impact between this transform geometry and a ray.

fn toi_and_normal_with_transform_and_ray(&self, m: &M, ray: &Ray) -> Option<(N, V)>

Computes the time of impact, and normal between this transformed geometry and a ray.

fn intersects_with_transform_and_ray(&self, m: &M, ray: &Ray) -> bool

Tests whether a ray intersects this transformed geometry.

Implementors