Trait rapier3d::geometry::RayCast

source ·
pub trait RayCast {
    // Required method
    fn cast_local_ray_and_get_normal(
        &self,
        ray: &Ray,
        max_time_of_impact: f32,
        solid: bool
    ) -> Option<RayIntersection>;

    // Provided methods
    fn cast_local_ray(
        &self,
        ray: &Ray,
        max_time_of_impact: f32,
        solid: bool
    ) -> Option<f32> { ... }
    fn intersects_local_ray(&self, ray: &Ray, max_time_of_impact: f32) -> bool { ... }
    fn cast_ray(
        &self,
        m: &Isometry<f32, Unit<Quaternion<f32>>, 3>,
        ray: &Ray,
        max_time_of_impact: f32,
        solid: bool
    ) -> Option<f32> { ... }
    fn cast_ray_and_get_normal(
        &self,
        m: &Isometry<f32, Unit<Quaternion<f32>>, 3>,
        ray: &Ray,
        max_time_of_impact: f32,
        solid: bool
    ) -> Option<RayIntersection> { ... }
    fn intersects_ray(
        &self,
        m: &Isometry<f32, Unit<Quaternion<f32>>, 3>,
        ray: &Ray,
        max_time_of_impact: f32
    ) -> bool { ... }
}
Expand description

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

Required Methods§

source

fn cast_local_ray_and_get_normal( &self, ray: &Ray, max_time_of_impact: f32, solid: bool ) -> Option<RayIntersection>

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

Provided Methods§

source

fn cast_local_ray( &self, ray: &Ray, max_time_of_impact: f32, solid: bool ) -> Option<f32>

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

source

fn intersects_local_ray(&self, ray: &Ray, max_time_of_impact: f32) -> bool

Tests whether a ray intersects this transformed shape.

source

fn cast_ray( &self, m: &Isometry<f32, Unit<Quaternion<f32>>, 3>, ray: &Ray, max_time_of_impact: f32, solid: bool ) -> Option<f32>

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

source

fn cast_ray_and_get_normal( &self, m: &Isometry<f32, Unit<Quaternion<f32>>, 3>, ray: &Ray, max_time_of_impact: f32, solid: bool ) -> Option<RayIntersection>

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

source

fn intersects_ray( &self, m: &Isometry<f32, Unit<Quaternion<f32>>, 3>, ray: &Ray, max_time_of_impact: f32 ) -> bool

Tests whether a ray intersects this transformed shape.

Implementors§