using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework;

namespace MojaDrugaGra
{
    public struct VertexPositionNormalColor : IVertexType
    {
        public Vector3 Position;
        public Vector3 Normal;
        public Color Color;

        public static readonly VertexDeclaration VertexDeclaration =
            new VertexDeclaration(
                new VertexElement(0, VertexElementFormat.Vector3, VertexElementUsage.Position, 0),
                new VertexElement(3 * sizeof(float), VertexElementFormat.Vector3, VertexElementUsage.Normal, 0),
                new VertexElement(6 * sizeof(float), VertexElementFormat.Color, VertexElementUsage.Color, 0)
            );

        VertexDeclaration IVertexType.VertexDeclaration => VertexDeclaration;        

        public VertexPositionNormalColor(Vector3 position, Vector3 normal, Color color)
        {
            this.Position = position;
            this.Normal = normal;
            this.Color = color;
        }
    }
}
