pub struct World {
pub velocity_iterations: u8,
pub position_iterations: u8,
/* private fields */
}
Fields§
§velocity_iterations: u8
§position_iterations: u8
Implementations§
Source§impl World
impl World
pub fn new(velocity_iterations: u8, position_iterations: u8) -> World
pub fn add_body(&mut self, body: Body) -> BodyId
pub fn add_joint(&mut self, bodies: (BodyId, BodyId), joint: Joint)
pub fn get_joints(&self, bodies: (BodyId, BodyId)) -> Option<&Vec<Joint>>
pub fn get_joints_mut( &mut self, bodies: (BodyId, BodyId), ) -> Option<&mut Vec<Joint>>
pub fn get_body(&self, body_id: BodyId) -> &Body
pub fn get_body_mut(&mut self, body_id: BodyId) -> &mut Body
pub fn bodies_iter(&self) -> impl Iterator<Item = &Body>
pub fn body_count(&self) -> usize
pub fn update(&mut self, dt: f32)
Trait Implementations§
Auto Trait Implementations§
impl Freeze for World
impl RefUnwindSafe for World
impl Send for World
impl Sync for World
impl Unpin for World
impl UnwindSafe for World
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