Changeset 161 for code/branches/main_reto_vs05/include/run_manager.h
- Timestamp:
- Nov 4, 2007, 5:00:41 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/main_reto_vs05/include/run_manager.h
r159 r161 30 30 #define RUN_MANAGER_H 31 31 32 #include "Ogre .h"33 #include "Ogre StringConverter.h"34 #include "Ogre Exception.h"32 #include "OgrePrerequisites.h" 33 #include "OgreWindowEventUtilities.h" 34 #include "OgreTextureManager.h" 35 35 36 #include "ogre_control.h"37 #include "orxonox_scene.h" 38 #include " orxonox_ship.h"36 #include <OIS/OISPrereqs.h> 37 38 #include "Orxonox_prerequisites.h" 39 39 40 40 41 //Use this define to signify OIS will be used as a DLL 42 //(so that dll import/export macros are in effect) 43 #define OIS_DYNAMIC_LIB 44 #include <OIS/OIS.h> 41 namespace Orxonox { 45 42 46 using namespace Ogre; 43 // let the class inherit from WindowEventListener in order for the RunMgr 44 // to act as the central point of all the calcuations in Orxonox 45 class RunManager : Ogre::WindowEventListener 46 { 47 public: 48 RunManager(OgreControl*); 49 50 virtual ~RunManager(); 51 52 virtual bool tick(unsigned long, Ogre::Real); 53 54 protected: 55 virtual void createCamera(void); 56 57 virtual void createViewports(void); 47 58 48 59 49 // let the class inherit from WindowEventListener in order for the RunMgr 50 // to act as the central point of all the calcuations in Orxonox 51 class RunManager : WindowEventListener 52 { 53 public: 54 RunManager(OgreControl*); 60 /** EVENT HANDLING **/ 55 61 56 virtual ~RunManager(); 62 //Adjust mouse clipping area 63 virtual void windowResized(Ogre::RenderWindow*); 57 64 58 virtual bool tick(unsigned long, Real); 59 60 protected: 61 virtual void createCamera(void); 62 63 virtual void createViewports(void); 65 //Unattach OIS before window shutdown (very important under Linux) 66 virtual void windowClosed(Ogre::RenderWindow*); 64 67 65 68 66 /** EVENT HANDLING **/ 69 /** INPUT PROCESSING **/ 70 virtual bool processUnbufferedKeyInput(); 67 71 68 //Adjust mouse clipping area 69 virtual void windowResized(RenderWindow*); 70 71 //Unattach OIS before window shutdown (very important under Linux) 72 virtual void windowClosed(RenderWindow*); 72 virtual bool processUnbufferedMouseInput(); 73 73 74 74 75 /** INPUT PROCESSING **/ 76 virtual bool processUnbufferedKeyInput(); 75 /** OUTPUT **/ 77 76 78 virtual bool processUnbufferedMouseInput();77 virtual void updateStats(void); 79 78 79 virtual void showDebugOverlay(bool); 80 80 81 /** OUTPUT **/ 81 protected: 82 Ogre::SceneManager *sceneMgr_; 83 Ogre::RenderWindow *window_; 84 Ogre::Camera *camera_; 85 OgreControl *ogre_; 86 OrxonoxScene *backgroundScene_; 87 OrxonoxShip *playerShip_; 82 88 83 virtual void updateStats(void); 89 bool statsOn_; 90 std::string debugText_; 84 91 85 virtual void showDebugOverlay(bool); 92 unsigned int screenShotCounter_; 93 // just to stop toggles flipping too fast 94 Ogre::Real timeUntilNextToggle_; 95 bool leftButtonDown_; 96 Ogre::TextureFilterOptions filtering_; 97 int aniso_; 86 98 87 protected: 88 OgreControl *ogre_; 89 SceneManager *sceneMgr_; 90 RenderWindow *window_; 91 OrxonoxScene *backgroundScene_; 92 Camera *camera_; 93 OrxonoxShip *playerShip_; 99 int sceneDetailIndex_; 100 Ogre::Overlay* debugOverlay_; 94 101 95 bool statsOn_; 96 std::string debugText_; 102 //OIS Input devices 103 OIS::InputManager* inputManager_; 104 OIS::Mouse* mouse_; 105 OIS::Keyboard* keyboard_; 106 OIS::JoyStick* joystick_; 97 107 98 unsigned int screenShotCounter_; 99 // just to stop toggles flipping too fast 100 Real timeUntilNextToggle_; 101 bool leftButtonDown_; 102 TextureFilterOptions filtering_; 103 int aniso_; 108 const Ogre::Real mouseSensitivity_; 104 109 105 int sceneDetailIndex_; 106 Overlay* debugOverlay_; 110 // Bullet array 111 Bullet **bullets_; 112 int bulletsSize_; 113 int bulletsIndex_; 107 114 108 //OIS Input devices 109 OIS::InputManager* inputManager_; 110 OIS::Mouse* mouse_; 111 OIS::Keyboard* keyboard_; 112 OIS::JoyStick* joystick_; 115 // previously elapsed render time 116 unsigned long totalTime_; 113 117 114 const Real mouseSensitivity_;118 }; 115 119 116 // Bullet array 117 Bullet **bullets_; 118 int bulletsSize_; 119 int bulletsIndex_; 120 121 // previously elapsed render time 122 unsigned long totalTime_; 123 124 }; 120 } 125 121 126 122 #endif /* RUN_MANAGER_H */
Note: See TracChangeset
for help on using the changeset viewer.