Back to index

supertuxkart  0.5+dfsg1
Public Member Functions | Protected Member Functions | Protected Attributes
bt32BitAxisSweep3 Class Reference

bt32BitAxisSweep3 allows higher precision quantization and more objects compared to the btAxisSweep3 sweep and prune. This comes at the cost of more memory per handle, and a bit slower performance. It uses arrays rather then lists for storage of the 3 axis. More...

#include <btAxisSweep3.h>

Inheritance diagram for bt32BitAxisSweep3:
Inheritance graph
[legend]
Collaboration diagram for bt32BitAxisSweep3:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 bt32BitAxisSweep3 (const btPoint3 &worldAabbMin, const btPoint3 &worldAabbMax, unsigned int maxHandles=1500000, btOverlappingPairCache *pairCache=0)
 ATTRIBUTE_ALIGNED16 (class) Handle
unsigned int getNumHandles () const
virtual void calculateOverlappingPairs (btDispatcher *dispatcher)
 calculateOverlappingPairs is optional: incremental algorithms (sweep and prune) might do it during the set aabb
unsigned int addHandle (const btPoint3 &aabbMin, const btPoint3 &aabbMax, void *pOwner, short int collisionFilterGroup, short int collisionFilterMask, btDispatcher *dispatcher, void *multiSapProxy)
void removeHandle (unsigned inthandle, btDispatcher *dispatcher)
void updateHandle (unsigned inthandle, const btPoint3 &aabbMin, const btPoint3 &aabbMax, btDispatcher *dispatcher)
SIMD_FORCE_INLINE Handle * getHandle (unsigned intindex) const
void processAllOverlappingPairs (btOverlapCallback *callback)
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)
bool testAabbOverlap (btBroadphaseProxy *proxy0, btBroadphaseProxy *proxy1)
btOverlappingPairCachegetOverlappingPairCache ()
const btOverlappingPairCachegetOverlappingPairCache () const
void setOverlappingPairUserCallback (btOverlappingPairCallback *pairCallback)
const btOverlappingPairCallbackgetOverlappingPairUserCallback () 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
virtual void printStats ()

Protected Member Functions

unsigned int allocHandle ()
void freeHandle (unsigned inthandle)
bool testOverlap (int ignoreAxis, const Handle *pHandleA, const Handle *pHandleB)
void quantize (unsigned int *out, const btPoint3 &point, int isMax) const
void sortMinDown (int axis, unsigned intedge, btDispatcher *dispatcher, bool updateOverlaps)
void sortMinUp (int axis, unsigned intedge, btDispatcher *dispatcher, bool updateOverlaps)
void sortMaxDown (int axis, unsigned intedge, btDispatcher *dispatcher, bool updateOverlaps)
void sortMaxUp (int axis, unsigned intedge, btDispatcher *dispatcher, bool updateOverlaps)

Protected Attributes

unsigned int m_bpHandleMask
unsigned int m_handleSentinel
btPoint3 m_worldAabbMin
btPoint3 m_worldAabbMax
btVector3 m_quantize
unsigned int m_numHandles
unsigned int m_maxHandles
Handle * m_pHandles
unsigned int m_firstFreeHandle
Edge * m_pEdges [3]
btOverlappingPairCachem_pairCache
btOverlappingPairCallbackm_userPairCallback
 btOverlappingPairCallback is an additional optional user callback for adding/removing overlapping pairs, similar interface to btOverlappingPairCache.
bool m_ownsPairCache
int m_invalidPair

Detailed Description

bt32BitAxisSweep3 allows higher precision quantization and more objects compared to the btAxisSweep3 sweep and prune. This comes at the cost of more memory per handle, and a bit slower performance. It uses arrays rather then lists for storage of the 3 axis.

Definition at line 898 of file btAxisSweep3.h.


Constructor & Destructor Documentation

bt32BitAxisSweep3::bt32BitAxisSweep3 ( const btPoint3 worldAabbMin,
const btPoint3 worldAabbMax,
unsigned int  maxHandles = 1500000,
btOverlappingPairCache pairCache = 0 
)

Definition at line 33 of file btAxisSweep3.cpp.

:btAxisSweep3Internal<unsigned int>(worldAabbMin,worldAabbMax,0xfffffffe,0x7fffffff,maxHandles,pairCache)
{
       // 1 handle is reserved as sentinel
       btAssert(maxHandles > 1 && maxHandles < 2147483647);
}

Member Function Documentation

