Public Member Functions | Protected Member Functions | List of all members
PxD6Joint Class Referenceabstract

A D6 joint is a general constraint between two actors. More...

#include <PxD6Joint.h>

Inheritance diagram for PxD6Joint:
Inheritance graph
[legend]
Collaboration diagram for PxD6Joint:
Collaboration graph
[legend]

Public Member Functions

virtual void setMotion (PxD6Axis::Enum axis, PxD6Motion::Enum type)=0
 Set the motion type around the specified axis. More...
 
virtual PxD6Motion::Enum getMotion (PxD6Axis::Enum axis) const =0
 Get the motion type around the specified axis. More...
 
virtual PxReal getTwist () const =0
 get the twist angle of the joint More...
 
virtual PxReal getSwingYAngle () const =0
 get the swing angle of the joint from the Y axis More...
 
virtual PxReal getSwingZAngle () const =0
 get the swing angle of the joint from the Z axis More...
 
virtual void setLinearLimit (const PxJointLinearLimit &limit)=0
 Set the linear limit for the joint. More...
 
virtual PxJointLinearLimit getLinearLimit () const =0
 Get the linear limit for the joint. More...
 
virtual void setTwistLimit (const PxJointAngularLimitPair &limit)=0
 Set the twist limit for the joint. More...
 
virtual PxJointAngularLimitPair getTwistLimit () const =0
 Get the twist limit for the joint. More...
 
virtual void setSwingLimit (const PxJointLimitCone &limit)=0
 Set the swing cone limit for the joint. More...
 
virtual PxJointLimitCone getSwingLimit () const =0
 Get the cone limit for the joint. More...
 
virtual void setDrive (PxD6Drive::Enum index, const PxD6JointDrive &drive)=0
 Set the drive parameters for the specified drive type. More...
 
virtual PxD6JointDrive getDrive (PxD6Drive::Enum index) const =0
 Get the drive parameters for the specified drive type. More...
 
virtual void setDrivePosition (const PxTransform &pose)=0
 Set the drive goal pose. More...
 
virtual PxTransform getDrivePosition () const =0
 Get the drive goal pose. More...
 
virtual void setDriveVelocity (const PxVec3 &linear, const PxVec3 &angular)=0
 Set the target goal velocity for drive. More...
 
virtual void getDriveVelocity (PxVec3 &linear, PxVec3 &angular) const =0
 Get the target goal velocity for joint drive. More...
 
virtual void setProjectionLinearTolerance (PxReal tolerance)=0
 Set the linear tolerance threshold for projection. Projection is enabled if PxConstraintFlag::ePROJECTION is set for the joint. More...
 
virtual PxReal getProjectionLinearTolerance () const =0
 Get the linear tolerance threshold for projection. More...
 
virtual void setProjectionAngularTolerance (PxReal tolerance)=0
 Set the angular tolerance threshold for projection. Projection is enabled if PxConstraintFlag::ePROJECTION is set for the joint. More...
 
virtual PxReal getProjectionAngularTolerance () const =0
 Get the angular tolerance threshold for projection. More...
 
virtual const char * getConcreteTypeName () const
 Returns string name of PxD6Joint, used for serialization. More...
 
- Public Member Functions inherited from PxJoint
virtual void setActors (PxRigidActor *actor0, PxRigidActor *actor1)=0
 Set the actors for this joint. More...
 
virtual void getActors (PxRigidActor *&actor0, PxRigidActor *&actor1) const =0
 Get the actors for this joint. More...
 
virtual void setLocalPose (PxJointActorIndex::Enum actor, const PxTransform &localPose)=0
 Set the joint local pose for an actor. More...
 
virtual PxTransform getLocalPose (PxJointActorIndex::Enum actor) const =0
 get the joint local pose for an actor. More...
 
virtual PxTransform getRelativeTransform () const =0
 get the relative pose for this joint More...
 
virtual PxVec3 getRelativeLinearVelocity () const =0
 get the relative linear velocity of the joint More...
 
virtual PxVec3 getRelativeAngularVelocity () const =0
 get the relative angular velocity of the joint More...
 
virtual void setBreakForce (PxReal force, PxReal torque)=0
 set the break force for this joint. More...
 
virtual void getBreakForce (PxReal &force, PxReal &torque) const =0
 get the break force for this joint. More...
 
