RayCast

Trait 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>,
        ray: &Ray,
        max_time_of_impact: f32,
        solid: bool,
    ) -> Option<f32> { ... }
    fn cast_ray_and_get_normal(
        &self,
        m: &Isometry<f32>,
        ray: &Ray,
        max_time_of_impact: f32,
        solid: bool,
    ) -> Option<RayIntersection> { ... }
    fn intersects_ray(
        &self,
        m: &Isometry<f32>,
        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>, 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>, 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>, ray: &Ray, max_time_of_impact: f32, ) -> bool

Tests whether a ray intersects this transformed shape.

Implementors§

Source§

impl RayCast for Aabb

Source§

impl RayCast for BoundingSphere

Source§

impl RayCast for Ball

Source§

impl RayCast for Capsule

Source§

impl RayCast for Compound

Source§

impl RayCast for ConvexPolygon

Available on crate features dim2 and alloc only.
Source§

impl RayCast for Cuboid

Source§

impl RayCast for HalfSpace

Source§

impl RayCast for HeightField

Available on crate feature dim2 only.
Source§

impl RayCast for Polyline

Source§

impl RayCast for Segment

Source§

impl RayCast for TriMesh

Source§

impl RayCast for Triangle

Source§

impl RayCast for Voxels

Source§

impl<'a> RayCast for VoxelsChunkRef<'a>

Source§

impl<S: SupportMap> RayCast for RoundShape<S>