ncollide3d::query

Trait RayCast

Source
pub trait RayCast<N: RealField + Copy> {
    // Required method
    fn toi_and_normal_with_ray(
        &self,
        m: &Isometry<N>,
        ray: &Ray<N>,
        max_toi: N,
        solid: bool,
    ) -> Option<RayIntersection<N>>;

    // Provided methods
    fn toi_with_ray(
        &self,
        m: &Isometry<N>,
        ray: &Ray<N>,
        max_toi: N,
        solid: bool,
    ) -> Option<N> { ... }
    fn toi_and_normal_and_uv_with_ray(
        &self,
        m: &Isometry<N>,
        ray: &Ray<N>,
        max_toi: N,
        solid: bool,
    ) -> Option<RayIntersection<N>> { ... }
    fn intersects_ray(&self, m: &Isometry<N>, ray: &Ray<N>, max_toi: N) -> bool { ... }
}
Expand description

Traits of objects which can be transformed and tested for intersection with a ray.

Required Methods§

Source

fn toi_and_normal_with_ray( &self, m: &Isometry<N>, ray: &Ray<N>, max_toi: N, solid: bool, ) -> Option<RayIntersection<N>>

Computes the time of impact, and normal between this transformed shape and a ray.

Provided Methods§

Source

fn toi_with_ray( &self, m: &Isometry<N>, ray: &Ray<N>, max_toi: N, solid: bool, ) -> Option<N>

Computes the time of impact between this transform shape and a ray.

Source

fn toi_and_normal_and_uv_with_ray( &self, m: &Isometry<N>, ray: &Ray<N>, max_toi: N, solid: bool, ) -> Option<RayIntersection<N>>

Computes time of impact, normal, and texture coordinates (uv) between this transformed shape and a ray.

Source

fn intersects_ray(&self, m: &Isometry<N>, ray: &Ray<N>, max_toi: N) -> bool

Tests whether a ray intersects this transformed shape.

Implementors§

Source§

impl<N: RealField + Copy> RayCast<N> for AABB<N>

Source§

impl<N: RealField + Copy> RayCast<N> for BoundingSphere<N>

Source§

impl<N: RealField + Copy> RayCast<N> for Ball<N>

Source§

impl<N: RealField + Copy> RayCast<N> for Capsule<N>

Source§

impl<N: RealField + Copy> RayCast<N> for Compound<N>

Source§

impl<N: RealField + Copy> RayCast<N> for Cone<N>

Source§

impl<N: RealField + Copy> RayCast<N> for ConvexHull<N>

Source§

impl<N: RealField + Copy> RayCast<N> for Cuboid<N>

Source§

impl<N: RealField + Copy> RayCast<N> for Cylinder<N>

Source§

impl<N: RealField + Copy> RayCast<N> for HeightField<N>

Source§

impl<N: RealField + Copy> RayCast<N> for Plane<N>

Source§

impl<N: RealField + Copy> RayCast<N> for Polyline<N>

Source§

impl<N: RealField + Copy> RayCast<N> for Segment<N>

Source§

impl<N: RealField + Copy> RayCast<N> for TriMesh<N>

Source§

impl<N: RealField + Copy> RayCast<N> for Triangle<N>

Source§

impl<N: RealField + Copy> RayCast<N> for dyn Shape<N>