42 :m_pairCache(overlappingPairCache),
43 m_ownsPairCache(false),
47 if (!overlappingPairCache)
94 btAssert(aabbMin[0]<= aabbMax[0] && aabbMin[1]<= aabbMax[1] && aabbMin[2]<= aabbMax[2]);
219 int new_largest_index = -1;
227 new_largest_index = i;
279 for (i=0;i<overlappingPairArray.
size();i++)
284 bool isDuplicate = (pair == previousPair);
288 bool needsRemoval =
false;
296 needsRemoval =
false;
324 #define CLEAN_INVALID_PAIRS 1
325 #ifdef CLEAN_INVALID_PAIRS
332 #endif//CLEAN_INVALID_PAIRS
btSimpleBroadphaseProxy * m_pHandles
virtual bool processOverlap(btBroadphasePair &pair)
virtual void cleanOverlappingPair(btBroadphasePair &pair, btDispatcher *dispatcher)=0
void freeHandle(btSimpleBroadphaseProxy *proxy)
virtual bool hasDeferredRemoval()=0
btSimpleBroadphaseProxy * getSimpleProxyFromProxy(btBroadphaseProxy *proxy)
static bool aabbOverlap(btSimpleBroadphaseProxy *proxy0, btSimpleBroadphaseProxy *proxy1)
virtual void destroyProxy(btBroadphaseProxy *proxy, btDispatcher *dispatcher)
bool TestAabbAgainstAabb2(const btVector3 &aabbMin1, const btVector3 &aabbMax1, const btVector3 &aabbMin2, const btVector3 &aabbMax2)
conservative test for overlap between two aabbs
void SetNextFree(int next)
btBroadphaseProxy * m_targetProxy
virtual bool processOverlap(btBroadphasePair &pair)
virtual void resetPool(btDispatcher *dispatcher)
reset broadphase internal structures, to ensure determinism/reproducability
The btOverlappingPairCache provides an interface for overlapping pair management (add, remove, storage), used by the btBroadphaseInterface broadphases.
int gOverlappingPairs
btSapBroadphaseArray m_sapBroadphases;
int size() const
return the number of elements in the array
btOverlappingPairCache * m_pairCache
virtual btBroadphasePairArray & getOverlappingPairArray()=0
virtual btBroadphasePair * findPair(btBroadphaseProxy *proxy0, btBroadphaseProxy *proxy1)=0
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 rayTest(const btVector3 &rayFrom, const btVector3 &rayTo, btBroadphaseRayCallback &rayCallback, const btVector3 &aabbMin=btVector3(0, 0, 0), const btVector3 &aabbMax=btVector3(0, 0, 0))
virtual bool processOverlap(btBroadphasePair &pair)
#define btAlignedFree(ptr)
virtual void removeOverlappingPairsContainingProxy(btBroadphaseProxy *proxy0, btDispatcher *dispatcher)=0
virtual ~btSimpleBroadphase()
virtual void getAabb(btBroadphaseProxy *proxy, btVector3 &aabbMin, btVector3 &aabbMax) const
virtual ~btOverlappingPairCache()
The btBroadphaseProxy is the main class that can be used with the Bullet broadphases.
btBroadphaseProxy * m_pProxy1
btCollisionAlgorithm * m_algorithm
btVector3 can be used to represent 3D points and vectors.
virtual bool process(const btBroadphaseProxy *proxy)=0
btBroadphaseProxy * m_pProxy0
bool testAabbOverlap(btBroadphaseProxy *proxy0, btBroadphaseProxy *proxy1)
virtual btBroadphasePair * addOverlappingPair(btBroadphaseProxy *proxy0, btBroadphaseProxy *proxy1)=0
virtual void aabbTest(const btVector3 &aabbMin, const btVector3 &aabbMax, btBroadphaseAabbCallback &callback)
virtual void calculateOverlappingPairs(btDispatcher *dispatcher)
calculateOverlappingPairs is optional: incremental algorithms (sweep and prune) might do it during th...
void resize(int newsize, const T &fillData=T())
btSimpleBroadphase(int maxProxies=16384, btOverlappingPairCache *overlappingPairCache=0)
virtual void setAabb(btBroadphaseProxy *proxy, const btVector3 &aabbMin, const btVector3 &aabbMax, btDispatcher *dispatcher)
#define btAlignedAlloc(size, alignment)
virtual ~RemovePairContainingProxy()
The btDispatcher interface class can be used in combination with broadphase to dispatch calculations ...
Hash-space based Pair Cache, thanks to Erin Catto, Box2D, http://www.box2d.org, and Pierre Terdiman...
void quickSort(const L &CompareFunc)
virtual void * removeOverlappingPair(btBroadphaseProxy *proxy0, btBroadphaseProxy *proxy1, btDispatcher *dispatcher)=0
The btBroadphasePair class contains a pair of aabb-overlapping objects.