btBroadphaseInterface.h
Go to the documentation of this file.
00001 /*
00002 Bullet Continuous Collision Detection and Physics Library
00003 Copyright (c) 2003-2006 Erwin Coumans  http://continuousphysics.com/Bullet/
00004 
00005 This software is provided 'as-is', without any express or implied warranty.
00006 In no event will the authors be held liable for any damages arising from the use of this software.
00007 Permission is granted to anyone to use this software for any purpose, 
00008 including commercial applications, and to alter it and redistribute it freely, 
00009 subject to the following restrictions:
00010 
00011 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
00012 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
00013 3. This notice may not be removed or altered from any source distribution.
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
 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:30