Class PxSphericalJoint


public class PxSphericalJoint extends PxJoint
A joint which behaves in a similar way to a ball and socket.

A spherical joint removes all linear degrees of freedom from two objects.

The position of the joint on each actor is specified by the origin of the body's joint frame.

A spherical joint may have a cone limit, to restrict the motion to within a certain range. In addition, the bodies may be projected together if the distance between them exceeds a given threshold.

Projection, drive and limits are activated by setting the appropriate flags on the joint.

See Also:
  • Field Details

    • SIZEOF

      public static final int SIZEOF
    • ALIGNOF

      public static final int ALIGNOF
      See Also:
  • Constructor Details

    • PxSphericalJoint

      protected PxSphericalJoint()
    • PxSphericalJoint

      protected PxSphericalJoint(long address)
  • Method Details

    • wrapPointer

      public static PxSphericalJoint wrapPointer(long address)
    • arrayGet

      public static PxSphericalJoint arrayGet(long baseAddress, int index)
    • destroy

      public void destroy()
    • setLimitCone

      public void setLimitCone(PxJointLimitCone limitCone)
      Get the limit cone.
      See Also:
    • getSwingYAngle

      public float getSwingYAngle()
      get the swing angle of the joint from the Y axis
    • getSwingZAngle

      public float getSwingZAngle()
      get the swing angle of the joint from the Z axis
    • setSphericalJointFlags

      public void setSphericalJointFlags(PxSphericalJointFlags flags)
      Set the flags specific to the Spherical Joint.

      Default PxSphericalJointFlags(0)

      Parameters:
      flags - The joint flags.
    • setSphericalJointFlag

      public void setSphericalJointFlag(PxSphericalJointFlagEnum flag, boolean value)
      Set a single flag specific to a Spherical Joint to true or false.
      Parameters:
      flag - The flag to set or clear.
      value - the value to which to set the flag
    • getSphericalJointFlags

      public PxSphericalJointFlags getSphericalJointFlags()
      Get the flags specific to the Spherical Joint.
      Returns:
      the joint flags