From dc8ccc0c30e75aea8f144dbfad16be088d4d4ea2 Mon Sep 17 00:00:00 2001 From: Crozet Sébastien Date: Fri, 19 Feb 2021 17:32:09 +0100 Subject: Make revolute joint actuation work properly even when SIMD is enabled. --- src/dynamics/joint/revolute_joint.rs | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/dynamics/joint/revolute_joint.rs') diff --git a/src/dynamics/joint/revolute_joint.rs b/src/dynamics/joint/revolute_joint.rs index 9af0ae6..022779d 100644 --- a/src/dynamics/joint/revolute_joint.rs +++ b/src/dynamics/joint/revolute_joint.rs @@ -77,6 +77,12 @@ impl RevoluteJoint { } } + /// Can a SIMD constraint be used for resolving this joint? + pub fn supports_simd_constraints(&self) -> bool { + // SIMD revolute constraints don't support motors right now. + self.motor_max_impulse == 0.0 || (self.motor_stiffness == 0.0 && self.motor_damping == 0.0) + } + pub fn configure_motor_model(&mut self, model: SpringModel) { self.motor_model = model; } -- cgit