Bullet Collision Detection & Physics Library: btHashedOverlappingPairCache Class Reference

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:
[legend]
Collaboration diagram for btHashedOverlappingPairCache:
[legend]

## Public Member Functions
| BT_DECLARE_ALIGNED_ALLOCATOR ()
| 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 btBroadphasePair * | addOverlappingPair (btBroadphaseProxy *proxy0, btBroadphaseProxy *proxy1)
void | cleanProxyFromPairs (btBroadphaseProxy *proxy, btDispatcher *dispatcher)
virtual void | processAllOverlappingPairs (btOverlapCallback *, btDispatcher *dispatcher)
virtual void | processAllOverlappingPairs (btOverlapCallback *callback, btDispatcher *dispatcher, const struct btDispatcherInfo &dispatchInfo)
virtual btBroadphasePair * | getOverlappingPairArrayPtr ()
const btBroadphasePair * | getOverlappingPairArrayPtr () const
btBroadphasePairArray & | getOverlappingPairArray ()
const btBroadphasePairArray & | getOverlappingPairArray () const
void | cleanOverlappingPair (btBroadphasePair &pair, btDispatcher *dispatcher)
btBroadphasePair * | findPair (btBroadphaseProxy *proxy0, btBroadphaseProxy *proxy1)
int | GetCount () const
btOverlapFilterCallback * | getOverlapFilterCallback ()
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
btOverlappingPairCallback * | m_ghostPairCallback

## Private Member Functions
btBroadphasePair * | internalAddPair (btBroadphaseProxy *proxy0, btBroadphaseProxy *proxy1)
void | growTables ()
bool | equalsPair (const btBroadphasePair &pair, int proxyId1, int proxyId2)
unsigned int | getHash (unsigned int proxyId1, unsigned int proxyId2)
btBroadphasePair * | internalFindPair (btBroadphaseProxy *proxy0, btBroadphaseProxy *proxy1, int hash)
virtual bool | hasDeferredRemoval ()
virtual void | setInternalGhostPairCallback (btOverlappingPairCallback *ghostPairCallback)
virtual void | sortOverlappingPairs (btDispatcher *dispatcher)

## Private Attributes
btBroadphasePairArray | m_overlappingPairArray
btOverlapFilterCallback * | m_overlapFilterCallback

## Additional Inherited Members
Protected Member Functions inherited from btOverlappingPairCallback
| btOverlappingPairCallback ()

## 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 87 of file btOverlappingPairCache.h.

## Constructor & Destructor Documentation

## ◆ btHashedOverlappingPairCache()

btHashedOverlappingPairCache::btHashedOverlappingPairCache | ( |  | ) |

Definition at line 24 of file btOverlappingPairCache.cpp.

## ◆ ~btHashedOverlappingPairCache()

btHashedOverlappingPairCache::~btHashedOverlappingPairCache | ( |  | ) |
| virtual

Definition at line 32 of file btOverlappingPairCache.cpp.

## Member Function Documentation

## ◆ addOverlappingPair()

virtual btBroadphasePair* btHashedOverlappingPairCache::addOverlappingPair | ( | btBroadphaseProxy * | proxy0,
|  | btBroadphaseProxy * | proxy1
| ) |  |
| inlinevirtual

Implements btOverlappingPairCallback.

Definition at line 121 of file btOverlappingPairCache.h.

## ◆ BT_DECLARE_ALIGNED_ALLOCATOR()

btHashedOverlappingPairCache::BT_DECLARE_ALIGNED_ALLOCATOR | ( |  | ) |

## ◆ cleanOverlappingPair()

void btHashedOverlappingPairCache::cleanOverlappingPair | ( | btBroadphasePair & | pair,
|  | btDispatcher * | dispatcher
| ) |  |
| virtual

Implements btOverlappingPairCache.

Definition at line 36 of file btOverlappingPairCache.cpp.

## ◆ cleanProxyFromPairs()

void btHashedOverlappingPairCache::cleanProxyFromPairs | ( | btBroadphaseProxy * | proxy,
|  | btDispatcher * | dispatcher
| ) |  |
| virtual

Implements btOverlappingPairCache.

Definition at line 48 of file btOverlappingPairCache.cpp.

## ◆ equalsPair()

bool btHashedOverlappingPairCache::equalsPair | ( | const btBroadphasePair & | pair,
|  | int | proxyId1,
|  | int | proxyId2
| ) |  |
| inlineprivate

Definition at line 182 of file btOverlappingPairCache.h.

## ◆ findPair()

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

Implements btOverlappingPairCache.

Definition at line 102 of file btOverlappingPairCache.cpp.

## ◆ GetCount()

int btHashedOverlappingPairCache::GetCount | ( |  | ) | const
| inline

Definition at line 159 of file btOverlappingPairCache.h.

## ◆ getHash()

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

Definition at line 203 of file btOverlappingPairCache.h.

## ◆ getNumOverlappingPairs()

int btHashedOverlappingPairCache::getNumOverlappingPairs | ( |  | ) | const
| inlinevirtual

Implements btOverlappingPairCache.

Definition at line 172 of file btOverlappingPairCache.h.

## ◆ getOverlapFilterCallback()

btOverlapFilterCallback* btHashedOverlappingPairCache::getOverlapFilterCallback | ( |  | ) |
| inlinevirtual

Implements btOverlappingPairCache.

Definition at line 162 of file btOverlappingPairCache.h.

## ◆ getOverlappingPairArray() [1/2]

