30 #ifndef PX_EXTENSIONS_JOINT_LIMIT 31 #define PX_EXTENSIONS_JOINT_LIMIT 122 bounceThreshold (0.0f),
125 contactDistance (0.0f)
131 bounceThreshold (p.bounceThreshold),
134 contactDistance (p.contactDistance)
148 PxIsFinite(bounceThreshold) && bounceThreshold >= 0 &&
149 PxIsFinite(contactDistance) && contactDistance >= 0;
261 bounceThreshold = 2.0f*scale.
length;
329 bounceThreshold = 0.5f;
410 bounceThreshold = 0.5f;
505 yAngleMin(yLimitAngleMin),
506 yAngleMax(yLimitAngleMax),
507 zAngleMin(zLimitAngleMin),
508 zAngleMax(zLimitAngleMax)
510 if(contactDist == -1.0f)
512 const PxReal contactDistY =
PxMin(0.1f, 0.49f*(yLimitAngleMax - yLimitAngleMin));
513 const PxReal contactDistZ =
PxMin(0.1f, 0.49f*(zLimitAngleMax - zLimitAngleMin));
521 bounceThreshold = 0.5f;
536 yAngleMin(yLimitAngleMin),
537 yAngleMax(yLimitAngleMax),
538 zAngleMin(zLimitAngleMin),
539 zAngleMax(zLimitAngleMax)
557 yAngleMax>=yAngleMin && zAngleMax>=zAngleMin;
Definition: GuContactBuffer.h:37
PX_INLINE bool isValid() const
Returns true if the current settings are valid.
Definition: PxJointLimit.h:143
PxJointLimitCone(PxReal yLimitAngle, PxReal zLimitAngle, const PxSpring &spring)
Construct a cone soft limit.
Definition: PxJointLimit.h:422
PxJointLimitPyramid(PxReal yLimitAngleMin, PxReal yLimitAngleMax, PxReal zLimitAngleMin, PxReal zLimitAngleMax, PxReal contactDist=-1.0f)
Construct a pyramid hard limit.
Definition: PxJointLimit.h:504
PxJointLinearLimitPair(const PxTolerancesScale &scale, PxReal lowerLimit=-PX_MAX_F32/3.0f, PxReal upperLimit=PX_MAX_F32/3.0f, PxReal contactDist=-1.0f)
Construct a linear hard limit pair. The lower distance value must be less than the upper distance val...
Definition: PxJointLimit.h:256
PxReal yAngleMax
the maximum angle from the Y axis of the constraint frame.
Definition: PxJointLimit.h:473
PxReal zAngleMin
the minimum angle from the Z-axis of the constraint frame.
Definition: PxJointLimit.h:482
PX_INLINE bool isValid() const
Returns true if the limit is valid.
Definition: PxJointLimit.h:286
PxReal restitution
restitution parameter for determining additional "bounce"
Definition: PxConstraintDesc.h:104
PxReal bounceThreshold
Definition: PxJointLimit.h:85
static const float PxPi
Definition: PxMath.h:58
PxJointLimitPyramid(PxReal yLimitAngleMin, PxReal yLimitAngleMax, PxReal zLimitAngleMin, PxReal zLimitAngleMax, const PxSpring &spring)
Construct a pyramid soft limit.
Definition: PxJointLimit.h:535
float PxReal
Definition: PxSimpleTypes.h:78
struct @6::SpringModifiers spring
PxReal restitution
Controls the amount of bounce when the joint hits a limit.
Definition: PxJointLimit.h:80
PxJointAngularLimitPair(PxReal lowerLimit, PxReal upperLimit, PxReal contactDist=-1.0f)
construct an angular hard limit pair.
Definition: PxJointLimit.h:324
Describes a one-sided linear limit.
Definition: PxJointLimit.h:165
PxJointLinearLimit(PxReal extent, const PxSpring &spring)
construct a linear soft limit
Definition: PxJointLimit.h:205
PX_INLINE bool isValid() const
Returns true if the limit is valid.
Definition: PxJointLimit.h:356
PxJointLimitCone(PxReal yLimitAngle, PxReal zLimitAngle, PxReal contactDist=-1.0f)
Construct a cone hard limit.
Definition: PxJointLimit.h:405
Describes the parameters for a joint limit.
Definition: PxJointLimit.h:52
PxReal stiffness
spring parameter, for spring constraints
Definition: PxConstraintDesc.h:99
~PxJointLimitParameters()
Definition: PxJointLimit.h:158
PX_INLINE bool isSoft() const
Definition: PxJointLimit.h:152
PxJointLimitParameters(const PxJointLimitParameters &p)
Definition: PxJointLimit.h:129
Definition: PxJointLimit.h:295
PX_CUDA_CALLABLE PX_FORCE_INLINE T PxMin(T a, T b)
The return value is the lesser of the two specified values.
Definition: PxMath.h:86
PxReal upper
the range of the limit. The upper limit must be no lower than the lower limit, and if they are equal ...
Definition: PxJointLimit.h:244
Describes a pyramidal joint limit.
Definition: PxJointLimit.h:448
Describes a two-sided limit.
Definition: PxJointLimit.h:228
Definition: PxJoint.h:381
#define PX_MAX_F32
Definition: PxSimpleTypes.h:86
PxReal damping
damping parameter, for spring constraints
Definition: PxConstraintDesc.h:100
PxReal length
Definition: PxTolerancesScale.h:67
PxJointAngularLimitPair(PxReal lowerLimit, PxReal upperLimit, const PxSpring &spring)
construct an angular soft limit pair.
Definition: PxJointLimit.h:343
Class to define the scale at which simulation runs. Most simulation tolerances are calculated in term...
Definition: PxTolerancesScale.h:56
PxJointLinearLimit(const PxTolerancesScale &scale, PxReal extent, PxReal contactDist=-1.0f)
construct a linear hard limit
Definition: PxJointLimit.h:191
PxReal contactDistance
the distance inside the limit value at which the limit will be considered to be active by the solver...
Definition: PxJointLimit.h:118
PxReal zAngleMax
the maximum angle from the Z-axis of the constraint frame.
Definition: PxJointLimit.h:491
PX_CUDA_CALLABLE PX_FORCE_INLINE bool PxIsFinite(float f)
returns true if the passed number is a finite floating point number as opposed to INF...
Definition: PxMath.h:292
PxJointLinearLimitPair(PxReal lowerLimit, PxReal upperLimit, const PxSpring &spring)
construct a linear soft limit pair
Definition: PxJointLimit.h:273
PxReal yAngle
the maximum angle from the Y axis of the constraint frame.
Definition: PxJointLimit.h:385
PxReal yAngleMin
the minimum angle from the Y axis of the constraint frame.
Definition: PxJointLimit.h:464
Describes an elliptical conical joint limit. Note that very small or highly elliptical limit cones ma...
Definition: PxJointLimit.h:369
PX_INLINE bool isValid() const
Returns true if the limit is valid.
Definition: PxJointLimit.h:216
PxReal zAngle
the maximum angle from the Z-axis of the constraint frame.
Definition: PxJointLimit.h:394
PxReal value
the extent of the limit.
Definition: PxJointLimit.h:180
PxReal upper
the range of the limit. The upper limit must be no lower than the lower limit.
Definition: PxJointLimit.h:311
PxJointLimitParameters()
Definition: PxJointLimit.h:120
#define PX_INLINE
Definition: PxPreprocessor.h:336
PxReal damping
if spring is greater than zero, this is the damping of the limit spring
Definition: PxJointLimit.h:101
PX_INLINE bool isValid() const
Returns true if the limit is valid.
Definition: PxJointLimit.h:435
PxReal stiffness
if greater than zero, the limit is soft, i.e. a spring pulls the joint back to the limit ...
Definition: PxJointLimit.h:93
PX_INLINE bool isValid() const
Returns true if the limit is valid.
Definition: PxJointLimit.h:550