pub struct BodyAccess<'a, U: UserDataTypes>(/* private fields */);
Methods from Deref<Target = Body>§
pub fn handle(&self) -> BodyHandle
pub fn transform<'a>(&'a self) -> &'a Transform
pub fn position<'a>(&'a self) -> &'a Vec2
pub fn angle(&self) -> f32
pub fn world_center<'a>(&'a self) -> &'a Vec2
pub fn local_center<'a>(&'a self) -> &'a Vec2
pub fn linear_velocity<'a>(&'a self) -> &'a Vec2
pub fn angular_velocity(&self) -> f32
pub fn mass(&self) -> f32
pub fn inertia(&self) -> f32
pub fn mass_data(&self) -> MassData
pub fn world_point(&self, local: &Vec2) -> Vec2
pub fn world_vector(&self, local: &Vec2) -> Vec2
pub fn local_point(&self, world: &Vec2) -> Vec2
pub fn local_vector(&self, world: &Vec2) -> Vec2
pub fn linear_velocity_from_world_point(&self, world: &Vec2) -> Vec2
pub fn linear_velocity_from_local_point(&self, local: &Vec2) -> Vec2
pub fn linear_damping(&self) -> f32
pub fn angular_damping(&self) -> f32
pub fn gravity_scale(&self) -> f32
pub fn body_type(&self) -> BodyType
pub fn is_bullet(&self) -> bool
pub fn is_sleeping_allowed(&self) -> bool
pub fn is_awake(&self) -> bool
pub fn is_active(&self) -> bool
pub fn is_rotation_fixed(&self) -> bool
pub fn joints(&self) -> JointIter<'_> ⓘ
pub fn set_transform(&mut self, pos: &Vec2, angle: f32)
pub fn set_linear_velocity(&mut self, v: &Vec2)
pub fn set_angular_velocity(&mut self, v: f32)
pub fn apply_force(&mut self, force: &Vec2, point: &Vec2, wake: bool)
pub fn apply_force_to_center(&mut self, force: &Vec2, wake: bool)
pub fn apply_torque(&mut self, torque: f32, wake: bool)
pub fn apply_linear_impulse(&mut self, impulse: &Vec2, point: &Vec2, wake: bool)
pub fn apply_angular_impulse(&mut self, impulse: f32, wake: bool)
pub fn set_mass_data(&mut self, data: &MassData)
pub fn reset_mass_data(&mut self)
pub fn set_linear_damping(&mut self, damping: f32)
pub fn set_angular_damping(&mut self, damping: f32)
pub fn set_gravity_scale(&mut self, scale: f32)
pub fn set_body_type(&mut self, typ: BodyType)
pub fn set_bullet(&mut self, flag: bool)
pub fn set_sleeping_allowed(&mut self, flag: bool)
pub fn set_awake(&mut self, flag: bool)
pub fn set_active(&mut self, flag: bool)
pub fn set_rotation_fixed(&mut self, flag: bool)
pub fn dump(&mut self)
Trait Implementations§
source§impl<'a, U: UserDataTypes> Deref for BodyAccess<'a, U>
impl<'a, U: UserDataTypes> Deref for BodyAccess<'a, U>
source§impl<'a, U: UserDataTypes> DerefMut for BodyAccess<'a, U>
impl<'a, U: UserDataTypes> DerefMut for BodyAccess<'a, U>
source§impl<'a, U: UserDataTypes> UserData<<U as UserDataTypes>::BodyData> for BodyAccess<'a, U>
impl<'a, U: UserDataTypes> UserData<<U as UserDataTypes>::BodyData> for BodyAccess<'a, U>
Auto Trait Implementations§
impl<'a, U> RefUnwindSafe for BodyAccess<'a, U>where
U: RefUnwindSafe,
impl<'a, U> !Send for BodyAccess<'a, U>
impl<'a, U> !Sync for BodyAccess<'a, U>
impl<'a, U> Unpin for BodyAccess<'a, U>where
U: Unpin,
impl<'a, U> !UnwindSafe for BodyAccess<'a, 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