unsigned int btAxisSweep3Internal< unsigned int >::addHandle ( const btPoint3 aabbMin,
const btPoint3 aabbMax,
void *  pOwner,
short int  collisionFilterGroup,
short int  collisionFilterMask,
btDispatcher dispatcher,
void *  multiSapProxy 
) [inherited]
unsigned int btAxisSweep3Internal< unsigned int >::allocHandle ( ) [protected, inherited]
btAxisSweep3Internal< unsigned int >::ATTRIBUTE_ALIGNED16 ( class  ) [inline, inherited]

Definition at line 54 of file btAxisSweep3.h.

                                         : public btBroadphaseProxy
       {
       public:
       BT_DECLARE_ALIGNED_ALLOCATOR();
       
              // indexes into the edge arrays
              BP_FP_INT_TYPE m_minEdges[3], m_maxEdges[3];            // 6 * 2 = 12
//            BP_FP_INT_TYPE m_uniqueId;
              BP_FP_INT_TYPE m_pad;
              
              //void* m_pOwner; this is now in btBroadphaseProxy.m_clientObject
       
              SIMD_FORCE_INLINE void SetNextFree(BP_FP_INT_TYPE next) {m_minEdges[0] = next;}
              SIMD_FORCE_INLINE BP_FP_INT_TYPE GetNextFree() const {return m_minEdges[0];}
       };            // 24 bytes + 24 for Edge structures = 44 bytes total per entry
virtual void btAxisSweep3Internal< unsigned int >::calculateOverlappingPairs ( btDispatcher dispatcher) [virtual, inherited]

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

Implements btBroadphaseInterface.

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

Implements btBroadphaseInterface.

virtual void btAxisSweep3Internal< unsigned int >::destroyProxy ( btBroadphaseProxy *  proxy,
btDispatcher dispatcher 
) [virtual, inherited]

Implements btBroadphaseInterface.

void btAxisSweep3Internal< unsigned int >::freeHandle ( unsigned int  handle) [protected, inherited]
virtual void btAxisSweep3Internal< unsigned int >::getBroadphaseAabb ( btVector3 aabbMin,
btVector3 aabbMax 
) const [inline, virtual, inherited]

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

Implements btBroadphaseInterface.

Definition at line 161 of file btAxisSweep3.h.

       {
              aabbMin = m_worldAabbMin;
              aabbMax = m_worldAabbMax;
       }
SIMD_FORCE_INLINE Handle* btAxisSweep3Internal< unsigned int >::getHandle ( unsigned int  index) const [inline, inherited]

Definition at line 130 of file btAxisSweep3.h.

{return m_pHandles + index;}
unsigned int btAxisSweep3Internal< unsigned int >::getNumHandles ( ) const [inline, inherited]

Definition at line 120 of file btAxisSweep3.h.

       {
              return m_numHandles;
       }
btOverlappingPairCache* btAxisSweep3Internal< unsigned int >::getOverlappingPairCache ( ) [inline, virtual, inherited]

Implements btBroadphaseInterface.

Definition at line 141 of file btAxisSweep3.h.

       {
              return m_pairCache;
       }
const btOverlappingPairCache* btAxisSweep3Internal< unsigned int >::getOverlappingPairCache ( ) const [inline, virtual, inherited]

Implements btBroadphaseInterface.

Definition at line 145 of file btAxisSweep3.h.

       {
              return m_pairCache;
       }
const btOverlappingPairCallback* btAxisSweep3Internal< unsigned int >::getOverlappingPairUserCallback ( ) const [inline, inherited]

Definition at line 154 of file btAxisSweep3.h.

       {
              return m_userPairCallback;
       }
virtual void btAxisSweep3Internal< unsigned int >::printStats ( ) [inline, virtual, inherited]

Implements btBroadphaseInterface.

Definition at line 167 of file btAxisSweep3.h.

       {
/*            printf("btAxisSweep3.h\n");
              printf("numHandles = %d, maxHandles = %d\n",m_numHandles,m_maxHandles);
              printf("aabbMin=%f,%f,%f,aabbMax=%f,%f,%f\n",m_worldAabbMin.getX(),m_worldAabbMin.getY(),m_worldAabbMin.getZ(),
                     m_worldAabbMax.getX(),m_worldAabbMax.getY(),m_worldAabbMax.getZ());
                     */

       }
