Bullet Collision Detection & Physics Library: btMultiSapBroadphase Class Reference

Bullet Collision Detection & Physics Library

Classes | Public Member Functions | Protected Attributes | Private Attributes | List of all members
btMultiSapBroadphase Class Reference

The btMultiSapBroadphase is a research project, not recommended to use in production. More...

`#include <btMultiSapBroadphase.h>`

Inheritance diagram for btMultiSapBroadphase:
[legend]
Collaboration diagram for btMultiSapBroadphase:
[legend]

## Classes
struct | btBridgeProxy
struct | btMultiSapProxy

## Public Member Functions
| btMultiSapBroadphase (int maxProxies=16384, btOverlappingPairCache *pairCache=0)
btSapBroadphaseArray & | getBroadphaseArray ()
const btSapBroadphaseArray & | getBroadphaseArray () const
virtual | ~btMultiSapBroadphase ()
virtual btBroadphaseProxy * | createProxy (const btVector3 &aabbMin, const btVector3 &aabbMax, int shapeType, void *userPtr, short int collisionFilterGroup, short int collisionFilterMask, btDispatcher *dispatcher, void *multiSapProxy)
virtual void | destroyProxy (btBroadphaseProxy *proxy, btDispatcher *dispatcher)
virtual void | setAabb (btBroadphaseProxy *proxy, const btVector3 &aabbMin, const btVector3 &aabbMax, btDispatcher *dispatcher)
virtual void | getAabb (btBroadphaseProxy *proxy, btVector3 &aabbMin, btVector3 &aabbMax) const
virtual void | rayTest (const btVector3 &rayFrom, const btVector3 &rayTo, btBroadphaseRayCallback &rayCallback, const btVector3 &aabbMin=btVector3(0, 0, 0), const btVector3 &aabbMax=btVector3(0, 0, 0))
void | addToChildBroadphase (btMultiSapProxy *parentMultiSapProxy, btBroadphaseProxy *childProxy, btBroadphaseInterface *childBroadphase)
virtual void | calculateOverlappingPairs (btDispatcher *dispatcher)
| calculateOverlappingPairs is optional: incremental algorithms (sweep and prune) might do it during the set aabb More...
bool | testAabbOverlap (btBroadphaseProxy *proxy0, btBroadphaseProxy *proxy1)
virtual btOverlappingPairCache * | getOverlappingPairCache ()
virtual const btOverlappingPairCache * | getOverlappingPairCache () const
virtual void | getBroadphaseAabb (btVector3 &aabbMin, btVector3 &aabbMax) const
| getAabb returns the axis aligned bounding box in the 'global' coordinate frame will add some transform later More...
void | buildTree (const btVector3 &bvhAabbMin, const btVector3 &bvhAabbMax)
virtual void | printStats ()
void | quicksort (btBroadphasePairArray &a, int lo, int hi)
virtual void | resetPool (btDispatcher *dispatcher)
| reset broadphase internal structures, to ensure determinism/reproducability More...
Public Member Functions inherited from btBroadphaseInterface
virtual | ~btBroadphaseInterface ()
virtual void | aabbTest (const btVector3 &aabbMin, const btVector3 &aabbMax, btBroadphaseAabbCallback &callback)=0

## Protected Attributes
btAlignedObjectArray< btMultiSapProxy * > | m_multiSapProxies

## Private Attributes
btSapBroadphaseArray | m_sapBroadphases
btSimpleBroadphase * | m_simpleBroadphase
btOverlappingPairCache * | m_overlappingPairs
class btQuantizedBvh * | m_optimizedAabbTree
bool | m_ownsPairCache
btOverlapFilterCallback * | m_filterCallback
int | m_invalidPair

## Detailed Description

The btMultiSapBroadphase is a research project, not recommended to use in production.

