Bullet Collision Detection & Physics Library
|
The btGpu3DGridBroadphase uses GPU-style code compiled for CPU to compute overlapping pairs. More...
#include <btGpu3DGridBroadphase.h>
Public Member Functions | |
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)) | |
btGpu3DGridBroadphase (btOverlappingPairCache *overlappingPairCache, 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)) | |
virtual | ~btGpu3DGridBroadphase () |
virtual void | calculateOverlappingPairs (btDispatcher *dispatcher) |
calculateOverlappingPairs is optional: incremental algorithms (sweep and prune) might do it during the set aabb More... | |
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 | destroyProxy (btBroadphaseProxy *proxy, btDispatcher *dispatcher) |
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)) |
virtual void | resetPool (btDispatcher *dispatcher) |
reset broadphase internal structures, to ensure determinism/reproducability More... | |
Public Member Functions inherited from btSimpleBroadphase | |
btSimpleBroadphase (int maxProxies=16384, btOverlappingPairCache *overlappingPairCache=0) | |
virtual | ~btSimpleBroadphase () |
virtual void | setAabb (btBroadphaseProxy *proxy, const btVector3 &aabbMin, const btVector3 &aabbMax, btDispatcher *dispatcher) |
virtual void | getAabb (btBroadphaseProxy *proxy, btVector3 &aabbMin, btVector3 &aabbMax) const |
virtual void | aabbTest (const btVector3 &aabbMin, const btVector3 &aabbMax, btBroadphaseAabbCallback &callback) |
btOverlappingPairCache * | getOverlappingPairCache () |
const btOverlappingPairCache * | getOverlappingPairCache () const |
bool | testAabbOverlap (btBroadphaseProxy *proxy0, btBroadphaseProxy *proxy1) |
virtual void | getBroadphaseAabb (btVector3 &aabbMin, btVector3 &aabbMax) const |
getAabb returns the axis aligned bounding box in the 'global' coordinate frame will add some transform later More... | |
virtual void | printStats () |
Public Member Functions inherited from btBroadphaseInterface | |
virtual | ~btBroadphaseInterface () |
Protected Member Functions | |
int | allocLargeHandle () |
void | freeLargeHandle (btSimpleBroadphaseProxy *proxy) |
bool | isLargeProxy (const btVector3 &aabbMin, const btVector3 &aabbMax) |
bool | isLargeProxy (btBroadphaseProxy *proxy) |
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)) |
void | _finalize () |
void | addPairsToCache (btDispatcher *dispatcher) |
void | addLarge2LargePairsToCache (btDispatcher *dispatcher) |
virtual void | setParameters (bt3DGridBroadphaseParams *hostParams) |
virtual void | prepareAABB () |
virtual void | calcHashAABB () |
virtual void | sortHash () |
virtual void | findCellStart () |
virtual void | findOverlappingPairs () |
virtual void | findPairsLarge () |
virtual void | computePairCacheChanges () |
virtual void | scanOverlappingPairBuff () |
virtual void | squeezeOverlappingPairBuff () |
Protected Member Functions inherited from btSimpleBroadphase | |
int | allocHandle () |
void | freeHandle (btSimpleBroadphaseProxy *proxy) |
btSimpleBroadphaseProxy * | getSimpleProxyFromProxy (btBroadphaseProxy *proxy) |
const btSimpleBroadphaseProxy * | getSimpleProxyFromProxy (btBroadphaseProxy *proxy) const |
void | validate () |
Protected Attributes | |
bool | m_bInitialized |
unsigned int | m_numBodies |
unsigned int | m_numCells |
unsigned int | m_maxPairsPerBody |
btScalar | m_cellFactorAABB |
unsigned int | m_maxBodiesPerCell |
bt3DGridBroadphaseParams | m_params |
btScalar | m_maxRadius |
unsigned int * | m_hBodiesHash |
unsigned int * | m_hCellStart |
unsigned int * | m_hPairBuffStartCurr |
bt3DGrid3F1U * | m_hAABB |
unsigned int * | m_hPairBuff |
unsigned int * | m_hPairScan |
unsigned int * | m_hPairOut |
int | m_numLargeHandles |
int | m_maxLargeHandles |
int | m_LastLargeHandleIndex |
btSimpleBroadphaseProxy * | m_pLargeHandles |
void * | m_pLargeHandlesRawPtr |
int | m_firstFreeLargeHandle |
unsigned int | m_numPairsAdded |
unsigned int | m_numPairsRemoved |
unsigned int | m_numOverflows |
Protected Attributes inherited from btSimpleBroadphase | |
int | m_numHandles |
int | m_maxHandles |
int | m_LastHandleIndex |
btSimpleBroadphaseProxy * | m_pHandles |
void * | m_pHandlesRawPtr |
int | m_firstFreeHandle |
btOverlappingPairCache * | m_pairCache |
bool | m_ownsPairCache |
int | m_invalidPair |
Additional Inherited Members | |
Static Public Member Functions inherited from btSimpleBroadphase | |
static bool | aabbOverlap (btSimpleBroadphaseProxy *proxy0, btSimpleBroadphaseProxy *proxy1) |
The btGpu3DGridBroadphase uses GPU-style code compiled for CPU to compute overlapping pairs.
Definition at line 31 of file btGpu3DGridBroadphase.h.
btGpu3DGridBroadphase::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) |
||
) |
Definition at line 46 of file btGpu3DGridBroadphase.cpp.
btGpu3DGridBroadphase::btGpu3DGridBroadphase | ( | btOverlappingPairCache * | overlappingPairCache, |
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) |
||
) |
Definition at line 64 of file btGpu3DGridBroadphase.cpp.
|
virtual |
Definition at line 81 of file btGpu3DGridBroadphase.cpp.
|
protected |
Definition at line 176 of file btGpu3DGridBroadphase.cpp.
|
protected |
Definition at line 90 of file btGpu3DGridBroadphase.cpp.
|
protected |
Definition at line 348 of file btGpu3DGridBroadphase.cpp.
|
protected |
Definition at line 226 of file btGpu3DGridBroadphase.cpp.
|
inlineprotected |
Definition at line 57 of file btGpu3DGridBroadphase.h.
|
protectedvirtual |
Definition at line 485 of file btGpu3DGridBroadphase.cpp.
|
virtual |
calculateOverlappingPairs is optional: incremental algorithms (sweep and prune) might do it during the set aabb
if you don't like to skip the invalid pairs in the array, execute following code:
Reimplemented from btSimpleBroadphase.
Definition at line 192 of file btGpu3DGridBroadphase.cpp.
|
protectedvirtual |
Definition at line 556 of file btGpu3DGridBroadphase.cpp.
|
virtual |
you have to increase the cell size, so 'large' proxies become 'small' proxies (fitting a cell)
Reimplemented from btSimpleBroadphase.
Definition at line 271 of file btGpu3DGridBroadphase.cpp.
|
virtual |
Reimplemented from btSimpleBroadphase.
Definition at line 296 of file btGpu3DGridBroadphase.cpp.
|
protectedvirtual |
Definition at line 529 of file btGpu3DGridBroadphase.cpp.
|
protectedvirtual |
Definition at line 538 of file btGpu3DGridBroadphase.cpp.
|
protectedvirtual |
Definition at line 547 of file btGpu3DGridBroadphase.cpp.
|
inlineprotected |
Definition at line 69 of file btGpu3DGridBroadphase.h.
|
protected |
use the bounding sphere radius of this bounding box, to include rotation
Definition at line 328 of file btGpu3DGridBroadphase.cpp.
|
protected |
Definition at line 341 of file btGpu3DGridBroadphase.cpp.
|
protectedvirtual |
Definition at line 418 of file btGpu3DGridBroadphase.cpp.
|
virtual |
Reimplemented from btSimpleBroadphase.
Definition at line 396 of file btGpu3DGridBroadphase.cpp.
|
virtual |
reset broadphase internal structures, to ensure determinism/reproducability
Reimplemented from btSimpleBroadphase.
Definition at line 315 of file btGpu3DGridBroadphase.cpp.
|
protectedvirtual |
Definition at line 565 of file btGpu3DGridBroadphase.cpp.
|
protectedvirtual |
Definition at line 477 of file btGpu3DGridBroadphase.cpp.
|
protectedvirtual |
Definition at line 494 of file btGpu3DGridBroadphase.cpp.
|
protectedvirtual |
Definition at line 579 of file btGpu3DGridBroadphase.cpp.
|
protected |
Definition at line 34 of file btGpu3DGridBroadphase.h.
|
protected |
Definition at line 38 of file btGpu3DGridBroadphase.h.
|
protected |
Definition at line 56 of file btGpu3DGridBroadphase.h.
|
protected |
Definition at line 46 of file btGpu3DGridBroadphase.h.
|
protected |
Definition at line 43 of file btGpu3DGridBroadphase.h.
|
protected |
Definition at line 44 of file btGpu3DGridBroadphase.h.
|
protected |
Definition at line 47 of file btGpu3DGridBroadphase.h.
|
protected |
Definition at line 45 of file btGpu3DGridBroadphase.h.
|
protected |
Definition at line 49 of file btGpu3DGridBroadphase.h.
|
protected |
Definition at line 48 of file btGpu3DGridBroadphase.h.
|
protected |
Definition at line 53 of file btGpu3DGridBroadphase.h.
|
protected |
Definition at line 39 of file btGpu3DGridBroadphase.h.
|
protected |
Definition at line 52 of file btGpu3DGridBroadphase.h.
|
protected |
Definition at line 37 of file btGpu3DGridBroadphase.h.
|
protected |
Definition at line 41 of file btGpu3DGridBroadphase.h.
|
protected |
Definition at line 35 of file btGpu3DGridBroadphase.h.
|
protected |
Definition at line 36 of file btGpu3DGridBroadphase.h.
|
protected |
Definition at line 51 of file btGpu3DGridBroadphase.h.
|
protected |
Definition at line 87 of file btGpu3DGridBroadphase.h.
|
protected |
Definition at line 85 of file btGpu3DGridBroadphase.h.
|
protected |
Definition at line 86 of file btGpu3DGridBroadphase.h.
|
protected |
Definition at line 40 of file btGpu3DGridBroadphase.h.
|
protected |
Definition at line 54 of file btGpu3DGridBroadphase.h.
|
protected |
Definition at line 55 of file btGpu3DGridBroadphase.h.