pub trait RayCast {
// Required method
fn cast_local_ray_and_get_normal(
&self,
ray: &Ray,
max_time_of_impact: Real,
solid: bool
) -> Option<RayIntersection>;
// Provided methods
fn cast_local_ray(
&self,
ray: &Ray,
max_time_of_impact: Real,
solid: bool
) -> Option<Real> { ... }
fn intersects_local_ray(&self, ray: &Ray, max_time_of_impact: Real) -> bool { ... }
fn cast_ray(
&self,
m: &Isometry<Real>,
ray: &Ray,
max_time_of_impact: Real,
solid: bool
) -> Option<Real> { ... }
fn cast_ray_and_get_normal(
&self,
m: &Isometry<Real>,
ray: &Ray,
max_time_of_impact: Real,
solid: bool
) -> Option<RayIntersection> { ... }
fn intersects_ray(
&self,
m: &Isometry<Real>,
ray: &Ray,
max_time_of_impact: Real
) -> 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: Real,
solid: bool
) -> Option<RayIntersection>
fn cast_local_ray_and_get_normal( &self, ray: &Ray, max_time_of_impact: Real, 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: Real,
solid: bool
) -> Option<Real>
fn cast_local_ray( &self, ray: &Ray, max_time_of_impact: Real, solid: bool ) -> Option<Real>
Computes the time of impact between this transform shape and a ray.
sourcefn intersects_local_ray(&self, ray: &Ray, max_time_of_impact: Real) -> bool
fn intersects_local_ray(&self, ray: &Ray, max_time_of_impact: Real) -> bool
Tests whether a ray intersects this transformed shape.
sourcefn cast_ray(
&self,
m: &Isometry<Real>,
ray: &Ray,
max_time_of_impact: Real,
solid: bool
) -> Option<Real>
fn cast_ray( &self, m: &Isometry<Real>, ray: &Ray, max_time_of_impact: Real, solid: bool ) -> Option<Real>
Computes the time of impact between this transform shape and a ray.
sourcefn cast_ray_and_get_normal(
&self,
m: &Isometry<Real>,
ray: &Ray,
max_time_of_impact: Real,
solid: bool
) -> Option<RayIntersection>
fn cast_ray_and_get_normal( &self, m: &Isometry<Real>, ray: &Ray, max_time_of_impact: Real, solid: bool ) -> Option<RayIntersection>
Computes the time of impact, and normal between this transformed shape and a ray.