Blender V2.61 - r43446
Public Member Functions | Protected Attributes

btSortedOverlappingPairCache Class Reference

#include <btOverlappingPairCache.h>

Inheritance diagram for btSortedOverlappingPairCache:
Inheritance graph
[legend]

List of all members.

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)
btBroadphasePair * addOverlappingPair (btBroadphaseProxy *proxy0, btBroadphaseProxy *proxy1)
btBroadphasePair * findPair (btBroadphaseProxy *proxy0, btBroadphaseProxy *proxy1)
void cleanProxyFromPairs (btBroadphaseProxy *proxy, btDispatcher *dispatcher)
void removeOverlappingPairsContainingProxy (btBroadphaseProxy *proxy, btDispatcher *dispatcher)
bool needsBroadphaseCollision (btBroadphaseProxy *proxy0, btBroadphaseProxy *proxy1) const
btBroadphasePairArraygetOverlappingPairArray ()
const btBroadphasePairArraygetOverlappingPairArray () const
btBroadphasePair * getOverlappingPairArrayPtr ()
const btBroadphasePair * getOverlappingPairArrayPtr () const
int getNumOverlappingPairs () const
btOverlapFilterCallbackgetOverlapFilterCallback ()
void setOverlapFilterCallback (btOverlapFilterCallback *callback)
virtual bool hasDeferredRemoval ()
virtual void setInternalGhostPairCallback (btOverlappingPairCallback *ghostPairCallback)
virtual void sortOverlappingPairs (btDispatcher *dispatcher)

Protected Attributes

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

Detailed Description

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

Definition at line 281 of file btOverlappingPairCache.h.


Constructor & Destructor Documentation

btSortedOverlappingPairCache::btSortedOverlappingPairCache ( )
btSortedOverlappingPairCache::~btSortedOverlappingPairCache ( ) [virtual]

Definition at line 551 of file btOverlappingPairCache.cpp.


Member Function Documentation

btBroadphasePair * btSortedOverlappingPairCache::addOverlappingPair ( btBroadphaseProxy *  proxy0,
btBroadphaseProxy *  proxy1 
) [virtual]
void btSortedOverlappingPairCache::cleanOverlappingPair ( btBroadphasePair &  pair,
btDispatcher dispatcher 
) [virtual]
void btSortedOverlappingPairCache::cleanProxyFromPairs ( btBroadphaseProxy *  proxy,
btDispatcher dispatcher 
) [virtual]

Implements btOverlappingPairCache.

Definition at line 569 of file btOverlappingPairCache.cpp.

References processAllOverlappingPairs().

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.

References btAlignedObjectArray< T >::findLinearSearch(), m_overlappingPairArray, needsBroadphaseCollision(), and btAlignedObjectArray< T >::size().

Referenced by removeOverlappingPair().

int btSortedOverlappingPairCache::getNumOverlappingPairs ( ) const [inline, virtual]
btOverlapFilterCallback* btSortedOverlappingPairCache::getOverlapFilterCallback ( ) [inline]

Definition at line 358 of file btOverlappingPairCache.h.

References m_overlapFilterCallback.

btBroadphasePairArray& btSortedOverlappingPairCache::getOverlappingPairArray ( ) [inline, virtual]

Implements btOverlappingPairCache.

Definition at line 330 of file btOverlappingPairCache.h.

References m_overlappingPairArray.

const btBroadphasePairArray& btSortedOverlappingPairCache::getOverlappingPairArray ( ) const [inline]

Definition at line 335 of file btOverlappingPairCache.h.

References m_overlappingPairArray.

btBroadphasePair* btSortedOverlappingPairCache::getOverlappingPairArrayPtr ( ) [inline, virtual]

Implements btOverlappingPairCache.

Definition at line 343 of file btOverlappingPairCache.h.

References m_overlappingPairArray.

const btBroadphasePair* btSortedOverlappingPairCache::getOverlappingPairArrayPtr ( ) const [inline, virtual]

Implements btOverlappingPairCache.

Definition at line 348 of file btOverlappingPairCache.h.

References m_overlappingPairArray.

virtual bool btSortedOverlappingPairCache::hasDeferredRemoval ( ) [inline, virtual]

Implements btOverlappingPairCache.

Definition at line 368 of file btOverlappingPairCache.h.

References m_hasDeferredRemoval.

Referenced by removeOverlappingPair().

bool btSortedOverlappingPairCache::needsBroadphaseCollision ( btBroadphaseProxy *  proxy0,
btBroadphaseProxy *  proxy1 
) const [inline]
void btSortedOverlappingPairCache::processAllOverlappingPairs ( btOverlapCallback callback,
btDispatcher dispatcher 
) [virtual]
void * btSortedOverlappingPairCache::removeOverlappingPair ( btBroadphaseProxy *  proxy0,
btBroadphaseProxy *  proxy1,
btDispatcher dispatcher 
) [virtual]
void btSortedOverlappingPairCache::removeOverlappingPairsContainingProxy ( btBroadphaseProxy *  proxy,
btDispatcher dispatcher 
) [virtual]

Implements btOverlappingPairCallback.

Definition at line 604 of file btOverlappingPairCache.cpp.

References processAllOverlappingPairs().

virtual void btSortedOverlappingPairCache::setInternalGhostPairCallback ( btOverlappingPairCallback ghostPairCallback) [inline, virtual]

Implements btOverlappingPairCache.

Definition at line 373 of file btOverlappingPairCache.h.

References m_ghostPairCallback.

void btSortedOverlappingPairCache::setOverlapFilterCallback ( btOverlapFilterCallback callback) [inline, virtual]

Implements btOverlappingPairCache.

Definition at line 363 of file btOverlappingPairCache.h.

References m_overlapFilterCallback.

void btSortedOverlappingPairCache::sortOverlappingPairs ( btDispatcher dispatcher) [virtual]

Implements btOverlappingPairCache.

Definition at line 629 of file btOverlappingPairCache.cpp.


Member Data Documentation

Definition at line 288 of file btOverlappingPairCache.h.

by default, do the removal during the pair traversal

Definition at line 291 of file btOverlappingPairCache.h.

Referenced by hasDeferredRemoval().


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