diff options
| author | Crozet Sébastien <developer@crozet.re> | 2021-02-22 17:51:40 +0100 |
|---|---|---|
| committer | Crozet Sébastien <developer@crozet.re> | 2021-02-22 17:52:03 +0100 |
| commit | ad5c10672e36f47fbdb0667bccd79c59ff3a97cc (patch) | |
| tree | 37607ad9ca3133f6e43466d0edcc8bc6529aca9e /src/geometry/contact_pair.rs | |
| parent | d31a327b45118a77bd9676f350f110683a235acf (diff) | |
| download | rapier-ad5c10672e36f47fbdb0667bccd79c59ff3a97cc.tar.gz rapier-ad5c10672e36f47fbdb0667bccd79c59ff3a97cc.tar.bz2 rapier-ad5c10672e36f47fbdb0667bccd79c59ff3a97cc.zip | |
Use contact ids instead of contact reordering in order to identify the impulse writeback location.
Diffstat (limited to 'src/geometry/contact_pair.rs')
| -rw-r--r-- | src/geometry/contact_pair.rs | 8 |
1 files changed, 8 insertions, 0 deletions
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<Real>, /// 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<SolverContact>, +} |
