diff options
| author | Sébastien Crozet <sebcrozet@dimforge.com> | 2024-05-26 18:12:26 +0200 |
|---|---|---|
| committer | Sébastien Crozet <sebastien@crozet.re> | 2024-06-09 12:09:58 +0200 |
| commit | c785ea49965aa151e942feb3da0fb4ba03768441 (patch) | |
| tree | 2bbe82ce435bb9e6a87175ed78fefcb82e722967 /src/dynamics/joint/generic_joint.rs | |
| parent | 5c44d936f7449e7925b124681cfbfd64cb031123 (diff) | |
| download | rapier-c785ea49965aa151e942feb3da0fb4ba03768441.tar.gz rapier-c785ea49965aa151e942feb3da0fb4ba03768441.tar.bz2 rapier-c785ea49965aa151e942feb3da0fb4ba03768441.zip | |
feat: rename JointAxesMask::X/Y/Z by ::LIN_X/LIN_Y/LIN_Z and JointAxis::X/Y/Z by ::LinX/LinY/LinZ
Diffstat (limited to 'src/dynamics/joint/generic_joint.rs')
| -rw-r--r-- | src/dynamics/joint/generic_joint.rs | 54 |
1 files changed, 27 insertions, 27 deletions
diff --git a/src/dynamics/joint/generic_joint.rs b/src/dynamics/joint/generic_joint.rs index 8c8a4aa..2651592 100644 --- a/src/dynamics/joint/generic_joint.rs +++ b/src/dynamics/joint/generic_joint.rs @@ -13,12 +13,12 @@ bitflags::bitflags! { /// A bit mask identifying multiple degrees of freedom of a joint. #[cfg_attr(feature = "serde-serialize", derive(Serialize, Deserialize))] pub struct JointAxesMask: u8 { - /// The translational degree of freedom along the local X axis of a joint. - const X = 1 << 0; - /// The translational degree of freedom along the local Y axis of a joint. - const Y = 1 << 1; - /// The translational degree of freedom along the local Z axis of a joint. - const Z = 1 << 2; + /// The linear (translational) degree of freedom along the local X axis of a joint. + const LIN_X = 1 << 0; + /// The linear (translational) degree of freedom along the local Y axis of a joint. + const LIN_Y = 1 << 1; + /// The linear (translational) degree of freedom along the local Z axis of a joint. + const LIN_Z = 1 << 2; /// The angular degree of freedom along the local X axis of a joint. const ANG_X = 1 << 3; /// The angular degree of freedom along the local Y axis of a joint. @@ -26,23 +26,23 @@ bitflags::bitflags! { /// The angular degree of freedom along the local Z axis of a joint. const ANG_Z = 1 << 5; /// The set of degrees of freedom locked by a revolute joint. - const LOCKED_REVOLUTE_AXES = Self::X.bits | Self::Y.bits | Self::Z.bits | Self::ANG_Y.bits | Self::ANG_Z.bits; + const LOCKED_REVOLUTE_AXES = Self::LIN_X.bits | Self::LIN_Y.bits | Self::LIN_Z.bits | Self::ANG_Y.bits | Self::ANG_Z.bits; /// The set of degrees of freedom locked by a prismatic joint. - const LOCKED_PRISMATIC_AXES = Self::Y.bits | Self::Z.bits | Self::ANG_X.bits | Self::ANG_Y.bits | Self::ANG_Z.bits; + const LOCKED_PRISMATIC_AXES = Self::LIN_Y.bits | Self::LIN_Z.bits | Self::ANG_X.bits | Self::ANG_Y.bits | Self::ANG_Z.bits; /// The set of degrees of freedom locked by a fixed joint. - const LOCKED_FIXED_AXES = Self::X.bits | Self::Y.bits | Self::Z.bits | Self::ANG_X.bits | Self::ANG_Y.bits | Self::ANG_Z.bits; + const LOCKED_FIXED_AXES = Self::LIN_X.bits | Self::LIN_Y.bits | Self::LIN_Z.bits | Self::ANG_X.bits | Self::ANG_Y.bits | Self::ANG_Z.bits; /// The set of degrees of freedom locked by a spherical joint. - const LOCKED_SPHERICAL_AXES = Self::X.bits | Self::Y.bits | Self::Z.bits; + const LOCKED_SPHERICAL_AXES = Self::LIN_X.bits | Self::LIN_Y.bits | Self::LIN_Z.bits; /// The set of degrees of freedom left free by a revolute joint. const FREE_REVOLUTE_AXES = Self::ANG_X.bits; /// The set of degrees of freedom left free by a prismatic joint. - const FREE_PRISMATIC_AXES = Self::X.bits; + const FREE_PRISMATIC_AXES = Self::LIN_X.bits; /// The set of degrees of freedom left free by a fixed joint. const FREE_FIXED_AXES = 0; /// The set of degrees of freedom left free by a spherical joint. const FREE_SPHERICAL_AXES = Self::ANG_X.bits | Self::ANG_Y.bits | Self::ANG_Z.bits; /// The set of all translational degrees of freedom. - const LIN_AXES = Self::X.bits() | Self::Y.bits() | Self::Z.bits(); + const LIN_AXES = Self::LIN_X.bits() | Self::LIN_Y.bits() | Self::LIN_Z.bits(); /// The set of all angular degrees of freedom. const ANG_AXES = Self::ANG_X.bits() | Self::ANG_Y.bits() | Self::ANG_Z.bits(); } @@ -53,26 +53,26 @@ bitflags::bitflags! { /// A bit mask identifying multiple degrees of freedom of a joint. #[cfg_attr(feature = "serde-serialize", derive(Serialize, Deserialize))] pub struct JointAxesMask: u8 { - /// The translational degree of freedom along the local X axis of a joint. - const X = 1 << 0; - /// The translational degree of freedom along the local Y axis of a joint. - const Y = 1 << 1; + /// The linear (translational) degree of freedom along the local X axis of a joint. + const LIN_X = 1 << 0; + /// The linear (translational) degree of freedom along the local Y axis of a joint. + const LIN_Y = 1 << 1; /// The angular degree of freedom of a joint. const ANG_X = 1 << 2; /// The set of degrees of freedom locked by a revolute joint. - const LOCKED_REVOLUTE_AXES = Self::X.bits | Self::Y.bits; + const LOCKED_REVOLUTE_AXES = Self::LIN_X.bits | Self::LIN_Y.bits; /// The set of degrees of freedom locked by a prismatic joint. - const LOCKED_PRISMATIC_AXES = Self::Y.bits | Self::ANG_X.bits; + const LOCKED_PRISMATIC_AXES = Self::LIN_Y.bits | Self::ANG_X.bits; /// The set of degrees of freedom locked by a fixed joint. - const LOCKED_FIXED_AXES = Self::X.bits | Self::Y.bits | Self::ANG_X.bits; + const LOCKED_FIXED_AXES = Self::LIN_X.bits | Self::LIN_Y.bits | Self::ANG_X.bits; /// The set of degrees of freedom left free by a revolute joint. const FREE_REVOLUTE_AXES = Self::ANG_X.bits; /// The set of degrees of freedom left free by a prismatic joint. - const FREE_PRISMATIC_AXES = Self::X.bits; + const FREE_PRISMATIC_AXES = Self::LIN_X.bits; /// The set of degrees of freedom left free by a fixed joint. const FREE_FIXED_AXES = 0; /// The set of all translational degrees of freedom. - const LIN_AXES = Self::X.bits() | Self::Y.bits(); + const LIN_AXES = Self::LIN_X.bits() | Self::LIN_Y.bits(); /// The set of all angular degrees of freedom. const ANG_AXES = Self::ANG_X.bits(); } @@ -88,13 +88,13 @@ impl Default for JointAxesMask { #[cfg_attr(feature = "serde-serialize", derive(Serialize, Deserialize))] #[derive(Copy, Clone, Debug, PartialEq)] pub enum JointAxis { - /// The translational degree of freedom along the joint’s local X axis. - X = 0, - /// The translational degree of freedom along the joint’s local Y axis. - Y, - /// The translational degree of freedom along the joint’s local Z axis. + /// The linear (translational) degree of freedom along the joint’s local X axis. + LinX = 0, + /// The linear (translational) degree of freedom along the joint’s local Y axis. + LinY, + /// The linear (translational) degree of freedom along the joint’s local Z axis. #[cfg(feature = "dim3")] - Z, + LinZ, /// The rotational degree of freedom along the joint’s local X axis. AngX, /// The rotational degree of freedom along the joint’s local Y axis. |
