PxRevoluteJoint.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2008-2015, NVIDIA CORPORATION. All rights reserved.
3  *
4  * NVIDIA CORPORATION and its licensors retain all intellectual property
5  * and proprietary rights in and to this software, related documentation
6  * and any modifications thereto. Any use, reproduction, disclosure or
7  * distribution of this software and related documentation without an express
8  * license agreement from NVIDIA CORPORATION is strictly prohibited.
9  */
10 // Copyright (c) 2004-2008 AGEIA Technologies, Inc. All rights reserved.
11 // Copyright (c) 2001-2004 NovodeX AG. All rights reserved.
12 
13 
14 #ifndef PX_REVOLUTEJOINT_H
15 #define PX_REVOLUTEJOINT_H
16 
20 #include "extensions/PxJoint.h"
22 
23 #ifndef PX_DOXYGEN
24 namespace physx
25 {
26 #endif
27 
28 class PxRevoluteJoint;
29 
43  PxRigidActor* actor0, const PxTransform& localFrame0,
44  PxRigidActor* actor1, const PxTransform& localFrame1);
45 
46 
54 {
55  enum Enum
56  {
57  eLIMIT_ENABLED = 1<<0, //< enable the limit
58  eDRIVE_ENABLED = 1<<1, //< enable the drive
59  eDRIVE_FREESPIN = 1<<2 //< if the existing velocity is beyond the drive velocity, do not add force
60  };
61 };
62 
65 
66 
67 
90 class PxRevoluteJoint : public PxJoint
91 {
92 public:
93 
97  virtual PxReal getAngle() const = 0;
98 
99 
103  virtual PxReal getVelocity() const = 0;
104 
118  virtual void setLimit(const PxJointAngularLimitPair& limits) = 0;
119 
127  virtual PxJointAngularLimitPair getLimit() const = 0;
128 
129 
130 
150  virtual void setDriveVelocity(PxReal velocity) = 0;
151 
159  virtual PxReal getDriveVelocity() const = 0;
160 
161 
174  virtual void setDriveForceLimit(PxReal limit) = 0;
175 
183  virtual PxReal getDriveForceLimit() const = 0;
184 
185 
199  virtual void setDriveGearRatio(PxReal ratio) = 0;
200 
208  virtual PxReal getDriveGearRatio() const = 0;
209 
210 
221  virtual void setRevoluteJointFlags(PxRevoluteJointFlags flags) = 0;
222 
232  virtual void setRevoluteJointFlag(PxRevoluteJointFlag::Enum flag, bool value) = 0;
233 
242  virtual PxRevoluteJointFlags getRevoluteJointFlags(void) const = 0;
243 
263  virtual void setProjectionLinearTolerance(PxReal tolerance) = 0;
264 
265 
274  virtual PxReal getProjectionLinearTolerance() const = 0;
275 
295  virtual void setProjectionAngularTolerance(PxReal tolerance) = 0;
296 
305  virtual PxReal getProjectionAngularTolerance() const = 0;
306 
310  virtual const char* getConcreteTypeName() const { return "PxRevoluteJoint"; }
311 
312 protected:
313 
314  //serialization
315 
319  PX_INLINE PxRevoluteJoint(PxType concreteType, PxBaseFlags baseFlags) : PxJoint(concreteType, baseFlags) {}
320 
324  PX_INLINE PxRevoluteJoint(PxBaseFlags baseFlags) : PxJoint(baseFlags) {}
325 
329  virtual bool isKindOf(const char* name) const { return !strcmp("PxRevoluteJoint", name) || PxJoint::isKindOf(name); }
330 
331  //~serialization
332 };
333 
334 #ifndef PX_DOXYGEN
335 } // namespace physx
336 #endif
337 
339 #endif


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