PxJointLimitPyramid#

Defined in include/extensions/PxJointLimit.h

class PxJointLimitPyramid : public PxJointLimitParameters#

Describes a pyramidal joint limit.

See also

PxD6Joint

Public Functions

inline PxJointLimitPyramid(
PxReal yLimitAngleMin,
PxReal yLimitAngleMax,
PxReal zLimitAngleMin,
PxReal zLimitAngleMax,
)#

Construct a pyramid hard limit.

Parameters:
  • yLimitAngleMin[in] The minimum limit angle from the Y-axis of the constraint frame

  • yLimitAngleMax[in] The maximum limit angle from the Y-axis of the constraint frame

  • zLimitAngleMin[in] The minimum limit angle from the Z-axis of the constraint frame

  • zLimitAngleMax[in] The maximum limit angle from the Z-axis of the constraint frame

inline PxJointLimitPyramid(
PxReal yLimitAngleMin,
PxReal yLimitAngleMax,
PxReal zLimitAngleMin,
PxReal zLimitAngleMax,
const PxSpring &spring,
)#

Construct a pyramid soft limit.

Parameters:
  • yLimitAngleMin[in] The minimum limit angle from the Y-axis of the constraint frame

  • yLimitAngleMax[in] The maximum limit angle from the Y-axis of the constraint frame

  • zLimitAngleMin[in] The minimum limit angle from the Z-axis of the constraint frame

  • zLimitAngleMax[in] The maximum limit angle from the Z-axis of the constraint frame

  • spring[in] The stiffness and damping of the limit spring

inline bool isValid() const#

Returns true if the limit is valid.

Returns:

true if the current settings are valid

inline bool isSoft() const#

Public Members

PxReal yAngleMin#

the minimum angle from the Y axis of the constraint frame.

Unit: Angular: Radians Range: Angular: (-PI,PI)Default: -PI/2

PxReal yAngleMax#

the maximum angle from the Y axis of the constraint frame.

Unit: Angular: Radians Range: Angular: (-PI,PI)Default: PI/2

PxReal zAngleMin#

the minimum angle from the Z-axis of the constraint frame.

Unit: Angular: Radians Range: Angular: (-PI,PI)Default: -PI/2

PxReal zAngleMax#

the maximum angle from the Z-axis of the constraint frame.

Unit: Angular: Radians Range: Angular: (-PI,PI)Default: PI/2

PxReal restitution#

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

PxReal bounceThreshold#

determines the minimum impact velocity which will cause the joint to bounce

PxReal stiffness#

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

PxReal damping#

if spring is greater than zero, this is the damping of the limit spring

Range: [0, PX_MAX_F32)Default: 0.0