Bullet Collision Detection & Physics Library
Public Member Functions | Protected Attributes | List of all members
btSortedOverlappingPairCache Class Reference

btSortedOverlappingPairCache maintains the objects with overlapping AABB Typically managed by the Broadphase, Axis3Sweep or btSimpleBroadphase More...

#include <btOverlappingPairCache.h>

Inheritance diagram for btSortedOverlappingPairCache:
Inheritance graph
[legend]
Collaboration diagram for btSortedOverlappingPairCache:
Collaboration graph
[legend]

Public Member Functions

 btSortedOverlappingPairCache ()
 
virtual ~btSortedOverlappingPairCache ()
 
virtual void processAllOverlappingPairs (btOverlapCallback *, btDispatcher *dispatcher)
 
void * removeOverlappingPair (btBroadphaseProxy *proxy0, btBroadphaseProxy *proxy1, btDispatcher *dispatcher)
 
void cleanOverlappingPair (btBroadphasePair &pair, btDispatcher *dispatcher)
 
btBroadphasePairaddOverlappingPair (btBroadphaseProxy *proxy0, btBroadphaseProxy *proxy1)
 
btBroadphasePairfindPair (btBroadphaseProxy *proxy0, btBroadphaseProxy *proxy1)
 this findPair becomes really slow. More...
 
void cleanProxyFromPairs (btBroadphaseProxy *proxy, btDispatcher *dispatcher)
 
void removeOverlappingPairsContainingProxy (btBroadphaseProxy *proxy, btDispatcher *dispatcher)
 
bool needsBroadphaseCollision (btBroadphaseProxy *proxy0, btBroadphaseProxy *proxy1) const
 
btBroadphasePairArraygetOverlappingPairArray ()
 
const btBroadphasePairArraygetOverlappingPairArray () const
 
btBroadphasePairgetOverlappingPairArrayPtr ()
 
const btBroadphasePairgetOverlappingPairArrayPtr () const
 
int getNumOverlappingPairs () const
 
btOverlapFilterCallbackgetOverlapFilterCallback ()
 
void setOverlapFilterCallback (btOverlapFilterCallback *callback)
 
virtual bool hasDeferredRemoval ()
 
virtual void setInternalGhostPairCallback (btOverlappingPairCallback *ghostPairCallback)
 
virtual void sortOverlappingPairs (btDispatcher *dispatcher)
 
- Public Member Functions inherited from btOverlappingPairCache
virtual ~btOverlappingPairCache ()
 
- Public Member Functions inherited from btOverlappingPairCallback
virtual ~btOverlappingPairCallback ()
 

Protected Attributes

btBroadphasePairArray m_overlappingPairArray
 
bool m_blockedForChanges
 
bool m_hasDeferredRemoval
 by default, do the removal during the pair traversal More...
 
btOverlapFilterCallbackm_overlapFilterCallback
 
btOverlappingPairCallbackm_ghostPairCallback
 

Detailed Description

btSortedOverlappingPairCache maintains the objects with overlapping AABB Typically managed by the Broadphase, Axis3Sweep or btSimpleBroadphase

Definition at line 282 of file btOverlappingPairCache.h.

Constructor & Destructor Documentation

btSortedOverlappingPairCache::btSortedOverlappingPairCache ( )

Definition at line 541 of file btOverlappingPairCache.cpp.

btSortedOverlappingPairCache::~btSortedOverlappingPairCache ( )
virtual

Definition at line 551 of file btOverlappingPairCache.cpp.

Member Function Documentation

btBroadphasePair * btSortedOverlappingPairCache::addOverlappingPair ( btBroadphaseProxy proxy0,
btBroadphaseProxy proxy1 
)
virtual

Implements btOverlappingPairCallback.

Definition at line 462 of file btOverlappingPairCache.cpp.

void btSortedOverlappingPairCache::cleanOverlappingPair ( btBroadphasePair pair,
btDispatcher dispatcher 
)
virtual

Implements btOverlappingPairCache.

Definition at line 555 of file btOverlappingPairCache.cpp.

void btSortedOverlappingPairCache::cleanProxyFromPairs ( btBroadphaseProxy proxy,
btDispatcher dispatcher 
)
virtual

Implements btOverlappingPairCache.

Definition at line 569 of file btOverlappingPairCache.cpp.

btBroadphasePair * btSortedOverlappingPairCache::findPair ( btBroadphaseProxy proxy0,
btBroadphaseProxy proxy1 
)
virtual

