@@ -5,7 +5,8 @@ use crate::geometry::{Collider, ColliderChanges, ColliderHandle, ColliderParent}
55use crate :: math:: Isometry ;
66use std:: ops:: { Index , IndexMut } ;
77
8- pub ( crate ) type ModifiedColliders = ModifiedObjects < ColliderHandle , Collider > ;
8+ /// A set of modified colliders
9+ pub type ModifiedColliders = ModifiedObjects < ColliderHandle , Collider > ;
910
1011impl HasModifiedFlag for Collider {
1112 #[ inline]
@@ -71,15 +72,32 @@ impl ColliderSet {
7172 }
7273 }
7374
74- pub ( crate ) fn take_modified ( & mut self ) -> ModifiedColliders {
75+ /// Fetch the set of colliders modified since the last call to
76+ /// `take_modified`
77+ ///
78+ /// Provides a value that can be passed to the `modified_colliders` argument
79+ /// of [`BroadPhaseBvh::update`](crate::geometry::BroadPhaseBvh::update).
80+ ///
81+ /// Should not be used if this [`ColliderSet`] will be used with a
82+ /// [`PhysicsPipeline`](crate::pipeline::PhysicsPipeline), which handles
83+ /// broadphase updates automatically.
84+ pub fn take_modified ( & mut self ) -> ModifiedColliders {
7585 std:: mem:: take ( & mut self . modified_colliders )
7686 }
7787
7888 pub ( crate ) fn set_modified ( & mut self , modified : ModifiedColliders ) {
7989 self . modified_colliders = modified;
8090 }
8191
82- pub ( crate ) fn take_removed ( & mut self ) -> Vec < ColliderHandle > {
92+ /// Fetch the set of colliders removed since the last call to `take_removed`
93+ ///
94+ /// Provides a value that can be passed to the `removed_colliders` argument
95+ /// of [`BroadPhaseBvh::update`](crate::geometry::BroadPhaseBvh::update).
96+ ///
97+ /// Should not be used if this [`ColliderSet`] will be used with a
98+ /// [`PhysicsPipeline`](crate::pipeline::PhysicsPipeline), which handles
99+ /// broadphase updates automatically.
100+ pub fn take_removed ( & mut self ) -> Vec < ColliderHandle > {
83101 std:: mem:: take ( & mut self . removed_colliders )
84102 }
85103
0 commit comments