18 #ifndef BTGPU3DGRIDBROADPHASE_H
19 #define BTGPU3DGRIDBROADPHASE_H
91 int gridSizeX,
int gridSizeY,
int gridSizeZ,
92 int maxSmallProxies,
int maxLargeProxies,
int maxPairsPerBody,
93 int maxBodiesPerCell = 8,
97 int gridSizeX,
int gridSizeY,
int gridSizeZ,
98 int maxSmallProxies,
int maxLargeProxies,
int maxPairsPerBody,
99 int maxBodiesPerCell = 8,
113 int gridSizeX,
int gridSizeY,
int gridSizeZ,
114 int maxSmallProxies,
int maxLargeProxies,
int maxPairsPerBody,
115 int maxBodiesPerCell = 8,
136 #endif //BTGPU3DGRIDBROADPHASE_H
virtual ~btGpu3DGridBroadphase()
unsigned int m_maxBodiesPerCell
bt3DGridBroadphaseParams m_params
The btGpu3DGridBroadphase uses GPU-style code compiled for CPU to compute overlapping pairs...
virtual void findPairsLarge()
virtual void computePairCacheChanges()
virtual void setParameters(bt3DGridBroadphaseParams *hostParams)
btScalar m_cellFactorAABB
unsigned int * m_hPairOut
virtual void destroyProxy(btBroadphaseProxy *proxy, btDispatcher *dispatcher)
virtual void findOverlappingPairs()
void freeLargeHandle(btSimpleBroadphaseProxy *proxy)
virtual btBroadphaseProxy * createProxy(const btVector3 &aabbMin, const btVector3 &aabbMax, int shapeType, void *userPtr, short int collisionFilterGroup, short int collisionFilterMask, btDispatcher *dispatcher, void *multiSapProxy)
virtual void squeezeOverlappingPairBuff()
unsigned int m_numOverflows
void SetNextFree(int next)
void _initialize(const btVector3 &worldAabbMin, const btVector3 &worldAabbMax, int gridSizeX, int gridSizeY, int gridSizeZ, int maxSmallProxies, int maxLargeProxies, int maxPairsPerBody, int maxBodiesPerCell=8, btScalar cellFactorAABB=btScalar(1.0f))
unsigned int m_maxPairsPerBody
virtual void scanOverlappingPairBuff()
virtual void prepareAABB()
unsigned int * m_hBodiesHash
The btOverlappingPairCache provides an interface for overlapping pair management (add, remove, storage), used by the btBroadphaseInterface broadphases.
virtual void findCellStart()
void addPairsToCache(btDispatcher *dispatcher)
unsigned int * m_hPairBuff
unsigned int m_numPairsAdded
unsigned int m_numPairsRemoved
bool isLargeProxy(const btVector3 &aabbMin, const btVector3 &aabbMax)
btGpu3DGridBroadphase(const btVector3 &worldAabbMin, const btVector3 &worldAabbMax, int gridSizeX, int gridSizeY, int gridSizeZ, int maxSmallProxies, int maxLargeProxies, int maxPairsPerBody, int maxBodiesPerCell=8, btScalar cellFactorAABB=btScalar(1.0f))
The btBroadphaseProxy is the main class that can be used with the Bullet broadphases.
btVector3 can be used to represent 3D points and vectors.
unsigned int * m_hCellStart
unsigned int * m_hPairBuffStartCurr
btSimpleBroadphaseProxy * m_pLargeHandles
The SimpleBroadphase is just a unit-test for btAxisSweep3, bt32BitAxisSweep3, or btDbvtBroadphase, so use those classes instead.
unsigned int * m_hPairScan
int m_firstFreeLargeHandle
virtual void calcHashAABB()
virtual void resetPool(btDispatcher *dispatcher)
reset broadphase internal structures, to ensure determinism/reproducability
void * m_pLargeHandlesRawPtr
The btDispatcher interface class can be used in combination with broadphase to dispatch calculations ...
void addLarge2LargePairsToCache(btDispatcher *dispatcher)
int m_LastLargeHandleIndex
virtual void calculateOverlappingPairs(btDispatcher *dispatcher)
calculateOverlappingPairs is optional: incremental algorithms (sweep and prune) might do it during th...
float btScalar
The btScalar type abstracts floating point numbers, to easily switch between double and single floati...
virtual void rayTest(const btVector3 &rayFrom, const btVector3 &rayTo, btBroadphaseRayCallback &rayCallback, const btVector3 &aabbMin=btVector3(0, 0, 0), const btVector3 &aabbMax=btVector3(0, 0, 0))