PxParticleGpu.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_PARTICLE_GPU_H
15 #define PX_PARTICLE_GPU_H
16 
21 
22 #if PX_SUPPORT_GPU_PHYSX
23 
24 #ifndef PX_DOXYGEN
25 namespace physx
26 {
27 #endif
28 
30 
35 struct PxTriangleMeshCacheStatistics
36 {
37  PxU32 bytesTotal;
38  PxU32 bytesUsed;
39  PxU32 bytesUsedMax;
40  PxReal percentageHitrate;
41 
42  PxTriangleMeshCacheStatistics() : bytesTotal(0), bytesUsed(0), bytesUsedMax(0), percentageHitrate(0.0f) {}
43 };
44 
48 class PxParticleGpu
49 {
50 public:
51 
63  PX_PHYSX_CORE_API static bool createTriangleMeshMirror(const class PxTriangleMesh& triangleMesh, PxCudaContextManager& contextManager);
64 
75  PX_PHYSX_CORE_API static void releaseTriangleMeshMirror(const class PxTriangleMesh& triangleMesh, PxCudaContextManager* contextManager = NULL);
76 
88  PX_PHYSX_CORE_API static bool createHeightFieldMirror(const class PxHeightField& heightField, PxCudaContextManager& contextManager);
89 
100  PX_PHYSX_CORE_API static void releaseHeightFieldMirror(const class PxHeightField& heightField, PxCudaContextManager* contextManager = NULL);
101 
113  PX_PHYSX_CORE_API static bool createConvexMeshMirror(const class PxConvexMesh& convexMesh, PxCudaContextManager& contextManager);
114 
125  PX_PHYSX_CORE_API static void releaseConvexMeshMirror(const class PxConvexMesh& convexMesh, PxCudaContextManager* contextManager = NULL);
126 
139  PX_PHYSX_CORE_API static void setExplicitCudaFlushCountHint(const class PxScene& scene, PxU32 cudaFlushCount);
140 
151  PX_PHYSX_CORE_API static bool setTriangleMeshCacheSizeHint(const class PxScene& scene, PxU32 size);
152 
163  PX_PHYSX_CORE_API static PxTriangleMeshCacheStatistics getTriangleMeshCacheStatistics(const class PxScene& scene);
164 
165 };
166 
167 #ifndef PX_DOXYGEN
168 } // namespace physx
169 #endif
170 
171 #endif // PX_SUPPORT_GPU_PHYSX
172 
174 #endif //PX_PARTICLE_GPU_H


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