Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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


Ignore:
Timestamp:
Aug 23, 2005, 11:07:40 PM (19 years ago)
Author:
bensch
Message:

orxonox/trunk: changed the behaviour of the iterator.
Now it is soon possible to walk through a List from front and back, and tell the Iterator from where to seek

@patrick: i had to disable your Collision-Detection algorithms, because they had a seekElement inside, that i did not entirely grasp the meaning of….
trying to fix this now

File:
1 edited

Legend:

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

    r4836 r5110  
    5353  // delete all remaining systems
    5454  tIterator<ParticleSystem>* sysIt = this->systemList->getIterator();
    55   ParticleSystem* tmpSys = sysIt->nextElement();
     55  ParticleSystem* tmpSys = sysIt->firstElement();
    5656  while(tmpSys)
    5757    {
     
    6464  // delete all remaining emitters
    6565  tIterator<ParticleEmitter>* emitIt = this->emitterList->getIterator();
    66   ParticleEmitter* tmpEmit = emitIt->nextElement();
     66  ParticleEmitter* tmpEmit = emitIt->firstElement();
    6767  while(tmpEmit)
    6868    {
     
    147147  // look, if we have already added this connection
    148148  tIterator<ParticleConnection>* tmpConIt = connectionList->getIterator();
    149   ParticleConnection* tmpConnection = tmpConIt->nextElement();
     149  ParticleConnection* tmpConnection = tmpConIt->firstElement();
    150150  while(tmpConnection)
    151151    {
     
    178178  // remove any connections, that have this system within
    179179  tIterator<ParticleConnection>* tmpConIt = connectionList->getIterator();
    180   ParticleConnection* tmpConnection = tmpConIt->nextElement();
     180  ParticleConnection* tmpConnection = tmpConIt->firstElement();
    181181  while(tmpConnection)
    182182    {
     
    199199  // remove any connections, that have this emitter within
    200200  tIterator<ParticleConnection>* tmpConIt = connectionList->getIterator();
    201   ParticleConnection* tmpConnection = tmpConIt->nextElement();
     201  ParticleConnection* tmpConnection = tmpConIt->firstElement();
    202202  while(tmpConnection)
    203203    {
     
    224224  // look, if we have already added this connection
    225225  tIterator<ParticleConnection>* tmpConIt = connectionList->getIterator();
    226   ParticleConnection* tmpConnection = tmpConIt->nextElement();
     226  ParticleConnection* tmpConnection = tmpConIt->firstElement();
    227227  while(tmpConnection)
    228228    {
     
    260260  // ticks all the ParticleSystems
    261261  tIterator<ParticleSystem>* tmpIt = systemList->getIterator();
    262   ParticleSystem* tmpSys = tmpIt->nextElement();
     262  ParticleSystem* tmpSys = tmpIt->firstElement();
    263263  while(tmpSys)
    264264    {
     
    270270  // add new Particles to each System connected to an Emitter.
    271271  tIterator<ParticleConnection>* tmpConIt = connectionList->getIterator();
    272   ParticleConnection* tmpConnection = tmpConIt->nextElement();
     272  ParticleConnection* tmpConnection = tmpConIt->firstElement();
    273273  while(tmpConnection)
    274274    {
     
    285285{
    286286  tIterator<ParticleSystem>* tmpIt = systemList->getIterator();
    287   ParticleSystem* tmpSys = tmpIt->nextElement();
     287  ParticleSystem* tmpSys = tmpIt->firstElement();
    288288  while(tmpSys)
    289289    {
     
    302302{
    303303  tIterator<ParticleSystem>* tmpIt = systemList->getIterator();
    304   ParticleSystem* tmpSys = tmpIt->nextElement();
     304  ParticleSystem* tmpSys = tmpIt->firstElement();
    305305  while(tmpSys)
    306306    {
     
    324324  int count = 0;
    325325  tIterator<ParticleSystem>* tmpIt = systemList->getIterator();
    326   ParticleSystem* tmpSys = tmpIt->nextElement();
     326  ParticleSystem* tmpSys = tmpIt->firstElement();
    327327  while(tmpSys)
    328328    {
     
    346346{
    347347  tIterator<ParticleEmitter>* tmpIt = emitterList->getIterator();
    348   ParticleEmitter* tmpEmit = tmpIt->nextElement();
     348  ParticleEmitter* tmpEmit = tmpIt->firstElement();
    349349  while(tmpEmit)
    350350    {
     
    369369  int count = 0;
    370370  tIterator<ParticleEmitter>* tmpIt = emitterList->getIterator();
    371   ParticleEmitter* tmpEmit = tmpIt->nextElement();
     371  ParticleEmitter* tmpEmit = tmpIt->firstElement();
    372372  while(tmpEmit)
    373373    {
     
    402402
    403403    tIterator<ParticleConnection>* tmpConIt = connectionList->getIterator();
    404     ParticleConnection* tmpConnection = tmpConIt->nextElement();
     404    ParticleConnection* tmpConnection = tmpConIt->firstElement();
    405405    while(tmpConnection)
    406406    {
     
    414414  {
    415415    tIterator<ParticleSystem>* tmpIt = systemList->getIterator();
    416     ParticleSystem* tmpSys = tmpIt->nextElement();
     416    ParticleSystem* tmpSys = tmpIt->firstElement();
    417417    while(tmpSys)
    418418    {
     
    429429  {
    430430    tIterator<ParticleEmitter>* tmpIt = emitterList->getIterator();
    431     ParticleEmitter* tmpEmit = tmpIt->nextElement();
     431    ParticleEmitter* tmpEmit = tmpIt->firstElement();
    432432    while(tmpEmit)
    433433    {
Note: See TracChangeset for help on using the changeset viewer.