PxSpatialIndex.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_SPATIAL_INDEX
15 #define PX_PHYSICS_SPATIAL_INDEX
16 
19 #include "PxPhysXConfig.h"
20 #include "foundation/PxTransform.h"
21 #include "geometry/PxGeometry.h"
22 #include "PxQueryReport.h"
23 
24 #ifndef PX_DOXYGEN
25 namespace physx
26 {
27 #endif
28 
31 
32 
34 {
35 };
36 
43 {
44 
52  virtual PxAgain onHit(PxSpatialIndexItem& item) = 0;
53 
55 };
56 
63 {
75  virtual PxAgain onHit(PxSpatialIndexItem& item, PxReal distance, PxReal& shrunkDistance) = 0;
76 
78 };
79 
80 
81 
94 {
95 public:
96 
97 
104  virtual PxSpatialIndexItemId insert(PxSpatialIndexItem& item,
105  const PxBounds3& bounds) = 0;
106 
113  virtual void update(PxSpatialIndexItemId id,
114  const PxBounds3& bounds) = 0;
115 
121  virtual void remove(PxSpatialIndexItemId id) = 0;
122 
123 
130  virtual void overlap(const PxBounds3 &aabb,
131  PxSpatialOverlapCallback& callback) const = 0;
132 
141  virtual void raycast(const PxVec3& origin,
142  const PxVec3& unitDir,
143  PxReal maxDist,
144  PxSpatialLocationCallback& callback) const = 0;
145 
154  virtual void sweep(const PxBounds3& aabb,
155  const PxVec3& unitDir,
156  PxReal maxDist,
157  PxSpatialLocationCallback& callback) const = 0;
158 
166  virtual void flush() = 0;
167 
171  virtual void rebuildFull() = 0;
172 
184  virtual void setIncrementalRebuildRate(PxU32 rate) = 0;
185 
189  virtual void rebuildStep() = 0;
190 
194  virtual void release() = 0;
195 protected:
196  virtual ~PxSpatialIndex(){}
197 };
198 
205 
206 #ifndef PX_DOXYGEN
207 } // namespace physx
208 #endif
209 
211 #endif


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