aboutsummaryrefslogtreecommitdiff
path: root/src/dynamics/rigid_body.rs
diff options
context:
space:
mode:
authorSébastien Crozet <developer@crozet.re>2023-01-15 13:01:27 +0100
committerGitHub <noreply@github.com>2023-01-15 13:01:27 +0100
commitff4c885195eb6adef2a318134aedcb985b6e88b4 (patch)
treef797275613e2fac3e423f647363bcf74c5a0ccd3 /src/dynamics/rigid_body.rs
parent56aa0f5e732a2f810b5c1d5834905791f542cf48 (diff)
parent3f5c0335e45a75ba435ef7dee3d203b11ec072d0 (diff)
downloadrapier-ff4c885195eb6adef2a318134aedcb985b6e88b4.tar.gz
rapier-ff4c885195eb6adef2a318134aedcb985b6e88b4.tar.bz2
rapier-ff4c885195eb6adef2a318134aedcb985b6e88b4.zip
Merge pull request #436 from dimforge/release-v0.17
Release v0.17.0
Diffstat (limited to 'src/dynamics/rigid_body.rs')
-rw-r--r--src/dynamics/rigid_body.rs10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/dynamics/rigid_body.rs b/src/dynamics/rigid_body.rs
index 78132b2..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.
@@ -184,6 +184,12 @@ impl RigidBody {
}
}
+ /// The axes along which this rigid-body cannot translate or rotate.
+ #[inline]
+ pub fn locked_axes(&self) -> LockedAxes {
+ self.mprops.flags
+ }
+
#[inline]
/// Locks or unlocks all the rotations of this rigid-body.
pub fn lock_rotations(&mut self, locked: bool, wake_up: bool) {