Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
May 8, 2008, 1:29:38 PM (16 years ago)
Author:
rgrieder
Message:
  • added initialiser lists
File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/ogre/src/orxonox/GraphicsEngine.cc

    r1244 r1249  
    5252    @return The only instance of GraphicsEngine.
    5353  */
    54   GraphicsEngine& GraphicsEngine::getSingleton()
     54  /*static*/ GraphicsEngine& GraphicsEngine::getSingleton()
    5555  {
    5656    static GraphicsEngine theOnlyInstance;
     
    6161    @brief Only use constructor to initialise variables and pointers!
    6262  */
    63   GraphicsEngine::GraphicsEngine()
     63  GraphicsEngine::GraphicsEngine() :
     64    root_(0),
     65    scene_(0),
     66    renderWindow_(0),
     67    //configPath_(""),
     68    dataPath_(""),
     69    ogreLogfile_("")
    6470  {
    6571    RegisterObject(GraphicsEngine);
    66     // set to standard values
    67     this->configPath_ = "";
    68     this->root_ = 0;
    69     this->scene_ = 0;
    70     this->renderWindow_ = 0;
     72
    7173    this->setConfigValues();
    7274    CCOUT(4) << "Constructed" << std::endl;
     75  }
     76
     77  void GraphicsEngine::setConfigValues()
     78  {
     79    SetConfigValue(dataPath_, "../../Media/").description("relative path to media data");
     80    SetConfigValue(ogreLogfile_, "ogre.log").description("Logfile for messages from Ogre. Use \"\" to suppress log file creation.");
     81    SetConfigValue(ogreLogLevelTrivial_ , 5).description("Corresponding orxonox debug level for ogre Trivial");
     82    SetConfigValue(ogreLogLevelNormal_  , 4).description("Corresponding orxonox debug level for ogre Normal");
     83    SetConfigValue(ogreLogLevelCritical_, 2).description("Corresponding orxonox debug level for ogre Critical");
    7384  }
    7485
     
    102113    }
    103114    COUT(4) << "Destroying objects done" << std::endl;
    104   }
    105 
    106   void GraphicsEngine::setConfigValues()
    107   {
    108     SetConfigValue(dataPath_, "../../Media/").description("relative path to media data");
    109     SetConfigValue(ogreLogfile_, "ogre.log").description("Logfile for messages from Ogre. Use \"\" to suppress log file creation.");
    110     SetConfigValue(ogreLogLevelTrivial_ , 5).description("Corresponding orxonox debug level for ogre Trivial");
    111     SetConfigValue(ogreLogLevelNormal_  , 4).description("Corresponding orxonox debug level for ogre Normal");
    112     SetConfigValue(ogreLogLevelCritical_, 2).description("Corresponding orxonox debug level for ogre Critical");
    113115  }
    114116
Note: See TracChangeset for help on using the changeset viewer.