29#ifndef GU_PRUNING_POOL_H
30#define GU_PRUNING_POOL_H
32#include "common/PxPhysXCommonConfig.h"
33#include "GuPrunerTypedef.h"
34#include "GuPrunerPayload.h"
36#include "GuAABBTreeBounds.h"
42 enum TransformCacheMode
44 TRANSFORM_CACHE_UNUSED,
45 TRANSFORM_CACHE_LOCAL,
46 TRANSFORM_CACHE_GLOBAL
58 PruningPool(PxU64 contextID, TransformCacheMode mode);
63 const PoolIndex index = getIndex(handle);
67 data->mBounds = wb + index;
68 data->mTransform = mTransforms ? mTransforms + index : NULL;
70 return mObjects[index];
73 void shiftOrigin(
const PxVec3& shift);
85 PX_FORCE_INLINE PoolIndex getIndex(PrunerHandle h)
const {
return mHandleToIndex[h]; }
93 mTransforms[getIndex(handle)] = transform;
101 void updateAndInflateBounds(
const PrunerHandle* handles,
const PxU32* boundsIndices,
const PxBounds3* newBounds,
const PxTransform32* newTransforms, PxU32 count,
float epsilon);
102 void preallocate(PxU32 entries);
112 const TransformCacheMode mTransformCacheMode;
119 PrunerHandle mFirstRecycledHandle;
123 bool resize(PxU32 newCapacity);
Definition GuAABBTreeBounds.h:39
Definition GuPruningPool.h:55
PxU32 mNbObjects
Current number of objects.
Definition GuPruningPool.h:105
PxU32 mMaxNbObjects
Max. number of objects (capacity for mWorldBoxes, mObjects)
Definition GuPruningPool.h:106
AABBTreeBounds mWorldBoxes
List of world boxes, stores mNbObjects, capacity=mMaxNbObjects.
Definition GuPruningPool.h:109
PrunerPayload * mObjects
List of objects, stores mNbObjects, capacity=mMaxNbObjects.
Definition GuPruningPool.h:110
PrunerHandle * mIndexToHandle
Inverse map from objectIndex to PrunerHandle.
Definition GuPruningPool.h:115
PoolIndex * mHandleToIndex
Maps from PrunerHandle to internal index (payload/userData index in mObjects)
Definition GuPruningPool.h:114
Class representing 3D range or axis aligned bounding box.
Definition PxBounds3.h:58
Definition PxUserAllocated.h:43
3 Element vector class.
Definition PxVec3.h:50
#define PX_FORCE_INLINE
Definition PxPreprocessor.h:335
Sorts an array of objects in ascending order, assuming that the predicate implements the < operator:
Definition PxBoxController.h:39
Definition GuPrunerPayload.h:55
Definition GuPrunerPayload.h:63
Definition GuPrunerPayload.h:43