Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 1032


Ignore:
Timestamp:
Apr 12, 2008, 4:08:29 PM (16 years ago)
Author:
rgrieder
Message:
  • singletonized GraphicsEngine —> Orxonox.h has to included only twice —> better compile performance —> Everything graphic related can now be accessed with GraphicsEngine::getSingleton()
  • asylumized Fighter (SpaceShip with weapon system integrated)
  • removed weapon system from build
Location:
code/trunk
Files:
20 edited
2 moved

Legend:

Unmodified
Added
Removed
  • code/trunk/bin/levels/sample.oxw

    r1021 r1032  
    1515<Skybox src="Orxonox/StarSkyBox" />
    1616
    17 <!--Fighter camera="true" position="0,0,0" scale="10" yawpitchroll="-90,-90,0" mesh="assf3.mesh"  forward="500" rotateupdown="200" rotaterightleft="200" looprightleft="200" /-->
    1817<SpaceShip camera="true" position="0,0,0" scale="10" yawpitchroll="-90,-90,0" mesh="assf3.mesh" maxSpeed="500" maxSideAndBackSpeed="50" maxRotation="1.0" transAcc="200" rotAcc="3.0" transDamp="75" rotDamp="1.0" />
    1918
  • code/trunk/src/asylum/orxonox/objects/Fighter.cc

    r1029 r1032  
    3838#include "util/String2Number.h"
    3939#include "core/CoreIncludes.h"
    40 #include "Orxonox.h"
     40#include "GraphicsEngine.h"
    4141#include "core/InputManager.h"
    4242#include "particle/ParticleInterface.h"
     
    129129
    130130#if 0
    131         w = new particle::ParticleInterface(Orxonox::getSingleton()->getSceneManager(),"schuss" + this->getName(),"Orxonox/schuss");
     131        w = new particle::ParticleInterface(GraphicsEngine::getSingleton().getSceneManager(),"schuss" + this->getName(),"Orxonox/schuss");
    132132        w->getParticleSystem()->setParameter("local_space","true");
    133133        w->newEmitter();
     
    148148#endif
    149149
    150         tt = new ParticleInterface(Orxonox::getSingleton()->getSceneManager(),"twinthruster" + this->getName(),"Orxonox/engineglow");
     150        tt = new ParticleInterface(GraphicsEngine::getSingleton().getSceneManager(),"twinthruster" + this->getName(),"Orxonox/engineglow");
    151151        tt->getParticleSystem()->setParameter("local_space","true");
    152152        tt->newEmitter();
     
    173173        mainWeapon_ = new BarrelGun();
    174174        mainWeapon_->setAmmoDump(ammoDump_);
    175         Orxonox::getSingleton()->getSceneManager()->getRootSceneNode()->removeChild(mainWeapon_->getNode());
     175        GraphicsEngine::getSingleton().getSceneManager()->getRootSceneNode()->removeChild(mainWeapon_->getNode());
    176176        getNode()->addChild(mainWeapon_->getNode());
    177177
     
    193193        if (xmlElem->Attribute("camera"))
    194194        {
    195             Ogre::Camera *cam = Orxonox::getSingleton()->getSceneManager()->createCamera("ShipCam");
     195            Ogre::Camera *cam = GraphicsEngine::getSingleton().getSceneManager()->createCamera("ShipCam");
    196196            Ogre::SceneNode *node = this->getNode()->createChildSceneNode("CamNode");
    197197/*
     
    208208
    209209            node->attachObject(cam);
    210             Orxonox::getSingleton()->getOgrePointer()->getRenderWindow()->addViewport(cam);
     210            GraphicsEngine::getSingleton().getRenderWindow()->addViewport(cam);
    211211        }
    212212    }
  • code/trunk/src/orxonox/CMakeLists.txt

    r1024 r1032  
    1313  objects/Camera.cc
    1414  objects/Explosion.cc
    15   objects/Fighter.cc
     15#  objects/Fighter.cc
    1616  objects/Model.cc
    1717  objects/NPC.cc
     
    2424#  objects/test3.cc
    2525  objects/WorldEntity.cc
    26   objects/weapon/AmmunitionDump.cc
    27   objects/weapon/BarrelGun.cc
    28   objects/weapon/BaseWeapon.cc
    29   objects/weapon/Bullet.cc
    30   objects/weapon/BulletManager.cc
    31   objects/weapon/WeaponStation.cc
     26#  objects/weapon/AmmunitionDump.cc
     27#  objects/weapon/BarrelGun.cc
     28#  objects/weapon/BaseWeapon.cc
     29#  objects/weapon/Bullet.cc
     30#  objects/weapon/BulletManager.cc
     31#  objects/weapon/WeaponStation.cc
    3232)
    3333
  • code/trunk/src/orxonox/GraphicsEngine.cc

    r1024 r1032  
    2222 *      Benjamin Knecht <beni_at_orxonox.net>, (C) 2007
    2323 *   Co-authors:
    24  *      ...
     24 *      Reto Grieder
    2525 *
    2626 */
     
    4141#include "core/CoreIncludes.h"
    4242#include "core/Debug.h"
     43
    4344#include "GraphicsEngine.h"
    4445
     
    4849  using namespace Ogre;
    4950
     51  /**
     52    @brief Returns the singleton instance and creates it the first time.
     53    @return The only instance of GraphicsEngine.
     54  */
     55  GraphicsEngine& GraphicsEngine::getSingleton()
     56  {
     57    static GraphicsEngine theOnlyInstance;
     58    return theOnlyInstance;
     59  }
     60
     61  /**
     62    @brief Only use constructor to initialise variables and pointers!
     63  */
    5064  GraphicsEngine::GraphicsEngine()
    5165  {
     
    5872    this->scene_ = 0;
    5973    this->renderWindow_ = 0;
    60   }
    61 
    62 
     74    COUT(4) << "*** GraphicsEngine: Constructed" << std::endl;
     75  }
     76
     77  /**
     78    @brief Called after main() --> call destroyObjects()!
     79  */
    6380  GraphicsEngine::~GraphicsEngine()
    6481  {
     82    this->destroy();
     83  }
     84
     85  /**
     86    @brief Destroys all the internal objects. Call this method when you
     87           normally would call the destructor.
     88  */
     89  void GraphicsEngine::destroy()
     90  {
     91    COUT(4) << "*** GraphicsEngine: Destroying objects..." << std::endl;
    6592    if (this->root_)
    6693      delete this->root_;
    67     // delete the ogre log and the logManager (sine we have created it).
     94    this->root_ = 0;
     95    this->scene_ = 0;
     96    this->renderWindow_ = 0;
     97    // delete the ogre log and the logManager (since we have created it).
    6898    if (LogManager::getSingletonPtr() != 0)
    6999    {
     
    72102      delete LogManager::getSingletonPtr();
    73103    }
     104    COUT(4) << "*** GraphicsEngine: Destroying objects done" << std::endl;
    74105  }
    75106
     
    78109    SetConfigValue(dataPath_, "../../media/").description("relative path to media data");
    79110    SetConfigValue(ogreLogfile_, "ogre.log").description("Logfile for messages from Ogre. Use \"\" to suppress log file creation.");
    80     SetConfigValue(ogreLogLevelTrivial_ , 5).description("relative path to media data");
    81     SetConfigValue(ogreLogLevelNormal_  , 4).description("relative path to media data");
    82     SetConfigValue(ogreLogLevelCritical_, 2).description("relative path to media data");
     111    SetConfigValue(ogreLogLevelTrivial_ , 5).description("Corresponding orxonox debug level for ogre Trivial");
     112    SetConfigValue(ogreLogLevelNormal_  , 4).description("Corresponding orxonox debug level for ogre Normal");
     113    SetConfigValue(ogreLogLevelCritical_, 2).description("Corresponding orxonox debug level for ogre Critical");
    83114  }
    84115
     
    107138    else
    108139      logger = LogManager::getSingletonPtr();
     140    COUT(4) << "*** GraphicsEngine: Ogre LogManager created/assigned" << std::endl;
    109141
    110142    // create our own log that we can listen to
     
    114146    else
    115147      myLog = logger->createLog(this->ogreLogfile_, true, false, false);
     148    COUT(4) << "*** GraphicsEngine: Ogre Log created" << std::endl;
    116149
    117150    myLog->setLogDetail(LL_BOREME);
     
    119152
    120153    // Root will detect that we've already created a Log
     154    COUT(4) << "*** GraphicsEngine: Creating Ogre Root..." << std::endl;
    121155    root_ = new Root(plugin_filename);
     156    COUT(4) << "*** GraphicsEngine: Creating Ogre Root done" << std::endl;
    122157  }
    123158
     
    192227    if (this->renderWindow_)
    193228    {
    194       Ogre::RenderWindow *renderWindow = this->root_->getAutoCreatedWindow();
    195229      size_t windowHnd = 0;
    196       renderWindow->getCustomAttribute("WINDOW", &windowHnd);
     230      this->renderWindow_->getCustomAttribute("WINDOW", &windowHnd);
    197231      return windowHnd;
    198232    }
     
    208242  {
    209243    if (this->renderWindow_)
    210     {
    211244      return this->renderWindow_->getWidth();
    212     }
    213245    else
    214246      return 0;
     
    222254  {
    223255    if (this->renderWindow_)
    224     {
    225256      return this->renderWindow_->getHeight();
    226     }
    227257    else
    228258      return 0;
  • code/trunk/src/orxonox/GraphicsEngine.h

    r1024 r1032  
    1212#include <OgrePrerequisites.h>
    1313#include <OgreLog.h>
    14 #include <OgreRoot.h>
    15 #include <OgreSceneManager.h>
    1614
    1715#include "OrxonoxPrereqs.h"
     
    2119namespace orxonox {
    2220
    23 /**
    24    * graphics engine manager class
    25  */
     21  /**
     22    @brief Graphics engine manager class
     23  */
    2624  class _OrxonoxExport GraphicsEngine : public OrxonoxClass, public Ogre::LogListener
    2725  {
     26    friend class ClassIdentifier<GraphicsEngine>;
    2827    public:
    29       GraphicsEngine();
    3028      void setConfigPath(std::string path) { this->configPath_ = path; };
    31       // find a better way for this
    32       //inline Ogre::Root* getRoot() { return root_; };
    3329      void setConfigValues();
    3430      void setup();
     
    3733      Ogre::SceneManager* getSceneManager();
    3834      void initialise();
     35      void destroy();
    3936
    4037      // several window properties
     
    4441      int getWindowHeight() const;
    4542
    46       // Ogre Root access for Orxonox
    47       void frameStarted(Ogre::FrameEvent &evt)
    48       { if (root_) root_->_fireFrameStarted(evt); }
    49       void frameEnded  (Ogre::FrameEvent &evt)
    50       { if (root_) root_->_fireFrameEnded(evt);   }
    51       void renderOneFrame()
    52       { if (root_) root_->_updateAllRenderTargets(); }
    53 
    54       virtual ~GraphicsEngine();
     43      static GraphicsEngine& getSingleton();
    5544
    5645    private:
     46      // don't mess with singletons
     47      GraphicsEngine();
     48      GraphicsEngine(GraphicsEngine&) { }
     49      ~GraphicsEngine();
     50
    5751      //! Method called by the LogListener from Ogre
    58       void messageLogged(const std::string& message, Ogre::LogMessageLevel lml,
    59                          bool maskDebug, const std::string &logName);
     52      void messageLogged(const std::string&, Ogre::LogMessageLevel,
     53                         bool, const std::string&);
    6054
    6155      Ogre::Root*         root_;        //!< Ogre's root
    62       std::string         configPath_;  //!< path to config file
    63       std::string         dataPath_;    //!< path to data file
    6456      Ogre::SceneManager* scene_;       //!< scene manager of the game
    6557      Ogre::RenderWindow* renderWindow_;//!< the current render window
    6658      //bool               bOverwritePath_; //!< overwrites path
     59      std::string         configPath_;  //!< path to config file
     60      std::string         dataPath_;    //!< path to data file
    6761      std::string         ogreLogfile_; //!< log file name for Ogre log messages
    6862      int ogreLogLevelTrivial_;         //!< Corresponding Orxonx debug level for LL_TRIVIAL
  • code/trunk/src/orxonox/Orxonox.cc

    r1028 r1032  
    2727
    2828/**
    29  @file  Orxonox.cc
     29 @file
    3030 @brief Orxonox Main Class
    3131 */
     
    3333// Precompiled Headers
    3434#include "OrxonoxStableHeaders.h"
     35
     36//****** STD *******
     37//#include <iostream>
     38//#include <exception>
     39#include <deque>
    3540
    3641//****** OGRE ******
     
    3944#include <OgreOverlay.h>
    4045#include <OgreOverlayManager.h>
     46#include <OgreRoot.h>
    4147#include <OgreTimer.h>
    4248#include <OgreWindowEventUtilities.h>
    4349
    44 //****** STD *******
    45 //#include <iostream>
    46 //#include <exception>
    47 #include <deque>
    48 
    4950//***** ORXONOX ****
    50 //misc
     51// util
    5152//#include "util/Sleep.h"
    5253#include "util/ArgReader.h"
    5354
    54 // audio
    55 #include "audio/AudioManager.h"
    56 
    57 // network
    58 #include "network/Server.h"
    59 #include "network/Client.h"
    60 network::Client *client_g;
    61 network::Server *server_g;
    62 
    63 // objects
     55// core
    6456#include "core/Debug.h"
    6557#include "core/Factory.h"
    6658#include "core/Loader.h"
    6759#include "core/Tickable.h"
     60#include "core/InputManager.h"
     61
     62// audio
     63#include "audio/AudioManager.h"
     64
     65// network
     66#include "network/Server.h"
     67#include "network/Client.h"
     68
     69// objects and tools
     70#include "tools/Timer.h"
    6871#include "hud/HUD.h"
    69 #include "tools/Timer.h"
    70 #include "objects/weapon/BulletManager.h"
    71 
    72 #include "core/InputManager.h"
     72//#include "objects/weapon/BulletManager.h"
    7373
    7474#include "Orxonox.h"
     75
     76// FIXME: is this really file scope?
     77// globals for the server or client
     78network::Client *client_g;
     79network::Server *server_g;
    7580
    7681namespace orxonox
     
    8691  Orxonox::Orxonox()
    8792  {
    88     this->ogre_ = new GraphicsEngine();
     93    this->ogre_ = &GraphicsEngine::getSingleton();
    8994    this->timer_ = 0;
    9095    this->dataPath_ = "";
     
    103108  {
    104109    // keep in mind: the order of deletion is very important!
    105     if (this->bulletMgr_)
    106       delete this->bulletMgr_;
     110//    if (this->bulletMgr_)
     111//      delete this->bulletMgr_;
    107112    if (this->orxonoxHUD_)
    108113      delete this->orxonoxHUD_;
     
    113118    if (this->timer_)
    114119      delete this->timer_;
    115     if (this->ogre_)
    116       delete this->ogre_;
     120    GraphicsEngine::getSingleton().destroy();
    117121
    118122    if (client_g)
     
    251255    auMan_ = new audio::AudioManager();
    252256
    253     bulletMgr_ = new BulletManager();
     257    //bulletMgr_ = new BulletManager();
    254258   
    255259    Ogre::Overlay* hudOverlay = Ogre::OverlayManager::getSingleton().getByName("Orxonox/HUD1.2");
     
    298302    auMan_ = new audio::AudioManager();
    299303
    300     bulletMgr_ = new BulletManager();
     304    //bulletMgr_ = new BulletManager();
    301305
    302306    // load this file from config
     
    342346    About the loop: The design is almost exactly like the one in ogre, so that
    343347    if any part of ogre registers a framelisteners, it will still behave
    344     correctly. Furthermore I have taken over the time smoothing feature from
    345     ogre. If turned on (see orxonox constructor), it will calculate the dt_n by
    346     means of the recent most dt_n-1, dt_n-2, etc.
     348    correctly. Furthermore the time smoothing feature from ogre has been
     349    implemented too. If turned on (see orxonox constructor), it will calculate
     350    the dt_n by means of the recent most dt_n-1, dt_n-2, etc.
    347351  */
    348352  void Orxonox::startRenderLoop()
    349353  {
     354    // first check whether ogre root object has been created
     355    if (Ogre::Root::getSingletonPtr() == 0)
     356    {
     357      COUT(2) << "Error: Could not start rendering. No Ogre root object found" << std::endl;
     358      return;
     359    }
     360
    350361    // Contains the times of recently fired events
    351362    // eventTimes[4] is the list for the times required for the fps counter
     
    389400      // don't forget to call _fireFrameStarted in ogre to make sure
    390401      // everything goes smoothly
    391       ogre_->frameStarted(evt);
     402      Ogre::Root::getSingleton()._fireFrameStarted(evt);
    392403
    393404      // server still renders at the moment
    394405      //if (mode_ != SERVER)
    395       ogre_->renderOneFrame(); // only render in non-server mode
     406      Ogre::Root::getSingleton()._updateAllRenderTargets(); // only render in non-server mode
    396407
    397408      // get current time
     
    403414
    404415      // again, just to be sure ogre works fine
    405       ogre_->frameEnded(evt);
     416      Ogre::Root::getSingleton()._fireFrameEnded(evt);
    406417          }
    407418  }
  • code/trunk/src/orxonox/Orxonox.h

    r1024 r1032  
    1111
    1212#include <OgrePrerequisites.h>
    13 //#include <OIS/OISPrereqs.h>
    1413
    1514#include "OrxonoxPrereqs.h"
     
    2019
    2120
    22 // TODO: Orxonox should maybe derive from BaseObject
    23 //! Orxonox singleton class
    2421namespace orxonox {
    2522
     
    3027  };
    3128
     29  //! Orxonox singleton class
    3230  class _OrxonoxExport Orxonox : public InputEventListener
    3331  {
     
    3836      void abortImmediate(/* some error code */);
    3937      void abortRequest();
    40       inline Ogre::SceneManager*  getSceneManager()        { return ogre_->getSceneManager(); };
    41       inline GraphicsEngine*      getOgrePointer()         { return ogre_; };
    4238      inline audio::AudioManager* getAudioManagerPointer() { return auMan_; };
    43       inline BulletManager*       getBulletMgr()           { return this->bulletMgr_; }
    4439
    4540      static Orxonox* getSingleton();
     
    7469      std::string           dataPath_;      //!< path to data
    7570      audio::AudioManager*  auMan_;         //!< audio manager
    76       BulletManager*        bulletMgr_;     //!< Keeps track of the thrown bullets
    7771      InputManager*         inputHandler_;  //!< Handles input with key bindings
    78       Ogre::Root*           root_;          //!< Holy grail of Ogre
    7972      Ogre::Timer*          timer_;         //!< Main loop timer
    8073      // TODO: make this a config-value by creating a config class for orxonox
    8174      float                 frameSmoothingTime_;
    82       // little hack to actually show something dynamic in the HUD
    8375      HUD*                  orxonoxHUD_;
    8476      bool                  bAbort_;        //!< aborts the render loop if true
  • code/trunk/src/orxonox/OrxonoxPlatform.h

    r1024 r1032  
    2222 *      An unknown man from the Ogre development crew
    2323 *   Co-authors:
    24  *      Reto Grieder (OGRE --> ORXONOX)
     24 *      Reto Grieder
    2525 *
    2626 */
    2727
    2828/**
    29  @file  OrxonoxPlatform.h
     29 @file
    3030 @brief Various constants for compiler, architecture and platform. It's a mere
    3131        copy of the file found in the Ogre source code (OgrePlatform.h).
     
    108108// As a side note, if you start your message with 'Warning: ', the MSVC
    109109// IDE actually does catch a warning :)
    110 #define ORXONOX_QUOTE_INPLACE(x) # x
    111 #define ORXONOX_QUOTE(x) ORXONOX_QUOTE_INPLACE(x)
    112 #define ORXONOX_WARN( x )  message( __FILE__ "(" QUOTE( __LINE__ ) ") : " x "\n" )
     110// FIXME: Try this on linux box. Doesn't work with msvc
     111//#define ORXONOX_QUOTE_INPLACE(x) # x
     112//#define ORXONOX_QUOTE(x) ORXONOX_QUOTE_INPLACE(x)
     113//#define ORXONOX_WARN( x )  message( __FILE__ "(" QUOTE( __LINE__ ) ") : " x "\n" )
    113114
    114115//----------------------------------------------------------------------------
     
    137138#  endif
    138139
    139 #endif
     140#endif /* Platform Win32 */
    140141//----------------------------------------------------------------------------
    141142
     
    171172#  define ORXONOX_UNICODE_SUPPORT 1
    172173
    173 #endif
     174#endif /* Patform Linux/Apple */
    174175
    175176//For apple, we always have a custom config.h file
     
    191192// Integer formats of fixed bit width
    192193// FIXME: consider 64 bit platforms!
    193 /*typedef unsigned int uint32;
    194 typedef unsigned short uint16;
    195 typedef unsigned char uint8;*/
     194//typedef unsigned int uint32;
     195//typedef unsigned short uint16;
     196//typedef unsigned char uint8;
    196197
    197198#ifdef ORXONOX_DOUBLE_PRECISION
     
    261262//#   pragma warning (disable : 201)
    262263
    263 #endif
    264 
    265264
    266265// Define the english written operators like and, or, xor
    267 #if ORXONOX_COMPILER == ORXONOX_COMPILER_MSVC
    268 #  include <iso646.h>
    269 #endif
     266#include <iso646.h>
     267
     268#endif /* ORXONOX_COMPILER == ORXONOX_COMPILER_MSVC */
     269
     270// include visual leak detector to search for memory leaks
     271//#include <vld.h>
    270272
    271273} /* namespace orxonox */
    272274
    273 // include visual leak detector to search for memory links
    274 //#include <vld.h>
    275 
    276275#endif /* _OrxonoxPlatform_H__ */
  • code/trunk/src/orxonox/OrxonoxStableHeaders.h

    r1024 r1032  
    114114#include "objects/WorldEntity.h"
    115115
    116 #endif
     116#endif /* Compiler MSVC */
    117117
    118118#endif /* _OrxonoxStableHeaders_H__ */
  • code/trunk/src/orxonox/objects/Ambient.cc

    r871 r1032  
    3737#include "util/String2Number.h"
    3838#include "util/Math.h"
    39 #include "../core/Debug.h"
    40 #include "../core/CoreIncludes.h"
    41 #include "../Orxonox.h"
     39#include "core/Debug.h"
     40#include "core/CoreIncludes.h"
     41#include "GraphicsEngine.h"
    4242#include "core/XMLPort.h"
    4343
     
    7676   void Ambient::setAmbientLight(const ColourValue& colour)
    7777   {
    78         Orxonox::getSingleton()->getSceneManager()->setAmbientLight(colour);
     78        GraphicsEngine::getSingleton().getSceneManager()->setAmbientLight(colour);
    7979   }
    8080
  • code/trunk/src/orxonox/objects/Camera.cc

    r1021 r1032  
    1313#include "util/String2Number.h"
    1414#include "util/Math.h"
    15 #include "../core/Debug.h"
    16 #include "../core/CoreIncludes.h"
    17 #include "../Orxonox.h"
    18 #include "../GraphicsEngine.h"
     15#include "core/Debug.h"
     16#include "core/CoreIncludes.h"
     17#include "GraphicsEngine.h"
    1918
    2019#include "Camera.h"
     
    3534    void Camera::loadParams(TiXmlElement* xmlElem)
    3635    {
    37       Ogre::SceneManager* mgr = orxonox::Orxonox::getSingleton()->getSceneManager();
     36      Ogre::SceneManager* mgr = GraphicsEngine::getSingleton().getSceneManager();
    3837
    3938      if (xmlElem->Attribute("name") && xmlElem->Attribute("pos") && xmlElem->Attribute("lookat") && xmlElem->Attribute("node"))
     
    6867
    6968        // FIXME: unused var
    70         Ogre::Viewport* vp = orxonox::Orxonox::getSingleton()->getOgrePointer()->getRenderWindow()->addViewport(cam);
     69        Ogre::Viewport* vp = GraphicsEngine::getSingleton().getRenderWindow()->addViewport(cam);
    7170
    7271
  • code/trunk/src/orxonox/objects/Explosion.cc

    r790 r1032  
    3232#include <OgreSceneNode.h>
    3333
    34 #include "../core/CoreIncludes.h"
     34#include "core/CoreIncludes.h"
    3535#include "util/Math.h"
    36 #include "../Orxonox.h"
    37 #include "../particle/ParticleInterface.h"
     36#include "GraphicsEngine.h"
     37#include "particle/ParticleInterface.h"
    3838
    3939#include "Explosion.h"
     
    5656            Vector3 position = owner->getNode()->getWorldPosition();
    5757
    58             this->particle_ = new ParticleInterface(Orxonox::getSingleton()->getSceneManager(), "explosion" + this->getName(), "Orxonox/treibwerk");
     58            this->particle_ = new ParticleInterface(GraphicsEngine::getSingleton().getSceneManager(), "explosion" + this->getName(), "Orxonox/treibwerk");
    5959            this->particle_->getParticleSystem()->setParameter("local_space", "true");
    6060            this->particle_->newEmitter();
  • code/trunk/src/orxonox/objects/Model.cc

    r1021 r1032  
    3131#include "util/Tokenizer.h"
    3232#include "util/String2Number.h"
    33 #include "../core/CoreIncludes.h"
    34 #include "../Orxonox.h"
     33#include "core/CoreIncludes.h"
     34#include "GraphicsEngine.h"
    3535#include "core/XMLPort.h"
    3636
  • code/trunk/src/orxonox/objects/Skybox.cc

    r871 r1032  
    3535//#include "util/Tokenizer.h"
    3636//#include "util/String2Number.h"
    37 #include "../Orxonox.h"
    38 #include "../core/CoreIncludes.h"
    39 #include "../core/Debug.h"
     37#include "GraphicsEngine.h"
     38#include "core/CoreIncludes.h"
     39#include "core/Debug.h"
    4040#include "core/XMLPort.h"
    4141
     
    6868   void Skybox::setSkybox(const std::string& skyboxname)
    6969   {
    70         Orxonox::getSingleton()->getSceneManager()->setSkyBox(true, skyboxname);
     70        GraphicsEngine::getSingleton().getSceneManager()->setSkyBox(true, skyboxname);
    7171   }
    7272
  • code/trunk/src/orxonox/objects/SpaceShip.cc

    r1024 r1032  
    4141#include "core/CoreIncludes.h"
    4242#include "core/Debug.h"
    43 #include "Orxonox.h"
     43#include "GraphicsEngine.h"
    4444#include "core/InputManager.h"
    4545#include "particle/ParticleInterface.h"
     
    156156    {
    157157        // START CREATING THRUSTER
    158         this->tt_ = new ParticleInterface(Orxonox::getSingleton()->getSceneManager(),"twinthruster" + this->getName(),"Orxonox/engineglow");
     158        this->tt_ = new ParticleInterface(GraphicsEngine::getSingleton().getSceneManager(),"twinthruster" + this->getName(),"Orxonox/engineglow");
    159159        this->tt_->getParticleSystem()->setParameter("local_space","true");
    160160        this->tt_->newEmitter();
     
    271271    void SpaceShip::setCamera(const std::string& camera)
    272272    {
    273         Ogre::Camera *cam = Orxonox::getSingleton()->getSceneManager()->createCamera("ShipCam");
     273        Ogre::Camera *cam = GraphicsEngine::getSingleton().getSceneManager()->createCamera("ShipCam");
    274274        this->camNode_ = this->getNode()->createChildSceneNode("CamNode");
    275275/*
     
    286286
    287287        this->camNode_->attachObject(cam);
    288         Orxonox::getSingleton()->getOgrePointer()->getRenderWindow()->addViewport(cam);
     288        GraphicsEngine::getSingleton().getRenderWindow()->addViewport(cam);
    289289    }
    290290
  • code/trunk/src/orxonox/objects/WorldEntity.cc

    r1021 r1032  
    3434#include "util/Tokenizer.h"
    3535#include "util/String2Number.h"
    36 #include "../core/CoreIncludes.h"
    37 #include "../Orxonox.h"
     36#include "core/CoreIncludes.h"
     37#include "GraphicsEngine.h"
    3838#include "WorldEntity.h"
    3939#include "core/XMLPort.h"
     
    5858        this->momentum_ = 0;
    5959       
    60         if (Orxonox::getSingleton()->getSceneManager())
     60        if (GraphicsEngine::getSingleton().getSceneManager())
    6161        {
    6262          std::ostringstream name;
    6363          name << (WorldEntity::worldEntityCounter_s++);
    6464          this->setName("WorldEntity" + name.str());
    65           this->node_ = Orxonox::getSingleton()->getSceneManager()->getRootSceneNode()->createChildSceneNode(this->getName());
     65          this->node_ = GraphicsEngine::getSingleton().getSceneManager()->getRootSceneNode()->createChildSceneNode(this->getName());
    6666       
    6767          registerAllVariables();
  • code/trunk/src/orxonox/objects/weapon/BaseWeapon.cc

    r871 r1032  
    3434
    3535#include "util/Math.h"
    36 #include "../../Orxonox.h"
     36#include "Orxonox.h"
    3737#include "Bullet.h"
    3838#include "BulletManager.h"
     
    4747
    4848  BaseWeapon::BaseWeapon()
    49     : sceneMgr_(Orxonox::getSingleton()->getSceneManager()),
     49    : sceneMgr_(GraphicsEngine::getSingleton().getSceneManager()),
    5050      bulletCounter_(0),
    5151      bulletManager_(Orxonox::getSingleton()->getBulletMgr()),
  • code/trunk/src/orxonox/tools/BillboardSet.cc

    r790 r1032  
    3232#include <OgreSceneManager.h>
    3333
    34 #include "../Orxonox.h"
     34#include "GraphicsEngine.h"
    3535#include "util/Math.h"
    3636
     
    5050        std::ostringstream name;
    5151        name << (BillboardSet::billboardSetCounter_s++);
    52         this->billboardSet_ = Orxonox::getSingleton()->getSceneManager()->createBillboardSet("Billboard" + name.str(), count);
     52        this->billboardSet_ = GraphicsEngine::getSingleton().getSceneManager()->createBillboardSet("Billboard" + name.str(), count);
    5353        this->billboardSet_->createBillboard(position, colour);
    5454        this->billboardSet_->setMaterialName(file);
     
    5858    {
    5959        if (this->billboardSet_)
    60             Orxonox::getSingleton()->getSceneManager()->destroyBillboardSet(this->billboardSet_);
     60            GraphicsEngine::getSingleton().getSceneManager()->destroyBillboardSet(this->billboardSet_);
    6161    }
    6262}
  • code/trunk/src/orxonox/tools/Light.cc

    r790 r1032  
    55#include <OgreSceneManager.h>
    66
    7 #include "../Orxonox.h"
     7#include "GraphicsEngine.h"
    88
    99#include "Light.h"
     
    2222        std::ostringstream name;
    2323        name << (Light::lightCounter_s++);
    24         this->light_ = Orxonox::getSingleton()->getSceneManager()->createLight("Light" + name.str());
     24        this->light_ = GraphicsEngine::getSingleton().getSceneManager()->createLight("Light" + name.str());
    2525        this->light_->setType(type);
    2626        this->light_->setDiffuseColour(diffuse);
     
    3131    {
    3232        if (this->light_)
    33             Orxonox::getSingleton()->getSceneManager()->destroyLight(this->light_);
     33            GraphicsEngine::getSingleton().getSceneManager()->destroyLight(this->light_);
    3434    }
    3535}
  • code/trunk/src/orxonox/tools/Mesh.cc

    r790 r1032  
    3232#include <OgreSceneManager.h>
    3333
    34 #include "../Orxonox.h"
     34#include "GraphicsEngine.h"
    3535
    3636#include "Mesh.h"
     
    4949        std::ostringstream name;
    5050        name << (Mesh::meshCounter_s++);
    51         this->entity_ = Orxonox::getSingleton()->getSceneManager()->createEntity("Mesh" + name.str(), file);
     51        this->entity_ = GraphicsEngine::getSingleton().getSceneManager()->createEntity("Mesh" + name.str(), file);
    5252    }
    5353
     
    5555    {
    5656        if (this->entity_)
    57             Orxonox::getSingleton()->getSceneManager()->destroyEntity(this->entity_);
     57            GraphicsEngine::getSingleton().getSceneManager()->destroyEntity(this->entity_);
    5858    }
    5959}
  • code/trunk/visual_studio/vc8/orxonox.vcproj

    r1024 r1032  
    208208                                </File>
    209209                                <File
    210                                         RelativePath="..\..\src\orxonox\objects\Fighter.cc"
    211                                         >
    212                                 </File>
    213                                 <File
    214210                                        RelativePath="..\..\src\orxonox\objects\Model.cc"
    215211                                        >
     
    241237                                                RelativePath="..\..\src\orxonox\objects\weapon\AmmunitionDump.cc"
    242238                                                >
     239                                                <FileConfiguration
     240                                                        Name="Debug|Win32"
     241                                                        ExcludedFromBuild="true"
     242                                                        >
     243                                                        <Tool
     244                                                                Name="VCCLCompilerTool"
     245                                                        />
     246                                                </FileConfiguration>
    243247                                        </File>
    244248                                        <File
    245249                                                RelativePath="..\..\src\orxonox\objects\weapon\BarrelGun.cc"
    246250                                                >
     251                                                <FileConfiguration
     252                                                        Name="Debug|Win32"
     253                                                        ExcludedFromBuild="true"
     254                                                        >
     255                                                        <Tool
     256                                                                Name="VCCLCompilerTool"
     257                                                        />
     258                                                </FileConfiguration>
    247259                                        </File>
    248260                                        <File
    249261                                                RelativePath="..\..\src\orxonox\objects\weapon\BaseWeapon.cc"
    250262                                                >
     263                                                <FileConfiguration
     264                                                        Name="Debug|Win32"
     265                                                        ExcludedFromBuild="true"
     266                                                        >
     267                                                        <Tool
     268                                                                Name="VCCLCompilerTool"
     269                                                        />
     270                                                </FileConfiguration>
    251271                                        </File>
    252272                                        <File
    253273                                                RelativePath="..\..\src\orxonox\objects\weapon\Bullet.cc"
    254274                                                >
     275                                                <FileConfiguration
     276                                                        Name="Debug|Win32"
     277                                                        ExcludedFromBuild="true"
     278                                                        >
     279                                                        <Tool
     280                                                                Name="VCCLCompilerTool"
     281                                                        />
     282                                                </FileConfiguration>
    255283                                        </File>
    256284                                        <File
    257285                                                RelativePath="..\..\src\orxonox\objects\weapon\BulletManager.cc"
    258286                                                >
     287                                                <FileConfiguration
     288                                                        Name="Debug|Win32"
     289                                                        ExcludedFromBuild="true"
     290                                                        >
     291                                                        <Tool
     292                                                                Name="VCCLCompilerTool"
     293                                                        />
     294                                                </FileConfiguration>
    259295                                        </File>
    260296                                        <File
    261297                                                RelativePath="..\..\src\orxonox\objects\weapon\WeaponStation.cc"
    262298                                                >
     299                                                <FileConfiguration
     300                                                        Name="Debug|Win32"
     301                                                        ExcludedFromBuild="true"
     302                                                        >
     303                                                        <Tool
     304                                                                Name="VCCLCompilerTool"
     305                                                        />
     306                                                </FileConfiguration>
    263307                                        </File>
    264308                                </Filter>
     
    339383                                <File
    340384                                        RelativePath="..\..\src\orxonox\objects\Explosion.h"
    341                                         >
    342                                 </File>
    343                                 <File
    344                                         RelativePath="..\..\src\orxonox\objects\Fighter.h"
    345385                                        >
    346386                                </File>
Note: See TracChangeset for help on using the changeset viewer.