Use btAxisSweep3 or btDbvtBroadphase instead. The btMultiSapBroadphase is a broadphase that contains multiple SAP broadphases. The user can add SAP broadphases that cover the world. A btBroadphaseProxy can be in multiple child broadphases at the same time. A btQuantizedBvh acceleration structures finds overlapping SAPs for each btBroadphaseProxy. See http://www.continuousphysics.com/Bullet/phpBB2/viewtopic.php?t=328 and http://www.continuousphysics.com/Bullet/phpBB2/viewtopic.php?t=1329

Definition at line 35 of file btMultiSapBroadphase.h.

## Constructor & Destructor Documentation

## § btMultiSapBroadphase()

btMultiSapBroadphase::btMultiSapBroadphase | ( | int | maxProxies = `16384`,
|  | btOverlappingPairCache * | pairCache = `0`
| ) |  |

Definition at line 40 of file btMultiSapBroadphase.cpp.

## § ~btMultiSapBroadphase()

btMultiSapBroadphase::~btMultiSapBroadphase | ( |  | ) |
| virtual

Definition at line 78 of file btMultiSapBroadphase.cpp.

## Member Function Documentation

## § addToChildBroadphase()

void btMultiSapBroadphase::addToChildBroadphase | ( | btMultiSapProxy * | parentMultiSapProxy,
|  | btBroadphaseProxy * | childProxy,
|  | btBroadphaseInterface * | childBroadphase
| ) |  |

Definition at line 128 of file btMultiSapBroadphase.cpp.

## § buildTree()

void btMultiSapBroadphase::buildTree | ( | const btVector3 & | bvhAabbMin,
|  | const btVector3 & | bvhAabbMax
| ) |  |

Definition at line 88 of file btMultiSapBroadphase.cpp.

## § calculateOverlappingPairs()

void btMultiSapBroadphase::calculateOverlappingPairs | ( | btDispatcher * | dispatcher | ) |
| virtual

calculateOverlappingPairs is optional: incremental algorithms (sweep and prune) might do it during the set aabb

if you don't like to skip the invalid pairs in the array, execute following code:

Implements btBroadphaseInterface.

Definition at line 359 of file btMultiSapBroadphase.cpp.

## § createProxy()

btBroadphaseProxy * btMultiSapBroadphase::createProxy | ( | const btVector3 & | aabbMin,
|  | const btVector3 & | aabbMax,
|  | int | shapeType,
|  | void * | userPtr,
|  | short int | collisionFilterGroup,
|  | short int | collisionFilterMask,
|  | btDispatcher * | dispatcher,
|  | void * | multiSapProxy
| ) |  |
| virtual

this should deal with inserting/removal into child broadphases

Implements btBroadphaseInterface.

Definition at line 107 of file btMultiSapBroadphase.cpp.

## § destroyProxy()

void btMultiSapBroadphase::destroyProxy | ( | btBroadphaseProxy * | proxy,
|  | btDispatcher * | dispatcher
| ) |  |
| virtual

not yet

Implements btBroadphaseInterface.

Definition at line 120 of file btMultiSapBroadphase.cpp.

## § getAabb()

void btMultiSapBroadphase::getAabb | ( | btBroadphaseProxy * | proxy,
|  | btVector3 & | aabbMin,
|  | btVector3 & | aabbMax
| ) |  | const
| virtual

Implements btBroadphaseInterface.

Definition at line 152 of file btMultiSapBroadphase.cpp.

## § getBroadphaseAabb()

virtual void btMultiSapBroadphase::getBroadphaseAabb | ( | btVector3 & | aabbMin,
|  | btVector3 & | aabbMax
| ) |  | const
| inlinevirtual

getAabb returns the axis aligned bounding box in the 'global' coordinate frame will add some transform later

Implements btBroadphaseInterface.

Definition at line 134 of file btMultiSapBroadphase.h.

## § getBroadphaseArray() [1/2]

btSapBroadphaseArray& btMultiSapBroadphase::getBroadphaseArray | ( |  | ) |
| inline

Definition at line 97 of file btMultiSapBroadphase.h.

## § getBroadphaseArray() [2/2]

const btSapBroadphaseArray& btMultiSapBroadphase::getBroadphaseArray | ( |  | ) | const
| inline

