PxControllerManager.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_CCT_MANAGER
15 #define PX_PHYSICS_CCT_MANAGER
16 
21 
22 #include "PxPhysXConfig.h"
23 #include "foundation/PxFlags.h"
24 #include "common/PxRenderBuffer.h"
27 
28 #ifndef PX_DOXYGEN
29 namespace physx
30 {
31 #endif
32 
33 class PxPhysics;
34 class PxScene;
35 class PxController;
36 class PxControllerDesc;
37 class PxObstacleContext;
39 
44 {
45  enum Enum
46  {
47  eTEMPORAL_BV = (1<<0),
48  eCACHED_BV = (1<<1),
49  eOBSTACLES = (1<<2),
50 
51  eNONE = 0,
52  eALL = 0xffffffff
53  };
54 };
55 
63 
64 
65 
71 {
72 public:
81  virtual void release() = 0;
82 
88  virtual PxScene& getScene() const = 0;
89 
95  virtual PxU32 getNbControllers() const = 0;
96 
103  virtual PxController* getController(PxU32 index) = 0;
104 
113  virtual PxController* createController(const PxControllerDesc& desc) = 0;
114 
116  PX_DEPRECATED virtual PxController* createController(PxPhysics&, PxScene*, const PxControllerDesc& desc)
117  {
118  // The SDK & scene parameters are not needed anymore
119  PxGetFoundation().getErrorCallback().reportError(PxErrorCode::eDEBUG_WARNING, "The PxControllerManager::createController prototype has changed. Please upate your code.", __FILE__, __LINE__);
120  return createController(desc);
121  }
122 
126  virtual void purgeControllers() = 0;
127 
135  virtual PxRenderBuffer& getRenderBuffer() = 0;
136 
144  virtual void setDebugRenderingFlags(PxControllerDebugRenderFlags flags) = 0;
145 
151  virtual PxU32 getNbObstacleContexts() const = 0;
152 
159  virtual PxObstacleContext* getObstacleContext(PxU32 index) = 0;
160 
168  virtual PxObstacleContext* createObstacleContext() = 0;
169 
187  virtual void computeInteractions(PxF32 elapsedTime, PxControllerFilterCallback* cctFilterCb=NULL) = 0;
188 
202  virtual void setTessellation(bool flag, float maxEdgeLength) = 0;
203 
223  virtual void setOverlapRecoveryModule(bool flag) = 0;
224 
234  virtual void setPreciseSweeps(bool flag) = 0;
235 
249  virtual void setPreventVerticalSlidingAgainstCeiling(bool flag) = 0;
250 
263  virtual void shiftOrigin(const PxVec3& shift) = 0;
264 
265 protected:
267  virtual ~PxControllerManager() {}
268 };
269 
270 #ifndef PX_DOXYGEN
271 } // namespace physx
272 #endif
273 
290 PX_C_EXPORT PX_PHYSX_CHARACTER_API physx::PxControllerManager* PX_CALL_CONV PxCreateControllerManager(physx::PxScene& scene, bool lockingEnabled = false);
291 
293 #endif //PX_PHYSICS_CCT_MANAGER


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