this findPair becomes really slow.

Either sort the list to speedup the query, or use a different solution. It is mainly used for Removing overlapping pairs. Removal could be delayed. we could keep a linked list in each proxy, and store pair in one of the proxies (with lowest memory address) Also we can use a 2D bitmap, which can be useful for a future GPU implementation

Implements btOverlappingPairCache.

Definition at line 486 of file btOverlappingPairCache.cpp.

int btSortedOverlappingPairCache::getNumOverlappingPairs ( ) const
inlinevirtual

Implements btOverlappingPairCache.

Definition at line 354 of file btOverlappingPairCache.h.

btOverlapFilterCallback* btSortedOverlappingPairCache::getOverlapFilterCallback ( )
inline

Definition at line 359 of file btOverlappingPairCache.h.

btBroadphasePairArray& btSortedOverlappingPairCache::getOverlappingPairArray ( )
inlinevirtual

Implements btOverlappingPairCache.

Definition at line 331 of file btOverlappingPairCache.h.

const btBroadphasePairArray& btSortedOverlappingPairCache::getOverlappingPairArray ( ) const
inline

Definition at line 336 of file btOverlappingPairCache.h.

btBroadphasePair* btSortedOverlappingPairCache::getOverlappingPairArrayPtr ( )
inlinevirtual

Implements btOverlappingPairCache.

Definition at line 344 of file btOverlappingPairCache.h.

const btBroadphasePair* btSortedOverlappingPairCache::getOverlappingPairArrayPtr ( ) const
inlinevirtual

Implements btOverlappingPairCache.

Definition at line 349 of file btOverlappingPairCache.h.

virtual bool btSortedOverlappingPairCache::hasDeferredRemoval ( )
inlinevirtual

Implements btOverlappingPairCache.

Definition at line 369 of file btOverlappingPairCache.h.

bool btSortedOverlappingPairCache::needsBroadphaseCollision ( btBroadphaseProxy proxy0,
btBroadphaseProxy proxy1 
) const
inline

Definition at line 320 of file btOverlappingPairCache.h.

void btSortedOverlappingPairCache::processAllOverlappingPairs ( btOverlapCallback callback,
btDispatcher dispatcher 
)
virtual

Implements btOverlappingPairCache.

Definition at line 514 of file btOverlappingPairCache.cpp.

void * btSortedOverlappingPairCache::removeOverlappingPair ( btBroadphaseProxy proxy0,
btBroadphaseProxy proxy1,
btDispatcher dispatcher 
)
virtual

Implements btOverlappingPairCallback.

Definition at line 430 of file btOverlappingPairCache.cpp.

void btSortedOverlappingPairCache::removeOverlappingPairsContainingProxy ( btBroadphaseProxy proxy,
btDispatcher dispatcher 
)
virtual

Implements btOverlappingPairCallback.

Definition at line 604 of file btOverlappingPairCache.cpp.

virtual void btSortedOverlappingPairCache::setInternalGhostPairCallback ( btOverlappingPairCallback ghostPairCallback)
inlinevirtual

Implements btOverlappingPairCache.

Definition at line 374 of file btOverlappingPairCache.h.

void btSortedOverlappingPairCache::setOverlapFilterCallback ( btOverlapFilterCallback callback)
inlinevirtual

Implements btOverlappingPairCache.

Definition at line 364 of file btOverlappingPairCache.h.

void btSortedOverlappingPairCache::sortOverlappingPairs ( btDispatcher dispatcher)
virtual

Implements btOverlappingPairCache.

Definition at line 629 of file btOverlappingPairCache.cpp.

Member Data Documentation

bool btSortedOverlappingPairCache::m_blockedForChanges
protected

Definition at line 289 of file btOverlappingPairCache.h.

btOverlappingPairCallback* btSortedOverlappingPairCache::m_ghostPairCallback
protected

Definition at line 297 of file btOverlappingPairCache.h.

bool btSortedOverlappingPairCache::m_hasDeferredRemoval
protected

by default, do the removal during the pair traversal

Definition at line 292 of file btOverlappingPairCache.h.

btOverlapFilterCallback* btSortedOverlappingPairCache::m_overlapFilterCallback
protected

Definition at line 295 of file btOverlappingPairCache.h.

btBroadphasePairArray btSortedOverlappingPairCache::m_overlappingPairArray
protected

Definition at line 286 of file btOverlappingPairCache.h.


The documentation for this class was generated from the following files: