Bullet Collision Detection & Physics Library: btSortedOverlappingPairCache Class Reference

Bullet Collision Detection & Physics Library

- Main Page
- Namespaces
- Classes
- Files

- Class List
- Class Hierarchy
- Class Members

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:
[legend]
Collaboration diagram for btSortedOverlappingPairCache:
[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)
btBroadphasePair * | addOverlappingPair (btBroadphaseProxy *proxy0, btBroadphaseProxy *proxy1)
btBroadphasePair * | findPair (btBroadphaseProxy *proxy0, btBroadphaseProxy *proxy1)
| this findPair becomes really slow.
void | cleanProxyFromPairs (btBroadphaseProxy *proxy, btDispatcher *dispatcher)
void | removeOverlappingPairsContainingProxy (btBroadphaseProxy *proxy, btDispatcher *dispatcher)
bool | needsBroadphaseCollision (btBroadphaseProxy *proxy0, btBroadphaseProxy *proxy1) const
btBroadphasePairArray & | getOverlappingPairArray ()
const btBroadphasePairArray & | getOverlappingPairArray () const
btBroadphasePair * | getOverlappingPairArrayPtr ()
const btBroadphasePair * | getOverlappingPairArrayPtr () const
int | getNumOverlappingPairs () const
btOverlapFilterCallback * | getOverlapFilterCallback ()
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 ()
virtual btBroadphasePair * | getOverlappingPairArrayPtr ()=0
virtual const btBroadphasePair * | getOverlappingPairArrayPtr () const =0
virtual btBroadphasePairArray & | getOverlappingPairArray ()=0
virtual void | cleanOverlappingPair (btBroadphasePair &pair, btDispatcher *dispatcher)=0
virtual int | getNumOverlappingPairs () const =0
virtual bool | needsBroadphaseCollision (btBroadphaseProxy *proxy0, btBroadphaseProxy *proxy1) const =0
virtual btOverlapFilterCallback * | getOverlapFilterCallback ()=0
virtual void | cleanProxyFromPairs (btBroadphaseProxy *proxy, btDispatcher *dispatcher)=0
virtual void | setOverlapFilterCallback (btOverlapFilterCallback *callback)=0
virtual void | processAllOverlappingPairs (btOverlapCallback *, btDispatcher *dispatcher)=0
virtual void | processAllOverlappingPairs (btOverlapCallback *callback, btDispatcher *dispatcher, const struct btDispatcherInfo &)
virtual btBroadphasePair * | findPair (btBroadphaseProxy *proxy0, btBroadphaseProxy *proxy1)=0
virtual bool | hasDeferredRemoval ()=0
virtual void | setInternalGhostPairCallback (btOverlappingPairCallback *ghostPairCallback)=0
virtual void | sortOverlappingPairs (btDispatcher *dispatcher)=0
Public Member Functions inherited from btOverlappingPairCallback
virtual | ~btOverlappingPairCallback ()
virtual btBroadphasePair * | addOverlappingPair (btBroadphaseProxy *proxy0, btBroadphaseProxy *proxy1)=0
virtual void * | removeOverlappingPair (btBroadphaseProxy *proxy0, btBroadphaseProxy *proxy1, btDispatcher *dispatcher)=0
virtual void | removeOverlappingPairsContainingProxy (btBroadphaseProxy *proxy0, btDispatcher *dispatcher)=0

## Protected Attributes
btBroadphasePairArray | m_overlappingPairArray
bool | m_blockedForChanges
bool | m_hasDeferredRemoval
| by default, do the removal during the pair traversal
btOverlapFilterCallback * | m_overlapFilterCallback
btOverlappingPairCallback * | m_ghostPairCallback

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

## Detailed Description

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

Definition at line 258 of file btOverlappingPairCache.h.

## Constructor & Destructor Documentation

## ◆ btSortedOverlappingPairCache()

btSortedOverlappingPairCache::btSortedOverlappingPairCache | ( |  | ) |

Definition at line 529 of file btOverlappingPairCache.cpp.

## ◆ ~btSortedOverlappingPairCache()

btSortedOverlappingPairCache::~btSortedOverlappingPairCache | ( |  | ) |
| virtual

Definition at line 538 of file btOverlappingPairCache.cpp.

## Member Function Documentation

## ◆ addOverlappingPair()

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

