aboutsummaryrefslogtreecommitdiff
path: root/src/dynamics
diff options
context:
space:
mode:
Diffstat (limited to 'src/dynamics')
-rw-r--r--src/dynamics/rigid_body.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/dynamics/rigid_body.rs b/src/dynamics/rigid_body.rs
index a6384b7..26be983 100644
--- a/src/dynamics/rigid_body.rs
+++ b/src/dynamics/rigid_body.rs
@@ -146,6 +146,12 @@ impl RigidBody {
}
}
+ /// The world-space center-of-mass of this rigid-body.
+ #[inline]
+ pub fn center_of_mass(&self) -> &Point<Real> {
+ &self.mprops.world_com
+ }
+
/// The mass-properties of this rigid-body.
#[inline]
pub fn mass_properties(&self) -> &MassProperties {