From 158308ad715d00f2c0f259b185bf0410395b1aac Mon Sep 17 00:00:00 2001 From: Sébastien Crozet Date: Mon, 4 Jul 2022 15:04:06 +0200 Subject: Add hepler function for building a contact force event from a contact pair --- src/dynamics/joint/generic_joint.rs | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'src/dynamics') diff --git a/src/dynamics/joint/generic_joint.rs b/src/dynamics/joint/generic_joint.rs index 1cf96cb..bb1598d 100644 --- a/src/dynamics/joint/generic_joint.rs +++ b/src/dynamics/joint/generic_joint.rs @@ -278,17 +278,6 @@ impl GenericJoint { self } - /// Are contacts between the attached rigid-bodies enabled? - pub fn contacts_enabled(&self) -> bool { - self.contacts_enabled - } - - /// Sets whether contacts between the attached rigid-bodies are enabled. - pub fn set_contacts_enabled(&mut self, enabled: bool) -> &mut Self { - self.contacts_enabled = enabled; - self - } - /// The principal (local X) axis of this joint, expressed in the first rigid-body’s local-space. #[must_use] pub fn local_axis1(&self) -> UnitVector { @@ -337,6 +326,17 @@ impl GenericJoint { self } + /// Are contacts between the attached rigid-bodies enabled? + pub fn contacts_enabled(&self) -> bool { + self.contacts_enabled + } + + /// Sets whether contacts between the attached rigid-bodies are enabled. + pub fn set_contacts_enabled(&mut self, enabled: bool) -> &mut Self { + self.contacts_enabled = enabled; + self + } + /// The joint limits along the specified axis. #[must_use] pub fn limits(&self, axis: JointAxis) -> Option<&JointLimits> { -- cgit