From ad5c10672e36f47fbdb0667bccd79c59ff3a97cc Mon Sep 17 00:00:00 2001 From: Crozet Sébastien Date: Mon, 22 Feb 2021 17:51:40 +0100 Subject: Use contact ids instead of contact reordering in order to identify the impulse writeback location. --- src/geometry/contact_pair.rs | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/geometry/contact_pair.rs') diff --git a/src/geometry/contact_pair.rs b/src/geometry/contact_pair.rs index 462d3ef..c94a2cf 100644 --- a/src/geometry/contact_pair.rs +++ b/src/geometry/contact_pair.rs @@ -110,6 +110,8 @@ pub struct ContactManifoldData { #[derive(Copy, Clone, Debug)] #[cfg_attr(feature = "serde-serialize", derive(Serialize, Deserialize))] pub struct SolverContact { + /// The index of the manifold contact used to generate this solver contact. + pub contact_id: u8, /// The world-space contact point. pub point: Point, /// The distance between the two original contacts points along the contact normal. @@ -203,3 +205,9 @@ impl ContactManifoldData { // manifold.data.warmstart_multiplier = Self::min_warmstart_multiplier() // } } + +/// A contact manifold that can be modified by the user. +pub struct ModifiableContactManifold<'a> { + manifold: &'a super::ContactManifold, + solver_contacts: &'a mut Vec, +} -- cgit