diff options
| author | Sébastien Crozet <developer@crozet.re> | 2023-01-15 12:23:32 +0100 |
|---|---|---|
| committer | Sébastien Crozet <developer@crozet.re> | 2023-01-15 12:24:07 +0100 |
| commit | d2ebb25c227e239aa283b989cf560bf3739a1c39 (patch) | |
| tree | 533307a241654f22c3441d6b4d3e9dda00453716 /src/dynamics | |
| parent | 9b5ccb95e74350d4fb3b4bc2c4c9fbf9fb4943a2 (diff) | |
| download | rapier-d2ebb25c227e239aa283b989cf560bf3739a1c39.tar.gz rapier-d2ebb25c227e239aa283b989cf560bf3739a1c39.tar.bz2 rapier-d2ebb25c227e239aa283b989cf560bf3739a1c39.zip | |
Add accessor to get the locked axes of a rigid-body
Diffstat (limited to 'src/dynamics')
| -rw-r--r-- | src/dynamics/rigid_body.rs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/dynamics/rigid_body.rs b/src/dynamics/rigid_body.rs index 78132b2..b850f66 100644 --- a/src/dynamics/rigid_body.rs +++ b/src/dynamics/rigid_body.rs @@ -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) { |
