aboutsummaryrefslogtreecommitdiff
path: root/src/dynamics/joint/ball_joint.rs
diff options
context:
space:
mode:
authorCrozet Sébastien <developer@crozet.re>2021-02-22 14:20:06 +0100
committerCrozet Sébastien <developer@crozet.re>2021-02-22 14:20:06 +0100
commit0eec28325ecf192f386a6894526e97a462e68802 (patch)
tree3d5a08cc2a0569df703f5e03c7ccbeeab5e30eaa /src/dynamics/joint/ball_joint.rs
parent4c9138fd2b8413a44ea665a2db5d245370ff54fe (diff)
downloadrapier-0eec28325ecf192f386a6894526e97a462e68802.tar.gz
rapier-0eec28325ecf192f386a6894526e97a462e68802.tar.bz2
rapier-0eec28325ecf192f386a6894526e97a462e68802.zip
Fix warnings.
Diffstat (limited to 'src/dynamics/joint/ball_joint.rs')
-rw-r--r--src/dynamics/joint/ball_joint.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/dynamics/joint/ball_joint.rs b/src/dynamics/joint/ball_joint.rs
index 47c90ab..8481961 100644
--- a/src/dynamics/joint/ball_joint.rs
+++ b/src/dynamics/joint/ball_joint.rs
@@ -74,20 +74,24 @@ impl BallJoint {
self.motor_max_impulse == 0.0 || (self.motor_stiffness == 0.0 && self.motor_damping == 0.0)
}
+ /// Set the spring-like model used by the motor to reach the desired target velocity and position.
pub fn configure_motor_model(&mut self, model: SpringModel) {
self.motor_model = model;
}
+ /// Sets the target velocity and velocity correction factor this motor.
#[cfg(feature = "dim2")]
pub fn configure_motor_velocity(&mut self, target_vel: Real, factor: Real) {
self.configure_motor(self.motor_target_pos, target_vel, 0.0, factor)
}
+ /// Sets the target velocity and velocity correction factor this motor.
#[cfg(feature = "dim3")]
pub fn configure_motor_velocity(&mut self, target_vel: Vector<Real>, factor: Real) {
self.configure_motor(self.motor_target_pos, target_vel, 0.0, factor)
}
+ /// Sets the target orientation this motor needs to reach.
pub fn configure_motor_position(
&mut self,
target_pos: Rotation<Real>,
@@ -97,6 +101,7 @@ impl BallJoint {
self.configure_motor(target_pos, na::zero(), stiffness, damping)
}
+ /// Sets the target orientation this motor needs to reach.
#[cfg(feature = "dim2")]
pub fn configure_motor(
&mut self,
@@ -111,6 +116,7 @@ impl BallJoint {
self.motor_damping = damping;
}
+ /// Configure both the target orientation and target velocity of the motor.
#[cfg(feature = "dim3")]
pub fn configure_motor(
&mut self,