aboutsummaryrefslogtreecommitdiff
path: root/src/dynamics/joint/impulse_joint
diff options
context:
space:
mode:
authorSébastien Crozet <sebcrozet@dimforge.com>2022-05-30 17:48:31 +0200
committerSébastien Crozet <sebcrozet@dimforge.com>2022-05-30 17:48:31 +0200
commitc46f52f45102dee47c4f6839a7f2bfc9c8c13ee9 (patch)
tree7893261d532764b374945098c6e7df011a2a0b27 /src/dynamics/joint/impulse_joint
parent033a26aac483a4fbcf7febf61f19656c5a74f546 (diff)
downloadrapier-c46f52f45102dee47c4f6839a7f2bfc9c8c13ee9.tar.gz
rapier-c46f52f45102dee47c4f6839a7f2bfc9c8c13ee9.tar.bz2
rapier-c46f52f45102dee47c4f6839a7f2bfc9c8c13ee9.zip
Rename JointSet::joints_with to attached_joints
Diffstat (limited to 'src/dynamics/joint/impulse_joint')
-rw-r--r--src/dynamics/joint/impulse_joint/impulse_joint_set.rs14
1 files changed, 11 insertions, 3 deletions
diff --git a/src/dynamics/joint/impulse_joint/impulse_joint_set.rs b/src/dynamics/joint/impulse_joint/impulse_joint_set.rs
index 1cd177d..0309cff 100644
--- a/src/dynamics/joint/impulse_joint/impulse_joint_set.rs
+++ b/src/dynamics/joint/impulse_joint/impulse_joint_set.rs
@@ -69,15 +69,23 @@ impl ImpulseJointSet {
&self.joint_graph
}
- /// Iterates through all the impulse_joints attached to the given rigid-body.
- pub fn joints_with<'a>(
+ /// Iterates through all the impulse joints attached to the given rigid-body.
+ pub fn attached_joints<'a>(
&'a self,
body: RigidBodyHandle,
- ) -> impl Iterator<Item = (RigidBodyHandle, RigidBodyHandle, &'a ImpulseJoint)> {
+ ) -> impl Iterator<
+ Item = (
+ RigidBodyHandle,
+ RigidBodyHandle,
+ ImpulseJointHandle,
+ &'a ImpulseJoint,
+ ),
+ > {
self.rb_graph_ids
.get(body.0)
.into_iter()
.flat_map(move |id| self.joint_graph.interactions_with(*id))
+ .map(|inter| (inter.0, inter.1, inter.2.handle, inter.2))
}
/// Is the given joint handle valid?