Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/branches/main_reto/include/RunManager.h @ 126

Last change on this file since 126 was 126, checked in by rgrieder, 17 years ago
File size: 2.1 KB
Line 
1#ifndef __RunManager__
2#define __RunManager__
3
4#include "Ogre.h"
5#include "OgreStringConverter.h"
6#include "OgreException.h"
7
8#include "OgreControl.h"
9#include "OrxonoxScene.h"
10#include "OrxonoxShip.h"
11#include "SteerableNode.h"
12
13//Use this define to signify OIS will be used as a DLL
14//(so that dll import/export macros are in effect)
15#define OIS_DYNAMIC_LIB
16#include <OIS/OIS.h>
17
18using namespace Ogre;
19
20
21// let the class inherit from WindowEventListener in order for the RunMgr
22// to act as the central point of all the calcuations in Orxonox
23class RunManager : WindowEventListener
24{
25public:
26        RunManager(OgreControl*, bool = false, bool = false, bool = false);
27
28        virtual ~RunManager();
29
30        virtual bool tick(unsigned long, float);
31
32protected:
33        OgreControl  *mOgre;
34
35        SceneManager *mSceneMgr;
36        RenderWindow* mWindow;
37
38        OrxonoxScene *mScene;
39        Camera* mCamera;
40        SteerableNode *mShipNode;
41        OrxonoxShip *mShip;
42
43        Vector3 mTranslateVector;
44        bool mStatsOn;
45
46        std::string mDebugText;
47
48        unsigned int mNumScreenShots;
49        float mMoveScale;
50        Degree mRotScale;
51        // just to stop toggles flipping too fast
52        Real mTimeUntilNextToggle ;
53        Radian mRotX, mRotY;
54        TextureFilterOptions mFiltering;
55        int mAniso;
56
57        int mSceneDetailIndex ;
58        Real mMoveSpeed;
59        Degree mRotateSpeed;
60        Overlay* mDebugOverlay;
61
62        //OIS Input devices
63        OIS::InputManager* mInputManager;
64        OIS::Mouse*    mMouse;
65        OIS::Keyboard* mKeyboard;
66        OIS::JoyStick* mJoy;
67
68        // previously elapsed render time
69        unsigned long mTime;
70
71        virtual void createCamera(void);
72
73        virtual void createViewports(void);
74
75
76        /** EVENT HANDLING **/
77
78        //Adjust mouse clipping area
79        virtual void windowResized(RenderWindow*);
80
81        //Unattach OIS before window shutdown (very important under Linux)
82        virtual void windowClosed(RenderWindow*);
83
84
85        /** INPUT PROCESSING **/
86        virtual bool processUnbufferedKeyInput();
87
88        virtual bool processUnbufferedMouseInput();
89
90
91        /** OUTPUT **/
92
93        virtual void updateStats(void);
94
95        virtual void moveCamera();
96
97        virtual void showDebugOverlay(bool);
98
99};
100
101#endif
Note: See TracBrowser for help on using the repository browser.