#include <PxD6Joint.h>
Public Member Functions | |
virtual void | setMotion (PxD6Axis::Enum axis, PxD6Motion::Enum type)=0 |
Set the motion type around the specified axis. | |
virtual PxD6Motion::Enum | getMotion (PxD6Axis::Enum axis) const =0 |
Get the motion type around the specified axis. | |
virtual PxReal | getTwist () const =0 |
get the twist angle of the joint | |
virtual PxReal | getSwingYAngle () const =0 |
get the swing angle of the joint from the Y axis | |
virtual PxReal | getSwingZAngle () const =0 |
get the swing angle of the joint from the Z axis | |
virtual void | setLinearLimit (const PxJointLinearLimit &limit)=0 |
Set the linear limit for the joint. | |
virtual PxJointLinearLimit | getLinearLimit () const =0 |
Get the linear limit for the joint. | |
virtual void | setTwistLimit (const PxJointAngularLimitPair &limit)=0 |
Set the twist limit for the joint. | |
virtual PxJointAngularLimitPair | getTwistLimit () const =0 |
Get the twist limit for the joint. | |
virtual void | setSwingLimit (const PxJointLimitCone &limit)=0 |
Set the swing cone limit for the joint. | |
virtual PxJointLimitCone | getSwingLimit () const =0 |
Get the cone limit for the joint. | |
virtual void | setDrive (PxD6Drive::Enum index, const PxD6JointDrive &drive)=0 |
Set the drive parameters for the specified drive type. | |
virtual PxD6JointDrive | getDrive (PxD6Drive::Enum index) const =0 |
Get the drive parameters for the specified drive type. | |
virtual void | setDrivePosition (const PxTransform &pose)=0 |
Set the drive goal pose. | |
virtual PxTransform | getDrivePosition () const =0 |
Get the drive goal pose. | |
virtual void | setDriveVelocity (const PxVec3 &linear, const PxVec3 &angular)=0 |
Set the target goal velocity for drive. | |
virtual void | getDriveVelocity (PxVec3 &linear, PxVec3 &angular) const =0 |
Get the target goal velocity for joint drive. | |
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 void | setProjectionAngularTolerance (PxReal tolerance)=0 |
Set the angular tolerance threshold for projection. Projection is enabled if PxConstraintFlag::ePROJECTION is set for the joint. | |
virtual PxReal | getProjectionAngularTolerance () const =0 |
Get the angular tolerance threshold for projection. | |
virtual const char * | getConcreteTypeName () const |
Returns string name of PxD6Joint, used for serialization. | |
Protected Member Functions | |
PX_INLINE | PxD6Joint (PxType concreteType, PxBaseFlags baseFlags) |
Constructor. | |
PX_INLINE | PxD6Joint (PxBaseFlags baseFlags) |
Deserialization constructor. | |
virtual bool | isKindOf (const char *name) const |
Returns whether a given type name matches with the type of this instance. |
It allows the application to individually define the linear and rotational degrees of freedom, and also to configure a variety of limits and driven degrees of freedom.
By default all degrees of freedom are locked. So to create a prismatic joint with free motion along the x-axis:
... joint->setMotion(PxD6Axis::eX, PxD6JointMotion::eFREE); ...
Or a Revolute joint with motion free allowed around the x-axis:
... joint->setMotion(PxD6Axis::eTWIST, PxD6JointMotion::eFREE); ...
Degrees of freedom may also be set to limited instead of locked. There is a single limit value for all linear degrees of freedom, which may act as a linear, circular, or spherical limit depending on which degrees of freedom are limited.
If the twist degree of freedom is limited, is supports upper and lower limits. The two swing degrees of freedom are limited with a cone limit.
PX_INLINE PxD6Joint::PxD6Joint | ( | PxType | concreteType, | |
PxBaseFlags | baseFlags | |||
) | [inline, protected] |
Constructor.
PX_INLINE PxD6Joint::PxD6Joint | ( | PxBaseFlags | baseFlags | ) | [inline, protected] |
Deserialization constructor.
virtual const char* PxD6Joint::getConcreteTypeName | ( | ) | const [inline, virtual] |
virtual PxD6JointDrive PxD6Joint::getDrive | ( | PxD6Drive::Enum | index | ) | const [pure virtual] |
Get the drive parameters for the specified drive type.
[in] | index | the specified drive type |
virtual PxTransform PxD6Joint::getDrivePosition | ( | ) | const [pure virtual] |
Get the target goal velocity for joint drive.
[in] | linear | The goal velocity for linear drive |
[in] | angular | The goal velocity for angular drive |
virtual PxJointLinearLimit PxD6Joint::getLinearLimit | ( | ) | const [pure virtual] |
Get the linear limit for the joint.
virtual PxD6Motion::Enum PxD6Joint::getMotion | ( | PxD6Axis::Enum | axis | ) | const [pure virtual] |
Get the motion type around the specified axis.
[in] | axis | the degree of freedom around which the motion type is specified |
virtual PxReal PxD6Joint::getProjectionAngularTolerance | ( | ) | const [pure virtual] |
Get the angular tolerance threshold for projection.
virtual PxReal PxD6Joint::getProjectionLinearTolerance | ( | ) | const [pure virtual] |
Get the linear tolerance threshold for projection.
virtual PxJointLimitCone PxD6Joint::getSwingLimit | ( | ) | const [pure virtual] |
Get the cone limit for the joint.
virtual PxReal PxD6Joint::getSwingYAngle | ( | ) | const [pure virtual] |
get the swing angle of the joint from the Y axis
virtual PxReal PxD6Joint::getSwingZAngle | ( | ) | const [pure virtual] |
get the swing angle of the joint from the Z axis
virtual PxReal PxD6Joint::getTwist | ( | ) | const [pure virtual] |
get the twist angle of the joint
virtual PxJointAngularLimitPair PxD6Joint::getTwistLimit | ( | ) | const [pure virtual] |
Get the twist limit for the joint.
virtual bool PxD6Joint::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 PxD6Joint::setDrive | ( | PxD6Drive::Enum | index, | |
const PxD6JointDrive & | drive | |||
) | [pure virtual] |
Set the drive parameters for the specified drive type.
[in] | index | the type of drive being specified |
[in] | drive | the drive parameters |
virtual void PxD6Joint::setDrivePosition | ( | const PxTransform & | pose | ) | [pure virtual] |
Set the drive goal pose.
The goal is relative to the constraint frame of actor[0]
Default the identity transform
[in] | pose | The goal drive pose if positional drive is in use. |
virtual void PxD6Joint::setDriveVelocity | ( | const PxVec3 & | linear, | |
const PxVec3 & | angular | |||
) | [pure virtual] |
Set the target goal velocity for drive.
The velocity is measured in the constraint frame of actor[0]
[in] | linear | The goal velocity for linear drive |
[in] | angular | The goal velocity for angular drive |
virtual void PxD6Joint::setLinearLimit | ( | const PxJointLinearLimit & | limit | ) | [pure virtual] |
Set the linear limit for the joint.
A single limit constraints all linear limited degrees of freedom, forming a linear, circular or spherical constraint on motion depending on the number of limited degrees.
[in] | limit | the linear limit structure |
virtual void PxD6Joint::setMotion | ( | PxD6Axis::Enum | axis, | |
PxD6Motion::Enum | type | |||
) | [pure virtual] |
Set the motion type around the specified axis.
Each axis may independently specify that the degree of freedom is locked (blocking relative movement along or around this axis), limited by the corresponding limit, or free.
[in] | axis | the axis around which motion is specified |
[in] | type | the motion type around the specified axis |
virtual void PxD6Joint::setProjectionAngularTolerance | ( | PxReal | tolerance | ) | [pure virtual] |
Set the angular tolerance threshold for projection. Projection is enabled if PxConstraintFlag::ePROJECTION is set for the joint.
If the joint deviates by more than this angle around its locked angular degrees of freedom, the solver will move the bodies to close the angle.
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,Pi]
Default: Pi
[in] | tolerance | the angular tolerance threshold in radians |
virtual void PxD6Joint::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 PxD6Joint::setSwingLimit | ( | const PxJointLimitCone & | limit | ) | [pure virtual] |
Set the swing cone limit for the joint.
The cone limit is used if either or both swing axes are limited. The extents are symmetrical and measured in the frame of the parent. If only one swing degree of freedom is limited, the corresponding value from the cone limit defines the limit range.
[in] | limit | the cone limit structure |
virtual void PxD6Joint::setTwistLimit | ( | const PxJointAngularLimitPair & | limit | ) | [pure virtual] |
Set the twist limit for the joint.
The twist limit controls the range of motion around the twist axis.
The limit angle range is (-2*PI, 2*PI) and the extent of the limit must be strictly less than 2*PI
[in] | limit | the twist limit structure |