using System; using System.Collections.Generic; using System.Linq; using System.Text; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; namespace Krypton { public struct ShadowHullVertex : IVertexType { /// /// The position of the vertex /// public Vector2 Position; /// /// The normal of the vertex /// public Vector2 Normal; /// /// The color of vertex /// public Color Color; private static readonly VertexDeclaration mVertexDeclaration; /// /// /// public VertexDeclaration VertexDeclaration { get { return ShadowHullVertex.mVertexDeclaration; } } static ShadowHullVertex() { VertexElement[] elements = new VertexElement[] { new VertexElement(0, VertexElementFormat.Vector2, VertexElementUsage.Position, 0), new VertexElement(8, VertexElementFormat.Vector2, VertexElementUsage.Normal,0), new VertexElement(16, VertexElementFormat.Color, VertexElementUsage.Color,0), }; mVertexDeclaration = new VertexDeclaration(elements); } /// /// /// /// /// /// public ShadowHullVertex(Vector2 position, Vector2 normal, Color color) { this.Position = position; this.Normal = normal; this.Color = color; } } }