pub fn intersections_with_shape<'a>(
        &self,
        colliders: &'a ColliderSet,
        shape_pos: &Isometry<Real>,
        shape: &dyn Shape,
        groups: InteractionGroups,
        mut callback: impl FnMut(ColliderHandle, &'a Collider) -> bool,
    ) {
        let dispatcher = &*self.query_dispatcher;
        let inv_shape_pos = shape_pos.inverse();

        let mut leaf_callback = &mut |handle: &ColliderHandle| {
            if let Some(coll) = colliders.get(*handle) {
                if coll.collision_groups.test(groups) {
                    let pos12 = inv_shape_pos * coll.position();

                    if dispatcher.intersection_test(&pos12, shape, coll.shape()) == Ok(true) {
                        return callback(*handle, coll);
                    }
                }
            }

            true
        };

        let shape_aabb = shape.compute_aabb(shape_pos);
        let mut visitor = BoundingVolumeIntersectionsVisitor::new(&shape_aabb, &mut leaf_callback);

        self.quadtree.traverse_depth_first(&mut visitor);
    }
/// Retrieve all the colliders intersecting the given shape.
///
/// # Parameters
/// * `colliders` - The set of colliders taking part in this pipeline.
/// * `shapePos` - The position of the shape to test.
/// * `shapeRot` - The orientation of the shape to test.
/// * `shape` - The shape to test.
/// * `groups` - The bit groups and filter associated to the shape to test, in order to only
///   test on colliders with collision groups compatible with this group.
/// * `callback` - A function called with the handles of each collider intersecting the `shape`.
Retrieve all the colliders intersecting the given shape.
Retrieve all the colliders intersecting the given shape .
pub fn intersections_with_shape<'a>(
        &self,
        colliders: &'a ColliderSet,
        shape_pos: &Isometry<Real>,
        shape: &dyn Shape,
        groups: InteractionGroups,
        mut callback: impl FnMut(ColliderHandle, &'a Collider) -> bool,
    ) {
        let dispatcher = &*self.query_dispatcher;
        let inv_shape_pos = shape_pos.inverse();
        let mut leaf_callback = &mut |handle: &ColliderHandle| {
            if let Some(coll) = colliders.get(*handle) {
                if coll.collision_groups.test(groups) {
                    let pos12 = inv_shape_pos * coll.position();
                    if dispatcher.intersection_test(&pos12, shape, coll.shape()) == Ok(true) {
                        return callback(*handle, coll);
                    }
                }
            }
            true
        };
        let shape_aabb = shape.compute_aabb(shape_pos);
        let mut visitor = BoundingVolumeIntersectionsVisitor::new(&shape_aabb, &mut leaf_callback);
        self.quadtree.traverse_depth_first(&mut visitor);
    }
pub fn intersections_with_shape < ' a > ( & self , colliders : & ' a ColliderSet , shape_pos : & Isometry < Real > , shape : & dyn Shape , groups : InteractionGroups , mut callback : impl FnMut ( ColliderHandle , & ' a Collider ) -> bool , ) { let dispatcher = & * self . query_dispatcher ; let inv_shape_pos = shape_pos . inverse ( ) ; let mut leaf_callback = & mut | handle : & ColliderHandle | { if let Some ( coll ) = colliders . get ( * handle ) { if coll . collision_groups . test ( groups ) { let pos12 = inv_shape_pos * coll . position ( ) ; if dispatcher . intersection_test ( & pos12 , shape , coll . shape ( ) ) == Ok ( true ) { return callback ( * handle , coll ) ; } } } true } ; let shape_aabb = shape . compute_aabb ( shape_pos ) ; let mut visitor = BoundingVolumeIntersectionsVisitor :: new ( & shape_aabb , & mut leaf_callback ) ; self . quadtree . traverse_depth_first ( & mut visitor ) ; }
Retrieve all the colliders intersecting the given shape.
Retrieve all the colliders intersecting the given shape .
&self
colliders
&'a ColliderSet
shape_pos
&Isometry<Real>
shape
&dyn Shape
groups
InteractionGroups
callback
impl FnMut(ColliderHandle, &'a Collider) -> bool