39 : m_pairCache(overlappingPairCache),
40 m_ownsPairCache(false),
43 if (!overlappingPairCache)
86 btAssert(aabbMin[0] <= aabbMax[0] && aabbMin[1] <= aabbMax[1] && aabbMin[2] <= aabbMax[2]);
120 return ((m_targetProxy == proxy0 || m_targetProxy == proxy1));
137 aabbMin = sbp->m_aabbMin;
138 aabbMax = sbp->m_aabbMax;
144 sbp->m_aabbMin = aabbMin;
145 sbp->m_aabbMax = aabbMax;
153 if (!proxy->m_clientObject)
166 if (!proxy->m_clientObject)
179 return proxy0->m_aabbMin[0] <= proxy1->m_aabbMax[0] && proxy1->m_aabbMin[0] <= proxy0->m_aabbMax[0] &&
180 proxy0->m_aabbMin[1] <= proxy1->m_aabbMax[1] && proxy1->m_aabbMin[1] <= proxy0->m_aabbMax[1] &&
181 proxy0->m_aabbMin[2] <= proxy1->m_aabbMax[2] && proxy1->m_aabbMin[2] <= proxy0->m_aabbMax[2];
200 int new_largest_index = -1;
204 if (!proxy0->m_clientObject)
208 new_largest_index = i;
213 if (!proxy1->m_clientObject)
254 previousPair.m_pProxy0 = 0;
255 previousPair.m_pProxy1 = 0;
256 previousPair.m_algorithm = 0;
258 for (i = 0; i < overlappingPairArray.
size(); i++)
262 bool isDuplicate = (pair == previousPair);
266 bool needsRemoval =
false;
274 needsRemoval =
false;
302 #define CLEAN_INVALID_PAIRS 1
303 #ifdef CLEAN_INVALID_PAIRS
SIMD_FORCE_INLINE bool TestAabbAgainstAabb2(const btVector3 &aabbMin1, const btVector3 &aabbMax1, const btVector3 &aabbMin2, const btVector3 &aabbMax2)
conservative test for overlap between two aabbs
#define btAlignedFree(ptr)
#define btAlignedAlloc(size, alignment)
btHashedOverlappingPairCache()
btVector3
btVector3 can be used to represent 3D points and vectors. It has an un-used w component to suit 16-by...
virtual bool processOverlap(btBroadphasePair &pair)
virtual ~RemovePairContainingProxy()
virtual bool processOverlap(btBroadphasePair &pair)
virtual bool processOverlap(btBroadphasePair &pair)
SIMD_FORCE_INLINE int size() const
return the number of elements in the array
SIMD_FORCE_INLINE void resize(int newsize, const T &fillData=T())
void quickSort(const L &CompareFunc)
virtual void cleanOverlappingPair(btBroadphasePair &pair, btDispatcher *dispatcher)=0
virtual btBroadphasePair * findPair(btBroadphaseProxy *proxy0, btBroadphaseProxy *proxy1)=0
virtual ~btOverlappingPairCache()
virtual bool hasDeferredRemoval()=0
virtual btBroadphasePairArray & getOverlappingPairArray()=0
virtual void removeOverlappingPairsContainingProxy(btBroadphaseProxy *proxy0, btDispatcher *dispatcher)=0
virtual void * removeOverlappingPair(btBroadphaseProxy *proxy0, btBroadphaseProxy *proxy1, btDispatcher *dispatcher)=0
virtual btBroadphasePair * addOverlappingPair(btBroadphaseProxy *proxy0, btBroadphaseProxy *proxy1)=0
virtual void aabbTest(const btVector3 &aabbMin, const btVector3 &aabbMax, btBroadphaseAabbCallback &callback)
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))
btSimpleBroadphaseProxy * getSimpleProxyFromProxy(btBroadphaseProxy *proxy)
bool testAabbOverlap(btBroadphaseProxy *proxy0, btBroadphaseProxy *proxy1)
void freeHandle(btSimpleBroadphaseProxy *proxy)
btOverlappingPairCache * m_pairCache
virtual void resetPool(btDispatcher *dispatcher)
reset broadphase internal structures, to ensure determinism/reproducability
virtual void setAabb(btBroadphaseProxy *proxy, const btVector3 &aabbMin, const btVector3 &aabbMax, btDispatcher *dispatcher)
virtual btBroadphaseProxy * createProxy(const btVector3 &aabbMin, const btVector3 &aabbMax, int shapeType, void *userPtr, int collisionFilterGroup, int collisionFilterMask, btDispatcher *dispatcher)
btSimpleBroadphaseProxy * m_pHandles
btSimpleBroadphase(int maxProxies=16384, btOverlappingPairCache *overlappingPairCache=0)
virtual void getAabb(btBroadphaseProxy *proxy, btVector3 &aabbMin, btVector3 &aabbMax) const
virtual void destroyProxy(btBroadphaseProxy *proxy, btDispatcher *dispatcher)
virtual void calculateOverlappingPairs(btDispatcher *dispatcher)
calculateOverlappingPairs is optional: incremental algorithms (sweep and prune) might do it during th...
static bool aabbOverlap(btSimpleBroadphaseProxy *proxy0, btSimpleBroadphaseProxy *proxy1)
virtual ~btSimpleBroadphase()
DEGForeachIDComponentCallback callback
SyclQueue void void size_t num_bytes void
virtual bool process(const btBroadphaseProxy *proxy)=0
SIMD_FORCE_INLINE void SetNextFree(int next)