PxBatchQuery.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_SCENEQUERY
15 #define PX_PHYSICS_NX_SCENEQUERY
16 
19 #include "PxPhysXConfig.h"
20 #include "PxShape.h"
21 #include "PxBatchQueryDesc.h"
22 #include "PxQueryReport.h"
23 #include "PxQueryFiltering.h"
24 
25 #ifndef PX_DOXYGEN
26 namespace physx
27 {
28 #endif
29 
30 class PxBoxGeometry;
31 class PxSphereGeometry;
32 struct PxQueryCache;
33 
40 {
41  public:
42 
46  virtual void execute() = 0;
47 
55  virtual PxBatchQueryPreFilterShader getPreFilterShader() const = 0;
56 
64  virtual PxBatchQueryPostFilterShader getPostFilterShader() const = 0;
65 
66 
74  virtual const void* getFilterShaderData() const = 0;
75 
83  virtual PxU32 getFilterShaderDataSize() const = 0;
84 
85 
93  virtual PxClientID getOwnerClient() const = 0;
94 
102  virtual void setUserMemory(const PxBatchQueryMemory&) = 0;
103 
109  virtual const PxBatchQueryMemory& getUserMemory() = 0;
110 
116  virtual void release() = 0;
117 
118 
124  virtual void setRunOnSpu(bool runOnSpu) = 0;
125 
131  virtual bool getRunOnSpu() = 0;
132 
156  virtual void raycast(
157  const PxVec3& origin, const PxVec3& unitDir, PxReal distance = PX_MAX_F32, PxU16 maxTouchHits = 0,
159  const PxQueryFilterData& filterData = PxQueryFilterData(),
160  void* userData = NULL, const PxQueryCache* cache = NULL) = 0;
161 
162 
185  virtual void overlap(
186  const PxGeometry& geometry, const PxTransform& pose, PxU16 maxTouchHits = 0,
187  const PxQueryFilterData& filterData = PxQueryFilterData(), void* userData=NULL, const PxQueryCache* cache = NULL) = 0;
188 
216  virtual void sweep(
217  const PxGeometry& geometry, const PxTransform& pose, const PxVec3& unitDir, const PxReal distance,
218  PxU16 maxTouchHits = 0, PxHitFlags hitFlags = PxHitFlag::ePOSITION|PxHitFlag::eNORMAL|PxHitFlag::eDISTANCE,
219  const PxQueryFilterData& filterData = PxQueryFilterData(), void* userData=NULL, const PxQueryCache* cache = NULL,
220  const PxReal inflation = 0.f) = 0;
221 
222 protected:
223  virtual ~PxBatchQuery() {}
224 };
225 
226 #ifndef PX_DOXYGEN
227 } // namespace physx
228 #endif
229 
231 #endif


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