Add hepler function for building a contact force event from a contact pair

This commit is contained in:
Sébastien Crozet
2022-07-04 15:04:06 +02:00
parent 1121b07d52
commit 158308ad71
4 changed files with 52 additions and 45 deletions

View File

@@ -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-bodys local-space.
#[must_use]
pub fn local_axis1(&self) -> UnitVector<Real> {
@@ -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<Real>> {