aboutsummaryrefslogtreecommitdiff
path: root/src/dynamics/solver/interaction_groups.rs
diff options
context:
space:
mode:
authorSébastien Crozet <developer@crozet.re>2022-04-19 18:57:40 +0200
committerSébastien Crozet <sebastien@crozet.re>2022-04-20 19:02:49 +0200
commit2b1374c596957ac8cabe085859be3b823a1ba0c6 (patch)
treea7f37ec29199a5a2c6198a6b001e665524fdab96 /src/dynamics/solver/interaction_groups.rs
parentee679427cda6363e4de94a59e293d01133a44d1f (diff)
downloadrapier-2b1374c596957ac8cabe085859be3b823a1ba0c6.tar.gz
rapier-2b1374c596957ac8cabe085859be3b823a1ba0c6.tar.bz2
rapier-2b1374c596957ac8cabe085859be3b823a1ba0c6.zip
First round deleting the component sets.
Diffstat (limited to 'src/dynamics/solver/interaction_groups.rs')
-rw-r--r--src/dynamics/solver/interaction_groups.rs31
1 files changed, 12 insertions, 19 deletions
diff --git a/src/dynamics/solver/interaction_groups.rs b/src/dynamics/solver/interaction_groups.rs
index 2bcbacc..951b77f 100644
--- a/src/dynamics/solver/interaction_groups.rs
+++ b/src/dynamics/solver/interaction_groups.rs
@@ -1,5 +1,4 @@
-use crate::data::ComponentSet;
-use crate::dynamics::{IslandManager, JointGraphEdge, JointIndex, RigidBodyIds};
+use crate::dynamics::{IslandManager, JointGraphEdge, JointIndex, RigidBodySet};
use crate::geometry::{ContactManifold, ContactManifoldIndex};
#[cfg(feature = "simd-is-enabled")]
@@ -62,17 +61,15 @@ impl ParallelInteractionGroups {
self.groups.len() - 1
}
- pub fn group_interactions<Bodies, Interaction: PairInteraction>(
+ pub fn group_interactions<Interaction: PairInteraction>(
&mut self,
island_id: usize,
islands: &IslandManager,
- bodies: &Bodies,
+ bodies: &RigidBodySet,
multibodies: &MultibodyJointSet,
interactions: &[Interaction],
interaction_indices: &[usize],
- ) where
- Bodies: ComponentSet<RigidBodyIds> + ComponentSet<RigidBodyType>,
- {
+ ) {
let num_island_bodies = islands.active_island(island_id).len();
self.bodies_color.clear();
self.interaction_indices.clear();
@@ -217,7 +214,7 @@ impl InteractionGroups {
&mut self,
_island_id: usize,
_islands: &IslandManager,
- _bodies: &impl ComponentSet<RigidBodyIds>,
+ _bodies: &RigidBodySet,
_interactions: &[JointGraphEdge],
interaction_indices: &[JointIndex],
) {
@@ -226,16 +223,14 @@ impl InteractionGroups {
}
#[cfg(feature = "simd-is-enabled")]
- pub fn group_joints<Bodies>(
+ pub fn group_joints(
&mut self,
island_id: usize,
islands: &IslandManager,
- bodies: &Bodies,
+ bodies: &RigidBodySet,
interactions: &[JointGraphEdge],
interaction_indices: &[JointIndex],
- ) where
- Bodies: ComponentSet<RigidBodyType> + ComponentSet<RigidBodyIds>,
- {
+ ) {
// TODO: right now, we only sort based on the axes locked by the joint.
// We could also take motors and limits into account in the future (most of
// the SIMD constraints generation for motors and limits is already implemented).
@@ -376,7 +371,7 @@ impl InteractionGroups {
&mut self,
_island_id: usize,
_islands: &IslandManager,
- _bodies: &impl ComponentSet<RigidBodyIds>,
+ _bodies: &RigidBodySet,
_interactions: &[&mut ContactManifold],
interaction_indices: &[ContactManifoldIndex],
) {
@@ -385,16 +380,14 @@ impl InteractionGroups {
}
#[cfg(feature = "simd-is-enabled")]
- pub fn group_manifolds<Bodies>(
+ pub fn group_manifolds(
&mut self,
island_id: usize,
islands: &IslandManager,
- bodies: &Bodies,
+ bodies: &RigidBodySet,
interactions: &[&mut ContactManifold],
interaction_indices: &[ContactManifoldIndex],
- ) where
- Bodies: ComponentSet<RigidBodyType> + ComponentSet<RigidBodyIds>,
- {
+ ) {
// Note: each bit of a body mask indicates what bucket already contains
// a constraints involving this body.
// TODO: currently, this is a bit overconservative because when a bucket