Public Member Functions | Protected Attributes | Private Member Functions | Private Attributes

btHashedOverlappingPairCache Class Reference

Hash-space based Pair Cache, thanks to Erin Catto, Box2D, http://www.box2d.org, and Pierre Terdiman, Codercorner, http://codercorner.com. More...

#include <btOverlappingPairCache.h>

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

List of all members.

Public Member Functions

 btHashedOverlappingPairCache ()
virtual ~btHashedOverlappingPairCache ()
void removeOverlappingPairsContainingProxy (btBroadphaseProxy *proxy, btDispatcher *dispatcher)
virtual void * removeOverlappingPair (btBroadphaseProxy *proxy0, btBroadphaseProxy *proxy1, btDispatcher *dispatcher)
bool needsBroadphaseCollision (btBroadphaseProxy *proxy0, btBroadphaseProxy *proxy1) const
virtual btBroadphasePairaddOverlappingPair (btBroadphaseProxy *proxy0, btBroadphaseProxy *proxy1)
void cleanProxyFromPairs (btBroadphaseProxy *proxy, btDispatcher *dispatcher)
virtual void processAllOverlappingPairs (btOverlapCallback *, btDispatcher *dispatcher)
virtual btBroadphasePairgetOverlappingPairArrayPtr ()
const btBroadphasePairgetOverlappingPairArrayPtr () const
btBroadphasePairArraygetOverlappingPairArray ()
const btBroadphasePairArraygetOverlappingPairArray () const
void cleanOverlappingPair (btBroadphasePair &pair, btDispatcher *dispatcher)
btBroadphasePairfindPair (btBroadphaseProxy *proxy0, btBroadphaseProxy *proxy1)
int GetCount () const
btOverlapFilterCallbackgetOverlapFilterCallback ()
void setOverlapFilterCallback (btOverlapFilterCallback *callback)
int getNumOverlappingPairs () const

Protected Attributes

btAlignedObjectArray< int > m_hashTable
btAlignedObjectArray< int > m_next
btOverlappingPairCallbackm_ghostPairCallback

Private Member Functions

btBroadphasePairinternalAddPair (btBroadphaseProxy *proxy0, btBroadphaseProxy *proxy1)
void growTables ()
bool equalsPair (const btBroadphasePair &pair, int proxyId1, int proxyId2)
unsigned int getHash (unsigned int proxyId1, unsigned int proxyId2)
btBroadphasePairinternalFindPair (btBroadphaseProxy *proxy0, btBroadphaseProxy *proxy1, int hash)
virtual bool hasDeferredRemoval ()
virtual void setInternalGhostPairCallback (btOverlappingPairCallback *ghostPairCallback)
virtual void sortOverlappingPairs (btDispatcher *dispatcher)

Private Attributes

btBroadphasePairArray m_overlappingPairArray
btOverlapFilterCallbackm_overlapFilterCallback
bool m_blockedForChanges

Detailed Description

Hash-space based Pair Cache, thanks to Erin Catto, Box2D, http://www.box2d.org, and Pierre Terdiman, Codercorner, http://codercorner.com.

Definition at line 93 of file btOverlappingPairCache.h.


Constructor & Destructor Documentation

btHashedOverlappingPairCache::btHashedOverlappingPairCache (  ) 

Definition at line 35 of file btOverlappingPairCache.cpp.

btHashedOverlappingPairCache::~btHashedOverlappingPairCache (  )  [virtual]

Definition at line 48 of file btOverlappingPairCache.cpp.


Member Function Documentation

virtual btBroadphasePair* btHashedOverlappingPairCache::addOverlappingPair ( btBroadphaseProxy proxy0,
btBroadphaseProxy proxy1 
) [inline, virtual]

Implements btOverlappingPairCallback.

Definition at line 122 of file btOverlappingPairCache.h.

void btHashedOverlappingPairCache::cleanOverlappingPair ( btBroadphasePair pair,
btDispatcher dispatcher 
) [virtual]

Implements btOverlappingPairCache.

Definition at line 54 of file btOverlappingPairCache.cpp.

void btHashedOverlappingPairCache::cleanProxyFromPairs ( btBroadphaseProxy proxy,
btDispatcher dispatcher 
) [virtual]

Implements btOverlappingPairCache.

Definition at line 69 of file btOverlappingPairCache.cpp.

