-------------------------------------------------------------------------------- Description: Enables or disables all attached particle systems. This is used to enable/ dsiable general trails. Arguments: enable - on or off --------------------------------------------------------------------------------
| 227 | // enable - on or off |
| 228 | // -------------------------------------------------------------------------------- |
| 229 | void EveMissileWarhead::EnableParticleEmitting( bool enable ) |
| 230 | { |
| 231 | // try to find all attached GPU particle systems |
| 232 | for( PIEveTransformVector::const_iterator it = m_children.begin(); it != m_children.end(); ++it ) |
| 233 | { |
| 234 | EveTransformPtr child; |
| 235 | if( ( *it )->QueryInterface( BlueInterfaceIID<EveTransform>(), (void**)&child, BEQI_SILENT ) ) |
| 236 | { |
| 237 | // do we have an attached GPU emitter? |
| 238 | for( auto emIt = child->m_particleEmitters.begin(); emIt != child->m_particleEmitters.end(); ++emIt ) |
| 239 | { |
| 240 | if( auto emitter = dynamic_cast<Tr2GpuSharedEmitter*>( *emIt ) ) |
| 241 | { |
| 242 | emitter->Enable( enable ); |
| 243 | } |
| 244 | } |
| 245 | } |
| 246 | } |
| 247 | for( auto emIt = m_particleEmitters.begin(); emIt != m_particleEmitters.end(); ++emIt ) |
| 248 | { |
| 249 | if( auto emitter = dynamic_cast<Tr2GpuSharedEmitter*>( *emIt ) ) |
| 250 | { |
| 251 | emitter->Enable( enable ); |
| 252 | } |
| 253 | } |
| 254 | } |
| 255 | |
| 256 | // -------------------------------------------------------------------------------- |
| 257 | // Description: |
no test coverage detected