00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030 #ifndef PX_SPHERICALJOINT_H
00031 #define PX_SPHERICALJOINT_H
00032
00036 #include "extensions/PxJoint.h"
00037 #include "extensions/PxJointLimit.h"
00038
00039 #if !PX_DOXYGEN
00040 namespace physx
00041 {
00042 #endif
00043
00044 class PxSphericalJoint;
00045
00057 PxSphericalJoint* PxSphericalJointCreate(PxPhysics& physics, PxRigidActor* actor0, const PxTransform& localFrame0, PxRigidActor* actor1, const PxTransform& localFrame1);
00058
00059
00065 struct PxSphericalJointFlag
00066 {
00067 enum Enum
00068 {
00069 eLIMIT_ENABLED = 1<<1
00070 };
00071 };
00072 typedef PxFlags<PxSphericalJointFlag::Enum, PxU16> PxSphericalJointFlags;
00073 PX_FLAGS_OPERATORS(PxSphericalJointFlag::Enum, PxU16)
00074
00075
00089 class PxSphericalJoint : public PxJoint
00090 {
00091 public:
00092
00103 virtual PxJointLimitCone getLimitCone() const = 0;
00104
00112 virtual void setLimitCone(const PxJointLimitCone& limit) = 0;
00113
00117 virtual PxReal getSwingYAngle() const = 0;
00118
00122 virtual PxReal getSwingZAngle() const = 0;
00123
00133 virtual void setSphericalJointFlags(PxSphericalJointFlags flags) = 0;
00134
00143 virtual void setSphericalJointFlag(PxSphericalJointFlag::Enum flag, bool value) = 0;
00144
00152 virtual PxSphericalJointFlags getSphericalJointFlags() const = 0;
00153
00172 virtual void setProjectionLinearTolerance(PxReal tolerance) = 0;
00173
00181 virtual PxReal getProjectionLinearTolerance() const = 0;
00182
00186 virtual const char* getConcreteTypeName() const { return "PxSphericalJoint"; }
00187
00188 protected:
00189
00190
00191
00195 PX_INLINE PxSphericalJoint(PxType concreteType, PxBaseFlags baseFlags) : PxJoint(concreteType, baseFlags) {}
00196
00200 PX_INLINE PxSphericalJoint(PxBaseFlags baseFlags) : PxJoint(baseFlags) {}
00201
00205 virtual bool isKindOf(const char* name) const { return !::strcmp("PxSphericalJoint", name) || PxJoint::isKindOf(name); }
00206
00207
00208 };
00209
00210 #if !PX_DOXYGEN
00211 }
00212 #endif
00213
00215 #endif