Back to index

supertuxkart  0.5+dfsg1
btDefaultCollisionConfiguration.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_DEFAULT_COLLISION_CONFIGURATION
00017 #define BT_DEFAULT_COLLISION_CONFIGURATION
00018 
00019 #include "btCollisionConfiguration.h"
00020 class btVoronoiSimplexSolver;
00021 class btGjkEpaPenetrationDepthSolver;
00022 
00023 
00027 class  btDefaultCollisionConfiguration : public btCollisionConfiguration
00028 {
00029 
00030        int    m_persistentManifoldPoolSize;
00031        
00032        btStackAlloc* m_stackAlloc;
00033        bool   m_ownsStackAllocator;
00034 
00035        btPoolAllocator*     m_persistentManifoldPool;
00036        bool   m_ownsPersistentManifoldPool;
00037 
00038        btPoolAllocator*     m_collisionAlgorithmPool;
00039        bool   m_ownsCollisionAlgorithmPool;
00040 
00041        //default simplex/penetration depth solvers
00042        btVoronoiSimplexSolver*     m_simplexSolver;
00043        btGjkEpaPenetrationDepthSolver*    m_pdSolver;
00044        
00045        //default CreationFunctions, filling the m_doubleDispatch table
00046        btCollisionAlgorithmCreateFunc*    m_convexConvexCreateFunc;
00047        btCollisionAlgorithmCreateFunc*    m_convexConcaveCreateFunc;
00048        btCollisionAlgorithmCreateFunc*    m_swappedConvexConcaveCreateFunc;
00049        btCollisionAlgorithmCreateFunc*    m_compoundCreateFunc;
00050        btCollisionAlgorithmCreateFunc*    m_swappedCompoundCreateFunc;
00051        btCollisionAlgorithmCreateFunc* m_emptyCreateFunc;
00052        btCollisionAlgorithmCreateFunc* m_sphereSphereCF;
00053        btCollisionAlgorithmCreateFunc* m_sphereBoxCF;
00054        btCollisionAlgorithmCreateFunc* m_boxSphereCF;
00055        btCollisionAlgorithmCreateFunc* m_boxBoxCF;
00056        btCollisionAlgorithmCreateFunc*    m_sphereTriangleCF;
00057        btCollisionAlgorithmCreateFunc*    m_triangleSphereCF;
00058        btCollisionAlgorithmCreateFunc*    m_planeConvexCF;
00059        btCollisionAlgorithmCreateFunc*    m_convexPlaneCF;
00060        
00061 public:
00062 
00063        btDefaultCollisionConfiguration(btStackAlloc*    stackAlloc=0,btPoolAllocator*      persistentManifoldPool=0,btPoolAllocator* collisionAlgorithmPool=0);
00064 
00065        virtual ~btDefaultCollisionConfiguration();
00066 
00068        virtual btPoolAllocator* getPersistentManifoldPool()
00069        {
00070               return m_persistentManifoldPool;
00071        }
00072 
00073        virtual btPoolAllocator* getCollisionAlgorithmPool()
00074        {
00075               return m_collisionAlgorithmPool;
00076        }
00077 
00078        virtual btStackAlloc*       getStackAllocator()
00079        {
00080               return m_stackAlloc;
00081        }
00082 
00083 
00084        virtual btCollisionAlgorithmCreateFunc* getCollisionAlgorithmCreateFunc(int proxyType0,int proxyType1);
00085 
00086 
00087 };
00088 
00089 #endif //BT_DEFAULT_COLLISION_CONFIGURATION
00090