Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 6619 in orxonox.OLD for trunk/src/lib/particles/particle_emitter.cc


Ignore:
Timestamp:
Jan 19, 2006, 6:23:56 PM (18 years ago)
Author:
bensch
Message:

orxonox/trunk: rendering without the ParticleEngine, so now we are FAST :)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/lib/particles/particle_emitter.cc

    r6512 r6619  
    1919
    2020#include "particle_system.h"
    21 #include "particle_engine.h"
    2221
    2322#include "load_param.h"
     
    4443  this->setEmissionVelocity(velocity);
    4544
    46   ParticleEngine::getInstance()->addEmitter(this);
    4745}
    4846
     
    5755   if (root != NULL)
    5856     this->loadParams(root);
    59 
    60    ParticleEngine::getInstance()->addEmitter(this);
    6157}
    6258
     
    6864ParticleEmitter::~ParticleEmitter ()
    6965{
    70   ParticleEngine::getInstance()->removeEmitter(this);
    7166}
    7267
     
    8479  this->setSize(PARTICLE_EMITTER_DEFAULT_SIZE);
    8580
     81  this->system = NULL;
     82
    8683  this->saveTime = 0.0;
    8784}
     
    118115
    119116  LoadParam(root, "emission-direction", this, ParticleEmitter, setDirection);
     117}
     118
     119void ParticleEmitter::setSystem(ParticleSystem* system)
     120{
     121  if (system != NULL)
     122    system->addEmitter(this);
     123  else if (this->system != NULL)
     124    this->system->removeEmitter(this);
     125  this->system = system;
    120126}
    121127
Note: See TracChangeset for help on using the changeset viewer.