#include <PxSphericalJoint.h>
Public Member Functions | |
virtual PxJointLimitCone | getLimitCone () const =0 |
Set the limit cone. | |
virtual void | setLimitCone (const PxJointLimitCone &limit)=0 |
Get the limit cone. | |
virtual void | setSphericalJointFlags (PxSphericalJointFlags flags)=0 |
Set the flags specific to the Spherical Joint. | |
virtual void | setSphericalJointFlag (PxSphericalJointFlag::Enum flag, bool value)=0 |
Set a single flag specific to a Spherical Joint to true or false. | |
virtual PxSphericalJointFlags | getSphericalJointFlags (void) const =0 |
Get the flags specific to the Spherical Joint. | |
virtual void | setProjectionLinearTolerance (PxReal tolerance)=0 |
Set the linear tolerance threshold for projection. Projection is enabled if PxConstraintFlag::ePROJECTION is set for the joint. | |
virtual PxReal | getProjectionLinearTolerance () const =0 |
Get the linear tolerance threshold for projection. | |
virtual const char * | getConcreteTypeName () const |
Returns string name of PxSphericalJoint, used for serialization. | |
Protected Member Functions | |
PX_INLINE | PxSphericalJoint (PxType concreteType, PxBaseFlags baseFlags) |
Constructor. | |
PX_INLINE | PxSphericalJoint (PxBaseFlags baseFlags) |
Deserialization constructor. | |
virtual bool | isKindOf (const char *name) const |
Returns whether a given type name matches with the type of this instance. |
A spherical joint removes all linear degrees of freedom from two objects.
The position of the joint on each actor is specified by the origin of the body's joint frame.
A spherical joint may have a cone limit, to restrict the motion to within a certain range. In addition, the bodies may be projected together if the distance between them exceeds a given threshold.
Projection, drive and limits are activated by setting the appropriate flags on the joint.
PX_INLINE PxSphericalJoint::PxSphericalJoint | ( | PxType | concreteType, | |
PxBaseFlags | baseFlags | |||
) | [inline, protected] |
Constructor.
PX_INLINE PxSphericalJoint::PxSphericalJoint | ( | PxBaseFlags | baseFlags | ) | [inline, protected] |
Deserialization constructor.
virtual const char* PxSphericalJoint::getConcreteTypeName | ( | ) | const [inline, virtual] |
virtual PxJointLimitCone PxSphericalJoint::getLimitCone | ( | ) | const [pure virtual] |
Set the limit cone.
If enabled, the limit cone will constrain the angular movement of the joint to lie within an elliptical cone.
virtual PxReal PxSphericalJoint::getProjectionLinearTolerance | ( | ) | const [pure virtual] |
Get the linear tolerance threshold for projection.
virtual PxSphericalJointFlags PxSphericalJoint::getSphericalJointFlags | ( | void | ) | const [pure virtual] |
Get the flags specific to the Spherical Joint.
virtual bool PxSphericalJoint::isKindOf | ( | const char * | name | ) | const [inline, protected, virtual] |
Returns whether a given type name matches with the type of this instance.
Reimplemented from PxJoint.
References PxJoint::isKindOf().
virtual void PxSphericalJoint::setLimitCone | ( | const PxJointLimitCone & | limit | ) | [pure virtual] |
virtual void PxSphericalJoint::setProjectionLinearTolerance | ( | PxReal | tolerance | ) | [pure virtual] |
Set the linear tolerance threshold for projection. Projection is enabled if PxConstraintFlag::ePROJECTION is set for the joint.
If the joint separates by more than this distance along its locked degrees of freedom, the solver will move the bodies to close the distance.
Setting a very small tolerance may result in simulation jitter or other artifacts.
Sometimes it is not possible to project (for example when the joints form a cycle).
Range: [0, PX_MAX_F32)
Default: 1e10f
[in] | tolerance | the linear tolerance threshold |
virtual void PxSphericalJoint::setSphericalJointFlag | ( | PxSphericalJointFlag::Enum | flag, | |
bool | value | |||
) | [pure virtual] |
Set a single flag specific to a Spherical Joint to true or false.
[in] | flag | The flag to set or clear. |
[in] | value | the value to which to set the flag |
virtual void PxSphericalJoint::setSphericalJointFlags | ( | PxSphericalJointFlags | flags | ) | [pure virtual] |
Set the flags specific to the Spherical Joint.
Default PxSphericalJointFlags(0)
[in] | flags | The joint flags. |