-----------------------------------------------------------------------
| 155 | } |
| 156 | //----------------------------------------------------------------------- |
| 157 | ParticleSystem::~ParticleSystem() |
| 158 | { |
| 159 | if( mTimeController ) |
| 160 | { |
| 161 | // Destroy controller |
| 162 | ControllerManager::getSingleton().destroyController( mTimeController ); |
| 163 | mTimeController = 0; |
| 164 | } |
| 165 | |
| 166 | // Arrange for the deletion of emitters & affectors |
| 167 | removeAllEmitters(); |
| 168 | removeAllEmittedEmitters(); |
| 169 | removeAllAffectors(); |
| 170 | |
| 171 | // Deallocate all particles |
| 172 | destroyVisualParticles( 0, mParticlePool.size() ); |
| 173 | // Free pool items |
| 174 | ParticlePool::iterator i; |
| 175 | for( i = mParticlePool.begin(); i != mParticlePool.end(); ++i ) |
| 176 | { |
| 177 | OGRE_DELETE *i; |
| 178 | } |
| 179 | |
| 180 | if( mRenderer ) |
| 181 | { |
| 182 | ParticleSystemManager::getSingleton()._destroyRenderer( mRenderer ); |
| 183 | mRenderer = 0; |
| 184 | } |
| 185 | } |
| 186 | //----------------------------------------------------------------------- |
| 187 | SceneNode *ParticleSystem::getParticleEmitterRootNode() const { return mParticleEmitterRootNode; } |
| 188 | //----------------------------------------------------------------------- |
nothing calls this directly
no test coverage detected