Blender
V3.3
|
#include <btSimpleBroadphase.h>
Public Member Functions | |
btSimpleBroadphase (int maxProxies=16384, btOverlappingPairCache *overlappingPairCache=0) | |
virtual | ~btSimpleBroadphase () |
virtual btBroadphaseProxy * | createProxy (const btVector3 &aabbMin, const btVector3 &aabbMax, int shapeType, void *userPtr, int collisionFilterGroup, int collisionFilterMask, btDispatcher *dispatcher) |
virtual void | calculateOverlappingPairs (btDispatcher *dispatcher) |
calculateOverlappingPairs is optional: incremental algorithms (sweep and prune) might do it during the set aabb More... | |
virtual void | destroyProxy (btBroadphaseProxy *proxy, btDispatcher *dispatcher) |
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 | 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 | 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 |
virtual void | printStats () |
![]() | |
virtual | ~btBroadphaseInterface () |
Static Public Member Functions | |
static bool | aabbOverlap (btSimpleBroadphaseProxy *proxy0, btSimpleBroadphaseProxy *proxy1) |
Protected Member Functions | |
int | allocHandle () |
void | freeHandle (btSimpleBroadphaseProxy *proxy) |
btSimpleBroadphaseProxy * | getSimpleProxyFromProxy (btBroadphaseProxy *proxy) |
const btSimpleBroadphaseProxy * | getSimpleProxyFromProxy (btBroadphaseProxy *proxy) const |
virtual void | resetPool (btDispatcher *dispatcher) |
reset broadphase internal structures, to ensure determinism/reproducability More... | |
void | validate () |
Protected Attributes | |
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 |
The SimpleBroadphase is just a unit-test for btAxisSweep3, bt32BitAxisSweep3, or btDbvtBroadphase, so use those classes instead. It is a brute force aabb culling broadphase based on O(n^2) aabb checks
Definition at line 41 of file btSimpleBroadphase.h.
btSimpleBroadphase::btSimpleBroadphase | ( | int | maxProxies = 16384 , |
btOverlappingPairCache * | overlappingPairCache = 0 |
||
) |
Definition at line 38 of file btSimpleBroadphase.cpp.
References btAlignedAlloc, btHashedOverlappingPairCache(), m_firstFreeHandle, m_LastHandleIndex, m_maxHandles, m_numHandles, m_ownsPairCache, m_pairCache, m_pHandles, m_pHandlesRawPtr, and btSimpleBroadphaseProxy::SetNextFree().
|
virtual |
Definition at line 68 of file btSimpleBroadphase.cpp.
References btAlignedFree, m_ownsPairCache, m_pairCache, m_pHandlesRawPtr, and btOverlappingPairCache::~btOverlappingPairCache().
|
static |
Definition at line 177 of file btSimpleBroadphase.cpp.
Referenced by calculateOverlappingPairs(), CheckOverlapCallback::processOverlap(), and testAabbOverlap().
|
virtual |
Implements btBroadphaseInterface.
Definition at line 161 of file btSimpleBroadphase.cpp.
References callback, m_LastHandleIndex, m_pHandles, and TestAabbAgainstAabb2().
|
inlineprotected |
Definition at line 53 of file btSimpleBroadphase.h.
References btAssert, freeHandle(), btSimpleBroadphaseProxy::GetNextFree(), m_firstFreeHandle, m_LastHandleIndex, m_maxHandles, m_numHandles, and m_pHandles.
Referenced by createProxy().
|
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:
Implements btBroadphaseInterface.
Definition at line 194 of file btSimpleBroadphase.cpp.
References aabbOverlap(), btOverlappingPairCallback::addOverlappingPair(), btAssert, btBroadphasePair, btOverlappingPairCache::cleanOverlappingPair(), btOverlappingPairCache::findPair(), btOverlappingPairCache::getOverlappingPairArray(), getSimpleProxyFromProxy(), btOverlappingPairCache::hasDeferredRemoval(), m_invalidPair, m_LastHandleIndex, m_numHandles, m_ownsPairCache, m_pairCache, m_pHandles, btAlignedObjectArray< T >::quickSort(), btOverlappingPairCallback::removeOverlappingPair(), btAlignedObjectArray< T >::resize(), btAlignedObjectArray< T >::size(), and testAabbOverlap().
|
virtual |
Implements btBroadphaseInterface.
Definition at line 79 of file btSimpleBroadphase.cpp.
References allocHandle(), btAssert, m_maxHandles, m_numHandles, and m_pHandles.
|
virtual |
Implements btBroadphaseInterface.
Definition at line 124 of file btSimpleBroadphase.cpp.
References freeHandle(), m_pairCache, and btOverlappingPairCallback::removeOverlappingPairsContainingProxy().
|
inlineprotected |
Definition at line 66 of file btSimpleBroadphase.h.
References btAssert, m_firstFreeHandle, m_LastHandleIndex, m_maxHandles, m_numHandles, m_pHandles, and btSimpleBroadphaseProxy::SetNextFree().
Referenced by allocHandle(), and destroyProxy().
|
virtual |
Implements btBroadphaseInterface.
Definition at line 134 of file btSimpleBroadphase.cpp.
References getSimpleProxyFromProxy().
|
inlinevirtual |
getAabb returns the axis aligned bounding box in the 'global' coordinate frame will add some transform later
Implements btBroadphaseInterface.
Definition at line 135 of file btSimpleBroadphase.h.
References BT_LARGE_FLOAT.
|
inlinevirtual |
Implements btBroadphaseInterface.
Definition at line 122 of file btSimpleBroadphase.h.
References m_pairCache.
|
inlinevirtual |
Implements btBroadphaseInterface.
Definition at line 126 of file btSimpleBroadphase.h.
References m_pairCache.
|
inlineprotected |
Definition at line 87 of file btSimpleBroadphase.h.
Referenced by calculateOverlappingPairs(), getAabb(), setAabb(), and testAabbOverlap().
|
inlineprotected |
Definition at line 93 of file btSimpleBroadphase.h.
|
inlinevirtual |
Implements btBroadphaseInterface.
Definition at line 141 of file btSimpleBroadphase.h.
|
virtual |
Implements btBroadphaseInterface.
Definition at line 148 of file btSimpleBroadphase.cpp.
References m_LastHandleIndex, m_pHandles, and btBroadphaseAabbCallback::process().
|
protectedvirtual |
reset broadphase internal structures, to ensure determinism/reproducability
Reimplemented from btBroadphaseInterface.
Definition at line 322 of file btSimpleBroadphase.cpp.
|
virtual |
Implements btBroadphaseInterface.
Definition at line 141 of file btSimpleBroadphase.cpp.
References getSimpleProxyFromProxy().
bool btSimpleBroadphase::testAabbOverlap | ( | btBroadphaseProxy * | proxy0, |
btBroadphaseProxy * | proxy1 | ||
) |
Definition at line 315 of file btSimpleBroadphase.cpp.
References aabbOverlap(), and getSimpleProxyFromProxy().
Referenced by calculateOverlappingPairs().
|
protected |
Definition at line 27 of file btSimpleBroadphase.cpp.
References btAssert, m_numHandles, and m_pHandles.
|
protected |
Definition at line 51 of file btSimpleBroadphase.h.
Referenced by allocHandle(), btSimpleBroadphase(), and freeHandle().
|
protected |
Definition at line 85 of file btSimpleBroadphase.h.
Referenced by calculateOverlappingPairs().
|
protected |
Definition at line 46 of file btSimpleBroadphase.h.
Referenced by aabbTest(), allocHandle(), btSimpleBroadphase(), calculateOverlappingPairs(), freeHandle(), and rayTest().
|
protected |
Definition at line 45 of file btSimpleBroadphase.h.
Referenced by allocHandle(), btSimpleBroadphase(), createProxy(), and freeHandle().
|
protected |
Definition at line 44 of file btSimpleBroadphase.h.
Referenced by allocHandle(), btSimpleBroadphase(), calculateOverlappingPairs(), createProxy(), freeHandle(), and validate().
|
protected |
Definition at line 83 of file btSimpleBroadphase.h.
Referenced by btSimpleBroadphase(), calculateOverlappingPairs(), and ~btSimpleBroadphase().
|
protected |
Definition at line 82 of file btSimpleBroadphase.h.
Referenced by btSimpleBroadphase(), calculateOverlappingPairs(), destroyProxy(), getOverlappingPairCache(), and ~btSimpleBroadphase().
|
protected |
Definition at line 48 of file btSimpleBroadphase.h.
Referenced by aabbTest(), allocHandle(), btSimpleBroadphase(), calculateOverlappingPairs(), createProxy(), freeHandle(), rayTest(), and validate().
|
protected |
Definition at line 50 of file btSimpleBroadphase.h.
Referenced by btSimpleBroadphase(), and ~btSimpleBroadphase().