bool btHashedOverlappingPairCache::equalsPair ( const btBroadphasePair pair,
int  proxyId1,
int  proxyId2 
) [inline, private]

Definition at line 188 of file btOverlappingPairCache.h.

btBroadphasePair * btHashedOverlappingPairCache::findPair ( btBroadphaseProxy proxy0,
btBroadphaseProxy proxy1 
) [virtual]

Implements btOverlappingPairCache.

Definition at line 136 of file btOverlappingPairCache.cpp.

int btHashedOverlappingPairCache::GetCount (  )  const [inline]

Definition at line 165 of file btOverlappingPairCache.h.

unsigned int btHashedOverlappingPairCache::getHash ( unsigned int  proxyId1,
unsigned int  proxyId2 
) [inline, private]

Definition at line 211 of file btOverlappingPairCache.h.

int btHashedOverlappingPairCache::getNumOverlappingPairs (  )  const [inline, virtual]

Implements btOverlappingPairCache.

Definition at line 178 of file btOverlappingPairCache.h.

btOverlapFilterCallback* btHashedOverlappingPairCache::getOverlapFilterCallback (  )  [inline]

Definition at line 168 of file btOverlappingPairCache.h.

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

Implements btOverlappingPairCache.

Definition at line 149 of file btOverlappingPairCache.h.

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

Definition at line 154 of file btOverlappingPairCache.h.

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

Implements btOverlappingPairCache.

Definition at line 144 of file btOverlappingPairCache.h.

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

Implements btOverlappingPairCache.

Definition at line 139 of file btOverlappingPairCache.h.

void btHashedOverlappingPairCache::growTables (  )  [private]

Definition at line 172 of file btOverlappingPairCache.cpp.

virtual bool btHashedOverlappingPairCache::hasDeferredRemoval (  )  [inline, private, virtual]

Implements btOverlappingPairCache.

Definition at line 255 of file btOverlappingPairCache.h.

btBroadphasePair * btHashedOverlappingPairCache::internalAddPair ( btBroadphaseProxy proxy0,
btBroadphaseProxy proxy1 
) [private]

Definition at line 214 of file btOverlappingPairCache.cpp.

btBroadphasePair* btHashedOverlappingPairCache::internalFindPair ( btBroadphaseProxy proxy0,
btBroadphaseProxy proxy1,
int  hash 
) [inline, private]

Definition at line 229 of file btOverlappingPairCache.h.

bool btHashedOverlappingPairCache::needsBroadphaseCollision ( btBroadphaseProxy proxy0,
btBroadphaseProxy proxy1 
) const [inline]

Definition at line 109 of file btOverlappingPairCache.h.

void btHashedOverlappingPairCache::processAllOverlappingPairs ( btOverlapCallback callback,
btDispatcher dispatcher 
) [virtual]

Implements btOverlappingPairCache.

Definition at line 377 of file btOverlappingPairCache.cpp.

void * btHashedOverlappingPairCache::removeOverlappingPair ( btBroadphaseProxy proxy0,
btBroadphaseProxy proxy1,
btDispatcher dispatcher 
) [virtual]

Implements btOverlappingPairCallback.

Definition at line 273 of file btOverlappingPairCache.cpp.

void btHashedOverlappingPairCache::removeOverlappingPairsContainingProxy ( btBroadphaseProxy proxy,
btDispatcher dispatcher 
) [virtual]

Implements btOverlappingPairCallback.

Definition at line 106 of file btOverlappingPairCache.cpp.

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

Implements btOverlappingPairCache.

Definition at line 260 of file btOverlappingPairCache.h.

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

Implements btOverlappingPairCache.

Definition at line 173 of file btOverlappingPairCache.h.

void btHashedOverlappingPairCache::sortOverlappingPairs ( btDispatcher dispatcher  )  [private, virtual]

need to keep hashmap in sync with pair address, so rebuild all

Implements btOverlappingPairCache.

Definition at line 399 of file btOverlappingPairCache.cpp.


Member Data Documentation

Definition at line 97 of file btOverlappingPairCache.h.

Definition at line 272 of file btOverlappingPairCache.h.

Definition at line 270 of file btOverlappingPairCache.h.

Definition at line 271 of file btOverlappingPairCache.h.

Definition at line 96 of file btOverlappingPairCache.h.

Definition at line 95 of file btOverlappingPairCache.h.


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