35#include "extensions/PxJoint.h"
36#include "extensions/PxJointLimit.h"
37#include "foundation/PxFlags.h"
57PxD6Joint*
PxD6JointCreate(PxPhysics& physics, PxRigidActor* actor0,
const PxTransform& localFrame0, PxRigidActor* actor1,
const PxTransform& localFrame1);
136typedef PxFlags<PxD6JointDriveFlag::Enum, PxU32> PxD6JointDriveFlags;
170 PxD6JointDrive(PxReal driveStiffness, PxReal driveDamping, PxReal driveForceLimit,
bool isAcceleration =
false)
171 :
PxSpring(driveStiffness, driveDamping)
172 , forceLimit(driveForceLimit)
181 return PxIsFinite(stiffness) && stiffness>=0 &&
parameters for configuring the drive model of a PxD6Joint
Definition PxD6Joint.h:145
PxReal forceLimit
the force limit of the drive - may be an impulse or a force depending on PxConstraintFlag::eDRIVE_LIM...
Definition PxD6Joint.h:154
PxD6JointDrive(PxReal driveStiffness, PxReal driveDamping, PxReal driveForceLimit, bool isAcceleration=false)
constructor a PxD6JointDrive.
Definition PxD6Joint.h:170
PxD6JointDriveFlags flags
the joint drive flags
Definition PxD6Joint.h:155
bool isValid() const
returns true if the drive is valid
Definition PxD6Joint.h:179
PxD6JointDrive()
default constructor for PxD6JointDrive.
Definition PxD6Joint.h:160
A D6 joint is a general constraint between two actors.
Definition PxD6Joint.h:224
virtual PxD6Motion::Enum getMotion(PxD6Axis::Enum axis) const =0
Get the motion type around the specified axis.
virtual void setTwistLimit(const PxJointAngularLimitPair &limit)=0
Set the twist limit for the joint.
virtual PxJointLinearLimitPair getLinearLimit(PxD6Axis::Enum axis) const =0
Get the linear limit for a given linear axis.
virtual PxTransform getDrivePosition() const =0
Get the drive goal pose.
virtual void setSwingLimit(const PxJointLimitCone &limit)=0
Set the swing cone limit for the joint.
virtual PxReal getSwingYAngle() const =0
get the swing angle of the joint from the Y axis
virtual PX_DEPRECATED PxReal getProjectionLinearTolerance() const =0
Get the linear tolerance threshold for projection.
virtual PX_DEPRECATED void setProjectionAngularTolerance(PxReal tolerance)=0
Set the angular tolerance threshold for projection. Projection is enabled if PxConstraintFlag::ePROJE...
PX_DEPRECATED PX_FORCE_INLINE void setLinearLimit(const PxJointLinearLimit &limit)
Definition PxD6Joint.h:299
virtual PxJointLinearLimit getDistanceLimit() const =0
Get the distance limit for the joint.
virtual PxD6JointDrive getDrive(PxD6Drive::Enum index) const =0
Get the drive parameters for the specified drive type.
virtual void setPyramidSwingLimit(const PxJointLimitPyramid &limit)=0
Set a pyramidal swing limit for the joint.
virtual void setMotion(PxD6Axis::Enum axis, PxD6Motion::Enum type)=0
Set the motion type around the specified axis.
PX_INLINE PxD6Joint(PxBaseFlags baseFlags)
Deserialization constructor.
Definition PxD6Joint.h:555
virtual void setDrive(PxD6Drive::Enum index, const PxD6JointDrive &drive)=0
Set the drive parameters for the specified drive type.
virtual bool isKindOf(const char *name) const
Returns whether a given type name matches with the type of this instance.
Definition PxD6Joint.h:560
virtual void setLinearLimit(PxD6Axis::Enum axis, const PxJointLinearLimitPair &limit)=0
Set the linear limit for a given linear axis.
virtual void setDriveVelocity(const PxVec3 &linear, const PxVec3 &angular, bool autowake=true)=0
Set the target goal velocity for drive.
virtual PxReal getSwingZAngle() const =0
get the swing angle of the joint from the Z axis
virtual PX_DEPRECATED PxReal getProjectionAngularTolerance() const =0
Get the angular tolerance threshold for projection.
virtual void setDistanceLimit(const PxJointLinearLimit &limit)=0
Set the distance limit for the joint.
virtual PxJointAngularLimitPair getTwistLimit() const =0
Get the twist limit for the joint.
virtual PxReal getTwistAngle() const =0
get the twist angle of the joint, in the range (-2*Pi, 2*Pi]
virtual void setDrivePosition(const PxTransform &pose, bool autowake=true)=0
Set the drive goal pose.
PX_INLINE PxD6Joint(PxType concreteType, PxBaseFlags baseFlags)
Constructor.
Definition PxD6Joint.h:550
PX_DEPRECATED PX_FORCE_INLINE PxReal getTwist() const
get the twist angle of the joint
Definition PxD6Joint.h:262
virtual PxJointLimitPyramid getPyramidSwingLimit() const =0
Get the pyramidal swing limit for the joint.
virtual PxJointLimitCone getSwingLimit() const =0
Get the cone limit for the joint.
virtual PX_DEPRECATED void setProjectionLinearTolerance(PxReal tolerance)=0
Set the linear tolerance threshold for projection. Projection is enabled if PxConstraintFlag::ePROJEC...
virtual const char * getConcreteTypeName() const
Returns string name of PxD6Joint, used for serialization.
Definition PxD6Joint.h:541
PX_DEPRECATED PX_FORCE_INLINE PxJointLinearLimit getLinearLimit() const
Definition PxD6Joint.h:304
virtual void getDriveVelocity(PxVec3 &linear, PxVec3 &angular) const =0
Get the target goal velocity for joint drive.
Definition PxJointLimit.h:297
Describes an elliptical conical joint limit. Note that very small or highly elliptical limit cones ma...
Definition PxJointLimit.h:371
Describes a pyramidal joint limit.
Definition PxJointLimit.h:450
Describes a two-sided limit.
Definition PxJointLimit.h:230
Describes a one-sided linear limit.
Definition PxJointLimit.h:167
a base interface providing common functionality for PhysX joints
Definition PxJoint.h:105
virtual bool isKindOf(const char *name) const
Returns whether a given type name matches with the type of this instance.
Definition PxJoint.h:379
3 Element vector class.
Definition PxVec3.h:50
#define PX_FORCE_INLINE
Definition PxPreprocessor.h:335
#define PX_INLINE
Definition PxPreprocessor.h:320
#define PX_DEPRECATED
Definition PxPreprocessor.h:418
Sorts an array of objects in ascending order, assuming that the predicate implements the < operator:
Definition PxBoxController.h:39
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:326
PxD6Joint * PxD6JointCreate(PxPhysics &physics, PxRigidActor *actor0, const PxTransform &localFrame0, PxRigidActor *actor1, const PxTransform &localFrame1)
Create a D6 joint.
Definition ExtD6Joint.cpp:1137
Used to specify one of the degrees of freedom of a D6 joint.
Definition PxD6Joint.h:65
Enum
Definition PxD6Joint.h:67
@ eX
motion along the X axis
Definition PxD6Joint.h:68
@ eSWING2
motion around the Z axis
Definition PxD6Joint.h:73
@ eTWIST
motion around the X axis
Definition PxD6Joint.h:71
@ eY
motion along the Y axis
Definition PxD6Joint.h:69
@ eZ
motion along the Z axis
Definition PxD6Joint.h:70
@ eSWING1
motion around the Y axis
Definition PxD6Joint.h:72
Used to specify which axes of a D6 joint are driven.
Definition PxD6Joint.h:111
Enum
Definition PxD6Joint.h:113
@ eX
drive along the X-axis
Definition PxD6Joint.h:114
@ eY
drive along the Y-axis
Definition PxD6Joint.h:115
@ eTWIST
drive of the displacement around the X-axis
Definition PxD6Joint.h:118
@ eSLERP
drive of all three angular degrees along a SLERP-path
Definition PxD6Joint.h:119
@ eZ
drive along the Z-axis
Definition PxD6Joint.h:116
@ eSWING
drive of displacement from the X-axis
Definition PxD6Joint.h:117
flags for configuring the drive model of a PxD6Joint
Definition PxD6Joint.h:130
Enum
Definition PxD6Joint.h:132
@ eACCELERATION
drive spring is for the acceleration at the joint (rather than the force)
Definition PxD6Joint.h:133
Used to specify the range of motions allowed for a degree of freedom in a D6 joint.
Definition PxD6Joint.h:85
Enum
Definition PxD6Joint.h:87
@ eLOCKED
The DOF is locked, it does not allow relative motion.
Definition PxD6Joint.h:88
@ eLIMITED
The DOF is limited, it only allows motion within a specific range.
Definition PxD6Joint.h:89
@ eFREE
The DOF is free and has its full range of motion.
Definition PxD6Joint.h:90