pub fn intersections_with_point<'a>(
        &self,
        colliders: &'a ColliderSet,
        point: &Point<Real>,
        groups: InteractionGroups,
        mut callback: impl FnMut(ColliderHandle, &'a Collider) -> bool,
    ) {
        let mut leaf_callback = &mut |handle: &ColliderHandle| {
            if let Some(coll) = colliders.get(*handle) {
                if coll.collision_groups.test(groups)
                    && coll.shape().contains_point(coll.position(), point)
                {
                    return callback(*handle, coll);
                }
            }

            true
        };

        let mut visitor = PointIntersectionsVisitor::new(point, &mut leaf_callback);

        self.quadtree.traverse_depth_first(&mut visitor);
    }
/// Find all the colliders containing the given point.
///
/// # Parameters
/// * `colliders` - The set of colliders taking part in this pipeline.
/// * `point` - The point used for the containment test.
/// * `groups` - The bit groups and filter associated to the point to test, in order to only
///   test on colliders with collision groups compatible with the ray's group.
/// * `callback` - A function called with each collider with a shape
///   containing the `point`.
Find all the colliders containing the given point.
Find all the colliders containing the given point .
pub fn intersections_with_point<'a>(
        &self,
        colliders: &'a ColliderSet,
        point: &Point<Real>,
        groups: InteractionGroups,
        mut callback: impl FnMut(ColliderHandle, &'a Collider) -> bool,
    ) {
        let mut leaf_callback = &mut |handle: &ColliderHandle| {
            if let Some(coll) = colliders.get(*handle) {
                if coll.collision_groups.test(groups)
                    && coll.shape().contains_point(coll.position(), point)
                {
                    return callback(*handle, coll);
                }
            }
            true
        };
        let mut visitor = PointIntersectionsVisitor::new(point, &mut leaf_callback);
        self.quadtree.traverse_depth_first(&mut visitor);
    }
pub fn intersections_with_point < ' a > ( & self , colliders : & ' a ColliderSet , point : & Point < Real > , groups : InteractionGroups , mut callback : impl FnMut ( ColliderHandle , & ' a Collider ) -> bool , ) { let mut leaf_callback = & mut | handle : & ColliderHandle | { if let Some ( coll ) = colliders . get ( * handle ) { if coll . collision_groups . test ( groups ) && coll . shape ( ) . contains_point ( coll . position ( ) , point ) { return callback ( * handle , coll ) ; } } true } ; let mut visitor = PointIntersectionsVisitor :: new ( point , & mut leaf_callback ) ; self . quadtree . traverse_depth_first ( & mut visitor ) ; }
Find all the colliders containing the given point.
Find all the colliders containing the given point .
&self
colliders
&'a ColliderSet
point
&Point<Real>
groups
InteractionGroups
callback
impl FnMut(ColliderHandle, &'a Collider) -> bool