Ejemplo n.º 1
0
        /// <summary>
        /// Make a deep copy of a material
        /// </summary>
        /// <param name="material"> Material to copy </param>
        public Material(Material material)
        {
            BlendStrenght   = material.BlendStrenght;
            SingelMaterial  = material.SingelMaterial;
            AffectedByLight = material.AffectedByLight;

            ColorChanel1 = material.ColorChanel1;
            ColorChanel2 = material.ColorChanel2;
            NoTexColor   = material.NoTexColor;

            NormalChannel1 = material.NormalChannel1;
            NormalChannel2 = material.NormalChannel2;

            SpecularChannel1 = material.SpecularChannel1;
            SpecularChannel2 = material.SpecularChannel2;

            ReflectionChannel1 = material.ReflectionChannel1;
            ReflectionChannel2 = material.ReflectionChannel2;

            TransparancyChannel1 = material.TransparancyChannel1;
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Create a new material
        /// </summary>
        /// <param name="TextureID1"> ID for texture 1 </param>
        /// <param name="TextureID2"> ID for texture 2 </param>
        /// <param name="BlendStrenght"> Blend strenght between chanels </param>
        /// <param name="affectedByLight"> Is the material affected by light sources</param>
        public Material(int TextureID1, int TextureID2, int BlendStrenght, bool affectedByLight)
        {
            this.BlendStrenght = BlendStrenght;
            SingelMaterial     = false;
            AffectedByLight    = true;

            ColorChanel1 = TextureID1;
            ColorChanel2 = TextureID2;
            NoTexColor   = new Color4(255, 255, 255, 1);

            NormalChannel1 = new Normal(-1, 0);
            NormalChannel2 = new Normal(-1, 0);

            SpecularChannel1 = new Specular(-1);
            SpecularChannel2 = new Specular(-1);

            ReflectionChannel1 = new Reflection(new Color4(255, 255, 255, 1), 0);
            ReflectionChannel2 = new Reflection(new Color4(255, 255, 255, 1), 0);

            TransparancyChannel1 = new Transparancy(-1);
        }
Ejemplo n.º 3
0
        /// <summary>
        /// Create a new material
        /// </summary>
        /// <param name="Color"> Color of the material </param>
        /// <param name="affectedByLight"> Is the material affected by light sources</param>
        public Material(Vector4 Color, bool affectedByLight)
        {
            BlendStrenght   = 1;
            SingelMaterial  = true;
            AffectedByLight = affectedByLight;

            ColorChanel1 = -1;
            ColorChanel2 = -1;
            NoTexColor   = Color;

            NormalChannel1 = new Normal(-1, 0);
            NormalChannel2 = new Normal(-1, 0);

            SpecularChannel1 = new Specular(-1);
            SpecularChannel2 = new Specular(-1);

            ReflectionChannel1 = new Reflection(new Color4(255, 255, 255, 1), 0);
            ReflectionChannel2 = new Reflection(new Color4(255, 255, 255, 1), 0);

            TransparancyChannel1 = new Transparancy(-1);
        }
Ejemplo n.º 4
0
        /// <summary>
        /// Create a new material
        /// </summary>
        /// <param name="TextureID"> ID for texture 1 </param>
        public Material(int TextureID)
        {
            BlendStrenght   = 1;
            SingelMaterial  = true;
            AffectedByLight = true;

            ColorChanel1 = TextureID;
            ColorChanel2 = -1;
            NoTexColor   = new Color4(255, 255, 255, 1);

            NormalChannel1 = new Normal(-1, 0);
            NormalChannel2 = new Normal(-1, 0);

            SpecularChannel1 = new Specular(-1);
            SpecularChannel2 = new Specular(-1);

            ReflectionChannel1 = new Reflection(new Color4(255, 255, 255, 1), 0);
            ReflectionChannel2 = new Reflection(new Color4(255, 255, 255, 1), 0);

            TransparancyChannel1 = new Transparancy(-1);
        }