pub struct RigidBody { /* private fields */ }Expand description
Rigid body state. Waking requests activation of its contact island on the next step.
Implementations§
Source§impl RigidBody
impl RigidBody
pub fn translation(&self) -> Vec3
pub fn rotation(&self) -> &Quat
pub fn linvel(&self) -> Vec3
pub fn angvel(&self) -> Vec3
pub fn mass(&self) -> f32
pub fn colliders(&self) -> &[ColliderHandle]
pub fn is_ccd_enabled(&self) -> bool
pub fn enable_ccd(&mut self, enabled: bool)
pub fn is_sleeping(&self) -> bool
pub fn wake_up(&mut self, _strong: bool)
pub fn set_translation(&mut self, p: Vec3, wake: bool)
pub fn set_rotation(&mut self, q: Quat, wake: bool)
pub fn set_linvel(&mut self, v: Vec3, wake: bool)
pub fn set_angvel(&mut self, v: Vec3, wake: bool)
pub fn set_gravity_scale(&mut self, scale: f32, wake: bool)
pub fn apply_impulse(&mut self, impulse: Vec3, wake: bool)
pub fn apply_impulse_at_point(&mut self, impulse: Vec3, point: Vec3, wake: bool)
pub fn apply_torque_impulse(&mut self, impulse: Vec3, wake: bool)
pub fn add_force(&mut self, force: Vec3, wake: bool)
pub fn add_torque(&mut self, torque: Vec3, wake: bool)
pub fn set_next_kinematic_translation(&mut self, p: Vec3)
pub fn set_next_kinematic_rotation(&mut self, q: Quat)
Trait Implementations§
Source§impl From<RigidBodyBuilder> for RigidBody
impl From<RigidBodyBuilder> for RigidBody
Source§fn from(b: RigidBodyBuilder) -> RigidBody
fn from(b: RigidBodyBuilder) -> RigidBody
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for RigidBody
impl RefUnwindSafe for RigidBody
impl Send for RigidBody
impl Sync for RigidBody
impl Unpin for RigidBody
impl UnwindSafe for RigidBody
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