Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 6612 in orxonox.OLD for trunk/src/lib/particles/particle_engine.cc


Ignore:
Timestamp:
Jan 19, 2006, 1:50:39 AM (18 years ago)
Author:
bensch
Message:

orxonox/trunk: particle_system is now loaded differently

ParticleEngine is NOT needed anymore, this is faster and better

File:
1 edited

Legend:

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

    r5654 r6612  
    309309{
    310310  // ticks all the ParticleSystems
     311//   tIterator<ParticleSystem>* tmpIt = systemList->getIterator();
     312//   ParticleSystem* tmpSys = tmpIt->firstElement();
     313//   while(tmpSys)
     314//     {
     315//       tmpSys->tick(dt);
     316//       tmpSys = tmpIt->nextElement();
     317//     }
     318//   delete tmpIt;
     319
     320  // add new Particles to each System connected to an Emitter.
     321  tIterator<ParticleConnection>* tmpConIt = connectionList->getIterator();
     322  ParticleConnection* tmpConnection = tmpConIt->firstElement();
     323  while(tmpConnection)
     324    {
     325      tmpConnection->emitter->tick(dt, tmpConnection->system);
     326      tmpConnection = tmpConIt->nextElement();
     327    }
     328  delete tmpConIt;
     329}
     330
     331/**
     332 *  draws all the systems and their Particles.
     333*/
     334void ParticleEngine::draw() const
     335{
     336  /*
    311337  tIterator<ParticleSystem>* tmpIt = systemList->getIterator();
    312338  ParticleSystem* tmpSys = tmpIt->firstElement();
    313339  while(tmpSys)
    314340    {
    315       tmpSys->tick(dt);
    316       tmpSys = tmpIt->nextElement();
    317     }
    318   delete tmpIt;
    319 
    320   // add new Particles to each System connected to an Emitter.
    321   tIterator<ParticleConnection>* tmpConIt = connectionList->getIterator();
    322   ParticleConnection* tmpConnection = tmpConIt->firstElement();
    323   while(tmpConnection)
    324     {
    325       tmpConnection->emitter->tick(dt, tmpConnection->system);
    326       tmpConnection = tmpConIt->nextElement();
    327     }
    328   delete tmpConIt;
    329 }
    330 
    331 /**
    332  *  draws all the systems and their Particles.
    333 */
    334 void ParticleEngine::draw() const
    335 {
    336   tIterator<ParticleSystem>* tmpIt = systemList->getIterator();
    337   ParticleSystem* tmpSys = tmpIt->firstElement();
    338   while(tmpSys)
    339     {
    340341      tmpSys->draw();
    341342      tmpSys = tmpIt->nextElement();
    342343    }
    343   delete tmpIt;
     344  delete tmpIt;*/
    344345
    345346}
Note: See TracChangeset for help on using the changeset viewer.