Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 6619 in orxonox.OLD for trunk/src/world_entities


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

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

Location:
trunk/src/world_entities/projectiles
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/world_entities/projectiles/bomb.cc

    r6512 r6619  
    2525#include "object_manager.h"
    2626
    27 #include "particle_engine.h"
    2827#include "particle_emitter.h"
    2928#include "particle_system.h"
  • trunk/src/world_entities/projectiles/guided_missile.cc

    r6434 r6619  
    2323#include "class_list.h"
    2424
    25 #include "particle_engine.h"
    2625#include "particle_emitter.h"
    2726#include "particle_system.h"
     
    113112  }
    114113
    115   ParticleEngine::getInstance()->addConnection(this->emitter, GuidedMissile::trailParticles);
     114  this->emitter->setSystem(GuidedMissile::trailParticles);
    116115
    117116  this->updateNode(0);
     
    123122void GuidedMissile::deactivate()
    124123{
    125   ParticleEngine::getInstance()->breakConnections(this->emitter);
     124  this->emitter->setSystem(NULL);
    126125  this->lifeCycle = 0.0;
    127126
     
    184183  PRINTF(5)("DESTROY GuidedMissile\n");
    185184  this->lifeCycle = .95; //!< @todo calculate this usefully.
    186   ParticleEngine::getInstance()->breakConnection(this->emitter, GuidedMissile::trailParticles);
    187   ParticleEngine::getInstance()->addConnection(this->emitter, GuidedMissile::explosionParticles);
     185  this->emitter->setSystem(GuidedMissile::explosionParticles);
    188186
    189187  this->emitter->setEmissionRate(1000.0);
  • trunk/src/world_entities/projectiles/laser.cc

    r6434 r6619  
    2424#include "model.h"
    2525
    26 #include "particle_engine.h"
    2726#include "particle_emitter.h"
    2827#include "particle_system.h"
     
    9392void Laser::deactivate()
    9493{
    95   ParticleEngine::getInstance()->breakConnections(this->emitter);
     94  assert (Laser::explosionParticles != NULL);
     95  Laser::explosionParticles->removeEmitter(this->emitter);
    9696  this->lifeCycle = 0.0;
    9797
     
    130130  PRINTF(5)("DESTROY Laser\n");
    131131  this->lifeCycle = .95; //!< @todo calculate this usefully.
    132   ParticleEngine::getInstance()->addConnection(this->emitter, Laser::explosionParticles);
     132
     133  this->emitter->setSystem(Laser::explosionParticles);
    133134}
    134135
  • trunk/src/world_entities/projectiles/rocket.cc

    r6434 r6619  
    2323#include "class_list.h"
    2424
    25 #include "particle_engine.h"
    2625#include "particle_emitter.h"
    2726#include "particle_system.h"
     
    110109  }
    111110
    112   ParticleEngine::getInstance()->addConnection(this->emitter, Rocket::trailParticles);
     111  this->emitter->setSystem(Rocket::trailParticles);
    113112
    114113  this->updateNode(0);
     
    120119void Rocket::deactivate()
    121120{
    122   ParticleEngine::getInstance()->breakConnections(this->emitter);
     121  this->emitter->setSystem(NULL);
    123122  this->lifeCycle = 0.0;
    124123  this->toList(OM_NULL);
     
    158157  PRINTF(5)("DESTROY Rocket\n");
    159158  this->lifeCycle = .95; //!< @todo calculate this usefully.
    160   ParticleEngine::getInstance()->breakConnection(this->emitter, Rocket::trailParticles);
    161   ParticleEngine::getInstance()->addConnection(this->emitter, Rocket::explosionParticles);
     159  this->emitter->setSystem(Rocket::explosionParticles);
    162160
    163161  this->emitter->setEmissionRate(1000.0);
  • trunk/src/world_entities/projectiles/test_bullet.cc

    r6434 r6619  
    2323#include "class_list.h"
    2424
    25 #include "particle_engine.h"
    2625#include "particle_emitter.h"
    2726#include "particle_system.h"
     
    105104  }
    106105
    107   ParticleEngine::getInstance()->addConnection(this->emitter, TestBullet::trailParticles);
     106  this->emitter->setSystem(TestBullet::trailParticles);
    108107
    109108  this->emitter->setEmissionRate(20.0);
     
    114113void TestBullet::deactivate()
    115114{
    116   ParticleEngine::getInstance()->breakConnections(this->emitter);
     115  this->emitter->setSystem(NULL);
    117116  this->lifeCycle = 0.0;
    118117  this->toList(OM_NULL);
     
    157156  PRINTF(5)("DESTROY TestBullet\n");
    158157  this->lifeCycle = .95; //!< @todo calculate this usefully.
    159   ParticleEngine::getInstance()->breakConnection(this->emitter, TestBullet::trailParticles);
    160   ParticleEngine::getInstance()->addConnection(this->emitter, TestBullet::explosionParticles);
     158  this->emitter->setSystem(TestBullet::explosionParticles);
    161159
    162160  this->emitter->setEmissionRate(30.0);
Note: See TracChangeset for help on using the changeset viewer.