protected void _showExplosionCommon(SSObject attachTo, SExplosionParameters eParams,
                                            Vector3 position, Vector3 velocity, float intensity, float simInterval = float.NaN)
        {
            SExplosionRenderer renderer = null;

            foreach (var existing in _renderers)
            {
                if (existing.particleSystem.numElements == 0)
                {
                    // recycle existing renderers...
                    renderer          = existing;
                    renderer.attachTo = attachTo;
                    if (attachTo == null)
                    {
                        renderer.worldMat = Matrix4.Identity;
                    }
                    else
                    {
                        renderer.worldMat = attachTo.worldMat;
                    }
                    renderer.parameters = eParams;
                    break;
                }
            }
            if (renderer == null)
            {
                // have to allocate a new renderer
                renderer          = new SExplosionRenderer(_particleCapacity, eParams);
                renderer.attachTo = attachTo;
                _renderScene.AddObject(renderer);
                _renderers.Add(renderer);
            }
            if (!float.IsNaN(simInterval))
            {
                renderer.particleSystem.simulationStep = simInterval;
            }
            renderer.showExplosion(position, intensity, velocity);
        }
 protected void _showExplosionCommon(SSObject attachTo, SExplosionParameters eParams,
     Vector3 position, Vector3 velocity, float intensity, float simInterval = float.NaN)
 {
     SExplosionRenderer renderer = null;
     foreach (var existing in _renderers) {
         if (existing.particleSystem.numElements == 0) {
             // recycle existing renderers...
             renderer = existing;
             renderer.attachTo = attachTo;
             if (attachTo == null) {
                 renderer.worldMat = Matrix4.Identity;
             } else {
                 renderer.worldMat = attachTo.worldMat;
             }
             renderer.parameters = eParams;
             break;
         }
     }
     if (renderer == null) {
         // have to allocate a new renderer
         renderer = new SExplosionRenderer (_particleCapacity, eParams);
         renderer.attachTo = attachTo;
         _renderScene.AddObject(renderer);
         _renderers.Add(renderer);
     }
     if (!float.IsNaN(simInterval)) {
         renderer.particleSystem.simulationStep = simInterval;
     }
     renderer.showExplosion(position, intensity, velocity);
 }