Bullet Collision Detection & Physics Library
Public Member Functions | Protected Attributes | Private Member Functions | Private Attributes | List of all members
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]

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
 
- Public Member Functions inherited from btOverlappingPairCache
virtual ~btOverlappingPairCache ()
 
- Public Member Functions inherited from btOverlappingPairCallback
virtual ~btOverlappingPairCallback ()
 

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 
)
inlinevirtual

Implements btOverlappingPairCallback.

Definition at line 128 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 
)
inlineprivate

Definition at line 194 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 171 of file btOverlappingPairCache.h.

unsigned int btHashedOverlappingPairCache::getHash ( unsigned int  proxyId1,
unsigned int  proxyId2 
)
inlineprivate

Definition at line 217 of file btOverlappingPairCache.h.

int btHashedOverlappingPairCache::getNumOverlappingPairs ( ) const
inlinevirtual

Implements btOverlappingPairCache.

Definition at line 184 of file btOverlappingPairCache.h.

btOverlapFilterCallback* btHashedOverlappingPairCache::getOverlapFilterCallback ( )
inline

Definition at line 174 of file btOverlappingPairCache.h.

btBroadphasePairArray& btHashedOverlappingPairCache::getOverlappingPairArray ( )
inlinevirtual

Implements btOverlappingPairCache.

Definition at line 155 of file btOverlappingPairCache.h.

const btBroadphasePairArray& btHashedOverlappingPairCache::getOverlappingPairArray ( ) const
inline

Definition at line 160 of file btOverlappingPairCache.h.

virtual btBroadphasePair* btHashedOverlappingPairCache::getOverlappingPairArrayPtr ( )
inlinevirtual

Implements btOverlappingPairCache.

Definition at line 145 of file btOverlappingPairCache.h.

const btBroadphasePair* btHashedOverlappingPairCache::getOverlappingPairArrayPtr ( ) const
inlinevirtual

Implements btOverlappingPairCache.

Definition at line 150 of file btOverlappingPairCache.h.

void btHashedOverlappingPairCache::growTables ( )
private

Definition at line 172 of file btOverlappingPairCache.cpp.

virtual bool btHashedOverlappingPairCache::hasDeferredRemoval ( )
inlineprivatevirtual

Implements btOverlappingPairCache.

Definition at line 261 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 
)
inlineprivate

Definition at line 235 of file btOverlappingPairCache.h.

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

Definition at line 115 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)
inlineprivatevirtual

Implements btOverlappingPairCache.

Definition at line 266 of file btOverlappingPairCache.h.

void btHashedOverlappingPairCache::setOverlapFilterCallback ( btOverlapFilterCallback callback)
inlinevirtual

Implements btOverlappingPairCache.

Definition at line 179 of file btOverlappingPairCache.h.

void btHashedOverlappingPairCache::sortOverlappingPairs ( btDispatcher dispatcher)
privatevirtual

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

bool btHashedOverlappingPairCache::m_blockedForChanges
private

Definition at line 97 of file btOverlappingPairCache.h.

btOverlappingPairCallback* btHashedOverlappingPairCache::m_ghostPairCallback
protected

Definition at line 103 of file btOverlappingPairCache.h.

btAlignedObjectArray<int> btHashedOverlappingPairCache::m_hashTable
protected

Definition at line 101 of file btOverlappingPairCache.h.

btAlignedObjectArray<int> btHashedOverlappingPairCache::m_next
protected

Definition at line 102 of file btOverlappingPairCache.h.

btOverlapFilterCallback* btHashedOverlappingPairCache::m_overlapFilterCallback
private

Definition at line 96 of file btOverlappingPairCache.h.

btBroadphasePairArray btHashedOverlappingPairCache::m_overlappingPairArray
private

Definition at line 95 of file btOverlappingPairCache.h.


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