PxParticleExt.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_EXTENSIONS_PARTICLEEXT_H
15 #define PX_PHYSICS_EXTENSIONS_PARTICLEEXT_H
16 
20 #include "PxPhysXConfig.h"
22 #include "foundation/PxBounds3.h"
23 
24 #ifndef PX_DOXYGEN
25 namespace physx
26 {
27 #endif
28 
30 {
31 public:
32 
34  {
38  };
39 
77  static PxU32 buildBoundsHash(PxU32* sortedParticleIndices,
78  ParticleBounds* particleBounds,
79  const PxStrideIterator<const PxVec3>& positionBuffer,
80  const PxU32 validParticleRange,
81  const PxU32* validParticleBitmap,
82  const PxU32 hashSize,
83  const PxU32 maxBounds,
84  const PxReal gridSpacing);
85 
95  class IndexPool
96  {
97  public:
104  virtual PxU32 allocateIndices(PxU32 num, const PxStrideIterator<PxU32>& indexBuffer) = 0;
105 
112  virtual void freeIndices(PxU32 num, const PxStrideIterator<const PxU32>& indexBuffer) = 0;
113 
117  virtual void freeIndices() = 0;
118 
122  virtual void release() = 0;
123 
127  virtual ~IndexPool() {}
128  };
129 
134  static IndexPool* createIndexPool(PxU32 maxParticles);
135 
142  static IndexPool* createIndexPool(PxU32 maxParticles, PxU32 validParticleRange, const PxU32* validParticleBitmap);
143 
144 };
145 
146 #ifndef PX_DOXYGEN
147 } // namespace physx
148 #endif
149 
151 #endif


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