void btAxisSweep3Internal< unsigned int >::processAllOverlappingPairs ( btOverlapCallback callback) [inherited]
void btAxisSweep3Internal< unsigned int >::quantize ( unsigned int *  out,
const btPoint3 point,
int  isMax 
) const [protected, inherited]
void btAxisSweep3Internal< unsigned int >::removeHandle ( unsigned int  handle,
btDispatcher dispatcher 
) [inherited]
virtual void btAxisSweep3Internal< unsigned int >::setAabb ( btBroadphaseProxy *  proxy,
const btVector3 aabbMin,
const btVector3 aabbMax,
btDispatcher dispatcher 
) [virtual, inherited]

Implements btBroadphaseInterface.

void btAxisSweep3Internal< unsigned int >::setOverlappingPairUserCallback ( btOverlappingPairCallback pairCallback) [inline, inherited]

Definition at line 150 of file btAxisSweep3.h.

       {
              m_userPairCallback = pairCallback;
       }
void btAxisSweep3Internal< unsigned int >::sortMaxDown ( int  axis,
unsigned int  edge,
btDispatcher dispatcher,
bool  updateOverlaps 
) [protected, inherited]
void btAxisSweep3Internal< unsigned int >::sortMaxUp ( int  axis,
unsigned int  edge,
btDispatcher dispatcher,
bool  updateOverlaps 
) [protected, inherited]
void btAxisSweep3Internal< unsigned int >::sortMinDown ( int  axis,
unsigned int  edge,
btDispatcher dispatcher,
bool  updateOverlaps 
) [protected, inherited]
void btAxisSweep3Internal< unsigned int >::sortMinUp ( int  axis,
unsigned int  edge,
btDispatcher dispatcher,
bool  updateOverlaps 
) [protected, inherited]
bool btAxisSweep3Internal< unsigned int >::testAabbOverlap ( btBroadphaseProxy *  proxy0,
btBroadphaseProxy *  proxy1 
) [inherited]
bool btAxisSweep3Internal< unsigned int >::testOverlap ( int  ignoreAxis,
const Handle *  pHandleA,
const Handle *  pHandleB 
) [protected, inherited]
void btAxisSweep3Internal< unsigned int >::updateHandle ( unsigned int  handle,
const btPoint3 aabbMin,
const btPoint3 aabbMax,
btDispatcher dispatcher 
) [inherited]

Member Data Documentation

unsigned int btAxisSweep3Internal< unsigned int >::m_bpHandleMask [protected, inherited]

Definition at line 38 of file btAxisSweep3.h.

unsigned int btAxisSweep3Internal< unsigned int >::m_firstFreeHandle [protected, inherited]

Definition at line 80 of file btAxisSweep3.h.

unsigned int btAxisSweep3Internal< unsigned int >::m_handleSentinel [protected, inherited]

Definition at line 39 of file btAxisSweep3.h.

int btAxisSweep3Internal< unsigned int >::m_invalidPair [protected, inherited]

Definition at line 91 of file btAxisSweep3.h.

unsigned int btAxisSweep3Internal< unsigned int >::m_maxHandles [protected, inherited]

Definition at line 78 of file btAxisSweep3.h.

unsigned int btAxisSweep3Internal< unsigned int >::m_numHandles [protected, inherited]

Definition at line 77 of file btAxisSweep3.h.

bool btAxisSweep3Internal< unsigned int >::m_ownsPairCache [protected, inherited]

Definition at line 89 of file btAxisSweep3.h.

btOverlappingPairCache* btAxisSweep3Internal< unsigned int >::m_pairCache [protected, inherited]

Definition at line 84 of file btAxisSweep3.h.

Edge* btAxisSweep3Internal< unsigned int >::m_pEdges[3] [protected, inherited]

Definition at line 82 of file btAxisSweep3.h.

Handle* btAxisSweep3Internal< unsigned int >::m_pHandles [protected, inherited]

Definition at line 79 of file btAxisSweep3.h.

btVector3 btAxisSweep3Internal< unsigned int >::m_quantize [protected, inherited]

Definition at line 75 of file btAxisSweep3.h.

btOverlappingPairCallback* btAxisSweep3Internal< unsigned int >::m_userPairCallback [protected, inherited]

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

Definition at line 87 of file btAxisSweep3.h.

btPoint3 btAxisSweep3Internal< unsigned int >::m_worldAabbMax [protected, inherited]

Definition at line 73 of file btAxisSweep3.h.

btPoint3 btAxisSweep3Internal< unsigned int >::m_worldAabbMin [protected, inherited]

Definition at line 68 of file btAxisSweep3.h.


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