diff options
| author | Sébastien Crozet <developer@crozet.re> | 2023-01-15 12:23:16 +0100 |
|---|---|---|
| committer | Sébastien Crozet <developer@crozet.re> | 2023-01-15 12:24:14 +0100 |
| commit | 89fc31f996b43a274337b1632673e6142e1fe621 (patch) | |
| tree | 1df3ce7c1582975daa55860ea8f6046879d45dfe | |
| parent | d2ebb25c227e239aa283b989cf560bf3739a1c39 (diff) | |
| download | rapier-89fc31f996b43a274337b1632673e6142e1fe621.tar.gz rapier-89fc31f996b43a274337b1632673e6142e1fe621.tar.bz2 rapier-89fc31f996b43a274337b1632673e6142e1fe621.zip | |
Give access to the world-space mass properties of rigid-bodies
| -rw-r--r-- | src/dynamics/rigid_body.rs | 4 | ||||
| -rw-r--r-- | src/dynamics/rigid_body_components.rs | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/dynamics/rigid_body.rs b/src/dynamics/rigid_body.rs index b850f66..cd1a0dc 100644 --- a/src/dynamics/rigid_body.rs +++ b/src/dynamics/rigid_body.rs @@ -158,8 +158,8 @@ impl RigidBody { /// The mass-properties of this rigid-body. #[inline] - pub fn mass_properties(&self) -> &MassProperties { - &self.mprops.local_mprops + pub fn mass_properties(&self) -> &RigidBodyMassProps { + &self.mprops } /// The dominance group of this rigid-body. diff --git a/src/dynamics/rigid_body_components.rs b/src/dynamics/rigid_body_components.rs index eb94c6b..89f6020 100644 --- a/src/dynamics/rigid_body_components.rs +++ b/src/dynamics/rigid_body_components.rs @@ -245,7 +245,7 @@ impl Default for RigidBodyAdditionalMassProps { #[cfg_attr(feature = "serde-serialize", derive(Serialize, Deserialize))] #[derive(Clone, Debug, PartialEq)] -/// The mass properties of this rigid-bodies. +/// The mass properties of a rigid-body. pub struct RigidBodyMassProps { /// Flags for locking rotation and translation. pub flags: LockedAxes, |
