#region CPL License /* Nuclex Framework Copyright (C) 2002-2009 Nuclex Development Labs This library is free software; you can redistribute it and/or modify it under the terms of the IBM Common Public License as published by the IBM Corporation; either version 1.0 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the IBM Common Public License for more details. You should have received a copy of the IBM Common Public License along with this library */ #endregion using System; using System.Collections.Generic; using Microsoft.Xna.Framework.Graphics; using Nuclex.Graphics.Batching; namespace Nuclex.Graphics.SpecialEffects.Particles.HighLevel { /// Renders particles into a primitive batch /// Data type of the particles /// /// Type of vertices being generated by the renderer /// /// /// /// This interface is used by the particle system manager to send the particles /// contained in a particle system to a primitive batch for rendering. /// /// /// In the simplest case, where your particle structure and vertex structure /// are the same, the renderer can simply add the particles given to it into /// the primitive batch. /// /// /// If, on the other hand, your particle structure is different from your vertex /// structure (maybe your particles need additional processing, like a billboard /// that needs to know of the camera location), the renderer can do virtually /// anything to procure the vertices a particle translates into. /// /// public interface IParticleRenderer where VertexType : struct, IVertexType { /// Renders a series of particles /// Particles that will be rendered /// /// Primitive batch that will receive the vertices generated by the particles /// void Render( ArraySegment particles, PrimitiveBatch primitiveBatch ); } /// Renders the particles in a particle system /// Data type of the particles /// /// This is just a simplification you can use if your particle structure and /// vertex structure are one and the same. /// public interface IParticleRenderer : IParticleRenderer where ParticleType : struct, IVertexType { } } // namespace Nuclex.Graphics.SpecialEffects.Particles.HighLevel