Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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

Last change on this file since 130 was 130, checked in by rgrieder, 16 years ago
File size: 1.9 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        SceneNode *mShipNode;
41        OrxonoxShip *mShip;
42
43        bool mStatsOn;
44
45        std::string mDebugText;
46
47        unsigned int mNumScreenShots;
48        // just to stop toggles flipping too fast
49        Real mTimeUntilNextToggle ;
50        TextureFilterOptions mFiltering;
51        int mAniso;
52
53        int mSceneDetailIndex ;
54        Overlay* mDebugOverlay;
55
56        //OIS Input devices
57        OIS::InputManager* mInputManager;
58        OIS::Mouse*    mMouse;
59        OIS::Keyboard* mKeyboard;
60        OIS::JoyStick* mJoy;
61
62        // previously elapsed render time
63        unsigned long mTime;
64
65        virtual void createCamera(void);
66
67        virtual void createViewports(void);
68
69
70        /** EVENT HANDLING **/
71
72        //Adjust mouse clipping area
73        virtual void windowResized(RenderWindow*);
74
75        //Unattach OIS before window shutdown (very important under Linux)
76        virtual void windowClosed(RenderWindow*);
77
78
79        /** INPUT PROCESSING **/
80        virtual bool processUnbufferedKeyInput();
81
82        virtual bool processUnbufferedMouseInput();
83
84
85        /** OUTPUT **/
86
87        virtual void updateStats(void);
88
89        virtual void showDebugOverlay(bool);
90
91};
92
93#endif
Note: See TracBrowser for help on using the repository browser.