PxVolumeCache.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 #ifndef PX_PHYSICS_NX_VOLUMECACHE
14 #define PX_PHYSICS_NX_VOLUMECACHE
15 
19 #include "PxScene.h"
21 
22 #ifndef PX_DOXYGEN
23 namespace physx
24 {
25 #endif
26 
35 {
36 public:
44  struct Iterator
45  {
54  virtual void processShapes(PxU32 count, const PxActorShape* actorShapePairs) = 0;
55 
61  virtual void finalizeQuery() {}
62  protected:
63  virtual ~Iterator() {}
64  };
65 
66 
73  {
79 
89 
97 
102  FILL_OUT_OF_MEMORY
103  };
104 
115  virtual FillStatus fill(const PxGeometry& cacheVolume, const PxTransform& pose) = 0;
116 
124  virtual bool isValid() const = 0;
125 
132  virtual void invalidate() = 0;
133 
141  virtual bool getCacheVolume(PxGeometryHolder& resultVolume, PxTransform& resultPose) = 0;
142 
148  virtual PxI32 getNbCachedShapes() = 0;
149 
155  virtual void release() = 0;
156 
166  virtual void forEach(Iterator& iter) = 0;
167 
175  virtual void setMaxNbStaticShapes(PxU32 maxCount) = 0;
176 
184  virtual void setMaxNbDynamicShapes(PxU32 maxCount) = 0;
185 
191  virtual PxU32 getMaxNbStaticShapes() = 0;
192 
198  virtual PxU32 getMaxNbDynamicShapes() = 0;
199 
219  virtual bool raycast(
220  const PxVec3& origin, const PxVec3& unitDir, const PxReal distance,
221  PxRaycastCallback& hitCall, PxHitFlags hitFlags = PxHitFlags(PxHitFlag::eDEFAULT),
222  const PxQueryFilterData& filterData = PxQueryFilterData(), PxQueryFilterCallback* filterCall = NULL) const = 0;
223 
243  virtual bool sweep(
244  const PxGeometry& geometry, const PxTransform& pose, const PxVec3& unitDir, const PxReal distance,
245  PxSweepCallback& hitCall, PxHitFlags hitFlags = PxHitFlags(PxHitFlag::ePOSITION | PxHitFlag::eNORMAL | PxHitFlag::eDISTANCE),
246  const PxQueryFilterData& filterData = PxQueryFilterData(), PxQueryFilterCallback* filterCall = NULL,
247  const PxReal inflation = 0.f) const = 0;
248 
249 
264  virtual bool overlap(
265  const PxGeometry& geometry, const PxTransform& pose, PxOverlapCallback& hitCall,
266  const PxQueryFilterData& filterData = PxQueryFilterData(), PxQueryFilterCallback* filterCall = NULL) const = 0;
267 
268 protected:
269  virtual ~PxVolumeCache() {}
270 }; // class PxVolumeCache
271 
272 #ifndef PX_DOXYGEN
273 } // namespace physx
274 #endif
275 
277 #endif


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