- Timestamp:
- Oct 27, 2008, 4:08:51 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/objecthierarchy/src/orxonox/tools/ParticleInterface.cc
r1755 r2019 37 37 #include <OgreParticleEmitter.h> 38 38 #include <OgreSceneManager.h> 39 #include <cassert> 39 40 40 41 #include "GraphicsEngine.h" … … 47 48 ParticleInterface* ParticleInterface::currentParticleInterface_s = 0; 48 49 49 ParticleInterface::ParticleInterface( const std::string& templateName, LODParticle::LOD detaillevel)50 ParticleInterface::ParticleInterface(Ogre::SceneManager* scenemanager, const std::string& templateName, LODParticle::LOD detaillevel) 50 51 { 51 52 RegisterRootObject(ParticleInterface); 52 53 54 assert(scenemanager); 55 56 this->scenemanager_ = scenemanager; 53 57 this->sceneNode_ = 0; 54 58 this->bEnabled_ = true; 55 59 this->detaillevel_ = (unsigned int)detaillevel; 56 this->particleSystem_ = GraphicsEngine::getInstance().getLevelSceneManager()->createParticleSystem("particles" + getConvertedValue<unsigned int, std::string>(ParticleInterface::counter_s++), templateName);60 this->particleSystem_ = this->scenemanager_->createParticleSystem("particles" + getConvertedValue<unsigned int, std::string>(ParticleInterface::counter_s++), templateName); 57 61 //this->particleSystem_->setSpeedFactor(Orxonox::getInstance().getTimeFactor()); 58 62 this->particleSystem_->setSpeedFactor(1.0f); … … 72 76 { 73 77 this->particleSystem_->removeAllEmitters(); 74 GraphicsEngine::getInstance().getLevelSceneManager()->destroyParticleSystem(particleSystem_);78 this->scenemanager_->destroyParticleSystem(particleSystem_); 75 79 } 76 80
Note: See TracChangeset
for help on using the changeset viewer.