Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/branches/FICN/src/orxonox/orxonox.h @ 515

Last change on this file since 515 was 515, checked in by nicolape, 16 years ago

Added some objects for the level loader

File size: 1.9 KB
Line 
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#include "spaceship_steering.h"
19
20
21// TODO: Orxonox should maybe derive from BaseObject
22//! Orxonox singleton class
23namespace orxonox {
24
25  class OrxListener;
26
27  class Orxonox
28  {
29    public:
30      void init(int argc, char **argv, std::string path);
31      void start();
32      // not sure if this should be private
33      void die(/* some error code */);
34      static Orxonox* getSingleton();
35      inline SceneManager* getSceneManager() { return ogre_->getSceneManager(); };
36      inline GraphicsEngine* getOgrePointer() { return ogre_; };
37      inline SpaceshipSteering* getSteeringPointer() { return steering_; };
38    private:
39      Orxonox();
40      virtual ~Orxonox();
41      void serverInit(std::string path);
42      void clientInit(std::string path);
43      void standalone(std::string path);
44      void defineResources();
45      void setupRenderSystem();
46      void createRenderWindow();
47      void initializeResourceGroups();
48      void createScene(void);
49      void setupScene();
50      void setupInputSystem();
51      void createFrameListener();
52      void startRenderLoop();
53    private:
54
55      GraphicsEngine*       ogre_;      //!< our dearest graphics engine <3
56      std::string           dataPath_;  //!< path to data
57      loader::LevelLoader*  loader_;    //!< level loader builds the scene
58      audio::AudioManager*  auMan_;     //!< audio manager
59      SpaceshipSteering*        steering_;
60      static Orxonox*       singletonRef_;
61      OIS::Keyboard*        keyboard_;
62      OIS::Mouse*           mouse_;
63      OIS::InputManager*    inputManager_;
64      OrxListener*          frameListener_;
65      Ogre::Root*           root_;
66  };
67}
68#endif /* ORXONOX_H */
Note: See TracBrowser for help on using the repository browser.