pub struct CompoundBody {
pub body: RigidBody,
pub collider: ColliderComponent,
pub centre_of_mass: DVec3,
}Expand description
A dynamic body built from a CompoundShape by
CompoundShape::dynamic_body: what crate::PhysicsSystem::set_body and
crate::PhysicsSystem::set_collider take, and where the body’s origin
sits in the shape’s frame.
Fields§
§body: RigidBodyThe body: the parts’ mass, and their inertia about their centre of mass.
collider: ColliderComponentThe collider, offset so the centre of mass is the body’s origin.
centre_of_mass: DVec3The centre of mass, in the shape’s frame. A game whose own origin is
the shape’s places the body at origin + rotation * centre_of_mass,
and reads its origin back as position - rotation * centre_of_mass.
Trait Implementations§
Source§impl Clone for CompoundBody
impl Clone for CompoundBody
Source§impl Debug for CompoundBody
impl Debug for CompoundBody
Source§impl PartialEq for CompoundBody
impl PartialEq for CompoundBody
impl StructuralPartialEq for CompoundBody
Auto Trait Implementations§
impl Forget for CompoundBody
impl Freeze for CompoundBody
impl Move for CompoundBody
impl RefUnwindSafe for CompoundBody
impl Send for CompoundBody
impl Sync for CompoundBody
impl Unpin for CompoundBody
impl UnsafeUnpin for CompoundBody
impl UnwindSafe for CompoundBody
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