aboutsummaryrefslogtreecommitdiff
path: root/src/dynamics/rigid_body_set.rs
diff options
context:
space:
mode:
authorCrozet Sébastien <developer@crozet.re>2020-12-31 11:16:03 +0100
committerCrozet Sébastien <developer@crozet.re>2020-12-31 11:16:03 +0100
commit967145a9492175be59e8db33299b1687d69d84e2 (patch)
tree8a1beb06349119a9df0983aa42ec59625c31c395 /src/dynamics/rigid_body_set.rs
parent64507a68e179ebc652f177e727fac5ff1a82d931 (diff)
downloadrapier-967145a9492175be59e8db33299b1687d69d84e2.tar.gz
rapier-967145a9492175be59e8db33299b1687d69d84e2.tar.bz2
rapier-967145a9492175be59e8db33299b1687d69d84e2.zip
Perform contact sorting in the narrow-phase directly.
Diffstat (limited to 'src/dynamics/rigid_body_set.rs')
-rw-r--r--src/dynamics/rigid_body_set.rs8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/dynamics/rigid_body_set.rs b/src/dynamics/rigid_body_set.rs
index c32c402..f36f4ec 100644
--- a/src/dynamics/rigid_body_set.rs
+++ b/src/dynamics/rigid_body_set.rs
@@ -20,13 +20,9 @@ pub struct BodyPair {
}
impl BodyPair {
- pub(crate) fn new(body1: RigidBodyHandle, body2: RigidBodyHandle) -> Self {
+ pub fn new(body1: RigidBodyHandle, body2: RigidBodyHandle) -> Self {
BodyPair { body1, body2 }
}
-
- pub(crate) fn swap(self) -> Self {
- Self::new(self.body2, self.body1)
- }
}
#[cfg_attr(feature = "serde-serialize", derive(Serialize, Deserialize))]
@@ -479,7 +475,7 @@ impl RigidBodySet {
if let Some(contacts) = narrow_phase.contacts_with(*collider_handle) {
for inter in contacts {
for manifold in &inter.2.manifolds {
- if manifold.num_active_contacts > 0 {
+ if !manifold.data.solver_contacts.is_empty() {
let other = crate::utils::other_handle(
(inter.0, inter.1),
*collider_handle,