aboutsummaryrefslogtreecommitdiff
path: root/src/dynamics/integration_parameters.rs
diff options
context:
space:
mode:
authorSébastien Crozet <sebcrozet@dimforge.com>2024-04-28 18:23:30 +0200
committerSébastien Crozet <sebastien@crozet.re>2024-04-30 23:10:46 +0200
commit0a9153e273dc0bdd4ba6443bd7f4dcfc671faac3 (patch)
tree08433a2e846051726d577cbf67e3fb932e446bc5 /src/dynamics/integration_parameters.rs
parent929aa6b9259b95d48cf6a84df40486132b21f088 (diff)
downloadrapier-0a9153e273dc0bdd4ba6443bd7f4dcfc671faac3.tar.gz
rapier-0a9153e273dc0bdd4ba6443bd7f4dcfc671faac3.tar.bz2
rapier-0a9153e273dc0bdd4ba6443bd7f4dcfc671faac3.zip
chore: clippy fixes
Diffstat (limited to 'src/dynamics/integration_parameters.rs')
-rw-r--r--src/dynamics/integration_parameters.rs10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/dynamics/integration_parameters.rs b/src/dynamics/integration_parameters.rs
index b883b0e..8b2ba3b 100644
--- a/src/dynamics/integration_parameters.rs
+++ b/src/dynamics/integration_parameters.rs
@@ -178,10 +178,16 @@ impl IntegrationParameters {
* self.joint_damping_ratio)
}
+ /// Amount of penetration the engine won’t attempt to correct (default: `0.001` multiplied by
+ /// [`Self::length_unit`]).
pub fn allowed_linear_error(&self) -> Real {
self.normalized_allowed_linear_error * self.length_unit
}
+ /// Maximum amount of penetration the solver will attempt to resolve in one timestep.
+ ///
+ /// This is equal to [`Self::normalized_max_penetration_correction`] multiplied by
+ /// [`Self::length_unit`].
pub fn max_penetration_correction(&self) -> Real {
if self.normalized_max_penetration_correction != Real::MAX {
self.normalized_max_penetration_correction * self.length_unit
@@ -190,11 +196,13 @@ impl IntegrationParameters {
}
}
+ /// The maximal distance separating two objects that will generate predictive contacts
+ /// (default: `0.002m` multiped by [`Self::length_unit`]).
pub fn prediction_distance(&self) -> Real {
self.normalized_prediction_distance * self.length_unit
}
- /// Initialize the simulation paramaters with settings matching the TGS-soft solver
+ /// Initialize the simulation parameters with settings matching the TGS-soft solver
/// with warmstarting.
///
/// This is the default configuration, equivalent to [`IntegrationParameters::default()`].