btBroadphasePairArray& btHashedOverlappingPairCache::getOverlappingPairArray | ( |  | ) |
| inlinevirtual

Implements btOverlappingPairCache.

Definition at line 145 of file btOverlappingPairCache.h.

## ◆ getOverlappingPairArray() [2/2]

const btBroadphasePairArray& btHashedOverlappingPairCache::getOverlappingPairArray | ( |  | ) | const
| inline

Definition at line 150 of file btOverlappingPairCache.h.

## ◆ getOverlappingPairArrayPtr() [1/2]

virtual btBroadphasePair* btHashedOverlappingPairCache::getOverlappingPairArrayPtr | ( |  | ) |
| inlinevirtual

Implements btOverlappingPairCache.

Definition at line 135 of file btOverlappingPairCache.h.

## ◆ getOverlappingPairArrayPtr() [2/2]

const btBroadphasePair* btHashedOverlappingPairCache::getOverlappingPairArrayPtr | ( |  | ) | const
| inlinevirtual

Implements btOverlappingPairCache.

Definition at line 140 of file btOverlappingPairCache.h.

## ◆ growTables()

void btHashedOverlappingPairCache::growTables | ( |  | ) |
| private

Definition at line 137 of file btOverlappingPairCache.cpp.

## ◆ hasDeferredRemoval()

virtual bool btHashedOverlappingPairCache::hasDeferredRemoval | ( |  | ) |
| inlineprivatevirtual

Implements btOverlappingPairCache.

Definition at line 243 of file btOverlappingPairCache.h.

## ◆ internalAddPair()

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

Definition at line 174 of file btOverlappingPairCache.cpp.

## ◆ internalFindPair()

btBroadphasePair* btHashedOverlappingPairCache::internalFindPair | ( | btBroadphaseProxy * | proxy0,
|  | btBroadphaseProxy * | proxy1,
|  | int | hash
| ) |  |
| inlineprivate

Definition at line 217 of file btOverlappingPairCache.h.

## ◆ needsBroadphaseCollision()

bool btHashedOverlappingPairCache::needsBroadphaseCollision | ( | btBroadphaseProxy * | proxy0,
|  | btBroadphaseProxy * | proxy1
| ) |  | const
| inlinevirtual

Implements btOverlappingPairCache.

Definition at line 108 of file btOverlappingPairCache.h.

## ◆ processAllOverlappingPairs() [1/2]

void btHashedOverlappingPairCache::processAllOverlappingPairs | ( | btOverlapCallback * | callback,
|  | btDispatcher * | dispatcher
| ) |  |
| virtual

Implements btOverlappingPairCache.

Definition at line 332 of file btOverlappingPairCache.cpp.

## ◆ processAllOverlappingPairs() [2/2]

void btHashedOverlappingPairCache::processAllOverlappingPairs | ( | btOverlapCallback * | callback,
|  | btDispatcher * | dispatcher,
|  | const struct btDispatcherInfo & | dispatchInfo
| ) |  |
| virtual

Reimplemented from btOverlappingPairCache.

Definition at line 372 of file btOverlappingPairCache.cpp.

## ◆ removeOverlappingPair()

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

Implements btOverlappingPairCallback.

Definition at line 229 of file btOverlappingPairCache.cpp.

## ◆ removeOverlappingPairsContainingProxy()

void btHashedOverlappingPairCache::removeOverlappingPairsContainingProxy | ( | btBroadphaseProxy * | proxy,
|  | btDispatcher * | dispatcher
| ) |  |
| virtual

Implements btOverlappingPairCallback.

Definition at line 79 of file btOverlappingPairCache.cpp.

## ◆ setInternalGhostPairCallback()

virtual void btHashedOverlappingPairCache::setInternalGhostPairCallback | ( | btOverlappingPairCallback * | ghostPairCallback | ) |
| inlineprivatevirtual

Implements btOverlappingPairCache.

Definition at line 248 of file btOverlappingPairCache.h.

## ◆ setOverlapFilterCallback()

void btHashedOverlappingPairCache::setOverlapFilterCallback | ( | btOverlapFilterCallback * | callback | ) |
| inlinevirtual

Implements btOverlappingPairCache.

Definition at line 167 of file btOverlappingPairCache.h.

## ◆ sortOverlappingPairs()

void btHashedOverlappingPairCache::sortOverlappingPairs | ( | btDispatcher * | dispatcher | ) |
| privatevirtual

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

Implements btOverlappingPairCache.

Definition at line 416 of file btOverlappingPairCache.cpp.

## Member Data Documentation

## ◆ m_ghostPairCallback

btOverlappingPairCallback* btHashedOverlappingPairCache::m_ghostPairCallback
| protected

Definition at line 96 of file btOverlappingPairCache.h.

## ◆ m_hashTable

btAlignedObjectArray<int> btHashedOverlappingPairCache::m_hashTable
| protected

Definition at line 94 of file btOverlappingPairCache.h.

## ◆ m_next

btAlignedObjectArray<int> btHashedOverlappingPairCache::m_next
| protected

Definition at line 95 of file btOverlappingPairCache.h.

## ◆ m_overlapFilterCallback

btOverlapFilterCallback* btHashedOverlappingPairCache::m_overlapFilterCallback
| private

Definition at line 91 of file btOverlappingPairCache.h.

## ◆ m_overlappingPairArray

btBroadphasePairArray btHashedOverlappingPairCache::m_overlappingPairArray
| private

Definition at line 90 of file btOverlappingPairCache.h.

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

- btOverlappingPairCache.h
- btOverlappingPairCache.cpp