aboutsummaryrefslogtreecommitdiff
path: root/src/dynamics/joint/joint_set.rs
diff options
context:
space:
mode:
authorEmil Ernerfeldt <emil.ernerfeldt@gmail.com>2021-02-04 13:11:04 +0100
committerEmil Ernerfeldt <emil.ernerfeldt@gmail.com>2021-02-04 13:11:04 +0100
commit85bc81d4fce29bf628d31cb978aa482e564aab90 (patch)
tree61cf130d7ad8d1162c9709345b0e7f794bdb1e46 /src/dynamics/joint/joint_set.rs
parent88cde90425364ee66b6b04f1c5e384423b96e369 (diff)
downloadrapier-85bc81d4fce29bf628d31cb978aa482e564aab90.tar.gz
rapier-85bc81d4fce29bf628d31cb978aa482e564aab90.tar.bz2
rapier-85bc81d4fce29bf628d31cb978aa482e564aab90.zip
Make clippy a bit happier
Diffstat (limited to 'src/dynamics/joint/joint_set.rs')
-rw-r--r--src/dynamics/joint/joint_set.rs5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/dynamics/joint/joint_set.rs b/src/dynamics/joint/joint_set.rs
index a87532a..ed3e69a 100644
--- a/src/dynamics/joint/joint_set.rs
+++ b/src/dynamics/joint/joint_set.rs
@@ -55,6 +55,11 @@ impl JointSet {
self.joint_graph.graph.edges.len()
}
+ /// `true` if there are no joints in this set.
+ pub fn is_empty(&self) -> bool {
+ self.joint_graph.graph.edges.is_empty()
+ }
+
/// Retrieve the joint graph where edges are joints and nodes are rigid body handles.
pub fn joint_graph(&self) -> &InteractionGraph<RigidBodyHandle, Joint> {
&self.joint_graph