PxJointLimitCone
Defined in include/extensions/PxJointLimit.h
Inheritance Relationships
Base Type
public PxJointLimitParameters
(PxJointLimitParameters)
-
class PxJointLimitCone : public PxJointLimitParameters
Describes an elliptical conical joint limit.
Note that very small or highly elliptical limit cones may result in jitter.
See also
Public Functions
-
inline PxJointLimitCone(PxReal yLimitAngle, PxReal zLimitAngle, PxReal contactDist_deprecated = -1.0f)
Construct a cone hard limit.
See also
- Parameters
yLimitAngle – [in] The limit angle from the Y-axis of the constraint frame
zLimitAngle – [in] The limit angle from the Z-axis of the constraint frame
contactDist_deprecated – [in] The distance from the limit at which it becomes active. Default is the lesser of 0.1 radians, and 0.49 * the lower of the limit angles. This is deprecated in PhysX 5.1.
-
inline PxJointLimitCone(PxReal yLimitAngle, PxReal zLimitAngle, const PxSpring &spring)
Construct a cone soft limit.
See also
- Parameters
yLimitAngle – [in] The limit angle from the Y-axis of the constraint frame
zLimitAngle – [in] The 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 yAngle
the maximum angle from the Y axis of the constraint frame.
Unit: Angular: Radians Range: Angular: (0,PI)Default: PI/2
-
PxReal zAngle
the maximum angle from the Z-axis of the constraint frame.
Unit: Angular: Radians Range: Angular: (0,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 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
-
PxReal contactDistance_deprecated
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
Note
This is deprecated in PhysX 5.1
-
inline PxJointLimitCone(PxReal yLimitAngle, PxReal zLimitAngle, PxReal contactDist_deprecated = -1.0f)