pub fn cast_ray_and_get_normal(
        &self,
        colliders: &ColliderSet,
        ray: &Ray,
        max_toi: Real,
        solid: bool,
        groups: InteractionGroups,
    ) -> Option<(ColliderHandle, RayIntersection)> {
        let pipeline_shape = self.as_composite_shape(colliders, groups);
        let mut visitor = RayCompositeShapeToiAndNormalBestFirstVisitor::new(
            &pipeline_shape,
            ray,
            max_toi,
            solid,
        );

        self.quadtree.traverse_best_first(&mut visitor).map(|h| h.1)
    }
/// Find the closest intersection between a ray and a set of collider.
///
/// # Parameters
/// - `position`: the position of this shape.
/// - `ray`: the ray to cast.
/// - `max_toi`: the maximum time-of-impact that can be reported by this cast. This effectively
///   limits the length of the ray to `ray.dir.norm() * max_toi`. Use `Real::MAX` for an unbounded ray.
Find the closest intersection between a ray and a set of collider.
Find the closest intersection between a ray and a set of collider .
pub fn cast_ray_and_get_normal(
        &self,
        colliders: &ColliderSet,
        ray: &Ray,
        max_toi: Real,
        solid: bool,
        groups: InteractionGroups,
    ) -> Option<(ColliderHandle, RayIntersection)> {
        let pipeline_shape = self.as_composite_shape(colliders, groups);
        let mut visitor = RayCompositeShapeToiAndNormalBestFirstVisitor::new(
            &pipeline_shape,
            ray,
            max_toi,
            solid,
        );
        self.quadtree.traverse_best_first(&mut visitor).map(|h| h.1)
    }
pub fn cast_ray_and_get_normal ( & self , colliders : & ColliderSet , ray : & Ray , max_toi : Real , solid : bool , groups : InteractionGroups , ) -> Option < ( ColliderHandle , RayIntersection ) > { let pipeline_shape = self . as_composite_shape ( colliders , groups ) ; let mut visitor = RayCompositeShapeToiAndNormalBestFirstVisitor :: new ( & pipeline_shape , ray , max_toi , solid , ) ; self . quadtree . traverse_best_first ( & mut visitor ) . map ( | h | h . 1 ) }
Find the closest intersection between a ray and a set of collider.
Find the closest intersection between a ray and a set of collider .
&self
colliders
&ColliderSet
ray
&Ray
the ray to cast.
the ray to cast .
max_toi
Real
the maximum time-of-impact that can be reported by this cast. This effectively
limits the length of the ray to `ray.dir.norm() * max_toi`. Use `Real::MAX` for an unbounded ray.
the maximum time - of - impact that can be reported by this cast . This effectively limits the length of the ray to ` ray . dir . norm () * max_toi ` . Use ` Real :: MAX ` for an unbounded ray .
solid
bool
groups
InteractionGroups
position
the position of this shape.
the position of this shape .