Implements btOverlappingPairCallback.

Definition at line 468 of file btOverlappingPairCache.cpp.

## ◆ cleanOverlappingPair()

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

Implements btOverlappingPairCache.

Definition at line 542 of file btOverlappingPairCache.cpp.

## ◆ cleanProxyFromPairs()

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

Implements btOverlappingPairCache.

Definition at line 554 of file btOverlappingPairCache.cpp.

## ◆ findPair()

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 488 of file btOverlappingPairCache.cpp.

## ◆ getNumOverlappingPairs()

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

Implements btOverlappingPairCache.

Definition at line 324 of file btOverlappingPairCache.h.

## ◆ getOverlapFilterCallback()

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

Implements btOverlappingPairCache.

Definition at line 329 of file btOverlappingPairCache.h.

## ◆ getOverlappingPairArray() [1/2]

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

Implements btOverlappingPairCache.

Definition at line 304 of file btOverlappingPairCache.h.

## ◆ getOverlappingPairArray() [2/2]

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

Definition at line 309 of file btOverlappingPairCache.h.

## ◆ getOverlappingPairArrayPtr() [1/2]

btBroadphasePair * btSortedOverlappingPairCache::getOverlappingPairArrayPtr | ( |  | ) |
| inlinevirtual

Implements btOverlappingPairCache.

Definition at line 314 of file btOverlappingPairCache.h.

## ◆ getOverlappingPairArrayPtr() [2/2]

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

Implements btOverlappingPairCache.

Definition at line 319 of file btOverlappingPairCache.h.

## ◆ hasDeferredRemoval()

virtual bool btSortedOverlappingPairCache::hasDeferredRemoval | ( |  | ) |
| inlinevirtual

Implements btOverlappingPairCache.

Definition at line 339 of file btOverlappingPairCache.h.

## ◆ needsBroadphaseCollision()

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

Implements btOverlappingPairCache.

Definition at line 293 of file btOverlappingPairCache.h.

## ◆ processAllOverlappingPairs()

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

Implements btOverlappingPairCache.

Definition at line 507 of file btOverlappingPairCache.cpp.

## ◆ removeOverlappingPair()

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

Implements btOverlappingPairCallback.

Definition at line 444 of file btOverlappingPairCache.cpp.

## ◆ removeOverlappingPairsContainingProxy()

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

Implements btOverlappingPairCallback.

Definition at line 585 of file btOverlappingPairCache.cpp.

## ◆ setInternalGhostPairCallback()

virtual void btSortedOverlappingPairCache::setInternalGhostPairCallback | ( | btOverlappingPairCallback * | ghostPairCallback | ) |
| inlinevirtual

Implements btOverlappingPairCache.

Definition at line 344 of file btOverlappingPairCache.h.

## ◆ setOverlapFilterCallback()

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

Implements btOverlappingPairCache.

Definition at line 334 of file btOverlappingPairCache.h.

## ◆ sortOverlappingPairs()

void btSortedOverlappingPairCache::sortOverlappingPairs | ( | btDispatcher * | dispatcher | ) |
| virtual

Implements btOverlappingPairCache.

Definition at line 608 of file btOverlappingPairCache.cpp.

## Member Data Documentation

## ◆ m_blockedForChanges

bool btSortedOverlappingPairCache::m_blockedForChanges
| protected

Definition at line 265 of file btOverlappingPairCache.h.

## ◆ m_ghostPairCallback

btOverlappingPairCallback* btSortedOverlappingPairCache::m_ghostPairCallback
| protected

Definition at line 273 of file btOverlappingPairCache.h.

## ◆ m_hasDeferredRemoval

bool btSortedOverlappingPairCache::m_hasDeferredRemoval
| protected

by default, do the removal during the pair traversal

Definition at line 268 of file btOverlappingPairCache.h.

## ◆ m_overlapFilterCallback

btOverlapFilterCallback* btSortedOverlappingPairCache::m_overlapFilterCallback
| protected

Definition at line 271 of file btOverlappingPairCache.h.

## ◆ m_overlappingPairArray

btBroadphasePairArray btSortedOverlappingPairCache::m_overlappingPairArray
| protected

Definition at line 262 of file btOverlappingPairCache.h.

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

- btOverlappingPairCache.h
- btOverlappingPairCache.cpp