Definition at line 102 of file btMultiSapBroadphase.h.

## § getOverlappingPairCache() [1/2]

virtual btOverlappingPairCache* btMultiSapBroadphase::getOverlappingPairCache | ( |  | ) |
| inlinevirtual

Implements btBroadphaseInterface.

Definition at line 123 of file btMultiSapBroadphase.h.

## § getOverlappingPairCache() [2/2]

virtual const btOverlappingPairCache* btMultiSapBroadphase::getOverlappingPairCache | ( |  | ) | const
| inlinevirtual

Implements btBroadphaseInterface.

Definition at line 127 of file btMultiSapBroadphase.h.

## § printStats()

void btMultiSapBroadphase::printStats | ( |  | ) |
| virtual

Implements btBroadphaseInterface.

Definition at line 467 of file btMultiSapBroadphase.cpp.

## § quicksort()

void btMultiSapBroadphase::quicksort | ( | btBroadphasePairArray & | a,
|  | int | lo,
|  | int | hi
| ) |  |

## § rayTest()

void btMultiSapBroadphase::rayTest | ( | const btVector3 & | rayFrom,
|  | const btVector3 & | rayTo,
|  | btBroadphaseRayCallback & | rayCallback,
|  | const btVector3 & | aabbMin = `btVector3(0,0,0)`,
|  | const btVector3 & | aabbMax = `btVector3(0,0,0)`
| ) |  |
| virtual

Implements btBroadphaseInterface.

Definition at line 159 of file btMultiSapBroadphase.cpp.

## § resetPool()

void btMultiSapBroadphase::resetPool | ( | btDispatcher * | dispatcher | ) |
| virtual

reset broadphase internal structures, to ensure determinism/reproducability

Reimplemented from btBroadphaseInterface.

Definition at line 486 of file btMultiSapBroadphase.cpp.

## § setAabb()

void btMultiSapBroadphase::setAabb | ( | btBroadphaseProxy * | proxy,
|  | const btVector3 & | aabbMin,
|  | const btVector3 & | aabbMax,
|  | btDispatcher * | dispatcher
| ) |  |
| virtual

Implements btBroadphaseInterface.

Definition at line 170 of file btMultiSapBroadphase.cpp.

## § testAabbOverlap()

bool btMultiSapBroadphase::testAabbOverlap | ( | btBroadphaseProxy * | proxy0,
|  | btBroadphaseProxy * | proxy1
| ) |  |

Definition at line 456 of file btMultiSapBroadphase.cpp.

## Member Data Documentation

## § m_filterCallback

btOverlapFilterCallback* btMultiSapBroadphase::m_filterCallback
| private

Definition at line 48 of file btMultiSapBroadphase.h.

## § m_invalidPair

int btMultiSapBroadphase::m_invalidPair
| private

Definition at line 50 of file btMultiSapBroadphase.h.

## § m_multiSapProxies

btAlignedObjectArray<btMultiSapProxy*> btMultiSapBroadphase::m_multiSapProxies
| protected

Definition at line 90 of file btMultiSapBroadphase.h.

## § m_optimizedAabbTree

class btQuantizedBvh* btMultiSapBroadphase::m_optimizedAabbTree
| private

Definition at line 43 of file btMultiSapBroadphase.h.

## § m_overlappingPairs

btOverlappingPairCache* btMultiSapBroadphase::m_overlappingPairs
| private

Definition at line 41 of file btMultiSapBroadphase.h.

## § m_ownsPairCache

bool btMultiSapBroadphase::m_ownsPairCache
| private

Definition at line 46 of file btMultiSapBroadphase.h.

## § m_sapBroadphases

btSapBroadphaseArray btMultiSapBroadphase::m_sapBroadphases
| private

Definition at line 37 of file btMultiSapBroadphase.h.

## § m_simpleBroadphase

btSimpleBroadphase* btMultiSapBroadphase::m_simpleBroadphase
| private

Definition at line 39 of file btMultiSapBroadphase.h.

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

- btMultiSapBroadphase.h
- btMultiSapBroadphase.cpp