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
    • setProjectionLinearTolerance

      @Deprecated public void setProjectionLinearTolerance(float tolerance)
      Deprecated.
      Set the linear tolerance threshold for projection. Projection is enabled if PxConstraintFlag::ePROJECTION is set for the joint.

      If the joint separates by more than this distance along its locked degrees of freedom, the solver will move the bodies to close the distance.

      Setting a very small tolerance may result in simulation jitter or other artifacts.

      Sometimes it is not possible to project (for example when the joints form a cycle).

      Range: [0, PX_MAX_F32)
      Default: 1e10f

      Parameters:
      tolerance - the linear tolerance threshold
      See Also:
    • getProjectionLinearTolerance

      @Deprecated public float getProjectionLinearTolerance()
      Deprecated.
      Get the linear tolerance threshold for projection.
      Returns:
      the linear tolerance threshold
      See Also: