pub fn nonlinear_cast_shape(
        &self,
        colliders: &ColliderSet,
        shape_motion: &dyn RigidMotion,
        shape: &dyn Shape,
        max_toi: Real,
        target_distance: Real,
        groups: InteractionGroups,
    ) -> Option<(ColliderHandle, TOI)> {
        let pipeline_shape = self.as_composite_shape(colliders, groups);
        let mut visitor = NonlinearTOICompositeShapeShapeBestFirstVisitor::new(
            &*self.query_dispatcher,
            shape_motion,
            &pipeline_shape,
            shape,
            max_toi,
            target_distance,
        );
        self.quadtree.traverse_best_first(&mut visitor).map(|h| h.1)
    }
/// Casts a shape with an arbitrary continuous motion and retrieve the first collider it hits.
///
/// # Parameters
/// * `colliders` - The set of colliders taking part in this pipeline.
/// * `shape_motion` - The motion of the shape.
/// * `shape` - The shape to cast.
/// * `max_toi` - The maximum time-of-impact that can be reported by this cast. This effectively
///   limits the distance traveled by the shape to `shapeVel.norm() * maxToi`.
/// * `groups` - The bit groups and filter associated to the shape to cast, in order to only
///   test on colliders with collision groups compatible with this group.
Casts a shape with an arbitrary continuous motion and retrieve the first collider it hits.
Casts a shape with an arbitrary continuous motion and retrieve the first collider it hits .
pub fn nonlinear_cast_shape(
        &self,
        colliders: &ColliderSet,
        shape_motion: &dyn RigidMotion,
        shape: &dyn Shape,
        max_toi: Real,
        target_distance: Real,
        groups: InteractionGroups,
    ) -> Option<(ColliderHandle, TOI)> {
        let pipeline_shape = self.as_composite_shape(colliders, groups);
        let mut visitor = NonlinearTOICompositeShapeShapeBestFirstVisitor::new(
            &*self.query_dispatcher,
            shape_motion,
            &pipeline_shape,
            shape,
            max_toi,
            target_distance,
        );
        self.quadtree.traverse_best_first(&mut visitor).map(|h| h.1)
    }
pub fn nonlinear_cast_shape ( & self , colliders : & ColliderSet , shape_motion : & dyn RigidMotion , shape : & dyn Shape , max_toi : Real , target_distance : Real , groups : InteractionGroups , ) -> Option < ( ColliderHandle , TOI ) > { let pipeline_shape = self . as_composite_shape ( colliders , groups ) ; let mut visitor = NonlinearTOICompositeShapeShapeBestFirstVisitor :: new ( & * self . query_dispatcher , shape_motion , & pipeline_shape , shape , max_toi , target_distance , ) ; self . quadtree . traverse_best_first ( & mut visitor ) . map ( | h | h . 1 ) }
Casts a shape with an arbitrary continuous motion and retrieve the first collider it hits.
Casts a shape with an arbitrary continuous motion and retrieve the first collider it hits .
&self
colliders
&ColliderSet
shape_motion
&dyn RigidMotion
shape
&dyn Shape
max_toi
Real
target_distance
Real
groups
InteractionGroups