aboutsummaryrefslogtreecommitdiff
path: root/src/geometry/contact_pair.rs
diff options
context:
space:
mode:
authorSébastien Crozet <developer@crozet.re>2021-06-02 17:15:46 +0200
committerGitHub <noreply@github.com>2021-06-02 17:15:46 +0200
commit6ba1c9dec184adcba2c68cc1851dc05587fd0bf0 (patch)
treeb672cfc4db1d2f426dad931d77098ecb4a600358 /src/geometry/contact_pair.rs
parent3bac79ecacdeaa18de19127b7a6c82cbfab29d14 (diff)
parentbde6657287cd32a801abb996322c520673406418 (diff)
downloadrapier-6ba1c9dec184adcba2c68cc1851dc05587fd0bf0.tar.gz
rapier-6ba1c9dec184adcba2c68cc1851dc05587fd0bf0.tar.bz2
rapier-6ba1c9dec184adcba2c68cc1851dc05587fd0bf0.zip
Merge pull request #196 from dimforge/api_changes
More API changes
Diffstat (limited to 'src/geometry/contact_pair.rs')
-rw-r--r--src/geometry/contact_pair.rs16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/geometry/contact_pair.rs b/src/geometry/contact_pair.rs
index 5a568fa..f4e7834 100644
--- a/src/geometry/contact_pair.rs
+++ b/src/geometry/contact_pair.rs
@@ -1,5 +1,5 @@
use crate::dynamics::RigidBodyHandle;
-use crate::geometry::{ColliderPair, Contact, ContactManifold};
+use crate::geometry::{ColliderHandle, Contact, ContactManifold};
use crate::math::{Point, Real, Vector};
use parry::query::ContactManifoldsWorkspace;
@@ -10,9 +10,6 @@ bitflags::bitflags! {
/// The constraint solver will take this contact manifold into
/// account for force computation.
const COMPUTE_IMPULSES = 0b001;
- /// The user-defined physics hooks will be used to
- /// modify the solver contacts of this contact manifold.
- const MODIFY_SOLVER_CONTACTS = 0b010;
}
}
@@ -56,8 +53,10 @@ impl Default for ContactData {
#[derive(Clone)]
/// The description of all the contacts between a pair of colliders.
pub struct ContactPair {
- /// The pair of colliders involved.
- pub pair: ColliderPair,
+ /// The first collider involved in the contact pair.
+ pub collider1: ColliderHandle,
+ /// The second collider involved in the contact pair.
+ pub collider2: ColliderHandle,
/// The set of contact manifolds between the two colliders.
///
/// All contact manifold contain themselves contact points between the colliders.
@@ -68,9 +67,10 @@ pub struct ContactPair {
}
impl ContactPair {
- pub(crate) fn new(pair: ColliderPair) -> Self {
+ pub(crate) fn new(collider1: ColliderHandle, collider2: ColliderHandle) -> Self {
Self {
- pair,
+ collider1,
+ collider2,
has_any_active_contact: false,
manifolds: Vec::new(),
workspace: None,