aboutsummaryrefslogtreecommitdiff
path: root/src/dynamics/joint/joint_set.rs
diff options
context:
space:
mode:
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