Bullet Collision Detection & Physics Library
|
The internal templace class btAxisSweep3Internal implements the sweep and prune broadphase. More...
#include <btAxisSweep3Internal.h>
Classes | |
class | Edge |
class | Handle |
Public Member Functions | |
BT_DECLARE_ALIGNED_ALLOCATOR () | |
btAxisSweep3Internal (const btVector3 &worldAabbMin, const btVector3 &worldAabbMax, BP_FP_INT_TYPE handleMask, BP_FP_INT_TYPE handleSentinel, BP_FP_INT_TYPE maxHandles=16384, btOverlappingPairCache *pairCache=0, bool disableRaycastAccelerator=false) | |
virtual | ~btAxisSweep3Internal () |
BP_FP_INT_TYPE | getNumHandles () const |
virtual void | calculateOverlappingPairs (btDispatcher *dispatcher) |
calculateOverlappingPairs is optional: incremental algorithms (sweep and prune) might do it during the set aabb More... | |
BP_FP_INT_TYPE | addHandle (const btVector3 &aabbMin, const btVector3 &aabbMax, void *pOwner, int collisionFilterGroup, int collisionFilterMask, btDispatcher *dispatcher) |
void | removeHandle (BP_FP_INT_TYPE handle, btDispatcher *dispatcher) |
void | updateHandle (BP_FP_INT_TYPE handle, const btVector3 &aabbMin, const btVector3 &aabbMax, btDispatcher *dispatcher) |
Handle * | getHandle (BP_FP_INT_TYPE index) const |
virtual void | resetPool (btDispatcher *dispatcher) |
reset broadphase internal structures, to ensure determinism/reproducability More... | |
void | processAllOverlappingPairs (btOverlapCallback *callback) |
virtual btBroadphaseProxy * | createProxy (const btVector3 &aabbMin, const btVector3 &aabbMax, int shapeType, void *userPtr, int collisionFilterGroup, int collisionFilterMask, btDispatcher *dispatcher) |
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)) |
virtual void | aabbTest (const btVector3 &aabbMin, const btVector3 &aabbMax, btBroadphaseAabbCallback &callback) |
void | quantize (BP_FP_INT_TYPE *out, const btVector3 &point, int isMax) const |
void | unQuantize (btBroadphaseProxy *proxy, btVector3 &aabbMin, btVector3 &aabbMax) const |
unQuantize should be conservative: aabbMin/aabbMax should be larger then 'getAabb' result More... | |
bool | testAabbOverlap (btBroadphaseProxy *proxy0, btBroadphaseProxy *proxy1) |
btOverlappingPairCache * | getOverlappingPairCache () |
const btOverlappingPairCache * | getOverlappingPairCache () const |
void | setOverlappingPairUserCallback (btOverlappingPairCallback *pairCallback) |
const btOverlappingPairCallback * | getOverlappingPairUserCallback () 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... | |
virtual void | printStats () |
Public Member Functions inherited from btBroadphaseInterface | |
virtual | ~btBroadphaseInterface () |
virtual btBroadphaseProxy * | createProxy (const btVector3 &aabbMin, const btVector3 &aabbMax, int shapeType, void *userPtr, int collisionFilterGroup, int collisionFilterMask, btDispatcher *dispatcher)=0 |
virtual void | destroyProxy (btBroadphaseProxy *proxy, btDispatcher *dispatcher)=0 |
virtual void | setAabb (btBroadphaseProxy *proxy, const btVector3 &aabbMin, const btVector3 &aabbMax, btDispatcher *dispatcher)=0 |
virtual void | getAabb (btBroadphaseProxy *proxy, btVector3 &aabbMin, btVector3 &aabbMax) const =0 |
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))=0 |
virtual void | aabbTest (const btVector3 &aabbMin, const btVector3 &aabbMax, btBroadphaseAabbCallback &callback)=0 |
virtual void | calculateOverlappingPairs (btDispatcher *dispatcher)=0 |
calculateOverlappingPairs is optional: incremental algorithms (sweep and prune) might do it during the set aabb More... | |
virtual btOverlappingPairCache * | getOverlappingPairCache ()=0 |
virtual const btOverlappingPairCache * | getOverlappingPairCache () const =0 |
virtual void | getBroadphaseAabb (btVector3 &aabbMin, btVector3 &aabbMax) const =0 |
getAabb returns the axis aligned bounding box in the 'global' coordinate frame will add some transform later More... | |
virtual void | resetPool (btDispatcher *dispatcher) |
reset broadphase internal structures, to ensure determinism/reproducability More... | |
virtual void | printStats ()=0 |
Protected Member Functions | |
BP_FP_INT_TYPE | allocHandle () |
void | freeHandle (BP_FP_INT_TYPE handle) |
bool | testOverlap2D (const Handle *pHandleA, const Handle *pHandleB, int axis0, int axis1) |
void | sortMinDown (int axis, BP_FP_INT_TYPE edge, btDispatcher *dispatcher, bool updateOverlaps) |
void | sortMinUp (int axis, BP_FP_INT_TYPE edge, btDispatcher *dispatcher, bool updateOverlaps) |
void | sortMaxDown (int axis, BP_FP_INT_TYPE edge, btDispatcher *dispatcher, bool updateOverlaps) |
void | sortMaxUp (int axis, BP_FP_INT_TYPE edge, btDispatcher *dispatcher, bool updateOverlaps) |
Protected Attributes | |
BP_FP_INT_TYPE | m_bpHandleMask |
BP_FP_INT_TYPE | m_handleSentinel |
btVector3 | m_worldAabbMin |
btVector3 | m_worldAabbMax |
btVector3 | m_quantize |
BP_FP_INT_TYPE | m_numHandles |
BP_FP_INT_TYPE | m_maxHandles |
Handle * | m_pHandles |
BP_FP_INT_TYPE | m_firstFreeHandle |
Edge * | m_pEdges [3] |
void * | m_pEdgesRawPtr [3] |
btOverlappingPairCache * | m_pairCache |
btOverlappingPairCallback * | m_userPairCallback |
btOverlappingPairCallback is an additional optional user callback for adding/removing overlapping pairs, similar interface to btOverlappingPairCache. More... | |
bool | m_ownsPairCache |
int | m_invalidPair |
btDbvtBroadphase * | m_raycastAccelerator |
additional dynamic aabb structure, used to accelerate ray cast queries. More... | |
btOverlappingPairCache * | m_nullPairCache |
The internal templace class btAxisSweep3Internal implements the sweep and prune broadphase.
It uses quantized integers to represent the begin and end points for each of the 3 axis. Dont use this class directly, use btAxisSweep3 or bt32BitAxisSweep3 instead.
Definition at line 36 of file btAxisSweep3Internal.h.
btAxisSweep3Internal< BP_FP_INT_TYPE >::btAxisSweep3Internal | ( | const btVector3 & | worldAabbMin, |
const btVector3 & | worldAabbMax, | ||
BP_FP_INT_TYPE | handleMask, | ||
BP_FP_INT_TYPE | handleSentinel, | ||
BP_FP_INT_TYPE | maxHandles = 16384 , |
||
btOverlappingPairCache * | pairCache = 0 , |
||
bool | disableRaycastAccelerator = false |
||
) |
Definition at line 331 of file btAxisSweep3Internal.h.
|
virtual |
Definition at line 412 of file btAxisSweep3Internal.h.
|
virtual |
Implements btBroadphaseInterface.
Definition at line 275 of file btAxisSweep3Internal.h.
BP_FP_INT_TYPE btAxisSweep3Internal< BP_FP_INT_TYPE >::addHandle | ( | const btVector3 & | aabbMin, |
const btVector3 & | aabbMax, | ||
void * | pOwner, | ||
int | collisionFilterGroup, | ||
int | collisionFilterMask, | ||
btDispatcher * | dispatcher | ||
) |
Definition at line 480 of file btAxisSweep3Internal.h.
|
protected |
Definition at line 457 of file btAxisSweep3Internal.h.
btAxisSweep3Internal< BP_FP_INT_TYPE >::BT_DECLARE_ALIGNED_ALLOCATOR | ( | ) |
|
virtual |
calculateOverlappingPairs is optional: incremental algorithms (sweep and prune) might do it during the set aabb
important to use an AABB test that is consistent with the broadphase
if you don't like to skip the invalid pairs in the array, execute following code:
Implements btBroadphaseInterface.
Definition at line 595 of file btAxisSweep3Internal.h.
|
virtual |
Implements btBroadphaseInterface.
Definition at line 217 of file btAxisSweep3Internal.h.
|
virtual |
Implements btBroadphaseInterface.
Definition at line 233 of file btAxisSweep3Internal.h.
|
protected |
Definition at line 469 of file btAxisSweep3Internal.h.
|
virtual |
Implements btBroadphaseInterface.
Definition at line 301 of file btAxisSweep3Internal.h.
|
inlinevirtual |
getAabb returns the axis aligned bounding box in the 'global' coordinate frame will add some transform later
Implements btBroadphaseInterface.
Definition at line 173 of file btAxisSweep3Internal.h.
|
inline |
Definition at line 132 of file btAxisSweep3Internal.h.
|
inline |
Definition at line 122 of file btAxisSweep3Internal.h.
|
inlinevirtual |
Implements btBroadphaseInterface.
Definition at line 153 of file btAxisSweep3Internal.h.
|
inlinevirtual |
Implements btBroadphaseInterface.
Definition at line 157 of file btAxisSweep3Internal.h.
|
inline |
Definition at line 166 of file btAxisSweep3Internal.h.
|
inlinevirtual |
Implements btBroadphaseInterface.
Definition at line 179 of file btAxisSweep3Internal.h.
void btAxisSweep3Internal< BP_FP_INT_TYPE >::processAllOverlappingPairs | ( | btOverlapCallback * | callback | ) |
void btAxisSweep3Internal< BP_FP_INT_TYPE >::quantize | ( | BP_FP_INT_TYPE * | out, |
const btVector3 & | point, | ||
int | isMax | ||
) | const |
Definition at line 436 of file btAxisSweep3Internal.h.
|
virtual |
Implements btBroadphaseInterface.
Definition at line 253 of file btAxisSweep3Internal.h.
void btAxisSweep3Internal< BP_FP_INT_TYPE >::removeHandle | ( | BP_FP_INT_TYPE | handle, |
btDispatcher * | dispatcher | ||
) |
Definition at line 530 of file btAxisSweep3Internal.h.
|
virtual |
reset broadphase internal structures, to ensure determinism/reproducability
Reimplemented from btBroadphaseInterface.
Definition at line 579 of file btAxisSweep3Internal.h.
|
virtual |
Implements btBroadphaseInterface.
Definition at line 242 of file btAxisSweep3Internal.h.
|
inline |
Definition at line 162 of file btAxisSweep3Internal.h.
|
protected |
Definition at line 853 of file btAxisSweep3Internal.h.
|
protected |
Definition at line 910 of file btAxisSweep3Internal.h.
|
protected |
Definition at line 754 of file btAxisSweep3Internal.h.
|
protected |
Definition at line 803 of file btAxisSweep3Internal.h.
bool btAxisSweep3Internal< BP_FP_INT_TYPE >::testAabbOverlap | ( | btBroadphaseProxy * | proxy0, |
btBroadphaseProxy * | proxy1 | ||
) |
Definition at line 674 of file btAxisSweep3Internal.h.
|
protected |
Definition at line 693 of file btAxisSweep3Internal.h.
void btAxisSweep3Internal< BP_FP_INT_TYPE >::unQuantize | ( | btBroadphaseProxy * | proxy, |
btVector3 & | aabbMin, | ||
btVector3 & | aabbMax | ||
) | const |
unQuantize should be conservative: aabbMin/aabbMax should be larger then 'getAabb' result
Definition at line 309 of file btAxisSweep3Internal.h.
void btAxisSweep3Internal< BP_FP_INT_TYPE >::updateHandle | ( | BP_FP_INT_TYPE | handle, |
const btVector3 & | aabbMin, | ||
const btVector3 & | aabbMax, | ||
btDispatcher * | dispatcher | ||
) |
Definition at line 708 of file btAxisSweep3Internal.h.
|
protected |
Definition at line 39 of file btAxisSweep3Internal.h.
|
protected |
Definition at line 80 of file btAxisSweep3Internal.h.
|
protected |
Definition at line 40 of file btAxisSweep3Internal.h.
|
protected |
Definition at line 92 of file btAxisSweep3Internal.h.
|
protected |
Definition at line 77 of file btAxisSweep3Internal.h.
|
protected |
Definition at line 97 of file btAxisSweep3Internal.h.
|
protected |
Definition at line 76 of file btAxisSweep3Internal.h.
|
protected |
Definition at line 90 of file btAxisSweep3Internal.h.
|
protected |
Definition at line 85 of file btAxisSweep3Internal.h.
|
protected |
Definition at line 82 of file btAxisSweep3Internal.h.
|
protected |
Definition at line 83 of file btAxisSweep3Internal.h.
|
protected |
Definition at line 78 of file btAxisSweep3Internal.h.
|
protected |
Definition at line 74 of file btAxisSweep3Internal.h.
|
protected |
additional dynamic aabb structure, used to accelerate ray cast queries.
can be disabled using a optional argument in the constructor
Definition at line 96 of file btAxisSweep3Internal.h.
|
protected |
btOverlappingPairCallback is an additional optional user callback for adding/removing overlapping pairs, similar interface to btOverlappingPairCache.
Definition at line 88 of file btAxisSweep3Internal.h.
|
protected |
Definition at line 72 of file btAxisSweep3Internal.h.
|
protected |
Definition at line 71 of file btAxisSweep3Internal.h.