pub struct RigidBody<S: PhysicsSpace> {
pub position: S::Point,
pub velocity: S::Vector,
pub orientation: S::Iso,
pub angular_velocity: S::AngVel,
pub inertia: S::Inertia,
pub restitution: f32,
pub collision_group: u32,
pub collision_mask: u32,
/* private fields */
}Fields§
§position: S::Point§velocity: S::Vector§orientation: S::Iso§angular_velocity: S::AngVel§inertia: S::Inertia§restitution: f32§collision_group: u32§collision_mask: u32Implementations§
Source§impl<S: PhysicsSpace> RigidBody<S>
impl<S: PhysicsSpace> RigidBody<S>
pub fn mass(&self) -> f32
pub fn is_static(&self) -> bool
pub fn is_sleeping(&self) -> bool
pub fn sleep(&mut self)
pub fn wake(&mut self)
pub fn collider(&self) -> ColliderRef
pub fn apply_impulse(&mut self, impulse: S::Vector)
pub fn apply_impulse_at_point( &mut self, space: &S, impulse: S::Vector, point: S::Point, )
Trait Implementations§
Source§impl<S: PhysicsSpace> Clone for RigidBody<S>
impl<S: PhysicsSpace> Clone for RigidBody<S>
impl<S: PhysicsSpace> Copy for RigidBody<S>
Auto Trait Implementations§
impl<S> Freeze for RigidBody<S>where
<S as Space>::Point: Freeze,
<S as Space>::Vector: Freeze,
<S as IsometryGroup>::Iso: Freeze,
<S as PhysicsSpace>::AngVel: Freeze,
<S as PhysicsSpace>::Inertia: Freeze,
impl<S> RefUnwindSafe for RigidBody<S>where
<S as Space>::Point: RefUnwindSafe,
<S as Space>::Vector: RefUnwindSafe,
<S as IsometryGroup>::Iso: RefUnwindSafe,
<S as PhysicsSpace>::AngVel: RefUnwindSafe,
<S as PhysicsSpace>::Inertia: RefUnwindSafe,
impl<S> Send for RigidBody<S>
impl<S> Sync for RigidBody<S>
impl<S> Unpin for RigidBody<S>where
<S as Space>::Point: Unpin,
<S as Space>::Vector: Unpin,
<S as IsometryGroup>::Iso: Unpin,
<S as PhysicsSpace>::AngVel: Unpin,
<S as PhysicsSpace>::Inertia: Unpin,
impl<S> UnsafeUnpin for RigidBody<S>where
<S as Space>::Point: UnsafeUnpin,
<S as Space>::Vector: UnsafeUnpin,
<S as IsometryGroup>::Iso: UnsafeUnpin,
<S as PhysicsSpace>::AngVel: UnsafeUnpin,
<S as PhysicsSpace>::Inertia: UnsafeUnpin,
impl<S> UnwindSafe for RigidBody<S>where
<S as Space>::Point: UnwindSafe,
<S as Space>::Vector: UnwindSafe,
<S as IsometryGroup>::Iso: UnwindSafe,
<S as PhysicsSpace>::AngVel: UnwindSafe,
<S as PhysicsSpace>::Inertia: UnwindSafe,
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