diff options
| author | Sébastien Crozet <developer@crozet.re> | 2022-01-16 08:20:22 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-01-16 08:20:22 -0800 |
| commit | 1880619d29029c99985ffae9ed12a1c8d2cc796b (patch) | |
| tree | 806e7d950015875ebfcca5520784aea6e7c5ae10 /src/dynamics/joint/joint_data.rs | |
| parent | 4454a845e98b990abf3929ca46b59d0fca5a18ec (diff) | |
| parent | 0703e5527fd95d86bb6621e61dbcb1a6e7f9329a (diff) | |
| download | rapier-1880619d29029c99985ffae9ed12a1c8d2cc796b.tar.gz rapier-1880619d29029c99985ffae9ed12a1c8d2cc796b.tar.bz2 rapier-1880619d29029c99985ffae9ed12a1c8d2cc796b.zip | |
Merge pull request #277 from dimforge/solver-fixes
Fix some solver issues
Diffstat (limited to 'src/dynamics/joint/joint_data.rs')
| -rw-r--r-- | src/dynamics/joint/joint_data.rs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/dynamics/joint/joint_data.rs b/src/dynamics/joint/joint_data.rs index 35d832d..b1ad6c6 100644 --- a/src/dynamics/joint/joint_data.rs +++ b/src/dynamics/joint/joint_data.rs @@ -218,12 +218,14 @@ impl JointData { } /// Set the spring-like model used by the motor to reach the desired target velocity and position. + #[must_use] pub fn motor_model(mut self, axis: JointAxis, model: MotorModel) -> Self { self.motors[axis as usize].model = model; self } /// Sets the target velocity this motor needs to reach. + #[must_use] pub fn motor_velocity(self, axis: JointAxis, target_vel: Real, factor: Real) -> Self { self.motor_axis( axis, @@ -235,6 +237,7 @@ impl JointData { } /// Sets the target angle this motor needs to reach. + #[must_use] pub fn motor_position( self, axis: JointAxis, @@ -246,6 +249,7 @@ impl JointData { } /// Configure both the target angle and target velocity of the motor. + #[must_use] pub fn motor_axis( mut self, axis: JointAxis, @@ -263,6 +267,7 @@ impl JointData { self } + #[must_use] pub fn motor_max_impulse(mut self, axis: JointAxis, max_impulse: Real) -> Self { self.motors[axis as usize].max_impulse = max_impulse; self |
