pub fn cast_shape<'a>(
        &self,
        colliders: &'a ColliderSet,
        shape_pos: &Isometry<Real>,
        shape_vel: &Vector<Real>,
        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 = TOICompositeShapeShapeBestFirstVisitor::new(
            &*self.query_dispatcher,
            shape_pos,
            shape_vel,
            &pipeline_shape,
            shape,
            max_toi,
            target_distance,
        );
        self.quadtree.traverse_best_first(&mut visitor).map(|h| h.1)
    }
/// Casts a shape at a constant linear velocity and retrieve the first collider it hits.
///
/// This is similar to ray-casting except that we are casting a whole shape instead of
/// just a point (the ray origin).
///
/// # Parameters
/// * `colliders` - The set of colliders taking part in this pipeline.
/// * `shape_pos` - The initial position of the shape to cast.
/// * `shape_vel` - The constant velocity of the shape to cast (i.e. the cast direction).
/// * `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 at a constant linear velocity and retrieve the first collider it hits.
This is similar to ray-casting except that we are casting a whole shape instead of
just a point (the ray origin).
Casts a shape at a constant linear velocity and retrieve the first collider it hits . This is similar to ray - casting except that we are casting a whole shape instead of just a point ( the ray origin ) .
pub fn cast_shape<'a>(
        &self,
        colliders: &'a ColliderSet,
        shape_pos: &Isometry<Real>,
        shape_vel: &Vector<Real>,
        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 = TOICompositeShapeShapeBestFirstVisitor::new(
            &*self.query_dispatcher,
            shape_pos,
            shape_vel,
            &pipeline_shape,
            shape,
            max_toi,
            target_distance,
        );
        self.quadtree.traverse_best_first(&mut visitor).map(|h| h.1)
    }
pub fn cast_shape < ' a > ( & self , colliders : & ' a ColliderSet , shape_pos : & Isometry < Real > , shape_vel : & Vector < Real > , 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 = TOICompositeShapeShapeBestFirstVisitor :: new ( & * self . query_dispatcher , shape_pos , shape_vel , & pipeline_shape , shape , max_toi , target_distance , ) ; self . quadtree . traverse_best_first ( & mut visitor ) . map ( | h | h . 1 ) }
Casts a shape at a constant linear velocity and retrieve the first collider it hits.
Casts a shape at a constant linear velocity and retrieve the first collider it hits .
&self
colliders
&'a ColliderSet
shape_pos
&Isometry<Real>
shape_vel
&Vector<Real>
shape
&dyn Shape
max_toi
Real
target_distance
Real
groups
InteractionGroups