pub struct World<U: UserDataTypes> { /* private fields */ }
Implementations§
source§impl<U: UserDataTypes> World<U>
impl<U: UserDataTypes> World<U>
pub fn new(gravity: &Vec2) -> Self
pub fn set_contact_filter<F: ContactFilter<U>>(&mut self, filter: Box<F>)
pub fn set_contact_listener<L: ContactListener<U>>(&mut self, listener: Box<L>)
pub fn create_body(&mut self, def: &BodyDef) -> BodyHandle
pub fn create_body_with( &mut self, def: &BodyDef, data: U::BodyData ) -> BodyHandle
pub fn body(&self, handle: BodyHandle) -> Ref<'_, MetaBody<U>>
pub fn body_mut(&self, handle: BodyHandle) -> RefMut<'_, MetaBody<U>>
pub fn try_body(&self, handle: BodyHandle) -> Option<Ref<'_, MetaBody<U>>>
pub fn try_body_mut( &self, handle: BodyHandle ) -> Option<RefMut<'_, MetaBody<U>>>
pub fn destroy_body(&mut self, handle: BodyHandle)
pub fn bodies(&self) -> HandleIter<'_, Body, MetaBody<U>>
pub fn create_joint<JD: JointDef>(&mut self, def: &JD) -> JointHandle
pub fn create_joint_with<JD: JointDef>( &mut self, def: &JD, data: U::JointData ) -> JointHandle
pub fn try_create_joint<JD: JointDef>( &mut self, def: &JD ) -> Option<JointHandle>
pub fn try_create_joint_with<JD: JointDef>( &mut self, def: &JD, data: U::JointData ) -> Option<JointHandle>
pub fn joint(&self, handle: JointHandle) -> Ref<'_, MetaJoint<U>>
pub fn joint_mut(&self, handle: JointHandle) -> RefMut<'_, MetaJoint<U>>
pub fn try_joint(&self, handle: JointHandle) -> Option<Ref<'_, MetaJoint<U>>>
pub fn try_joint_mut( &self, handle: JointHandle ) -> Option<RefMut<'_, MetaJoint<U>>>
pub fn destroy_joint(&mut self, handle: JointHandle)
pub fn joints(&self) -> HandleIter<'_, dyn Joint, MetaJoint<U>>
pub fn step( &mut self, time_step: f32, velocity_iterations: i32, position_iterations: i32 )
pub fn clear_forces(&mut self)
pub fn draw_debug_data<D: Draw>(&mut self, draw: &mut D, flags: DrawFlags)
pub fn query_aabb<C: QueryCallback>(&self, callback: &mut C, aabb: &AABB)
pub fn ray_cast<C: RayCastCallback>( &self, callback: &mut C, p1: &Vec2, p2: &Vec2 )
pub fn contacts_mut(&mut self) -> ContactIterMut<'_> ⓘ
pub fn contacts(&self) -> ContactIter<'_> ⓘ
pub fn set_sleeping_allowed(&mut self, flag: bool)
pub fn is_sleeping_allowed(&self) -> bool
pub fn set_warm_starting(&mut self, flag: bool)
pub fn is_warm_starting(&self) -> bool
pub fn set_continuous_physics(&mut self, flag: bool)
pub fn is_continuous_physics(&self) -> bool
pub fn set_sub_stepping(&mut self, flag: bool)
pub fn is_sub_stepping(&self) -> bool
pub fn proxy_count(&self) -> i32
pub fn body_count(&self) -> i32
pub fn joint_count(&self) -> i32
pub fn contact_count(&self) -> i32
pub fn tree_height(&self) -> i32
pub fn tree_balance(&self) -> i32
pub fn tree_quality(&self) -> f32
pub fn set_gravity(&mut self, gravity: &Vec2)
pub fn gravity(&self) -> Vec2
pub fn is_locked(&self) -> bool
pub fn set_auto_clearing_forces(&mut self, flag: bool)
pub fn is_auto_clearing_forces(&self) -> bool
pub fn shift_origin(&mut self, origin: &Vec2)
pub fn profile<'a>(&'a self) -> &'a Profile
pub fn dump(&mut self)
Trait Implementations§
Auto Trait Implementations§
impl<U> !RefUnwindSafe for World<U>
impl<U> !Send for World<U>
impl<U> !Sync for World<U>
impl<U> !Unpin for World<U>
impl<U> !UnwindSafe for World<U>
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