Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Oct 27, 2008, 4:08:51 AM (16 years ago)
Author:
landauf
Message:

many changes, most important: BaseObject takes now a pointer to it's creator which is needed to build a level hierarchy (with different scenes)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/objecthierarchy/src/orxonox/tools/ParticleInterface.cc

    r1755 r2019  
    3737#include <OgreParticleEmitter.h>
    3838#include <OgreSceneManager.h>
     39#include <cassert>
    3940
    4041#include "GraphicsEngine.h"
     
    4748  ParticleInterface* ParticleInterface::currentParticleInterface_s = 0;
    4849
    49   ParticleInterface::ParticleInterface(const std::string& templateName, LODParticle::LOD detaillevel)
     50  ParticleInterface::ParticleInterface(Ogre::SceneManager* scenemanager, const std::string& templateName, LODParticle::LOD detaillevel)
    5051  {
    5152    RegisterRootObject(ParticleInterface);
    5253
     54    assert(scenemanager);
     55
     56    this->scenemanager_ = scenemanager;
    5357    this->sceneNode_ = 0;
    5458    this->bEnabled_ = true;
    5559    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);
    5761    //this->particleSystem_->setSpeedFactor(Orxonox::getInstance().getTimeFactor());
    5862    this->particleSystem_->setSpeedFactor(1.0f);
     
    7276  {
    7377    this->particleSystem_->removeAllEmitters();
    74     GraphicsEngine::getInstance().getLevelSceneManager()->destroyParticleSystem(particleSystem_);
     78    this->scenemanager_->destroyParticleSystem(particleSystem_);
    7579  }
    7680
Note: See TracChangeset for help on using the changeset viewer.