Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/archive/environment2/src/external/bullet/BulletCollision/NarrowPhaseCollision/btGjkPairDetector.h @ 12373

Last change on this file since 12373 was 8351, checked in by rgrieder, 14 years ago

Merged kicklib2 branch back to trunk (includes former branches ois_update, mac_osx and kicklib).

Notes for updating

Linux:
You don't need an extra package for CEGUILua and Tolua, it's already shipped with CEGUI.
However you do need to make sure that the OgreRenderer is installed too with CEGUI 0.7 (may be a separate package).
Also, Orxonox now recognises if you install the CgProgramManager (a separate package available on newer Ubuntu on Debian systems).

Windows:
Download the new dependency packages versioned 6.0 and use these. If you have problems with that or if you don't like the in game console problem mentioned below, you can download the new 4.3 version of the packages (only available for Visual Studio 2005/2008).

Key new features:

  • *Support for Mac OS X*
  • Visual Studio 2010 support
  • Bullet library update to 2.77
  • OIS library update to 1.3
  • Support for CEGUI 0.7 —> Support for Arch Linux and even SuSE
  • Improved install target
  • Compiles now with GCC 4.6
  • Ogre Cg Shader plugin activated for Linux if available
  • And of course lots of bug fixes

There are also some regressions:

  • No support for CEGUI 0.5, Ogre 1.4 and boost 1.35 - 1.39 any more
  • In game console is not working in main menu for CEGUI 0.7
  • Tolua (just the C lib, not the application) and CEGUILua libraries are no longer in our repository. —> You will need to get these as well when compiling Orxonox
  • And of course lots of new bugs we don't yet know about
  • Property svn:eol-style set to native
File size: 3.3 KB
Line 
1/*
2Bullet Continuous Collision Detection and Physics Library
3Copyright (c) 2003-2006 Erwin Coumans  http://continuousphysics.com/Bullet/
4
5This software is provided 'as-is', without any express or implied warranty.
6In no event will the authors be held liable for any damages arising from the use of this software.
7Permission is granted to anyone to use this software for any purpose,
8including commercial applications, and to alter it and redistribute it freely,
9subject to the following restrictions:
10
111. 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.
122. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
133. This notice may not be removed or altered from any source distribution.
14*/
15
16
17
18
19#ifndef GJK_PAIR_DETECTOR_H
20#define GJK_PAIR_DETECTOR_H
21
22#include "btDiscreteCollisionDetectorInterface.h"
23#include "BulletCollision/CollisionShapes/btCollisionMargin.h"
24
25class btConvexShape;
26#include "btSimplexSolverInterface.h"
27class btConvexPenetrationDepthSolver;
28
29/// btGjkPairDetector uses GJK to implement the btDiscreteCollisionDetectorInterface
30class btGjkPairDetector : public btDiscreteCollisionDetectorInterface
31{
32       
33
34        btVector3       m_cachedSeparatingAxis;
35        btConvexPenetrationDepthSolver* m_penetrationDepthSolver;
36        btSimplexSolverInterface* m_simplexSolver;
37        const btConvexShape* m_minkowskiA;
38        const btConvexShape* m_minkowskiB;
39        int     m_shapeTypeA;
40        int m_shapeTypeB;
41        btScalar        m_marginA;
42        btScalar        m_marginB;
43
44        bool            m_ignoreMargin;
45        btScalar        m_cachedSeparatingDistance;
46       
47
48public:
49
50        //some debugging to fix degeneracy problems
51        int                     m_lastUsedMethod;
52        int                     m_curIter;
53        int                     m_degenerateSimplex;
54        int                     m_catchDegeneracies;
55
56
57        btGjkPairDetector(const btConvexShape* objectA,const btConvexShape* objectB,btSimplexSolverInterface* simplexSolver,btConvexPenetrationDepthSolver*     penetrationDepthSolver);
58        btGjkPairDetector(const btConvexShape* objectA,const btConvexShape* objectB,int shapeTypeA,int shapeTypeB,btScalar marginA, btScalar marginB, btSimplexSolverInterface* simplexSolver,btConvexPenetrationDepthSolver*   penetrationDepthSolver);
59        virtual ~btGjkPairDetector() {};
60
61        virtual void    getClosestPoints(const ClosestPointInput& input,Result& output,class btIDebugDraw* debugDraw,bool swapResults=false);
62
63        void    getClosestPointsNonVirtual(const ClosestPointInput& input,Result& output,class btIDebugDraw* debugDraw);
64       
65
66        void setMinkowskiA(btConvexShape* minkA)
67        {
68                m_minkowskiA = minkA;
69        }
70
71        void setMinkowskiB(btConvexShape* minkB)
72        {
73                m_minkowskiB = minkB;
74        }
75        void setCachedSeperatingAxis(const btVector3& seperatingAxis)
76        {
77                m_cachedSeparatingAxis = seperatingAxis;
78        }
79
80        const btVector3& getCachedSeparatingAxis() const
81        {
82                return m_cachedSeparatingAxis;
83        }
84        btScalar        getCachedSeparatingDistance() const
85        {
86                return m_cachedSeparatingDistance;
87        }
88
89        void    setPenetrationDepthSolver(btConvexPenetrationDepthSolver*       penetrationDepthSolver)
90        {
91                m_penetrationDepthSolver = penetrationDepthSolver;
92        }
93
94        ///don't use setIgnoreMargin, it's for Bullet's internal use
95        void    setIgnoreMargin(bool ignoreMargin)
96        {
97                m_ignoreMargin = ignoreMargin;
98        }
99
100
101};
102
103#endif //GJK_PAIR_DETECTOR_H
Note: See TracBrowser for help on using the repository browser.