Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 5115 in orxonox.OLD for trunk/src/lib/particles


Ignore:
Timestamp:
Aug 24, 2005, 1:30:13 AM (19 years ago)
Author:
bensch
Message:

orxonox/trunk: reimplemented the list functions, as i did before in revision 5110.
This time, i looked out for the bugs, and i think i found one

@patrick: i know, that you do not want to code at the moment… :/ → see mail

File:
1 edited

Legend:

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

    r5111 r5115  
    5151ParticleEngine::~ParticleEngine ()
    5252{
     53  // we must not do this, because PNoe does it for us
     54  // or we do this with help from ClassList, which essentially makes much more sense
    5355  // delete all remaining systems
    54   tIterator<ParticleSystem>* sysIt = this->systemList->getIterator();
    55   ParticleSystem* tmpSys = sysIt->nextElement();
    56   while(tmpSys)
    57     {
    58       delete tmpSys;
    59       tmpSys = sysIt->nextElement();
    60     }
    61   delete sysIt;
    62   delete this->systemList;
    63 
    64   // delete all remaining emitters
    65   tIterator<ParticleEmitter>* emitIt = this->emitterList->getIterator();
    66   ParticleEmitter* tmpEmit = emitIt->nextElement();
    67   while(tmpEmit)
    68     {
    69       delete tmpEmit;
    70       tmpEmit = emitIt->nextElement();
    71     }
    72   delete emitIt;
    73   delete this->emitterList;
     56//   tIterator<ParticleSystem>* sysIt = this->systemList->getIterator();
     57//   ParticleSystem* tmpSys = sysIt->firstElement();
     58//   while(tmpSys)
     59//     {
     60//       delete tmpSys;
     61//       tmpSys = sysIt->nextElement();
     62//     }
     63//   delete sysIt;
     64   delete this->systemList;
     65//
     66//   // delete all remaining emitters
     67//   tIterator<ParticleEmitter>* emitIt = this->emitterList->getIterator();
     68//   ParticleEmitter* tmpEmit = emitIt->firstElement();
     69//   while(tmpEmit)
     70//     {
     71//       delete tmpEmit;
     72//       tmpEmit = emitIt->nextElement();
     73//     }
     74//   delete emitIt;
     75   delete this->emitterList;
    7476
    7577  // there should be no more Connections
     
    147149  // look, if we have already added this connection
    148150  tIterator<ParticleConnection>* tmpConIt = connectionList->getIterator();
    149   ParticleConnection* tmpConnection = tmpConIt->nextElement();
     151  ParticleConnection* tmpConnection = tmpConIt->firstElement();
    150152  while(tmpConnection)
    151153    {
     
    178180  // remove any connections, that have this system within
    179181  tIterator<ParticleConnection>* tmpConIt = connectionList->getIterator();
    180   ParticleConnection* tmpConnection = tmpConIt->nextElement();
     182  ParticleConnection* tmpConnection = tmpConIt->firstElement();
    181183  while(tmpConnection)
    182184    {
     
    199201  // remove any connections, that have this emitter within
    200202  tIterator<ParticleConnection>* tmpConIt = connectionList->getIterator();
    201   ParticleConnection* tmpConnection = tmpConIt->nextElement();
     203  ParticleConnection* tmpConnection = tmpConIt->firstElement();
    202204  while(tmpConnection)
    203205    {
     
    224226  // look, if we have already added this connection
    225227  tIterator<ParticleConnection>* tmpConIt = connectionList->getIterator();
    226   ParticleConnection* tmpConnection = tmpConIt->nextElement();
     228  ParticleConnection* tmpConnection = tmpConIt->firstElement();
    227229  while(tmpConnection)
    228230    {
     
    260262  // ticks all the ParticleSystems
    261263  tIterator<ParticleSystem>* tmpIt = systemList->getIterator();
    262   ParticleSystem* tmpSys = tmpIt->nextElement();
     264  ParticleSystem* tmpSys = tmpIt->firstElement();
    263265  while(tmpSys)
    264266    {
     
    270272  // add new Particles to each System connected to an Emitter.
    271273  tIterator<ParticleConnection>* tmpConIt = connectionList->getIterator();
    272   ParticleConnection* tmpConnection = tmpConIt->nextElement();
     274  ParticleConnection* tmpConnection = tmpConIt->firstElement();
    273275  while(tmpConnection)
    274276    {
     
    285287{
    286288  tIterator<ParticleSystem>* tmpIt = systemList->getIterator();
    287   ParticleSystem* tmpSys = tmpIt->nextElement();
     289  ParticleSystem* tmpSys = tmpIt->firstElement();
    288290  while(tmpSys)
    289291    {
     
    302304{
    303305  tIterator<ParticleSystem>* tmpIt = systemList->getIterator();
    304   ParticleSystem* tmpSys = tmpIt->nextElement();
     306  ParticleSystem* tmpSys = tmpIt->firstElement();
    305307  while(tmpSys)
    306308    {
     
    324326  int count = 0;
    325327  tIterator<ParticleSystem>* tmpIt = systemList->getIterator();
    326   ParticleSystem* tmpSys = tmpIt->nextElement();
     328  ParticleSystem* tmpSys = tmpIt->firstElement();
    327329  while(tmpSys)
    328330    {
     
    346348{
    347349  tIterator<ParticleEmitter>* tmpIt = emitterList->getIterator();
    348   ParticleEmitter* tmpEmit = tmpIt->nextElement();
     350  ParticleEmitter* tmpEmit = tmpIt->firstElement();
    349351  while(tmpEmit)
    350352    {
     
    369371  int count = 0;
    370372  tIterator<ParticleEmitter>* tmpIt = emitterList->getIterator();
    371   ParticleEmitter* tmpEmit = tmpIt->nextElement();
     373  ParticleEmitter* tmpEmit = tmpIt->firstElement();
    372374  while(tmpEmit)
    373375    {
     
    402404
    403405    tIterator<ParticleConnection>* tmpConIt = connectionList->getIterator();
    404     ParticleConnection* tmpConnection = tmpConIt->nextElement();
     406    ParticleConnection* tmpConnection = tmpConIt->firstElement();
    405407    while(tmpConnection)
    406408    {
     
    414416  {
    415417    tIterator<ParticleSystem>* tmpIt = systemList->getIterator();
    416     ParticleSystem* tmpSys = tmpIt->nextElement();
     418    ParticleSystem* tmpSys = tmpIt->firstElement();
    417419    while(tmpSys)
    418420    {
     
    429431  {
    430432    tIterator<ParticleEmitter>* tmpIt = emitterList->getIterator();
    431     ParticleEmitter* tmpEmit = tmpIt->nextElement();
     433    ParticleEmitter* tmpEmit = tmpIt->firstElement();
    432434    while(tmpEmit)
    433435    {
Note: See TracChangeset for help on using the changeset viewer.