From bed47a82e706a13c22799fcf644753c69fdec6ad Mon Sep 17 00:00:00 2001 From: Crozet Sébastien Date: Sun, 7 Mar 2021 11:43:47 +0100 Subject: Projection friction impulses on an implicit cone instead of a pyramidal approximation. --- src/geometry/contact_pair.rs | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) (limited to 'src/geometry') 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, } impl Default for ContactData { fn default() -> Self { Self { impulse: 0.0, - tangent_impulse: Self::zero_tangent_impulse(), + tangent_impulse: na::zero(), } } } -- cgit