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/spring_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/spring_joint.rs')
| -rw-r--r-- | src/dynamics/joint/spring_joint.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/dynamics/joint/spring_joint.rs b/src/dynamics/joint/spring_joint.rs index f5cb5bd..eea639f 100644 --- a/src/dynamics/joint/spring_joint.rs +++ b/src/dynamics/joint/spring_joint.rs @@ -22,8 +22,8 @@ impl SpringJoint { pub fn new(rest_length: Real, stiffness: Real, damping: Real) -> Self { let data = GenericJointBuilder::new(JointAxesMask::empty()) .coupled_axes(JointAxesMask::LIN_AXES) - .motor_position(JointAxis::X, rest_length, stiffness, damping) - .motor_model(JointAxis::X, MotorModel::ForceBased) + .motor_position(JointAxis::LinX, rest_length, stiffness, damping) + .motor_model(JointAxis::LinX, MotorModel::ForceBased) .build(); Self { data } } @@ -75,7 +75,7 @@ impl SpringJoint { /// `MotorModel::AccelerationBased`, the spring constants will be automatically scaled by the attached masses, /// making the spring more mass-independent. pub fn set_spring_model(&mut self, model: MotorModel) -> &mut Self { - self.data.set_motor_model(JointAxis::X, model); + self.data.set_motor_model(JointAxis::LinX, model); self } |
