PxJointLimitParameters Class Reference

Describes the parameters for a joint limit. More...

#include <PxJointLimit.h>

Inheritance diagram for PxJointLimitParameters:

Public Member Functions

 PxJointLimitParameters ()
 
 PxJointLimitParameters (const PxJointLimitParameters &p)
 
PX_INLINE bool isValid () const
 Returns true if the current settings are valid. More...
 
PX_INLINE bool isSoft () const
 

Public Attributes

PxReal restitution
 Controls the amount of bounce when the joint hits a limit. More...
 
PxReal bounceThreshold
 
PxReal stiffness
 if greater than zero, the limit is soft, i.e. a spring pulls the joint back to the limit More...
 
PxReal damping
 if spring is greater than zero, this is the damping of the limit spring More...
 
PxReal contactDistance
 the distance inside the limit value at which the limit will be considered to be active by the solver. As this value is made larger, the limit becomes active more quickly. It thus becomes less likely to violate the extents of the limit, but more expensive. More...
 

Protected Member Functions

 ~PxJointLimitParameters ()
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ PxJointLimitParameters() [1/2]

PxJointLimitParameters::PxJointLimitParameters ( )
inline

◆ PxJointLimitParameters() [2/2]

PxJointLimitParameters::PxJointLimitParameters ( const PxJointLimitParameters p)
inline

◆ ~PxJointLimitParameters()

PxJointLimitParameters::~PxJointLimitParameters ( )
inlineprotected

Member Function Documentation

◆ isSoft()

PX_INLINE bool PxJointLimitParameters::isSoft ( ) const
inline

References damping, and stiffness.

◆ isValid()

PX_INLINE bool PxJointLimitParameters::isValid ( ) const
inline

Returns true if the current settings are valid.

Returns
true if the current settings are valid

References damping, PxIsFinite(), restitution, and stiffness.

Referenced by PxJointLinearLimit::isValid(), PxJointLinearLimitPair::isValid(), PxJointAngularLimitPair::isValid(), PxJointLimitCone::isValid(), and PxJointLimitPyramid::isValid().

Member Data Documentation

◆ bounceThreshold

PxReal PxJointLimitParameters::bounceThreshold

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

◆ contactDistance

PxReal PxJointLimitParameters::contactDistance

the distance inside the limit value at which the limit will be considered to be active by the solver. As this value is made larger, the limit becomes active more quickly. It thus becomes less likely to violate the extents of the limit, but more expensive.

The contact distance should be less than the limit angle or distance, and in the case of a pair limit, less than half the distance between the upper and lower bounds. Exceeding this value will result in the limit being active all the time.

Making this value too small can result in jitter around the limit.

Default: depends on the joint

See also
PxPhysics::getTolerancesScale()

Referenced by PxJointAngularLimitPair::PxJointAngularLimitPair(), PxJointLimitCone::PxJointLimitCone(), PxJointLimitPyramid::PxJointLimitPyramid(), PxJointLinearLimit::PxJointLinearLimit(), and PxJointLinearLimitPair::PxJointLinearLimitPair().

◆ damping

PxReal PxJointLimitParameters::damping

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

Range: [0, PX_MAX_F32)
Default: 0.0

◆ restitution

PxReal PxJointLimitParameters::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

◆ stiffness

PxReal PxJointLimitParameters::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


The documentation for this class was generated from the following file: