Changeset 1032 for code/trunk/src/orxonox
- Timestamp:
- Apr 12, 2008, 4:08:29 PM (17 years ago)
- Location:
- code/trunk/src/orxonox
- Files:
-
- 18 edited
Legend:
- Unmodified
- Added
- Removed
-
code/trunk/src/orxonox/CMakeLists.txt
r1024 r1032 13 13 objects/Camera.cc 14 14 objects/Explosion.cc 15 objects/Fighter.cc15 # objects/Fighter.cc 16 16 objects/Model.cc 17 17 objects/NPC.cc … … 24 24 # objects/test3.cc 25 25 objects/WorldEntity.cc 26 objects/weapon/AmmunitionDump.cc27 objects/weapon/BarrelGun.cc28 objects/weapon/BaseWeapon.cc29 objects/weapon/Bullet.cc30 objects/weapon/BulletManager.cc31 objects/weapon/WeaponStation.cc26 # 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 32 32 ) 33 33 -
code/trunk/src/orxonox/GraphicsEngine.cc
r1024 r1032 22 22 * Benjamin Knecht <beni_at_orxonox.net>, (C) 2007 23 23 * Co-authors: 24 * ...24 * Reto Grieder 25 25 * 26 26 */ … … 41 41 #include "core/CoreIncludes.h" 42 42 #include "core/Debug.h" 43 43 44 #include "GraphicsEngine.h" 44 45 … … 48 49 using namespace Ogre; 49 50 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 */ 50 64 GraphicsEngine::GraphicsEngine() 51 65 { … … 58 72 this->scene_ = 0; 59 73 this->renderWindow_ = 0; 60 } 61 62 74 COUT(4) << "*** GraphicsEngine: Constructed" << std::endl; 75 } 76 77 /** 78 @brief Called after main() --> call destroyObjects()! 79 */ 63 80 GraphicsEngine::~GraphicsEngine() 64 81 { 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; 65 92 if (this->root_) 66 93 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). 68 98 if (LogManager::getSingletonPtr() != 0) 69 99 { … … 72 102 delete LogManager::getSingletonPtr(); 73 103 } 104 COUT(4) << "*** GraphicsEngine: Destroying objects done" << std::endl; 74 105 } 75 106 … … 78 109 SetConfigValue(dataPath_, "../../media/").description("relative path to media data"); 79 110 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"); 83 114 } 84 115 … … 107 138 else 108 139 logger = LogManager::getSingletonPtr(); 140 COUT(4) << "*** GraphicsEngine: Ogre LogManager created/assigned" << std::endl; 109 141 110 142 // create our own log that we can listen to … … 114 146 else 115 147 myLog = logger->createLog(this->ogreLogfile_, true, false, false); 148 COUT(4) << "*** GraphicsEngine: Ogre Log created" << std::endl; 116 149 117 150 myLog->setLogDetail(LL_BOREME); … … 119 152 120 153 // Root will detect that we've already created a Log 154 COUT(4) << "*** GraphicsEngine: Creating Ogre Root..." << std::endl; 121 155 root_ = new Root(plugin_filename); 156 COUT(4) << "*** GraphicsEngine: Creating Ogre Root done" << std::endl; 122 157 } 123 158 … … 192 227 if (this->renderWindow_) 193 228 { 194 Ogre::RenderWindow *renderWindow = this->root_->getAutoCreatedWindow();195 229 size_t windowHnd = 0; 196 renderWindow->getCustomAttribute("WINDOW", &windowHnd);230 this->renderWindow_->getCustomAttribute("WINDOW", &windowHnd); 197 231 return windowHnd; 198 232 } … … 208 242 { 209 243 if (this->renderWindow_) 210 {211 244 return this->renderWindow_->getWidth(); 212 }213 245 else 214 246 return 0; … … 222 254 { 223 255 if (this->renderWindow_) 224 {225 256 return this->renderWindow_->getHeight(); 226 }227 257 else 228 258 return 0; -
code/trunk/src/orxonox/GraphicsEngine.h
r1024 r1032 12 12 #include <OgrePrerequisites.h> 13 13 #include <OgreLog.h> 14 #include <OgreRoot.h>15 #include <OgreSceneManager.h>16 14 17 15 #include "OrxonoxPrereqs.h" … … 21 19 namespace orxonox { 22 20 23 /**24 * graphics engine manager class25 */21 /** 22 @brief Graphics engine manager class 23 */ 26 24 class _OrxonoxExport GraphicsEngine : public OrxonoxClass, public Ogre::LogListener 27 25 { 26 friend class ClassIdentifier<GraphicsEngine>; 28 27 public: 29 GraphicsEngine();30 28 void setConfigPath(std::string path) { this->configPath_ = path; }; 31 // find a better way for this32 //inline Ogre::Root* getRoot() { return root_; };33 29 void setConfigValues(); 34 30 void setup(); … … 37 33 Ogre::SceneManager* getSceneManager(); 38 34 void initialise(); 35 void destroy(); 39 36 40 37 // several window properties … … 44 41 int getWindowHeight() const; 45 42 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(); 55 44 56 45 private: 46 // don't mess with singletons 47 GraphicsEngine(); 48 GraphicsEngine(GraphicsEngine&) { } 49 ~GraphicsEngine(); 50 57 51 //! 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&); 60 54 61 55 Ogre::Root* root_; //!< Ogre's root 62 std::string configPath_; //!< path to config file63 std::string dataPath_; //!< path to data file64 56 Ogre::SceneManager* scene_; //!< scene manager of the game 65 57 Ogre::RenderWindow* renderWindow_;//!< the current render window 66 58 //bool bOverwritePath_; //!< overwrites path 59 std::string configPath_; //!< path to config file 60 std::string dataPath_; //!< path to data file 67 61 std::string ogreLogfile_; //!< log file name for Ogre log messages 68 62 int ogreLogLevelTrivial_; //!< Corresponding Orxonx debug level for LL_TRIVIAL -
code/trunk/src/orxonox/Orxonox.cc
r1028 r1032 27 27 28 28 /** 29 @file Orxonox.cc29 @file 30 30 @brief Orxonox Main Class 31 31 */ … … 33 33 // Precompiled Headers 34 34 #include "OrxonoxStableHeaders.h" 35 36 //****** STD ******* 37 //#include <iostream> 38 //#include <exception> 39 #include <deque> 35 40 36 41 //****** OGRE ****** … … 39 44 #include <OgreOverlay.h> 40 45 #include <OgreOverlayManager.h> 46 #include <OgreRoot.h> 41 47 #include <OgreTimer.h> 42 48 #include <OgreWindowEventUtilities.h> 43 49 44 //****** STD *******45 //#include <iostream>46 //#include <exception>47 #include <deque>48 49 50 //***** ORXONOX **** 50 // misc51 // util 51 52 //#include "util/Sleep.h" 52 53 #include "util/ArgReader.h" 53 54 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 64 56 #include "core/Debug.h" 65 57 #include "core/Factory.h" 66 58 #include "core/Loader.h" 67 59 #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" 68 71 #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" 73 73 74 74 #include "Orxonox.h" 75 76 // FIXME: is this really file scope? 77 // globals for the server or client 78 network::Client *client_g; 79 network::Server *server_g; 75 80 76 81 namespace orxonox … … 86 91 Orxonox::Orxonox() 87 92 { 88 this->ogre_ = new GraphicsEngine();93 this->ogre_ = &GraphicsEngine::getSingleton(); 89 94 this->timer_ = 0; 90 95 this->dataPath_ = ""; … … 103 108 { 104 109 // 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_; 107 112 if (this->orxonoxHUD_) 108 113 delete this->orxonoxHUD_; … … 113 118 if (this->timer_) 114 119 delete this->timer_; 115 if (this->ogre_) 116 delete this->ogre_; 120 GraphicsEngine::getSingleton().destroy(); 117 121 118 122 if (client_g) … … 251 255 auMan_ = new audio::AudioManager(); 252 256 253 bulletMgr_ = new BulletManager();257 //bulletMgr_ = new BulletManager(); 254 258 255 259 Ogre::Overlay* hudOverlay = Ogre::OverlayManager::getSingleton().getByName("Orxonox/HUD1.2"); … … 298 302 auMan_ = new audio::AudioManager(); 299 303 300 bulletMgr_ = new BulletManager();304 //bulletMgr_ = new BulletManager(); 301 305 302 306 // load this file from config … … 342 346 About the loop: The design is almost exactly like the one in ogre, so that 343 347 if any part of ogre registers a framelisteners, it will still behave 344 correctly. Furthermore I have taken over the time smoothing feature from345 ogre. If turned on (see orxonox constructor), it will calculate the dt_n by346 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. 347 351 */ 348 352 void Orxonox::startRenderLoop() 349 353 { 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 350 361 // Contains the times of recently fired events 351 362 // eventTimes[4] is the list for the times required for the fps counter … … 389 400 // don't forget to call _fireFrameStarted in ogre to make sure 390 401 // everything goes smoothly 391 ogre_->frameStarted(evt);402 Ogre::Root::getSingleton()._fireFrameStarted(evt); 392 403 393 404 // server still renders at the moment 394 405 //if (mode_ != SERVER) 395 ogre_->renderOneFrame(); // only render in non-server mode406 Ogre::Root::getSingleton()._updateAllRenderTargets(); // only render in non-server mode 396 407 397 408 // get current time … … 403 414 404 415 // again, just to be sure ogre works fine 405 ogre_->frameEnded(evt);416 Ogre::Root::getSingleton()._fireFrameEnded(evt); 406 417 } 407 418 } -
code/trunk/src/orxonox/Orxonox.h
r1024 r1032 11 11 12 12 #include <OgrePrerequisites.h> 13 //#include <OIS/OISPrereqs.h>14 13 15 14 #include "OrxonoxPrereqs.h" … … 20 19 21 20 22 // TODO: Orxonox should maybe derive from BaseObject23 //! Orxonox singleton class24 21 namespace orxonox { 25 22 … … 30 27 }; 31 28 29 //! Orxonox singleton class 32 30 class _OrxonoxExport Orxonox : public InputEventListener 33 31 { … … 38 36 void abortImmediate(/* some error code */); 39 37 void abortRequest(); 40 inline Ogre::SceneManager* getSceneManager() { return ogre_->getSceneManager(); };41 inline GraphicsEngine* getOgrePointer() { return ogre_; };42 38 inline audio::AudioManager* getAudioManagerPointer() { return auMan_; }; 43 inline BulletManager* getBulletMgr() { return this->bulletMgr_; }44 39 45 40 static Orxonox* getSingleton(); … … 74 69 std::string dataPath_; //!< path to data 75 70 audio::AudioManager* auMan_; //!< audio manager 76 BulletManager* bulletMgr_; //!< Keeps track of the thrown bullets77 71 InputManager* inputHandler_; //!< Handles input with key bindings 78 Ogre::Root* root_; //!< Holy grail of Ogre79 72 Ogre::Timer* timer_; //!< Main loop timer 80 73 // TODO: make this a config-value by creating a config class for orxonox 81 74 float frameSmoothingTime_; 82 // little hack to actually show something dynamic in the HUD83 75 HUD* orxonoxHUD_; 84 76 bool bAbort_; //!< aborts the render loop if true -
code/trunk/src/orxonox/OrxonoxPlatform.h
r1024 r1032 22 22 * An unknown man from the Ogre development crew 23 23 * Co-authors: 24 * Reto Grieder (OGRE --> ORXONOX)24 * Reto Grieder 25 25 * 26 26 */ 27 27 28 28 /** 29 @file OrxonoxPlatform.h29 @file 30 30 @brief Various constants for compiler, architecture and platform. It's a mere 31 31 copy of the file found in the Ogre source code (OgrePlatform.h). … … 108 108 // As a side note, if you start your message with 'Warning: ', the MSVC 109 109 // 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" ) 113 114 114 115 //---------------------------------------------------------------------------- … … 137 138 # endif 138 139 139 #endif 140 #endif /* Platform Win32 */ 140 141 //---------------------------------------------------------------------------- 141 142 … … 171 172 # define ORXONOX_UNICODE_SUPPORT 1 172 173 173 #endif 174 #endif /* Patform Linux/Apple */ 174 175 175 176 //For apple, we always have a custom config.h file … … 191 192 // Integer formats of fixed bit width 192 193 // 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; 196 197 197 198 #ifdef ORXONOX_DOUBLE_PRECISION … … 261 262 //# pragma warning (disable : 201) 262 263 263 #endif264 265 264 266 265 // 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> 270 272 271 273 } /* namespace orxonox */ 272 274 273 // include visual leak detector to search for memory links274 //#include <vld.h>275 276 275 #endif /* _OrxonoxPlatform_H__ */ -
code/trunk/src/orxonox/OrxonoxStableHeaders.h
r1024 r1032 114 114 #include "objects/WorldEntity.h" 115 115 116 #endif 116 #endif /* Compiler MSVC */ 117 117 118 118 #endif /* _OrxonoxStableHeaders_H__ */ -
code/trunk/src/orxonox/objects/Ambient.cc
r871 r1032 37 37 #include "util/String2Number.h" 38 38 #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" 42 42 #include "core/XMLPort.h" 43 43 … … 76 76 void Ambient::setAmbientLight(const ColourValue& colour) 77 77 { 78 Orxonox::getSingleton()->getSceneManager()->setAmbientLight(colour);78 GraphicsEngine::getSingleton().getSceneManager()->setAmbientLight(colour); 79 79 } 80 80 -
code/trunk/src/orxonox/objects/Camera.cc
r1021 r1032 13 13 #include "util/String2Number.h" 14 14 #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" 19 18 20 19 #include "Camera.h" … … 35 34 void Camera::loadParams(TiXmlElement* xmlElem) 36 35 { 37 Ogre::SceneManager* mgr = orxonox::Orxonox::getSingleton()->getSceneManager();36 Ogre::SceneManager* mgr = GraphicsEngine::getSingleton().getSceneManager(); 38 37 39 38 if (xmlElem->Attribute("name") && xmlElem->Attribute("pos") && xmlElem->Attribute("lookat") && xmlElem->Attribute("node")) … … 68 67 69 68 // FIXME: unused var 70 Ogre::Viewport* vp = orxonox::Orxonox::getSingleton()->getOgrePointer()->getRenderWindow()->addViewport(cam);69 Ogre::Viewport* vp = GraphicsEngine::getSingleton().getRenderWindow()->addViewport(cam); 71 70 72 71 -
code/trunk/src/orxonox/objects/Explosion.cc
r790 r1032 32 32 #include <OgreSceneNode.h> 33 33 34 #include " ../core/CoreIncludes.h"34 #include "core/CoreIncludes.h" 35 35 #include "util/Math.h" 36 #include " ../Orxonox.h"37 #include " ../particle/ParticleInterface.h"36 #include "GraphicsEngine.h" 37 #include "particle/ParticleInterface.h" 38 38 39 39 #include "Explosion.h" … … 56 56 Vector3 position = owner->getNode()->getWorldPosition(); 57 57 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"); 59 59 this->particle_->getParticleSystem()->setParameter("local_space", "true"); 60 60 this->particle_->newEmitter(); -
code/trunk/src/orxonox/objects/Model.cc
r1021 r1032 31 31 #include "util/Tokenizer.h" 32 32 #include "util/String2Number.h" 33 #include " ../core/CoreIncludes.h"34 #include " ../Orxonox.h"33 #include "core/CoreIncludes.h" 34 #include "GraphicsEngine.h" 35 35 #include "core/XMLPort.h" 36 36 -
code/trunk/src/orxonox/objects/Skybox.cc
r871 r1032 35 35 //#include "util/Tokenizer.h" 36 36 //#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" 40 40 #include "core/XMLPort.h" 41 41 … … 68 68 void Skybox::setSkybox(const std::string& skyboxname) 69 69 { 70 Orxonox::getSingleton()->getSceneManager()->setSkyBox(true, skyboxname);70 GraphicsEngine::getSingleton().getSceneManager()->setSkyBox(true, skyboxname); 71 71 } 72 72 -
code/trunk/src/orxonox/objects/SpaceShip.cc
r1024 r1032 41 41 #include "core/CoreIncludes.h" 42 42 #include "core/Debug.h" 43 #include " Orxonox.h"43 #include "GraphicsEngine.h" 44 44 #include "core/InputManager.h" 45 45 #include "particle/ParticleInterface.h" … … 156 156 { 157 157 // 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"); 159 159 this->tt_->getParticleSystem()->setParameter("local_space","true"); 160 160 this->tt_->newEmitter(); … … 271 271 void SpaceShip::setCamera(const std::string& camera) 272 272 { 273 Ogre::Camera *cam = Orxonox::getSingleton()->getSceneManager()->createCamera("ShipCam");273 Ogre::Camera *cam = GraphicsEngine::getSingleton().getSceneManager()->createCamera("ShipCam"); 274 274 this->camNode_ = this->getNode()->createChildSceneNode("CamNode"); 275 275 /* … … 286 286 287 287 this->camNode_->attachObject(cam); 288 Orxonox::getSingleton()->getOgrePointer()->getRenderWindow()->addViewport(cam);288 GraphicsEngine::getSingleton().getRenderWindow()->addViewport(cam); 289 289 } 290 290 -
code/trunk/src/orxonox/objects/WorldEntity.cc
r1021 r1032 34 34 #include "util/Tokenizer.h" 35 35 #include "util/String2Number.h" 36 #include " ../core/CoreIncludes.h"37 #include " ../Orxonox.h"36 #include "core/CoreIncludes.h" 37 #include "GraphicsEngine.h" 38 38 #include "WorldEntity.h" 39 39 #include "core/XMLPort.h" … … 58 58 this->momentum_ = 0; 59 59 60 if ( Orxonox::getSingleton()->getSceneManager())60 if (GraphicsEngine::getSingleton().getSceneManager()) 61 61 { 62 62 std::ostringstream name; 63 63 name << (WorldEntity::worldEntityCounter_s++); 64 64 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()); 66 66 67 67 registerAllVariables(); -
code/trunk/src/orxonox/objects/weapon/BaseWeapon.cc
r871 r1032 34 34 35 35 #include "util/Math.h" 36 #include " ../../Orxonox.h"36 #include "Orxonox.h" 37 37 #include "Bullet.h" 38 38 #include "BulletManager.h" … … 47 47 48 48 BaseWeapon::BaseWeapon() 49 : sceneMgr_( Orxonox::getSingleton()->getSceneManager()),49 : sceneMgr_(GraphicsEngine::getSingleton().getSceneManager()), 50 50 bulletCounter_(0), 51 51 bulletManager_(Orxonox::getSingleton()->getBulletMgr()), -
code/trunk/src/orxonox/tools/BillboardSet.cc
r790 r1032 32 32 #include <OgreSceneManager.h> 33 33 34 #include " ../Orxonox.h"34 #include "GraphicsEngine.h" 35 35 #include "util/Math.h" 36 36 … … 50 50 std::ostringstream name; 51 51 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); 53 53 this->billboardSet_->createBillboard(position, colour); 54 54 this->billboardSet_->setMaterialName(file); … … 58 58 { 59 59 if (this->billboardSet_) 60 Orxonox::getSingleton()->getSceneManager()->destroyBillboardSet(this->billboardSet_);60 GraphicsEngine::getSingleton().getSceneManager()->destroyBillboardSet(this->billboardSet_); 61 61 } 62 62 } -
code/trunk/src/orxonox/tools/Light.cc
r790 r1032 5 5 #include <OgreSceneManager.h> 6 6 7 #include " ../Orxonox.h"7 #include "GraphicsEngine.h" 8 8 9 9 #include "Light.h" … … 22 22 std::ostringstream name; 23 23 name << (Light::lightCounter_s++); 24 this->light_ = Orxonox::getSingleton()->getSceneManager()->createLight("Light" + name.str());24 this->light_ = GraphicsEngine::getSingleton().getSceneManager()->createLight("Light" + name.str()); 25 25 this->light_->setType(type); 26 26 this->light_->setDiffuseColour(diffuse); … … 31 31 { 32 32 if (this->light_) 33 Orxonox::getSingleton()->getSceneManager()->destroyLight(this->light_);33 GraphicsEngine::getSingleton().getSceneManager()->destroyLight(this->light_); 34 34 } 35 35 } -
code/trunk/src/orxonox/tools/Mesh.cc
r790 r1032 32 32 #include <OgreSceneManager.h> 33 33 34 #include " ../Orxonox.h"34 #include "GraphicsEngine.h" 35 35 36 36 #include "Mesh.h" … … 49 49 std::ostringstream name; 50 50 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); 52 52 } 53 53 … … 55 55 { 56 56 if (this->entity_) 57 Orxonox::getSingleton()->getSceneManager()->destroyEntity(this->entity_);57 GraphicsEngine::getSingleton().getSceneManager()->destroyEntity(this->entity_); 58 58 } 59 59 }
Note: See TracChangeset
for help on using the changeset viewer.