NVIDIA(R) PhysX(R) SDK 3.4 API Reference: PxArticulation.h Source File

NVIDIA PhysX SDK 3.4 API

PxArticulation.h

Go to the documentation of this file.
00001 // This code contains NVIDIA Confidential Information and is disclosed to you
00002 // under a form of NVIDIA software license agreement provided separately to you.
00003 //
00004 // Notice
00005 // NVIDIA Corporation and its licensors retain all intellectual property and
00006 // proprietary rights in and to this software and related documentation and
00007 // any modifications thereto. Any use, reproduction, disclosure, or
00008 // distribution of this software and related documentation without an express
00009 // license agreement from NVIDIA Corporation is strictly prohibited.
00010 //
00011 // ALL NVIDIA DESIGN SPECIFICATIONS, CODE ARE PROVIDED "AS IS.". NVIDIA MAKES
00012 // NO WARRANTIES, EXPRESSED, IMPLIED, STATUTORY, OR OTHERWISE WITH RESPECT TO
00013 // THE MATERIALS, AND EXPRESSLY DISCLAIMS ALL IMPLIED WARRANTIES OF NONINFRINGEMENT,
00014 // MERCHANTABILITY, AND FITNESS FOR A PARTICULAR PURPOSE.
00015 //
00016 // Information and code furnished is believed to be accurate and reliable.
00017 // However, NVIDIA Corporation assumes no responsibility for the consequences of use of such
00018 // information or for any infringement of patents or other rights of third parties that may
00019 // result from its use. No license is granted by implication or otherwise under any patent
00020 // or patent rights of NVIDIA Corporation. Details are subject to change without notice.
00021 // This code supersedes and replaces all information previously supplied.
00022 // NVIDIA Corporation products are not authorized for use as critical
00023 // components in life support devices or systems without express written approval of
00024 // NVIDIA Corporation.
00025 //
00026 // Copyright (c) 2008-2017 NVIDIA Corporation. All rights reserved.
00027 // Copyright (c) 2004-2008 AGEIA Technologies, Inc. All rights reserved.
00028 // Copyright (c) 2001-2004 NovodeX AG. All rights reserved.  
00029 
00030 
00031 #ifndef PX_PHYSICS_NX_ARTICULATION
00032 #define PX_PHYSICS_NX_ARTICULATION
00033 
00036 #include "PxPhysXConfig.h"
00037 #include "common/PxBase.h"
00038 
00039 #if !PX_DOXYGEN
00040 namespace physx
00041 {
00042 #endif
00043 
00044 class PxArticulationLink;
00045 
00053 class PxArticulationDriveCache
00054 {
00055 protected:
00056     PxArticulationDriveCache();
00057 };
00058 
00069 class PxArticulation : public PxBase
00070 {
00071 public:
00079     virtual     void            release() = 0;
00080 
00088     virtual     PxScene*        getScene()  const = 0;
00089 
00090 
00103     virtual     void            setMaxProjectionIterations(PxU32 iterations) = 0;
00104 
00113     virtual     PxU32           getMaxProjectionIterations() const = 0;
00114 
00126     virtual     void            setSeparationTolerance(PxReal tolerance) = 0;
00127 
00136     virtual     PxReal          getSeparationTolerance() const = 0;
00137 
00138 
00151     virtual     void            setInternalDriveIterations(PxU32 iterations) = 0;
00152 
00161     virtual     PxU32           getInternalDriveIterations() const = 0;
00162 
00163 
00177     virtual     void            setExternalDriveIterations(PxU32 iterations) = 0;
00178 
00187     virtual     PxU32           getExternalDriveIterations() const = 0;
00188 
00189 
00190 
00207     virtual     void                setSolverIterationCounts(PxU32 minPositionIters, PxU32 minVelocityIters = 1) = 0;
00208 
00214     virtual     void                getSolverIterationCounts(PxU32 & minPositionIters, PxU32 & minVelocityIters) const = 0;
00215 
00248     virtual     bool                isSleeping() const = 0;
00249 
00259     virtual     void                setSleepThreshold(PxReal threshold) = 0;
00260 
00268     virtual     PxReal              getSleepThreshold() const = 0;
00269 
00283     virtual     void                setStabilizationThreshold(PxReal threshold) = 0;
00284 
00294     virtual     PxReal              getStabilizationThreshold() const = 0;
00295 
00311     virtual     void                setWakeCounter(PxReal wakeCounterValue) = 0;
00312 
00320     virtual     PxReal              getWakeCounter() const = 0;
00321 
00333     virtual     void                wakeUp()    = 0;
00334 
00346     virtual     void                putToSleep()    = 0;
00347 
00360     virtual         PxArticulationLink*         createLink(PxArticulationLink* parent, const PxTransform& pose) = 0;
00361 
00362 
00367     virtual     PxU32           getNbLinks() const = 0;
00368 
00382     virtual     PxU32           getLinks(PxArticulationLink** userBuffer, PxU32 bufferSize, PxU32 startIndex=0) const = 0;
00383 
00394     virtual     void            setName(const char* name)       = 0;
00395 
00403     virtual     const char*     getName()           const   = 0;
00404 
00414     virtual     PxBounds3       getWorldBounds(float inflation=1.01f) const = 0;
00415 
00423     virtual     PxAggregate*    getAggregate() const = 0;
00424 
00439     virtual     PxArticulationDriveCache* 
00440                                 createDriveCache(PxReal compliance, PxU32 driveIterations) const = 0;
00441 
00442 
00455     virtual     void            updateDriveCache(PxArticulationDriveCache& driveCache,
00456                                                  PxReal compliance, 
00457                                                  PxU32 driveIterations) const = 0;
00458 
00466     virtual     void            releaseDriveCache(PxArticulationDriveCache& driveCache) const = 0;
00467 
00481     virtual     void            applyImpulse(PxArticulationLink* link,
00482                                              const PxArticulationDriveCache& driveCache,
00483                                              const PxVec3& linearImpulse,
00484                                              const PxVec3& angularImpulse) = 0;
00485 
00503     virtual     void            computeImpulseResponse(PxArticulationLink*link,
00504                                                        PxVec3& linearResponse, 
00505                                                        PxVec3& angularResponse,
00506                                                        const PxArticulationDriveCache& driveCache,
00507                                                        const PxVec3& linearImpulse,
00508                                                        const PxVec3& angularImpulse) const = 0;
00509 
00510 
00511     //public variables:
00512                 void*           userData;   
00513 
00514     virtual     const char*     getConcreteTypeName() const { return "PxArticulation"; }
00515 
00516 protected:
00517     PX_INLINE                   PxArticulation(PxType concreteType, PxBaseFlags baseFlags) : PxBase(concreteType, baseFlags) {}
00518     PX_INLINE                   PxArticulation(PxBaseFlags baseFlags) : PxBase(baseFlags) {}
00519     virtual                     ~PxArticulation() {}
00520     virtual     bool            isKindOf(const char* name) const { return !::strcmp("PxArticulation", name) || PxBase::isKindOf(name); }
00521 
00522 
00523 };
00524 
00525 #if !PX_DOXYGEN
00526 } // namespace physx
00527 #endif
00528 
00530 #endif


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