Changeset 3943 in orxonox.OLD for orxonox/branches/particleEngine/src/lib/graphics
- Timestamp:
- Apr 23, 2005, 2:05:17 PM (20 years ago)
- Location:
- orxonox/branches/particleEngine/src/lib/graphics/particles
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/branches/particleEngine/src/lib/graphics/particles/particle_engine.cc
r3938 r3943 110 110 bool ParticleEngine::removeSystem(ParticleSystem* system) 111 111 { 112 // remove any connections, that have this system within 113 tIterator<ParticleConnection>* tmpConIt = connectionList->getIterator(); 114 ParticleConnection* tmpConnection = tmpConIt->nextElement(); 115 while(tmpConnection) 116 { 117 if (tmpConnection->system == system) 118 this->breakConnection(tmpConnection); 119 tmpConnection = tmpConIt->nextElement(); 120 } 121 delete tmpConIt; 122 123 // remove the System from the systemList. 112 124 this->systemList->remove(system); 113 125 } … … 115 127 bool ParticleEngine::removeEmitter(ParticleEmitter* emitter) 116 128 { 129 // remove any connections, that have this emitter within 130 tIterator<ParticleConnection>* tmpConIt = connectionList->getIterator(); 131 ParticleConnection* tmpConnection = tmpConIt->nextElement(); 132 while(tmpConnection) 133 { 134 if (tmpConnection->emitter == emitter) 135 this->breakConnection(tmpConnection); 136 tmpConnection = tmpConIt->nextElement(); 137 } 138 delete tmpConIt; 139 140 // remove the emitter from the emitterList 117 141 this->emitterList->remove(emitter); 142 } 143 144 145 bool ParticleEngine::breakConnection(ParticleEmitter* emitter, ParticleSystem* system) 146 { 147 // look, if we have already added this connection 148 tIterator<ParticleConnection>* tmpConIt = connectionList->getIterator(); 149 ParticleConnection* tmpConnection = tmpConIt->nextElement(); 150 while(tmpConnection) 151 { 152 if (tmpConnection->emitter == emitter && tmpConnection->system == system) 153 this->breakConnection(tmpConnection); 154 tmpConnection = tmpConIt->nextElement(); 155 } 156 delete tmpConIt; 157 } 158 159 bool ParticleEngine::breakConnection(ParticleConnection* connection) 160 { 161 this->connectionList->remove(connection); 118 162 } 119 163 -
orxonox/branches/particleEngine/src/lib/graphics/particles/particle_engine.h
r3932 r3943 36 36 bool removeSystem(ParticleSystem* system); 37 37 bool removeEmitter(ParticleEmitter* emitter); 38 bool breakConection(ParticleEmitter* emitter, ParticleSystem* system); 38 bool breakConnection(ParticleEmitter* emitter, ParticleSystem* system); 39 bool breakConnection(ParticleConnection* connection); 39 40 40 41 private: -
orxonox/branches/particleEngine/src/lib/graphics/particles/particle_system.cc
r3942 r3943 89 89 glEnd(); 90 90 glEndList(); 91 92 93 94 91 } 95 92
Note: See TracChangeset
for help on using the changeset viewer.