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§
Sourcefn cast_local_ray_and_get_normal(
&self,
ray: &Ray,
max_time_of_impact: f32,
solid: bool,
) -> Option<RayIntersection>
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§
Sourcefn cast_local_ray(
&self,
ray: &Ray,
max_time_of_impact: f32,
solid: bool,
) -> Option<f32>
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.
Sourcefn intersects_local_ray(&self, ray: &Ray, max_time_of_impact: f32) -> bool
fn intersects_local_ray(&self, ray: &Ray, max_time_of_impact: f32) -> bool
Tests whether a ray intersects this transformed shape.
Sourcefn cast_ray(
&self,
m: &Isometry<f32>,
ray: &Ray,
max_time_of_impact: f32,
solid: bool,
) -> Option<f32>
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.
Sourcefn cast_ray_and_get_normal(
&self,
m: &Isometry<f32>,
ray: &Ray,
max_time_of_impact: f32,
solid: bool,
) -> Option<RayIntersection>
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.
Implementors§
impl RayCast for Aabb
impl RayCast for BoundingSphere
impl RayCast for Ball
impl RayCast for Capsule
impl RayCast for Compound
impl RayCast for ConvexPolygon
Available on crate features
dim2 and alloc only.impl RayCast for Cuboid
impl RayCast for HalfSpace
impl RayCast for HeightField
Available on crate feature
dim2 only.