Changeset 5115 in orxonox.OLD for trunk/src/lib/particles
- Timestamp:
- Aug 24, 2005, 1:30:13 AM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/lib/particles/particle_engine.cc
r5111 r5115 51 51 ParticleEngine::~ParticleEngine () 52 52 { 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 53 55 // 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 emitters65 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; 74 76 75 77 // there should be no more Connections … … 147 149 // look, if we have already added this connection 148 150 tIterator<ParticleConnection>* tmpConIt = connectionList->getIterator(); 149 ParticleConnection* tmpConnection = tmpConIt-> nextElement();151 ParticleConnection* tmpConnection = tmpConIt->firstElement(); 150 152 while(tmpConnection) 151 153 { … … 178 180 // remove any connections, that have this system within 179 181 tIterator<ParticleConnection>* tmpConIt = connectionList->getIterator(); 180 ParticleConnection* tmpConnection = tmpConIt-> nextElement();182 ParticleConnection* tmpConnection = tmpConIt->firstElement(); 181 183 while(tmpConnection) 182 184 { … … 199 201 // remove any connections, that have this emitter within 200 202 tIterator<ParticleConnection>* tmpConIt = connectionList->getIterator(); 201 ParticleConnection* tmpConnection = tmpConIt-> nextElement();203 ParticleConnection* tmpConnection = tmpConIt->firstElement(); 202 204 while(tmpConnection) 203 205 { … … 224 226 // look, if we have already added this connection 225 227 tIterator<ParticleConnection>* tmpConIt = connectionList->getIterator(); 226 ParticleConnection* tmpConnection = tmpConIt-> nextElement();228 ParticleConnection* tmpConnection = tmpConIt->firstElement(); 227 229 while(tmpConnection) 228 230 { … … 260 262 // ticks all the ParticleSystems 261 263 tIterator<ParticleSystem>* tmpIt = systemList->getIterator(); 262 ParticleSystem* tmpSys = tmpIt-> nextElement();264 ParticleSystem* tmpSys = tmpIt->firstElement(); 263 265 while(tmpSys) 264 266 { … … 270 272 // add new Particles to each System connected to an Emitter. 271 273 tIterator<ParticleConnection>* tmpConIt = connectionList->getIterator(); 272 ParticleConnection* tmpConnection = tmpConIt-> nextElement();274 ParticleConnection* tmpConnection = tmpConIt->firstElement(); 273 275 while(tmpConnection) 274 276 { … … 285 287 { 286 288 tIterator<ParticleSystem>* tmpIt = systemList->getIterator(); 287 ParticleSystem* tmpSys = tmpIt-> nextElement();289 ParticleSystem* tmpSys = tmpIt->firstElement(); 288 290 while(tmpSys) 289 291 { … … 302 304 { 303 305 tIterator<ParticleSystem>* tmpIt = systemList->getIterator(); 304 ParticleSystem* tmpSys = tmpIt-> nextElement();306 ParticleSystem* tmpSys = tmpIt->firstElement(); 305 307 while(tmpSys) 306 308 { … … 324 326 int count = 0; 325 327 tIterator<ParticleSystem>* tmpIt = systemList->getIterator(); 326 ParticleSystem* tmpSys = tmpIt-> nextElement();328 ParticleSystem* tmpSys = tmpIt->firstElement(); 327 329 while(tmpSys) 328 330 { … … 346 348 { 347 349 tIterator<ParticleEmitter>* tmpIt = emitterList->getIterator(); 348 ParticleEmitter* tmpEmit = tmpIt-> nextElement();350 ParticleEmitter* tmpEmit = tmpIt->firstElement(); 349 351 while(tmpEmit) 350 352 { … … 369 371 int count = 0; 370 372 tIterator<ParticleEmitter>* tmpIt = emitterList->getIterator(); 371 ParticleEmitter* tmpEmit = tmpIt-> nextElement();373 ParticleEmitter* tmpEmit = tmpIt->firstElement(); 372 374 while(tmpEmit) 373 375 { … … 402 404 403 405 tIterator<ParticleConnection>* tmpConIt = connectionList->getIterator(); 404 ParticleConnection* tmpConnection = tmpConIt-> nextElement();406 ParticleConnection* tmpConnection = tmpConIt->firstElement(); 405 407 while(tmpConnection) 406 408 { … … 414 416 { 415 417 tIterator<ParticleSystem>* tmpIt = systemList->getIterator(); 416 ParticleSystem* tmpSys = tmpIt-> nextElement();418 ParticleSystem* tmpSys = tmpIt->firstElement(); 417 419 while(tmpSys) 418 420 { … … 429 431 { 430 432 tIterator<ParticleEmitter>* tmpIt = emitterList->getIterator(); 431 ParticleEmitter* tmpEmit = tmpIt-> nextElement();433 ParticleEmitter* tmpEmit = tmpIt->firstElement(); 432 434 while(tmpEmit) 433 435 {
Note: See TracChangeset
for help on using the changeset viewer.