aboutsummaryrefslogtreecommitdiff
path: root/src/dynamics/joint
diff options
context:
space:
mode:
authorRobert Hrusecky <robert.hrusecky@utexas.edu>2020-10-06 14:22:26 -0500
committerRobert Hrusecky <robert.hrusecky@utexas.edu>2020-10-06 14:22:26 -0500
commitdd8e25bc4756b8bd01d283b5d7e7c5daa9a1af3f (patch)
tree43a0e92a698d5c622edf406dfdd27037471a5e24 /src/dynamics/joint
parent0c1b210109e6d4816dc54f2a6dc93e8d6beb5089 (diff)
parent6b1cd9cd404bd1da6aec94527e58dcd483a50c67 (diff)
downloadrapier-dd8e25bc4756b8bd01d283b5d7e7c5daa9a1af3f.tar.gz
rapier-dd8e25bc4756b8bd01d283b5d7e7c5daa9a1af3f.tar.bz2
rapier-dd8e25bc4756b8bd01d283b5d7e7c5daa9a1af3f.zip
Merge branch 'master' into infinite_fall_memory
Diffstat (limited to 'src/dynamics/joint')
-rw-r--r--src/dynamics/joint/joint_set.rs16
1 files changed, 10 insertions, 6 deletions
diff --git a/src/dynamics/joint/joint_set.rs b/src/dynamics/joint/joint_set.rs
index 51d7432..2b1895f 100644
--- a/src/dynamics/joint/joint_set.rs
+++ b/src/dynamics/joint/joint_set.rs
@@ -66,17 +66,21 @@ impl JointSet {
}
/// Iterates through all the joint on this set.
- pub fn iter(&self) -> impl Iterator<Item = &Joint> {
- self.joint_graph.graph.edges.iter().map(|e| &e.weight)
+ pub fn iter(&self) -> impl Iterator<Item = (JointHandle, &Joint)> {
+ self.joint_graph
+ .graph
+ .edges
+ .iter()
+ .map(|e| (e.weight.handle, &e.weight))
}
/// Iterates mutably through all the joint on this set.
- pub fn iter_mut(&mut self) -> impl Iterator<Item = &mut Joint> {
+ pub fn iter_mut(&mut self) -> impl Iterator<Item = (JointHandle, &mut Joint)> {
self.joint_graph
.graph
.edges
.iter_mut()
- .map(|e| &mut e.weight)
+ .map(|e| (e.weight.handle, &mut e.weight))
}
// /// The set of joints as an array.
@@ -202,8 +206,8 @@ impl JointSet {
}
// Wake up the attached bodies.
- bodies.wake_up(h1);
- bodies.wake_up(h2);
+ bodies.wake_up(h1, true);
+ bodies.wake_up(h2, true);
}
if let Some(other) = self.joint_graph.remove_node(deleted_id) {