Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/branches/environment2/src/external/bullet/BulletCollision/BroadphaseCollision/btDispatcher.h @ 8900

Last change on this file since 8900 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.4 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#ifndef _DISPATCHER_H
17#define _DISPATCHER_H
18
19#include "LinearMath/btScalar.h"
20
21class btCollisionAlgorithm;
22struct btBroadphaseProxy;
23class btRigidBody;
24class   btCollisionObject;
25class btOverlappingPairCache;
26
27
28class btPersistentManifold;
29class btStackAlloc;
30
31struct btDispatcherInfo
32{
33        enum DispatchFunc
34        {
35                DISPATCH_DISCRETE = 1,
36                DISPATCH_CONTINUOUS
37        };
38        btDispatcherInfo()
39                :m_timeStep(btScalar(0.)),
40                m_stepCount(0),
41                m_dispatchFunc(DISPATCH_DISCRETE),
42                m_timeOfImpact(btScalar(1.)),
43                m_useContinuous(false),
44                m_debugDraw(0),
45                m_enableSatConvex(false),
46                m_enableSPU(true),
47                m_useEpa(true),
48                m_allowedCcdPenetration(btScalar(0.04)),
49                m_useConvexConservativeDistanceUtil(false),
50                m_convexConservativeDistanceThreshold(0.0f),
51                m_convexMaxDistanceUseCPT(false),
52                m_stackAllocator(0)
53        {
54
55        }
56        btScalar        m_timeStep;
57        int                     m_stepCount;
58        int                     m_dispatchFunc;
59        mutable btScalar        m_timeOfImpact;
60        bool            m_useContinuous;
61        class btIDebugDraw*     m_debugDraw;
62        bool            m_enableSatConvex;
63        bool            m_enableSPU;
64        bool            m_useEpa;
65        btScalar        m_allowedCcdPenetration;
66        bool            m_useConvexConservativeDistanceUtil;
67        btScalar        m_convexConservativeDistanceThreshold;
68        bool            m_convexMaxDistanceUseCPT;
69        btStackAlloc*   m_stackAllocator;
70};
71
72///The btDispatcher interface class can be used in combination with broadphase to dispatch calculations for overlapping pairs.
73///For example for pairwise collision detection, calculating contact points stored in btPersistentManifold or user callbacks (game logic).
74class btDispatcher
75{
76
77
78public:
79        virtual ~btDispatcher() ;
80
81        virtual btCollisionAlgorithm* findAlgorithm(btCollisionObject* body0,btCollisionObject* body1,btPersistentManifold* sharedManifold=0) = 0;
82
83        virtual btPersistentManifold*   getNewManifold(void* body0,void* body1)=0;
84
85        virtual void releaseManifold(btPersistentManifold* manifold)=0;
86
87        virtual void clearManifold(btPersistentManifold* manifold)=0;
88
89        virtual bool    needsCollision(btCollisionObject* body0,btCollisionObject* body1) = 0;
90
91        virtual bool    needsResponse(btCollisionObject* body0,btCollisionObject* body1)=0;
92
93        virtual void    dispatchAllCollisionPairs(btOverlappingPairCache* pairCache,const btDispatcherInfo& dispatchInfo,btDispatcher* dispatcher)  =0;
94
95        virtual int getNumManifolds() const = 0;
96
97        virtual btPersistentManifold* getManifoldByIndexInternal(int index) = 0;
98
99        virtual btPersistentManifold**  getInternalManifoldPointer() = 0;
100
101        virtual void* allocateCollisionAlgorithm(int size)  = 0;
102
103        virtual void freeCollisionAlgorithm(void* ptr) = 0;
104
105};
106
107
108#endif //_DISPATCHER_H
Note: See TracBrowser for help on using the repository browser.