PxArticulation.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
15 #define PX_PHYSICS_NX_ARTICULATION
16 
19 #include "PxPhysXConfig.h"
20 #include "common/PxBase.h"
21 
22 #ifndef PX_DOXYGEN
23 namespace physx
24 {
25 #endif
26 
27 class PxArticulationLink;
28 
37 {
38 protected:
40 };
41 
52 class PxArticulation : public PxBase
53 {
54 public:
62  virtual void release() = 0;
63 
71  virtual PxScene* getScene() const = 0;
72 
73 
86  virtual void setMaxProjectionIterations(PxU32 iterations) = 0;
87 
96  virtual PxU32 getMaxProjectionIterations() const = 0;
97 
109  virtual void setSeparationTolerance(PxReal tolerance) = 0;
110 
119  virtual PxReal getSeparationTolerance() const = 0;
120 
121 
134  virtual void setInternalDriveIterations(PxU32 iterations) = 0;
135 
144  virtual PxU32 getInternalDriveIterations() const = 0;
145 
146 
160  virtual void setExternalDriveIterations(PxU32 iterations) = 0;
161 
170  virtual PxU32 getExternalDriveIterations() const = 0;
171 
172 
173 
190  virtual void setSolverIterationCounts(PxU32 minPositionIters, PxU32 minVelocityIters = 1) = 0;
191 
197  virtual void getSolverIterationCounts(PxU32 & minPositionIters, PxU32 & minVelocityIters) const = 0;
198 
231  virtual bool isSleeping() const = 0;
232 
242  virtual void setSleepThreshold(PxReal threshold) = 0;
243 
251  virtual PxReal getSleepThreshold() const = 0;
252 
266  virtual void setStabilizationThreshold(PxReal threshold) = 0;
267 
277  virtual PxReal getStabilizationThreshold() const = 0;
278 
294  virtual void setWakeCounter(PxReal wakeCounterValue) = 0;
295 
303  virtual PxReal getWakeCounter() const = 0;
304 
316  virtual void wakeUp() = 0;
317 
329  virtual void putToSleep() = 0;
330 
343  virtual PxArticulationLink* createLink(PxArticulationLink* parent, const PxTransform& pose) = 0;
344 
345 
350  virtual PxU32 getNbLinks() const = 0;
351 
364  virtual PxU32 getLinks(PxArticulationLink** userBuffer, PxU32 bufferSize) const = 0;
365 
376  virtual void setName(const char* name) = 0;
377 
385  virtual const char* getName() const = 0;
386 
396  virtual PxBounds3 getWorldBounds(float inflation=1.01f) const = 0;
397 
405  virtual PxAggregate* getAggregate() const = 0;
406 
421  virtual PxArticulationDriveCache*
422  createDriveCache(PxReal compliance, PxU32 driveIterations) const = 0;
423 
424 
439  virtual void updateDriveCache(PxArticulationDriveCache& driveCache,
440  PxReal compliance,
441  PxU32 driveIterations) const = 0;
442 
450  virtual void releaseDriveCache(PxArticulationDriveCache& driveCache) const = 0;
451 
465  virtual void applyImpulse(PxArticulationLink* link,
466  const PxArticulationDriveCache& driveCache,
467  const PxVec3& linearImpulse,
468  const PxVec3& angularImpulse) = 0;
469 
487  virtual void computeImpulseResponse(PxArticulationLink*link,
488  PxVec3& linearResponse,
489  PxVec3& angularResponse,
490  const PxArticulationDriveCache& driveCache,
491  const PxVec3& linearImpulse,
492  const PxVec3& angularImpulse) const = 0;
493 
494 
495  //public variables:
496  void* userData;
497 
498  virtual const char* getConcreteTypeName() const { return "PxArticulation"; }
499 
500 protected:
501  PX_INLINE PxArticulation(PxType concreteType, PxBaseFlags baseFlags) : PxBase(concreteType, baseFlags) {}
502  PX_INLINE PxArticulation(PxBaseFlags baseFlags) : PxBase(baseFlags) {}
503  virtual ~PxArticulation() {}
504  virtual bool isKindOf(const char* name) const { return !strcmp("PxArticulation", name) || PxBase::isKindOf(name); }
505 
506 
507 };
508 
509 #ifndef PX_DOXYGEN
510 } // namespace physx
511 #endif
512 
514 #endif


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