[462] | 1 | /** |
---|
| 2 | @file orxonox.h |
---|
| 3 | @brief Main Orxonox Class File |
---|
| 4 | @author Benjamin Knecht <beni_at_orxonox.net> |
---|
| 5 | */ |
---|
| 6 | |
---|
| 7 | #ifndef ORXONOX_H |
---|
| 8 | #define ORXONOX_H |
---|
| 9 | |
---|
| 10 | //#include <OgreSingleton.h> |
---|
| 11 | #include <OgreSceneManager.h> |
---|
| 12 | |
---|
| 13 | #include <OIS/OIS.h> |
---|
| 14 | |
---|
| 15 | #include "graphicsEngine.h" |
---|
| 16 | #include "../loader/LevelLoader.h" |
---|
| 17 | #include "../audio/AudioManager.h" |
---|
| 18 | |
---|
| 19 | |
---|
| 20 | // TODO: Orxonox should maybe derive from BaseObject |
---|
| 21 | //! Orxonox singleton class |
---|
| 22 | namespace orxonox { |
---|
| 23 | |
---|
| 24 | class OrxListener; |
---|
| 25 | |
---|
| 26 | class Orxonox |
---|
| 27 | { |
---|
| 28 | public: |
---|
| 29 | void init(int argc, char **argv, std::string path); |
---|
| 30 | void start(); |
---|
| 31 | // not sure if this should be private |
---|
| 32 | void die(/* some error code */); |
---|
| 33 | static Orxonox* getSingleton(); |
---|
| 34 | inline SceneManager* getSceneManager() { return ogre_->getSceneManager(); }; |
---|
| 35 | private: |
---|
| 36 | Orxonox(); |
---|
| 37 | virtual ~Orxonox(); |
---|
| 38 | void serverInit(std::string path); |
---|
| 39 | void clientInit(std::string path); |
---|
| 40 | void standalone(std::string path); |
---|
[473] | 41 | void defineResources(); |
---|
| 42 | void setupRenderSystem(); |
---|
| 43 | void createRenderWindow(); |
---|
| 44 | void initializeResourceGroups(); |
---|
[462] | 45 | void createScene(void); |
---|
| 46 | void setupScene(); |
---|
| 47 | void setupInputSystem(); |
---|
| 48 | void createFrameListener(); |
---|
| 49 | void startRenderLoop(); |
---|
| 50 | private: |
---|
| 51 | |
---|
| 52 | GraphicsEngine* ogre_; //!< our dearest graphics engine <3 |
---|
| 53 | std::string dataPath_; //!< path to data |
---|
| 54 | loader::LevelLoader* loader_; //!< level loader builds the scene |
---|
| 55 | audio::AudioManager* auMan_; //!< audio manager |
---|
| 56 | static Orxonox* singletonRef_; |
---|
| 57 | OIS::Keyboard* keyboard_; |
---|
| 58 | OIS::Mouse* mouse_; |
---|
| 59 | OIS::InputManager* inputManager_; |
---|
| 60 | OrxListener* frameListener_; |
---|
[473] | 61 | Ogre::Root* root_; |
---|
[462] | 62 | }; |
---|
| 63 | } |
---|
| 64 | #endif /* ORXONOX_H */ |
---|