Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Apr 12, 2008, 4:08:29 PM (17 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/src/orxonox/objects
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • 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()),
Note: See TracChangeset for help on using the changeset viewer.