Classes | Public Member Functions | Protected Member Functions | Protected Attributes
btAxisSweep3Internal< BP_FP_INT_TYPE > Class Template Reference

#include <btAxisSweep3.h>

Inheritance diagram for btAxisSweep3Internal< BP_FP_INT_TYPE >:
Inheritance graph
[legend]

List of all members.

Classes

class  Edge
class  Handle

Public Member Functions

virtual void aabbTest (const btVector3 &aabbMin, const btVector3 &aabbMax, btBroadphaseAabbCallback &callback)
BP_FP_INT_TYPE addHandle (const btVector3 &aabbMin, const btVector3 &aabbMax, void *pOwner, short int collisionFilterGroup, short int collisionFilterMask, btDispatcher *dispatcher, void *multiSapProxy)
 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 void calculateOverlappingPairs (btDispatcher *dispatcher)
 calculateOverlappingPairs is optional: incremental algorithms (sweep and prune) might do it during the set aabb
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 getAabb (btBroadphaseProxy *proxy, btVector3 &aabbMin, btVector3 &aabbMax) const
virtual void getBroadphaseAabb (btVector3 &aabbMin, btVector3 &aabbMax) const
SIMD_FORCE_INLINE HandlegetHandle (BP_FP_INT_TYPE index) const
BP_FP_INT_TYPE getNumHandles () const
btOverlappingPairCachegetOverlappingPairCache ()
const btOverlappingPairCachegetOverlappingPairCache () const
const btOverlappingPairCallbackgetOverlappingPairUserCallback () const
virtual void printStats ()
void processAllOverlappingPairs (btOverlapCallback *callback)
void quantize (BP_FP_INT_TYPE *out, const btVector3 &point, int isMax) 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 removeHandle (BP_FP_INT_TYPE handle, btDispatcher *dispatcher)
virtual void resetPool (btDispatcher *dispatcher)
 reset broadphase internal structures, to ensure determinism/reproducability
virtual void setAabb (btBroadphaseProxy *proxy, const btVector3 &aabbMin, const btVector3 &aabbMax, btDispatcher *dispatcher)
void setOverlappingPairUserCallback (btOverlappingPairCallback *pairCallback)
bool testAabbOverlap (btBroadphaseProxy *proxy0, btBroadphaseProxy *proxy1)
void unQuantize (btBroadphaseProxy *proxy, btVector3 &aabbMin, btVector3 &aabbMax) const
 unQuantize should be conservative: aabbMin/aabbMax should be larger then 'getAabb' result
void updateHandle (BP_FP_INT_TYPE handle, const btVector3 &aabbMin, const btVector3 &aabbMax, btDispatcher *dispatcher)
virtual ~btAxisSweep3Internal ()

Protected Member Functions

BP_FP_INT_TYPE allocHandle ()
void freeHandle (BP_FP_INT_TYPE handle)
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)
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)
bool testOverlap2D (const Handle *pHandleA, const Handle *pHandleB, int axis0, int axis1)

Protected Attributes

BP_FP_INT_TYPE m_bpHandleMask
BP_FP_INT_TYPE m_firstFreeHandle
BP_FP_INT_TYPE m_handleSentinel
int m_invalidPair
BP_FP_INT_TYPE m_maxHandles
btOverlappingPairCachem_nullPairCache
BP_FP_INT_TYPE m_numHandles
bool m_ownsPairCache
btOverlappingPairCachem_pairCache
Edgem_pEdges [3]
void * m_pEdgesRawPtr [3]
Handlem_pHandles
btVector3 m_quantize
btDbvtBroadphasem_raycastAccelerator
btOverlappingPairCallbackm_userPairCallback
 btOverlappingPairCallback is an additional optional user callback for adding/removing overlapping pairs, similar interface to btOverlappingPairCache.
btVector3 m_worldAabbMax
btVector3 m_worldAabbMin

Detailed Description

template<typename BP_FP_INT_TYPE>
class btAxisSweep3Internal< BP_FP_INT_TYPE >

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 btAxisSweep3.h.


Constructor & Destructor Documentation

template<typename BP_FP_INT_TYPE>
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 352 of file btAxisSweep3.h.

template<typename BP_FP_INT_TYPE >
btAxisSweep3Internal< BP_FP_INT_TYPE >::~btAxisSweep3Internal ( ) [virtual]

Definition at line 435 of file btAxisSweep3.h.


Member Function Documentation