virtual void setConstraintFlags (PxConstraintFlags flags)=0
 set the constraint flags for this joint. More...
 
virtual void setConstraintFlag (PxConstraintFlag::Enum flag, bool value)=0
 set a constraint flags for this joint to a specified value. More...
 
virtual PxConstraintFlags getConstraintFlags () const =0
 get the constraint flags for this joint. More...
 
virtual void setInvMassScale0 (PxReal invMassScale)=0
 set the inverse mass scale for actor0. More...
 
virtual PxReal getInvMassScale0 () const =0
 get the inverse mass scale for actor0. More...
 
virtual void setInvInertiaScale0 (PxReal invInertiaScale)=0
 set the inverse inertia scale for actor0. More...
 
virtual PxReal getInvInertiaScale0 () const =0
 get the inverse inertia scale for actor0. More...
 
virtual void setInvMassScale1 (PxReal invMassScale)=0
 set the inverse mass scale for actor1. More...
 
virtual PxReal getInvMassScale1 () const =0
 get the inverse mass scale for actor1. More...
 
virtual void setInvInertiaScale1 (PxReal invInertiaScale)=0
 set the inverse inertia scale for actor1. More...
 
virtual PxReal getInvInertiaScale1 () const =0
 get the inverse inertia scale for actor1. More...
 
virtual PxConstraintgetConstraint () const =0
 Retrieves the PxConstraint corresponding to this joint. More...
 
virtual void setName (const char *name)=0
 Sets a name string for the object that can be retrieved with getName(). More...
 
virtual const char * getName () const =0
 Retrieves the name string set with setName(). More...
 
virtual void release ()=0
 Deletes the joint. More...
 
virtual PxScenegetScene () const =0
 Retrieves the scene which this joint belongs to. More...
 
PX_DEPRECATED PxJointType::Enum getType ()
 Deprecated method to retrieves the type of this joint. Please use getConcreteType() More...
 
- Public Member Functions inherited from PxBase
template<class T >
T * is ()
 
template<class T >
const T * is () const
 
PX_INLINE PxType getConcreteType () const
 Returns concrete type of object. More...
 
PX_INLINE void setBaseFlag (PxBaseFlag::Enum flag, bool value)
 Set PxBaseFlag. More...
 
PX_INLINE void setBaseFlags (PxBaseFlags inFlags)
 Set PxBaseFlags. More...
 
PX_INLINE PxBaseFlags getBaseFlags () const
 Returns PxBaseFlags. More...
 
virtual bool isReleasable () const
 Whether the object is subordinate. More...
 

Protected Member Functions

PX_INLINE PxD6Joint (PxType concreteType, PxBaseFlags baseFlags)
 Constructor. More...
 
PX_INLINE PxD6Joint (PxBaseFlags baseFlags)
 Deserialization constructor. More...
 
virtual bool isKindOf (const char *name) const
 Returns whether a given type name matches with the type of this instance. More...
 
- Protected Member Functions inherited from PxJoint
virtual ~PxJoint ()
 
PX_INLINE PxJoint (PxType concreteType, PxBaseFlags baseFlags)
 Constructor. More...
 
PX_INLINE PxJoint (PxBaseFlags baseFlags)
 Deserialization constructor. More...
 
- Protected Member Functions inherited from PxBase
PX_INLINE PxBase (PxType concreteType, PxBaseFlags baseFlags)
 Constructor setting concrete type and base flags. More...
 
PX_INLINE PxBase (PxBaseFlags baseFlags)
 Deserialization constructor setting base flags. More...
 
virtual ~PxBase ()
 Destructor. More...
 
template<class T >
bool typeMatch () const
 

Additional Inherited Members

- Static Public Member Functions inherited from PxJoint
static void getBinaryMetaData (PxOutputStream &stream)
 Put class meta data in stream, used for serialization. More...
 
- Public Attributes inherited from PxJoint
void * userData
 user can assign this to whatever, usually to create a 1:1 relationship with a user object. More...
 
- Protected Attributes inherited from PxBase
PxType mConcreteType
 
PxBaseFlags mBaseFlags
 

Detailed Description

A D6 joint is a general constraint between two actors.

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.

See Also
PxD6JointCreate() PxJoint

Constructor & Destructor Documentation

