Back to index

supertuxkart  0.5+dfsg1
btSimplexSolverInterface.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 
00017 
00018 #ifndef SIMPLEX_SOLVER_INTERFACE_H
00019 #define SIMPLEX_SOLVER_INTERFACE_H
00020 
00021 #include "LinearMath/btVector3.h"
00022 #include "LinearMath/btPoint3.h"
00023 
00024 #define NO_VIRTUAL_INTERFACE 1
00025 #ifdef NO_VIRTUAL_INTERFACE
00026 #include "btVoronoiSimplexSolver.h"
00027 #define btSimplexSolverInterface btVoronoiSimplexSolver
00028 #else
00029 
00033 class btSimplexSolverInterface
00034 {
00035        public:
00036               virtual ~btSimplexSolverInterface() {};
00037 
00038        virtual void reset() = 0;
00039 
00040        virtual void addVertex(const btVector3& w, const btPoint3& p, const btPoint3& q) = 0;
00041        
00042        virtual bool closest(btVector3& v) = 0;
00043 
00044        virtual btScalar maxVertex() = 0;
00045 
00046        virtual bool fullSimplex() const = 0;
00047 
00048        virtual int getSimplex(btPoint3 *pBuf, btPoint3 *qBuf, btVector3 *yBuf) const = 0;
00049 
00050        virtual bool inSimplex(const btVector3& w) = 0;
00051        
00052        virtual void backup_closest(btVector3& v) = 0;
00053 
00054        virtual bool emptySimplex() const = 0;
00055 
00056        virtual void compute_points(btPoint3& p1, btPoint3& p2) = 0;
00057 
00058        virtual int numVertices() const =0;
00059 
00060 
00061 };
00062 #endif
00063 #endif //SIMPLEX_SOLVER_INTERFACE_H
00064