Trait ncollide2d::query::RayCast
source · pub trait RayCast<N: Real> {
fn toi_and_normal_with_ray(
&self,
m: &Isometry<N>,
ray: &Ray<N>,
solid: bool
) -> Option<RayIntersection<N>>;
fn toi_with_ray(&self, m: &Isometry<N>, ray: &Ray<N>, solid: bool) -> Option<N> { ... }
fn intersects_ray(&self, m: &Isometry<N>, ray: &Ray<N>) -> bool { ... }
}
Expand description
Traits of objects which can be transformed and tested for intersection with a ray.
Required Methods§
sourcefn toi_and_normal_with_ray(
&self,
m: &Isometry<N>,
ray: &Ray<N>,
solid: bool
) -> Option<RayIntersection<N>>
fn toi_and_normal_with_ray(
&self,
m: &Isometry<N>,
ray: &Ray<N>,
solid: bool
) -> Option<RayIntersection<N>>
Computes the time of impact, and normal between this transformed shape and a ray.
Provided Methods§
sourcefn toi_with_ray(&self, m: &Isometry<N>, ray: &Ray<N>, solid: bool) -> Option<N>
fn toi_with_ray(&self, m: &Isometry<N>, ray: &Ray<N>, solid: bool) -> Option<N>
Computes the time of impact between this transform shape and a ray.
sourcefn intersects_ray(&self, m: &Isometry<N>, ray: &Ray<N>) -> bool
fn intersects_ray(&self, m: &Isometry<N>, ray: &Ray<N>) -> bool
Tests whether a ray intersects this transformed shape.