aboutsummaryrefslogtreecommitdiff
path: root/src/geometry/contact_pair.rs
diff options
context:
space:
mode:
authorSébastien Crozet <developer@crozet.re>2021-02-25 15:38:10 +0100
committerGitHub <noreply@github.com>2021-02-25 15:38:10 +0100
commitf41a6fb76d2a762e7d0680dec25e2a48b701606e (patch)
tree641526f68ab04c1b60adc2570b32b8f36540cb18 /src/geometry/contact_pair.rs
parent8e40ab758d85f2dcb46b8346178abd13829961a5 (diff)
parent9cdd34c741d6e45b7dcaf797c3704d1bc9dfeaae (diff)
downloadrapier-f41a6fb76d2a762e7d0680dec25e2a48b701606e.tar.gz
rapier-f41a6fb76d2a762e7d0680dec25e2a48b701606e.tar.bz2
rapier-f41a6fb76d2a762e7d0680dec25e2a48b701606e.zip
Merge pull request #122 from dimforge/dominance
Implement dominance groups
Diffstat (limited to 'src/geometry/contact_pair.rs')
-rw-r--r--src/geometry/contact_pair.rs5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/geometry/contact_pair.rs b/src/geometry/contact_pair.rs
index 50094ca..5ef1ac1 100644
--- a/src/geometry/contact_pair.rs
+++ b/src/geometry/contact_pair.rs
@@ -113,6 +113,8 @@ pub struct ContactManifoldData {
/// The contacts that will be seen by the constraints solver for computing forces.
#[cfg_attr(feature = "serde-serialize", serde(skip))]
pub solver_contacts: Vec<SolverContact>,
+ /// The relative dominance of the bodies involved in this contact manifold.
+ pub relative_dominance: i16,
/// A user-defined piece of data.
pub user_data: u32,
}
@@ -122,7 +124,7 @@ pub struct ContactManifoldData {
#[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,
+ pub(crate) contact_id: u8,
/// The world-space contact point.
pub point: Point<Real>,
/// The distance between the two original contacts points along the contact normal.
@@ -177,6 +179,7 @@ impl ContactManifoldData {
solver_flags,
normal: Vector::zeros(),
solver_contacts: Vec::new(),
+ relative_dominance: 0,
user_data: 0,
}
}