PxBatchQueryDesc.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-2012 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_SCENEQUERYDESC 00032 #define PX_PHYSICS_NX_SCENEQUERYDESC 00033 00036 #include "PxPhysX.h" 00037 #include "PxClient.h" 00038 #include "PxFiltering.h" 00039 #include "PxSceneQueryFiltering.h" 00040 00041 #ifndef PX_DOXYGEN 00042 namespace physx 00043 { 00044 #endif 00045 00046 struct PxSweepHit; 00047 struct PxRaycastHit; 00048 00049 struct PxBatchQueryStatus 00050 { 00051 enum Enum 00052 { 00056 ePENDING = 0, 00057 00061 eSUCCESS, 00062 00066 eABORTED 00067 }; 00068 }; 00069 00073 struct PxRaycastQueryResult 00074 { 00075 PxRaycastHit* hits; 00076 PxU32 nbHits; 00077 PxU32 queryStatus; 00078 void* userData; 00079 }; 00080 00084 struct PxSweepQueryResult 00085 { 00086 PxSweepHit* hits; 00087 PxU32 nbHits; 00088 PxU32 queryStatus; 00089 void* userData; 00090 }; 00091 00095 struct PxOverlapQueryResult 00096 { 00097 PxShape** hits; 00098 PxU32 nbHits; 00099 PxU32 queryStatus; 00100 void* userData; 00101 }; 00102 00103 00109 class PxBatchQueryDesc 00110 { 00111 public: 00112 00122 void* filterShaderData; 00123 00131 PxU32 filterShaderDataSize; 00132 00138 PxBatchQueryPreFilterShader preFilterShader; 00139 00145 PxBatchQueryPostFilterShader postFilterShader; 00146 00162 void* spuPreFilterShader; 00163 00171 PxU32 spuPreFilterShaderSize; 00172 00189 void* spuPostFilterShader; 00190 00198 PxU32 spuPostFilterShaderSize; 00199 00207 PxClientID ownerClient; 00208 00217 PxRaycastQueryResult* userRaycastResultBuffer; 00218 00226 PxRaycastHit* userRaycastHitBuffer; 00227 00236 PxSweepQueryResult* userSweepResultBuffer; 00237 00245 PxSweepHit* userSweepHitBuffer; 00246 00255 PxOverlapQueryResult* userOverlapResultBuffer; 00256 00264 PxShape** userOverlapHitBuffer; 00265 00270 PxU32 raycastHitBufferSize; 00271 00276 PxU32 sweepHitBufferSize; 00277 00282 PxU32 overlapHitBufferSize; 00283 00284 00285 PX_INLINE PxBatchQueryDesc(); 00286 PX_INLINE void setToDefault(); 00287 PX_INLINE bool isValid() const; 00288 }; 00289 00290 00291 PX_INLINE PxBatchQueryDesc::PxBatchQueryDesc() : 00292 filterShaderData (NULL), 00293 filterShaderDataSize (0), 00294 preFilterShader (NULL), 00295 postFilterShader (NULL), 00296 spuPreFilterShader (NULL), 00297 spuPreFilterShaderSize (0), 00298 spuPostFilterShader (NULL), 00299 spuPostFilterShaderSize (0), 00300 ownerClient (PX_DEFAULT_CLIENT), 00301 userRaycastResultBuffer (NULL), 00302 userRaycastHitBuffer (NULL), 00303 userSweepResultBuffer (NULL), 00304 userSweepHitBuffer (NULL), 00305 userOverlapResultBuffer (NULL), 00306 userOverlapHitBuffer (NULL), 00307 raycastHitBufferSize (0), 00308 sweepHitBufferSize (0), 00309 overlapHitBufferSize (0) 00310 { 00311 } 00312 00313 00314 PX_INLINE void PxBatchQueryDesc::setToDefault() 00315 { 00316 *this = PxBatchQueryDesc(); 00317 } 00318 00319 PX_INLINE bool PxBatchQueryDesc::isValid() const 00320 { 00321 if ( ((filterShaderDataSize == 0) && (filterShaderData != NULL)) || 00322 ((filterShaderDataSize > 0) && (filterShaderData == NULL)) ) 00323 return false; 00324 00325 return true; 00326 } 00327 00328 #ifndef PX_DOXYGEN 00329 } // namespace physx 00330 #endif 00331 00333 #endif
Copyright © 2008-2012 NVIDIA Corporation, 2701 San Tomas Expressway, Santa Clara, CA 95050 U.S.A. All rights reserved. www.nvidia.com