[−][src]Struct physics2d::World
Fields
velocity_iterations: u8
position_iterations: u8
Methods
impl World
[src]
pub fn new(velocity_iterations: u8, position_iterations: u8) -> World
[src]
pub fn add_body(&mut self, body: Body) -> BodyId
[src]
pub fn add_joint(&mut self, bodies: (BodyId, BodyId), joint: Joint)
[src]
pub fn get_joints(&self, bodies: (BodyId, BodyId)) -> Option<&Vec<Joint>>
[src]
pub fn get_joints_mut(
&mut self,
bodies: (BodyId, BodyId)
) -> Option<&mut Vec<Joint>>
[src]
&mut self,
bodies: (BodyId, BodyId)
) -> Option<&mut Vec<Joint>>
pub fn get_body(&self, body_id: BodyId) -> &Body
[src]
pub fn get_body_mut(&mut self, body_id: BodyId) -> &mut Body
[src]
pub fn bodies_iter(&self) -> impl Iterator<Item = &Body>
[src]
pub fn body_count(&self) -> usize
[src]
pub fn update(&mut self, dt: f32)
[src]
Trait Implementations
Auto Trait Implementations
impl Sync for World
impl Send for World
impl Unpin for World
impl RefUnwindSafe for World
impl UnwindSafe for World
Blanket Implementations
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,