aboutsummaryrefslogtreecommitdiff
path: root/src/geometry/contact_pair.rs
diff options
context:
space:
mode:
authorCrozet Sébastien <developer@crozet.re>2021-01-04 15:14:25 +0100
committerCrozet Sébastien <developer@crozet.re>2021-01-04 15:14:25 +0100
commitaa61fe65e3ff0289ecab57b4053a3410cf6d4a87 (patch)
treea2ab513f43d779e4eb1c0edcd2a6e734b3fa4470 /src/geometry/contact_pair.rs
parenta1aa8855f76168d8af14244a54c9f28d15696342 (diff)
downloadrapier-aa61fe65e3ff0289ecab57b4053a3410cf6d4a87.tar.gz
rapier-aa61fe65e3ff0289ecab57b4053a3410cf6d4a87.tar.bz2
rapier-aa61fe65e3ff0289ecab57b4053a3410cf6d4a87.zip
Add support of 64-bits reals.
Diffstat (limited to 'src/geometry/contact_pair.rs')
-rw-r--r--src/geometry/contact_pair.rs14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/geometry/contact_pair.rs b/src/geometry/contact_pair.rs
index b2ae812..129d444 100644
--- a/src/geometry/contact_pair.rs
+++ b/src/geometry/contact_pair.rs
@@ -20,25 +20,25 @@ pub struct ContactData {
/// The impulse, along the contact normal, applied by this contact to the first collider's rigid-body.
///
/// The impulse applied to the second collider's rigid-body is given by `-impulse`.
- pub impulse: f32,
+ pub impulse: Real,
/// The friction impulse along the vector orthonormal to the contact normal, applied to the first
/// collider's rigid-body.
#[cfg(feature = "dim2")]
- pub tangent_impulse: f32,
+ pub tangent_impulse: Real,
/// The friction impulses along the basis orthonormal to the contact normal, applied to the first
/// collider's rigid-body.
#[cfg(feature = "dim3")]
- pub tangent_impulse: [f32; 2],
+ pub tangent_impulse: [Real; 2],
}
impl ContactData {
#[cfg(feature = "dim2")]
- pub(crate) fn zero_tangent_impulse() -> f32 {
+ pub(crate) fn zero_tangent_impulse() -> Real {
0.0
}
#[cfg(feature = "dim3")]
- pub(crate) fn zero_tangent_impulse() -> [f32; 2] {
+ pub(crate) fn zero_tangent_impulse() -> [Real; 2] {
[0.0, 0.0]
}
}
@@ -87,7 +87,7 @@ pub struct ContactManifoldData {
// The following are set by the narrow-phase.
/// The pair of body involved in this contact manifold.
pub body_pair: BodyPair,
- pub(crate) warmstart_multiplier: f32,
+ pub(crate) warmstart_multiplier: Real,
// The two following are set by the constraints solver.
pub(crate) constraint_index: usize,
pub(crate) position_constraint_index: usize,
@@ -140,7 +140,7 @@ impl ContactManifoldData {
self.solver_contacts.len()
}
- pub(crate) fn min_warmstart_multiplier() -> f32 {
+ pub(crate) fn min_warmstart_multiplier() -> Real {
// Multiplier used to reduce the amount of warm-starting.
// This coefficient increases exponentially over time, until it reaches 1.0.
// This will reduce significant overshoot at the timesteps that