pub fn update(&mut self, bodies: &RigidBodySet, colliders: &ColliderSet) {
        if !self.tree_built {
            let data = colliders.iter().map(|(h, c)| (h, c.compute_aabb()));
            self.quadtree.clear_and_rebuild(data, self.dilation_factor);
            // FIXME: uncomment this once we handle insertion/removals properly.
            // self.tree_built = true;
            return;
        }

        for (_, body) in bodies
            .iter_active_dynamic()
            .chain(bodies.iter_active_kinematic())
        {
            for handle in &body.colliders {
                self.quadtree.pre_update(*handle)
            }
        }

        self.quadtree.update(
            |handle| colliders[*handle].compute_aabb(),
            self.dilation_factor,
        );
    }
/// Update the acceleration structure on the query pipeline.
Update the acceleration structure on the query pipeline.
Update the acceleration structure on the query pipeline .
pub fn update(&mut self, bodies: &RigidBodySet, colliders: &ColliderSet) {
        if !self.tree_built {
            let data = colliders.iter().map(|(h, c)| (h, c.compute_aabb()));
            self.quadtree.clear_and_rebuild(data, self.dilation_factor);
            // FIXME: uncomment this once we handle insertion/removals properly.
            // self.tree_built = true;
            return;
        }
        for (_, body) in bodies
            .iter_active_dynamic()
            .chain(bodies.iter_active_kinematic())
        {
            for handle in &body.colliders {
                self.quadtree.pre_update(*handle)
            }
        }
        self.quadtree.update(
            |handle| colliders[*handle].compute_aabb(),
            self.dilation_factor,
        );
    }
pub fn update ( & mut self , bodies : & RigidBodySet , colliders : & ColliderSet ) { if ! self . tree_built { let data = colliders . iter ( ) . map ( | ( h , c ) | ( h , c . compute_aabb ( ) ) ) ; self . quadtree . clear_and_rebuild ( data , self . dilation_factor ) ; // FIXME: uncomment this once we handle insertion/removals properly. // self.tree_built = true; return ; } for ( _ , body ) in bodies . iter_active_dynamic ( ) . chain ( bodies . iter_active_kinematic ( ) ) { for handle in & body . colliders { self . quadtree . pre_update ( * handle ) } } self . quadtree . update ( | handle | colliders [ * handle ] . compute_aabb ( ) , self . dilation_factor , ) ; }
Update the acceleration structure on the query pipeline.
Update the acceleration structure on the query pipeline .
&mut self
bodies
&RigidBodySet
colliders
&ColliderSet