PX_INLINE PxD6Joint::PxD6Joint ( PxType  concreteType,
PxBaseFlags  baseFlags 
)
inlineprotected

Constructor.

PX_INLINE PxD6Joint::PxD6Joint ( PxBaseFlags  baseFlags)
inlineprotected

Deserialization constructor.

Member Function Documentation

virtual const char* PxD6Joint::getConcreteTypeName ( ) const
inlinevirtual

Returns string name of PxD6Joint, used for serialization.

Reimplemented from PxBase.

virtual PxD6JointDrive PxD6Joint::getDrive ( PxD6Drive::Enum  index) const
pure virtual

Get the drive parameters for the specified drive type.

Parameters
[in]indexthe specified drive type
See Also
setDrive() PxD6JointDrive
virtual PxTransform PxD6Joint::getDrivePosition ( ) const
pure virtual

Get the drive goal pose.

See Also
getDrivePosition()
virtual void PxD6Joint::getDriveVelocity ( PxVec3 linear,
PxVec3 angular 
) const
pure virtual

Get the target goal velocity for joint drive.

Parameters
[in]linearThe goal velocity for linear drive
[in]angularThe goal velocity for angular drive
See Also
setDriveVelocity()
virtual PxJointLinearLimit PxD6Joint::getLinearLimit ( ) const
pure virtual

Get the linear limit for the joint.

Returns
the linear limit structure
See Also
setLinearLimit() PxJointLinearLimit
virtual PxD6Motion::Enum PxD6Joint::getMotion ( PxD6Axis::Enum  axis) const
pure virtual

Get the motion type around the specified axis.

See Also
setMotion() PxD6Axis PxD6Motion
Parameters
[in]axisthe degree of freedom around which the motion type is specified
Returns
the motion type around the specified axis
virtual PxReal PxD6Joint::getProjectionAngularTolerance ( ) const
pure virtual

Get the angular tolerance threshold for projection.

Returns
tolerance the angular tolerance threshold in radians
See Also
setProjectionAngularTolerance()
virtual PxReal PxD6Joint::getProjectionLinearTolerance ( ) const
pure virtual

Get the linear tolerance threshold for projection.

Returns
the linear tolerance threshold
See Also
setProjectionLinearTolerance()
virtual PxJointLimitCone PxD6Joint::getSwingLimit ( ) const
pure virtual

Get the cone limit for the joint.

Returns
the swing limit structure
See Also
setLimitCone() PxJointLimitCone
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.

Returns
the twist limit structure
See Also
setTwistLimit() PxJointAngularLimitPair
virtual bool PxD6Joint::isKindOf ( const char *  name) const
inlineprotectedvirtual

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.

Parameters
[in]indexthe type of drive being specified
[in]drivethe drive parameters
See Also
getDrive() PxD6JointDrive

Default The default drive spring and damping values are zero, the force limit is zero, and no flags are set.

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

Parameters
[in]poseThe goal drive pose if positional drive is in use.
See Also
setDrivePosition()
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]

Parameters
[in]linearThe goal velocity for linear drive
[in]angularThe goal velocity for angular drive
See Also
getDriveVelocity()
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.

Parameters
[in]limitthe linear limit structure
See Also
getLinearLimit()
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.

Parameters
[in]axisthe axis around which motion is specified
[in]typethe motion type around the specified axis

Default: all degrees of freedom are locked

See Also
getMotion() PxD6Axis PxD6Motion
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

Parameters
[in]tolerancethe angular tolerance threshold in radians
Note
Angular projection is implemented only for the case of two or three locked angular degrees of freedom.
See Also
getProjectionAngularTolerance() PxJoint::setConstraintFlag() PxConstraintFlag::ePROJECTION
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

Parameters
[in]tolerancethe linear tolerance threshold
See Also
getProjectionLinearTolerance() PxJoint::setConstraintFlags() PxConstraintFlag::ePROJECTION
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.

Parameters
[in]limitthe cone limit structure
See Also
getLimitCone() PxJointLimitCone
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

Parameters
[in]limitthe twist limit structure
See Also
getTwistLimit() PxJointAngularLimitPair

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


Copyright © 2008-2015 NVIDIA Corporation, 2701 San Tomas Expressway, Santa Clara, CA 95050 U.S.A. All rights reserved. www.nvidia.com