using System;
using System.Collections.Generic;
using System.Text;
using System.Drawing;
using OpenTK;

namespace ObjectManager
{
    public enum MeshMaterialBlendModeEnum : byte
    {
        Normal = 0,
        Additive = 1
    }

    public enum GlowAttenuationModeEnum
    {
        None = 0,
        DivisionExponent2 = 1,
        DivisionExponent4 = 2
    }

    public class Material
    {
        public System.Drawing.Color Color;
        public System.Drawing.Color EmissiveColor;
        public bool EmissiveColorUsed;
        public System.Drawing.Color TransparentColor;
        public bool TransparentColorUsed;
        public string DaytimeTexture;
        public string NighttimeTexture;
        public MeshMaterialBlendModeEnum BlendMode;
        public double GlowHalfDistance;
        public GlowAttenuationModeEnum GlowAttenuationMode;

        #region Constructors

        public Material()
        {
            this.Color = System.Drawing.Color.FromArgb(255, 255, 255, 255);
            this.EmissiveColor = System.Drawing.Color.FromArgb(0, 0, 0);
            this.EmissiveColorUsed = false;
            this.TransparentColor = System.Drawing.Color.FromArgb(0, 0, 0);
            this.TransparentColorUsed = false;
            this.DaytimeTexture = null;
            this.NighttimeTexture = null;
            this.BlendMode = MeshMaterialBlendModeEnum.Normal;
            this.GlowHalfDistance = 0;
            this.GlowAttenuationMode = GlowAttenuationModeEnum.None;
        }

        public Material(Material material)
        {
            this.Color = material.Color;
            this.EmissiveColor = material.EmissiveColor;
            this.EmissiveColorUsed = material.EmissiveColorUsed;
            this.TransparentColor = material.TransparentColor;
            this.TransparentColorUsed = material.TransparentColorUsed;
            this.DaytimeTexture = material.DaytimeTexture;
            this.NighttimeTexture = material.NighttimeTexture;
            this.BlendMode = material.BlendMode;
            this.GlowAttenuationMode = material.GlowAttenuationMode;
        }

        #endregion
    }
}
