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_PRISMATICJOINT_H
00031 #define PX_PRISMATICJOINT_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 PxPrismaticJoint;
00045
00057 PxPrismaticJoint* PxPrismaticJointCreate(PxPhysics& physics, PxRigidActor* actor0, const PxTransform& localFrame0, PxRigidActor* actor1, const PxTransform& localFrame1);
00058
00059
00065 struct PxPrismaticJointFlag
00066 {
00067 enum Enum
00068 {
00069 eLIMIT_ENABLED = 1<<1
00070 };
00071 };
00072
00073 typedef PxFlags<PxPrismaticJointFlag::Enum, PxU16> PxPrismaticJointFlags;
00074 PX_FLAGS_OPERATORS(PxPrismaticJointFlag::Enum, PxU16)
00075
00076
00087 class PxPrismaticJoint : public PxJoint
00088 {
00089 public:
00090
00094 virtual PxReal getPosition() const = 0;
00095
00099 virtual PxReal getVelocity() const = 0;
00100
00109 virtual void setLimit(const PxJointLinearLimitPair&) = 0;
00110
00116 virtual PxJointLinearLimitPair getLimit() const = 0;
00117
00127 virtual void setPrismaticJointFlags(PxPrismaticJointFlags flags) = 0;
00128
00137 virtual void setPrismaticJointFlag(PxPrismaticJointFlag::Enum flag, bool value) = 0;
00138
00146 virtual PxPrismaticJointFlags getPrismaticJointFlags() const = 0;
00147
00167 virtual void setProjectionLinearTolerance(PxReal tolerance) = 0;
00168
00176 virtual PxReal getProjectionLinearTolerance() const = 0;
00177
00196 virtual void setProjectionAngularTolerance(PxReal tolerance) = 0;
00197
00203 virtual PxReal getProjectionAngularTolerance() const = 0;
00204
00208 virtual const char* getConcreteTypeName() const { return "PxPrismaticJoint"; }
00209
00210 protected:
00211
00212
00216 PX_INLINE PxPrismaticJoint(PxType concreteType, PxBaseFlags baseFlags) : PxJoint(concreteType, baseFlags) {}
00217
00221 PX_INLINE PxPrismaticJoint(PxBaseFlags baseFlags) : PxJoint(baseFlags) {}
00222
00226 virtual bool isKindOf(const char* name) const { return !::strcmp("PxPrismaticJoint", name) || PxJoint::isKindOf(name); }
00227
00228
00229 };
00230
00231 #if !PX_DOXYGEN
00232 }
00233 #endif
00234
00236 #endif