Class PxJointLimitParameters

java.lang.Object
physx.NativeObject
physx.extensions.PxJointLimitParameters
Direct Known Subclasses:
PxJointAngularLimitPair, PxJointLimitCone, PxJointLimitPyramid, PxJointLinearLimit, PxJointLinearLimitPair

public class PxJointLimitParameters extends NativeObject
Describes the parameters for a joint limit.

Limits are enabled or disabled by setting flags or other configuration parameters joints, see the documentation for specific joint types for details.

  • Field Details

    • SIZEOF

      public static final int SIZEOF
    • ALIGNOF

      public static final int ALIGNOF
      See Also:
  • Constructor Details

    • PxJointLimitParameters

      protected PxJointLimitParameters()
    • PxJointLimitParameters

      protected PxJointLimitParameters(long address)
  • Method Details

    • wrapPointer

      public static PxJointLimitParameters wrapPointer(long address)
    • arrayGet

      public static PxJointLimitParameters arrayGet(long baseAddress, int index)
    • getRestitution

      public float getRestitution()
      Controls the amount of bounce when the joint hits a limit.

      A restitution value of 1.0 causes the joint to bounce back with the velocity which it hit the limit. A value of zero causes the joint to stop dead.

      In situations where the joint has many locked DOFs (e.g. 5) the restitution may not be applied correctly. This is due to a limitation in the solver which causes the restitution velocity to become zero as the solver enforces constraints on the other DOFs.

      This limitation applies to both angular and linear limits, however it is generally most apparent with limited angular DOFs. Disabling joint projection and increasing the solver iteration count may improve this behavior to some extent.

      Also, combining soft joint limits with joint drives driving against those limits may affect stability.

      Range: [0,1]
      Default: 0.0

    • setRestitution

      public void setRestitution(float value)
      Controls the amount of bounce when the joint hits a limit.

      A restitution value of 1.0 causes the joint to bounce back with the velocity which it hit the limit. A value of zero causes the joint to stop dead.

      In situations where the joint has many locked DOFs (e.g. 5) the restitution may not be applied correctly. This is due to a limitation in the solver which causes the restitution velocity to become zero as the solver enforces constraints on the other DOFs.

      This limitation applies to both angular and linear limits, however it is generally most apparent with limited angular DOFs. Disabling joint projection and increasing the solver iteration count may improve this behavior to some extent.

      Also, combining soft joint limits with joint drives driving against those limits may affect stability.

      Range: [0,1]
      Default: 0.0

    • getBounceThreshold

      public float getBounceThreshold()
      determines the minimum impact velocity which will cause the joint to bounce
    • setBounceThreshold

      public void setBounceThreshold(float value)
      determines the minimum impact velocity which will cause the joint to bounce
    • getStiffness

      public float getStiffness()
      if greater than zero, the limit is soft, i.e. a spring pulls the joint back to the limit

      Range: [0, PX_MAX_F32)
      Default: 0.0

    • setStiffness

      public void setStiffness(float value)
      if greater than zero, the limit is soft, i.e. a spring pulls the joint back to the limit

      Range: [0, PX_MAX_F32)
      Default: 0.0

    • getDamping

      public float getDamping()
      if spring is greater than zero, this is the damping of the limit spring

      Range: [0, PX_MAX_F32)
      Default: 0.0

    • setDamping

      public void setDamping(float value)
      if spring is greater than zero, this is the damping of the limit spring

      Range: [0, PX_MAX_F32)
      Default: 0.0

    • isValid

      public boolean isValid()
      Returns true if the current settings are valid.
      Returns:
      true if the current settings are valid
    • isSoft

      public boolean isSoft()
      Returns:
      WebIDL type: boolean