pub struct BodySet { /* private fields */ }
Expand description
Container for bodies, removal is currently performed through PhysicsWorld
, but access and modification is possible through this structure
Implementations§
Source§impl BodySet
impl BodySet
pub fn new() -> Self
Sourcepub fn insert(&mut self, body: Body) -> BodyHandle
pub fn insert(&mut self, body: Body) -> BodyHandle
Inserts a new body into the world and returns it’s unique handle.
pub fn get(&self, handle: BodyHandle) -> Option<&Body>
pub fn get_mut(&mut self, handle: BodyHandle) -> Option<&mut Body>
pub fn iter(&self) -> impl Iterator<Item = (BodyHandle, &Body)>
pub fn iter_mut(&mut self) -> impl Iterator<Item = (BodyHandle, &mut Body)>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for BodySet
impl RefUnwindSafe for BodySet
impl Send for BodySet
impl Sync for BodySet
impl Unpin for BodySet
impl UnwindSafe for BodySet
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more