template<typename BP_FP_INT_TYPE >
void btAxisSweep3Internal< BP_FP_INT_TYPE >::aabbTest ( const btVector3 &  aabbMin,
const btVector3 &  aabbMax,
btBroadphaseAabbCallback callback 
) [virtual]

Implements btBroadphaseInterface.

Definition at line 291 of file btAxisSweep3.h.

template<typename BP_FP_INT_TYPE >
BP_FP_INT_TYPE btAxisSweep3Internal< BP_FP_INT_TYPE >::addHandle ( const btVector3 &  aabbMin,
const btVector3 &  aabbMax,
void *  pOwner,
short int  collisionFilterGroup,
short int  collisionFilterMask,
btDispatcher dispatcher,
void *  multiSapProxy 
)

Definition at line 505 of file btAxisSweep3.h.

template<typename BP_FP_INT_TYPE >
BP_FP_INT_TYPE btAxisSweep3Internal< BP_FP_INT_TYPE >::allocHandle ( ) [protected]

Definition at line 481 of file btAxisSweep3.h.

template<typename BP_FP_INT_TYPE>
btAxisSweep3Internal< BP_FP_INT_TYPE >::BT_DECLARE_ALIGNED_ALLOCATOR ( )
template<typename BP_FP_INT_TYPE >
void btAxisSweep3Internal< BP_FP_INT_TYPE >::calculateOverlappingPairs ( btDispatcher dispatcher) [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 636 of file btAxisSweep3.h.

template<typename BP_FP_INT_TYPE >
btBroadphaseProxy * btAxisSweep3Internal< BP_FP_INT_TYPE >::createProxy ( const btVector3 &  aabbMin,
const btVector3 &  aabbMax,
int  shapeType,
void *  userPtr,
short int  collisionFilterGroup,
short int  collisionFilterMask,
btDispatcher dispatcher,
void *  multiSapProxy 
) [virtual]

Implements btBroadphaseInterface.

Definition at line 231 of file btAxisSweep3.h.

template<typename BP_FP_INT_TYPE >
void btAxisSweep3Internal< BP_FP_INT_TYPE >::destroyProxy ( btBroadphaseProxy *  proxy,
btDispatcher dispatcher 
) [virtual]

Implements btBroadphaseInterface.

Definition at line 249 of file btAxisSweep3.h.

template<typename BP_FP_INT_TYPE>
void btAxisSweep3Internal< BP_FP_INT_TYPE >::freeHandle ( BP_FP_INT_TYPE  handle) [protected]

Definition at line 493 of file btAxisSweep3.h.

template<typename BP_FP_INT_TYPE >
void btAxisSweep3Internal< BP_FP_INT_TYPE >::getAabb ( btBroadphaseProxy *  proxy,
btVector3 &  aabbMin,
btVector3 &  aabbMax 
) const [virtual]

Implements btBroadphaseInterface.

Definition at line 318 of file btAxisSweep3.h.

template<typename BP_FP_INT_TYPE>
virtual void btAxisSweep3Internal< BP_FP_INT_TYPE >::getBroadphaseAabb ( btVector3 &  aabbMin,
btVector3 &  aabbMax 
) const [inline, virtual]

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

Implements btBroadphaseInterface.

Definition at line 182 of file btAxisSweep3.h.

template<typename BP_FP_INT_TYPE>
SIMD_FORCE_INLINE Handle* btAxisSweep3Internal< BP_FP_INT_TYPE >::getHandle ( BP_FP_INT_TYPE  index) const [inline]

Definition at line 140 of file btAxisSweep3.h.

template<typename BP_FP_INT_TYPE>
BP_FP_INT_TYPE btAxisSweep3Internal< BP_FP_INT_TYPE >::getNumHandles ( ) const [inline]

Definition at line 130 of file btAxisSweep3.h.

template<typename BP_FP_INT_TYPE>
btOverlappingPairCache* btAxisSweep3Internal< BP_FP_INT_TYPE >::getOverlappingPairCache ( ) [inline, virtual]

Implements btBroadphaseInterface.

Definition at line 162 of file btAxisSweep3.h.

template<typename BP_FP_INT_TYPE>
const btOverlappingPairCache* btAxisSweep3Internal< BP_FP_INT_TYPE >::getOverlappingPairCache ( ) const [inline, virtual]

Implements btBroadphaseInterface.

Definition at line 166 of file btAxisSweep3.h.

template<typename BP_FP_INT_TYPE>
const btOverlappingPairCallback* btAxisSweep3Internal< BP_FP_INT_TYPE >::getOverlappingPairUserCallback ( ) const [inline]

Definition at line 175 of file btAxisSweep3.h.

template<typename BP_FP_INT_TYPE>
virtual void btAxisSweep3Internal< BP_FP_INT_TYPE >::printStats ( ) [inline, virtual]

Implements btBroadphaseInterface.

Definition at line 188 of file btAxisSweep3.h.

template<typename BP_FP_INT_TYPE>
void btAxisSweep3Internal< BP_FP_INT_TYPE >::processAllOverlappingPairs ( btOverlapCallback callback)
template<typename BP_FP_INT_TYPE>
void btAxisSweep3Internal< BP_FP_INT_TYPE >::quantize ( BP_FP_INT_TYPE *  out,
const btVector3 &  point,
int  isMax 
) const

Definition at line 459 of file btAxisSweep3.h.

template<typename BP_FP_INT_TYPE >
void btAxisSweep3Internal< BP_FP_INT_TYPE >::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 270 of file btAxisSweep3.h.

template<typename BP_FP_INT_TYPE>
void btAxisSweep3Internal< BP_FP_INT_TYPE >::removeHandle ( BP_FP_INT_TYPE  handle,
btDispatcher dispatcher 
)
Todo:
: compare performance

Definition at line 561 of file btAxisSweep3.h.

template<typename BP_FP_INT_TYPE >
void btAxisSweep3Internal< BP_FP_INT_TYPE >::resetPool ( btDispatcher dispatcher) [virtual]

reset broadphase internal structures, to ensure determinism/reproducability

Reimplemented from btBroadphaseInterface.

Definition at line 618 of file btAxisSweep3.h.

template<typename BP_FP_INT_TYPE >
void btAxisSweep3Internal< BP_FP_INT_TYPE >::setAabb ( btBroadphaseProxy *  proxy,
const btVector3 &  aabbMin,
const btVector3 &  aabbMax,
btDispatcher dispatcher 
) [virtual]

Implements btBroadphaseInterface.

Definition at line 258 of file btAxisSweep3.h.

template<typename BP_FP_INT_TYPE>
void btAxisSweep3Internal< BP_FP_INT_TYPE >::setOverlappingPairUserCallback ( btOverlappingPairCallback pairCallback) [inline]

Definition at line 171 of file btAxisSweep3.h.

template<typename BP_FP_INT_TYPE>
void btAxisSweep3Internal< BP_FP_INT_TYPE >::sortMaxDown ( int  axis,
BP_FP_INT_TYPE  edge,
btDispatcher dispatcher,
bool  updateOverlaps 
) [protected]

Definition at line 915 of file btAxisSweep3.h.

template<typename BP_FP_INT_TYPE>
void btAxisSweep3Internal< BP_FP_INT_TYPE >::sortMaxUp ( int  axis,
BP_FP_INT_TYPE  edge,
btDispatcher dispatcher,
bool  updateOverlaps 
) [protected]

Definition at line 978 of file btAxisSweep3.h.

template<typename BP_FP_INT_TYPE>
void btAxisSweep3Internal< BP_FP_INT_TYPE >::sortMinDown ( int  axis,
BP_FP_INT_TYPE  edge,
btDispatcher dispatcher,
bool  updateOverlaps 
) [protected]

Definition at line 807 of file btAxisSweep3.h.

template<typename BP_FP_INT_TYPE>
void btAxisSweep3Internal< BP_FP_INT_TYPE >::sortMinUp ( int  axis,
BP_FP_INT_TYPE  edge,
btDispatcher dispatcher,
bool  updateOverlaps 
) [protected]

Definition at line 859 of file btAxisSweep3.h.

template<typename BP_FP_INT_TYPE >
bool btAxisSweep3Internal< BP_FP_INT_TYPE >::testAabbOverlap ( btBroadphaseProxy *  proxy0,
btBroadphaseProxy *  proxy1 
)

Definition at line 722 of file btAxisSweep3.h.

template<typename BP_FP_INT_TYPE >
bool btAxisSweep3Internal< BP_FP_INT_TYPE >::testOverlap2D ( const Handle pHandleA,
const Handle pHandleB,
int  axis0,
int  axis1 
) [protected]

Definition at line 741 of file btAxisSweep3.h.

template<typename BP_FP_INT_TYPE >
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 327 of file btAxisSweep3.h.

template<typename BP_FP_INT_TYPE>
void btAxisSweep3Internal< BP_FP_INT_TYPE >::updateHandle ( BP_FP_INT_TYPE  handle,
const btVector3 &  aabbMin,
const btVector3 &  aabbMax,
btDispatcher dispatcher 
)

Definition at line 756 of file btAxisSweep3.h.


Member Data Documentation

template<typename BP_FP_INT_TYPE>
BP_FP_INT_TYPE btAxisSweep3Internal< BP_FP_INT_TYPE >::m_bpHandleMask [protected]

Definition at line 40 of file btAxisSweep3.h.

template<typename BP_FP_INT_TYPE>
BP_FP_INT_TYPE btAxisSweep3Internal< BP_FP_INT_TYPE >::m_firstFreeHandle [protected]

Definition at line 83 of file btAxisSweep3.h.

template<typename BP_FP_INT_TYPE>
BP_FP_INT_TYPE btAxisSweep3Internal< BP_FP_INT_TYPE >::m_handleSentinel [protected]

Definition at line 41 of file btAxisSweep3.h.

template<typename BP_FP_INT_TYPE>
int btAxisSweep3Internal< BP_FP_INT_TYPE >::m_invalidPair [protected]

Definition at line 95 of file btAxisSweep3.h.

template<typename BP_FP_INT_TYPE>
BP_FP_INT_TYPE btAxisSweep3Internal< BP_FP_INT_TYPE >::m_maxHandles [protected]

Definition at line 80 of file btAxisSweep3.h.

template<typename BP_FP_INT_TYPE>
btOverlappingPairCache* btAxisSweep3Internal< BP_FP_INT_TYPE >::m_nullPairCache [protected]

Definition at line 100 of file btAxisSweep3.h.

template<typename BP_FP_INT_TYPE>
BP_FP_INT_TYPE btAxisSweep3Internal< BP_FP_INT_TYPE >::m_numHandles [protected]

Definition at line 79 of file btAxisSweep3.h.

template<typename BP_FP_INT_TYPE>
bool btAxisSweep3Internal< BP_FP_INT_TYPE >::m_ownsPairCache [protected]

Definition at line 93 of file btAxisSweep3.h.

template<typename BP_FP_INT_TYPE>
btOverlappingPairCache* btAxisSweep3Internal< BP_FP_INT_TYPE >::m_pairCache [protected]

Definition at line 88 of file btAxisSweep3.h.

template<typename BP_FP_INT_TYPE>
Edge* btAxisSweep3Internal< BP_FP_INT_TYPE >::m_pEdges[3] [protected]

Definition at line 85 of file btAxisSweep3.h.

template<typename BP_FP_INT_TYPE>
void* btAxisSweep3Internal< BP_FP_INT_TYPE >::m_pEdgesRawPtr[3] [protected]

Definition at line 86 of file btAxisSweep3.h.

template<typename BP_FP_INT_TYPE>
Handle* btAxisSweep3Internal< BP_FP_INT_TYPE >::m_pHandles [protected]

Definition at line 81 of file btAxisSweep3.h.

template<typename BP_FP_INT_TYPE>
btVector3 btAxisSweep3Internal< BP_FP_INT_TYPE >::m_quantize [protected]

Definition at line 77 of file btAxisSweep3.h.

template<typename BP_FP_INT_TYPE>
btDbvtBroadphase* btAxisSweep3Internal< BP_FP_INT_TYPE >::m_raycastAccelerator [protected]

additional dynamic aabb structure, used to accelerate ray cast queries. can be disabled using a optional argument in the constructor

Definition at line 99 of file btAxisSweep3.h.

template<typename BP_FP_INT_TYPE>
btOverlappingPairCallback* btAxisSweep3Internal< BP_FP_INT_TYPE >::m_userPairCallback [protected]

btOverlappingPairCallback is an additional optional user callback for adding/removing overlapping pairs, similar interface to btOverlappingPairCache.

Definition at line 91 of file btAxisSweep3.h.

template<typename BP_FP_INT_TYPE>
btVector3 btAxisSweep3Internal< BP_FP_INT_TYPE >::m_worldAabbMax [protected]

Definition at line 75 of file btAxisSweep3.h.

template<typename BP_FP_INT_TYPE>
btVector3 btAxisSweep3Internal< BP_FP_INT_TYPE >::m_worldAabbMin [protected]

Definition at line 74 of file btAxisSweep3.h.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines


bullet
Author(s): Erwin Coumans, ROS package maintained by Tully Foote
autogenerated on Wed Oct 31 2012 07:54:32