PxArticulationJoint.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_PHYSICS_NX_ARTICULATION_JOINT
15 #define PX_PHYSICS_NX_ARTICULATION_JOINT
16 
19 #include "PxPhysXConfig.h"
20 #include "common/PxBase.h"
21 
22 #ifndef PX_DOXYGEN
23 namespace physx
24 {
25 #endif
26 
41 {
42  enum Enum
43  {
44  eTARGET = 0, // use the quaternion as the drive target
45  eERROR = 1 // use the vector part of the quaternion as the drive error.
46  };
47 };
48 
49 
60 {
61 public:
62 
72  virtual void setParentPose(const PxTransform& pose) = 0;
73 
82  virtual PxTransform getParentPose() const = 0;
83 
84 
94  virtual void setChildPose(const PxTransform& pose) = 0;
95 
103  virtual PxTransform getChildPose() const = 0;
104 
105 
118  virtual void setTargetOrientation(const PxQuat& orientation) = 0;
119 
127  virtual PxQuat getTargetOrientation() const = 0;
128 
139  virtual void setTargetVelocity(const PxVec3& velocity) = 0;
140 
148  virtual PxVec3 getTargetVelocity() const = 0;
149 
150 
159  virtual void setDriveType(PxArticulationJointDriveType::Enum driveType) = 0;
160 
169  getDriveType() const = 0;
170 
171 
185  virtual void setStiffness(PxReal spring) = 0;
186 
194  virtual PxReal getStiffness() const = 0;
195 
196 
210  virtual void setDamping(PxReal damping) = 0;
211 
218  virtual PxReal getDamping() const = 0;
219 
239  virtual void setInternalCompliance(PxReal compliance) = 0;
240 
241 
249  virtual PxReal getInternalCompliance() const = 0;
250 
270  virtual void setExternalCompliance(PxReal compliance) = 0;
271 
279  virtual PxReal getExternalCompliance() const = 0;
280 
281 
282 
295  virtual void setSwingLimit(PxReal yLimit, PxReal zLimit) = 0;
296 
297 
306  virtual void getSwingLimit(PxReal &yLimit, PxReal &zLimit) const = 0;
307 
308 
309 
316  virtual void setTangentialStiffness(PxReal spring) = 0;
317 
318 
326  virtual PxReal getTangentialStiffness() const = 0;
327 
328 
335  virtual void setTangentialDamping(PxReal damping) = 0;
336 
337 
345  virtual PxReal getTangentialDamping() const = 0;
346 
347 
359  virtual void setSwingLimitContactDistance(PxReal contactDistance) = 0;
360 
361 
369  virtual PxReal getSwingLimitContactDistance() const = 0;
370 
371 
372 
381  virtual void setSwingLimitEnabled(bool enabled) = 0;
382 
391  virtual bool getSwingLimitEnabled() const = 0;
392 
393 
406  virtual void setTwistLimit(PxReal lower, PxReal upper) = 0;
407 
417  virtual void getTwistLimit(PxReal &lower, PxReal &upper) const = 0;
418 
419 
428  virtual void setTwistLimitEnabled(bool enabled) = 0;
429 
438  virtual bool getTwistLimitEnabled() const = 0;
439 
440 
452  virtual void setTwistLimitContactDistance(PxReal contactDistance) = 0;
453 
454 
462  virtual PxReal getTwistLimitContactDistance() const = 0;
463 
464  virtual const char* getConcreteTypeName() const { return "PxArticulationJoint"; }
465 
466 protected:
467  PX_INLINE PxArticulationJoint(PxType concreteType, PxBaseFlags baseFlags) : PxBase(concreteType, baseFlags) {}
468  PX_INLINE PxArticulationJoint(PxBaseFlags baseFlags) : PxBase(baseFlags) {}
469  virtual ~PxArticulationJoint() {}
470  virtual bool isKindOf(const char* name) const { return !strcmp("PxArticulationJoint", name) || PxBase::isKindOf(name); }
471 };
472 
473 #ifndef PX_DOXYGEN
474 } // namespace physx
475 #endif
476 
478 #endif


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