public void Draw(List <VRageRender.MyBillboard> collectedBillboards)
        {
            VRage.Profiler.ProfilerShort.Begin("GPU_Draw");
            if (m_renderId == MyRenderProxy.RENDER_ID_UNASSIGNED)
            {
                m_renderId = MyRenderProxy.CreateGPUEmitter();
            }

            if (IsDirty)
            {
                ProfilerShort.Begin("GPU_FillDataComplete");
                m_emitter = new MyGPUEmitter();
                FillDataComplete(ref m_emitter);
                MyParticlesManager.GPUEmitters.Add(m_emitter);
                ProfilerShort.End();
                m_dirty = m_animDirty = m_positionDirty = false;
            }
            else if (m_animatedTimeValues || m_animDirty)
            {
                ProfilerShort.Begin("GPU_FillData");
                FillData(ref m_emitter);
                MyParticlesManager.GPUEmitters.Add(m_emitter);
                ProfilerShort.End();
                m_animDirty = false;
            }
            else if (IsPositionDirty)
            {
                ProfilerShort.Begin("GPU_FillPosition");
                var transform = new MyGPUEmitterTransformUpdate()
                {
                    GID                = m_renderId,
                    Transform          = CalculateWorldMatrix(),
                    Scale              = m_effect.GetEmitterScale(),
                    Gravity            = m_effect.Gravity * Gravity,
                    ParticlesPerSecond = GetParticlesPerSecond()
                };
                MyParticlesManager.GPUEmitterTransforms.Add(transform);
                ProfilerShort.End();

                m_positionDirty = false;
            }
            else if (ParticlesPerSecond.GetKeysCount() > 1)
            {
                ProfilerShort.Begin("GPU_FillLight");
                MyParticlesManager.GPUEmittersLight.Add(new MyGPUEmitterLight()
                {
                    GID = m_renderId,
                    ParticlesPerSecond = GetParticlesPerSecond()
                });
                ProfilerShort.End();
            }
            ProfilerShort.End();
        }
        public void DeserializeFromObjectBuilder(ParticleGeneration generation)
        {
            m_name = generation.Name;

            foreach (GenerationProperty property in generation.Properties)
            {
                for (int i = 0; i < m_properties.Length; i++)
                {
                    if (m_properties[i].Name.Equals(property.Name))
                    {
                        m_properties[i].DeserializeFromObjectBuilder(property);
                    }
                }
            }
            Debug.WriteLine("ParticlesPerSecond {0}, Velocity {1}",
                            ParticlesPerSecond.GetKeysCount(),
                            Velocity.GetKeysCount());
        }