Trait ncollide::query::RayCast
[−]
[src]
pub trait RayCast<P, M> where
P: Point, { fn toi_and_normal_with_ray(
&self,
m: &M,
ray: &Ray<P>,
solid: bool
) -> Option<RayIntersection<<P as Point>::Vector>>; fn toi_with_ray(
&self,
m: &M,
ray: &Ray<P>,
solid: bool
) -> Option<<P as EuclideanSpace>::Real> { ... } fn toi_and_normal_and_uv_with_ray(
&self,
m: &M,
ray: &Ray<P>,
solid: bool
) -> Option<RayIntersection<<P as Point>::Vector>> { ... } fn intersects_ray(&self, m: &M, ray: &Ray<P>) -> bool { ... } }
Traits of objects which can be transformed and tested for intersection with a ray.
Required Methods
fn toi_and_normal_with_ray(
&self,
m: &M,
ray: &Ray<P>,
solid: bool
) -> Option<RayIntersection<<P as Point>::Vector>>
&self,
m: &M,
ray: &Ray<P>,
solid: bool
) -> Option<RayIntersection<<P as Point>::Vector>>
Computes the time of impact, and normal between this transformed shape and a ray.
Provided Methods
fn toi_with_ray(
&self,
m: &M,
ray: &Ray<P>,
solid: bool
) -> Option<<P as EuclideanSpace>::Real>
&self,
m: &M,
ray: &Ray<P>,
solid: bool
) -> Option<<P as EuclideanSpace>::Real>
Computes the time of impact between this transform shape and a ray.
fn toi_and_normal_and_uv_with_ray(
&self,
m: &M,
ray: &Ray<P>,
solid: bool
) -> Option<RayIntersection<<P as Point>::Vector>>
&self,
m: &M,
ray: &Ray<P>,
solid: bool
) -> Option<RayIntersection<<P as Point>::Vector>>
Computes time of impact, normal, and texture coordinates (uv) between this transformed shape and a ray.
fn intersects_ray(&self, m: &M, ray: &Ray<P>) -> bool
Tests whether a ray intersects this transformed shape.
Implementors
impl<P, M> RayCast<P, M> for TriMesh<P> where
M: Isometry<P>,
P: Point,impl<P, M> RayCast<P, M> for Cuboid<<P as Point>::Vector> where
M: Isometry<P>,
P: Point,impl<P, M> RayCast<P, M> for Plane<<P as Point>::Vector> where
M: Isometry<P>,
P: Point,impl<P, M> RayCast<P, M> for Polyline<P> where
M: Isometry<P>,
P: Point,impl<P, M> RayCast<P, M> for ConvexHull<P> where
M: Isometry<P>,
P: Point,impl<P, M> RayCast<P, M> for AABB<P> where
M: Isometry<P>,
P: Point,impl<'a, P, M, M2, G1, G2> RayCast<P, M2> for MinkowskiSum<'a, M, G1, G2> where
G1: SupportMap<P, M> + ?Sized,
G2: SupportMap<P, M> + ?Sized,
M2: Isometry<P>,
P: Point,impl<P, M> RayCast<P, M> for Cylinder<<P as EuclideanSpace>::Real> where
M: Isometry<P>,
P: Point,impl<P, M> RayCast<P, M> for BoundingSphere<P> where
M: Isometry<P>,
P: Point,impl<P, M> RayCast<P, M> for Triangle<P> where
M: Isometry<P>,
P: Point,impl<P, M> RayCast<P, M> for Cone<<P as EuclideanSpace>::Real> where
M: Isometry<P>,
P: Point,impl<P, M> RayCast<P, M> for Ball<<P as EuclideanSpace>::Real> where
M: Isometry<P>,
P: Point,impl<P, M> RayCast<P, M> for Shape<P, M> + 'static where
M: Isometry<P>,
P: Point,impl<P, M> RayCast<P, M> for Capsule<<P as EuclideanSpace>::Real> where
M: Isometry<P>,
P: Point,impl<P, M, I, E> RayCast<P, M> for BaseMesh<P, I, E> where
E: BaseMeshElement<I, P> + RayCast<P, Id<Multiplicative>>,
I: Index<usize, Output = usize>,
M: Isometry<P>,
P: Point,impl<P, M> RayCast<P, M> for Segment<P> where
M: Isometry<P>,
P: Point,impl<P, M> RayCast<P, M> for Compound<P, M> where
M: Isometry<P>,
P: Point,