Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016 #ifndef BT_BROADPHASE_INTERFACE_H
00017 #define BT_BROADPHASE_INTERFACE_H
00018
00019
00020
00021 struct btDispatcherInfo;
00022 class btDispatcher;
00023 #include "btBroadphaseProxy.h"
00024
00025 class btOverlappingPairCache;
00026
00027
00028
00029 struct btBroadphaseAabbCallback
00030 {
00031 virtual ~btBroadphaseAabbCallback() {}
00032 virtual bool process(const btBroadphaseProxy* proxy) = 0;
00033 };
00034
00035
00036 struct btBroadphaseRayCallback : public btBroadphaseAabbCallback
00037 {
00039 btVector3 m_rayDirectionInverse;
00040 unsigned int m_signs[3];
00041 btScalar m_lambda_max;
00042
00043 virtual ~btBroadphaseRayCallback() {}
00044 };
00045
00046 #include "LinearMath/btVector3.h"
00047
00051 class btBroadphaseInterface
00052 {
00053 public:
00054 virtual ~btBroadphaseInterface() {}
00055
00056 virtual btBroadphaseProxy* createProxy( const btVector3& aabbMin, const btVector3& aabbMax,int shapeType,void* userPtr, short int collisionFilterGroup,short int collisionFilterMask, btDispatcher* dispatcher,void* multiSapProxy) =0;
00057 virtual void destroyProxy(btBroadphaseProxy* proxy,btDispatcher* dispatcher)=0;
00058 virtual void setAabb(btBroadphaseProxy* proxy,const btVector3& aabbMin,const btVector3& aabbMax, btDispatcher* dispatcher)=0;
00059 virtual void getAabb(btBroadphaseProxy* proxy,btVector3& aabbMin, btVector3& aabbMax ) const =0;
00060
00061 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;
00062
00063 virtual void aabbTest(const btVector3& aabbMin, const btVector3& aabbMax, btBroadphaseAabbCallback& callback) = 0;
00064
00066 virtual void calculateOverlappingPairs(btDispatcher* dispatcher)=0;
00067
00068 virtual btOverlappingPairCache* getOverlappingPairCache()=0;
00069 virtual const btOverlappingPairCache* getOverlappingPairCache() const =0;
00070
00073 virtual void getBroadphaseAabb(btVector3& aabbMin,btVector3& aabbMax) const =0;
00074
00076 virtual void resetPool(btDispatcher* dispatcher) { (void) dispatcher; };
00077
00078 virtual void printStats() = 0;
00079
00080 };
00081
00082 #endif //BT_BROADPHASE_INTERFACE_H