aboutsummaryrefslogtreecommitdiff
path: root/src/geometry
diff options
context:
space:
mode:
authorSébastien Crozet <developer@crozet.re>2021-03-08 10:09:43 +0100
committerGitHub <noreply@github.com>2021-03-08 10:09:43 +0100
commitbeaddea6f2596dce936355940fd98ca90945cb65 (patch)
tree22a8e6863cce5daab7782c5de108749e5d046fbb /src/geometry
parente7f805aea45612abb655b3c36a133357fecfcdc4 (diff)
parent152ada67ecd122fe38a9cae8b262542b4abf25fc (diff)
downloadrapier-beaddea6f2596dce936355940fd98ca90945cb65.tar.gz
rapier-beaddea6f2596dce936355940fd98ca90945cb65.tar.bz2
rapier-beaddea6f2596dce936355940fd98ca90945cb65.zip
Merge pull request #146 from dimforge/implicit_friction_cone
Projection friction impulses on an implicit cone instead of a pyramid approximation.
Diffstat (limited to 'src/geometry')
-rw-r--r--src/geometry/contact_pair.rs16
1 files changed, 2 insertions, 14 deletions
diff --git a/src/geometry/contact_pair.rs b/src/geometry/contact_pair.rs
index 5c70e44..f156db5 100644
--- a/src/geometry/contact_pair.rs
+++ b/src/geometry/contact_pair.rs
@@ -37,26 +37,14 @@ pub struct ContactData {
/// 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: [Real; 2],
-}
-
-impl ContactData {
- #[cfg(feature = "dim2")]
- pub(crate) fn zero_tangent_impulse() -> Real {
- 0.0
- }
-
- #[cfg(feature = "dim3")]
- pub(crate) fn zero_tangent_impulse() -> [Real; 2] {
- [0.0, 0.0]
- }
+ pub tangent_impulse: na::Vector2<Real>,
}
impl Default for ContactData {
fn default() -> Self {
Self {
impulse: 0.0,
- tangent_impulse: Self::zero_tangent_impulse(),
+ tangent_impulse: na::zero(),
}
}
}