[][src]Struct physics2d::World

pub struct World {
    pub velocity_iterations: u8,
    pub position_iterations: u8,
    // some fields omitted
}

Fields

velocity_iterations: u8position_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]

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

impl DebugCollision for World[src]

impl Default for World[src]

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]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]