aboutsummaryrefslogtreecommitdiff
path: root/src/geometry/contact_pair.rs
diff options
context:
space:
mode:
authorCrozet Sébastien <developer@crozet.re>2021-05-25 11:00:13 +0200
committerCrozet Sébastien <developer@crozet.re>2021-05-25 11:00:13 +0200
commit1bef66fea941307a7305ddaebdb0abe3d0cb281f (patch)
tree450bc3cd2fd611f91cb7d7809edcc4260f043b0b /src/geometry/contact_pair.rs
parent47139323e01f978a94ed7aa2c33bbf63b00f4c30 (diff)
downloadrapier-1bef66fea941307a7305ddaebdb0abe3d0cb281f.tar.gz
rapier-1bef66fea941307a7305ddaebdb0abe3d0cb281f.tar.bz2
rapier-1bef66fea941307a7305ddaebdb0abe3d0cb281f.zip
Add prelude + use vectors for setting linvel/translation in builders
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,