Skip to content

Conversation

@Aztro-dev
Copy link

Implemented locked_axes(&self) for all of these structs:

  • FixedJoint
  • PrismaticJoint
  • RevoluteJoint
  • RopeJoint
  • SphericalJoint

locked_axes(&self) returns all of the axes that are currently locked by the joint.

Implemented set_locked_axes(&mut self, axes: JointAxesMask) for all of these structs:

  • PrismaticJoint
  • RevoluteJoint
  • RopeJoint
  • SphericalJoint

set_locked_axes(&mut self, axes: JointAxesMask) allows you to lock axes that aren't already locked by the default axes.

implemented lock_axes(&mut self, axes: JointAxesMask) for all of these structs:

  • PrismaticJointBuilder
  • RevoluteJointBuilder
  • RopeJointBuilder
  • SphericalJointBuilder

lock_axes(&mut self, axes: JointAxesMask) works exactly the same as set_locked_axes(), but is only implemented for Joint builders.

Made JointAxesMask and JointAxis publicly available, rather than having to import them through rapier.

@ThierryBerger
Copy link
Contributor

ThierryBerger commented May 21, 2024

Have you considered getters ?

    pub fn get(&self) -> &GenericJoint {
        &self.data
    }

    pub fn get_mut(&mut self) -> &mut GenericJoint {
        &mut self.data
    }

or deref / derefmut derive ?

@ThierryBerger ThierryBerger added the question Further information is requested label May 21, 2024
@ThierryBerger
Copy link
Contributor

ThierryBerger commented May 21, 2024

I realized some joints data are pub (SpringJoint, ImpulseJoint), some others are not (those you modified: PrismaticJoint...).

I'm curious why there is a visibility difference there @sebcrozet ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

D-Medium P-Medium question Further information is requested

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants