public DirectionalLight Get()
        {
            DirectionalLight light = new DirectionalLight();

            light.Direction = this.Direction;
            light.Diffuse = this.Diffuse;
            light.Specular = this.Specular;

            return light;
        }
예제 #2
0
        public virtual void SetDefaults()
        {
            SpecularColor = Vector3.One;
            SpecularPower = 64;

            DiffuseColor = Vector4.One;
            Light0       = new DirectionalLight {
                Direction = new Vector3(0.5f, 0.25f, 1),
                Diffuse   = Vector4.One,
                Specular  = Vector4.One * 0.75f,
            };
            Light1 = new DirectionalLight {
                Direction = new Vector3(0, -1, 0),
                Diffuse   = Vector4.One,
                Specular  = Vector4.One * 0.75f,
            };
            Light2 = new DirectionalLight {
                Direction = new Vector3(-0.5f, 0.25f, -1),
                Diffuse   = Vector4.One,
                Specular  = Vector4.One * 0.75f,
            };

            /*
             * Light0 = new DirectionalLight {
             *  Direction = new Vector3(-0.5265408f, -0.5735765f, -0.6275069f),
             *  Diffuse = new Vector4(1, 0.9607844f, 0.8078432f, 1),
             *  Specular = new Vector4(1, 0.9607844f, 0.8078432f, 1),
             * };
             * Light1 = new DirectionalLight {
             *  Direction = new Vector3(0.7198464f, 0.3420201f, 0.6040227f),
             *  Diffuse = new Vector4(0.9647059f, 0.7607844f, 0.4078432f, 1),
             *  Specular = Vector4.One,
             * };
             * Light2 = new DirectionalLight {
             *  Direction = new Vector3(0.4545195f, -0.7660444f, 0.4545195f),
             *  Diffuse = new Vector4(0.3231373f, 0.3607844f, 0.3937255f, 1),
             *  Specular = new Vector4(0.3231373f, 0.3607844f, 0.3937255f, 1),
             * };
             */
            this.AmbientColor = new Vector3(0.05333332f, 0.09882354f, 0.1819608f);
        }
 public void Set(DirectionalLight light)
 {
     this.Direction = light.Direction;
     this.Diffuse = light.Diffuse;
     this.Specular = light.Specular;
 }
예제 #4
0
        public virtual void SetDefaults()
        {
            SpecularColor = Vector3.One;
            SpecularPower = 64;

            DiffuseColor = Vector4.One;
            Light0 = new DirectionalLight {
                Direction = new Vector3(0.5f, 0.25f, 1),
                Diffuse = Vector4.One,
                Specular = Vector4.One * 0.75f,
            };
            Light1 = new DirectionalLight {
                Direction = new Vector3(0, -1, 0),
                Diffuse = Vector4.One,
                Specular = Vector4.One * 0.75f,
            };
            Light2 = new DirectionalLight {
                Direction = new Vector3(-0.5f, 0.25f, -1),
                Diffuse = Vector4.One,
                Specular = Vector4.One * 0.75f,
            };
            /*
            Light0 = new DirectionalLight {
                Direction = new Vector3(-0.5265408f, -0.5735765f, -0.6275069f),
                Diffuse = new Vector4(1, 0.9607844f, 0.8078432f, 1),
                Specular = new Vector4(1, 0.9607844f, 0.8078432f, 1),
            };
            Light1 = new DirectionalLight {
                Direction = new Vector3(0.7198464f, 0.3420201f, 0.6040227f),
                Diffuse = new Vector4(0.9647059f, 0.7607844f, 0.4078432f, 1),
                Specular = Vector4.One,
            };
            Light2 = new DirectionalLight {
                Direction = new Vector3(0.4545195f, -0.7660444f, 0.4545195f),
                Diffuse = new Vector4(0.3231373f, 0.3607844f, 0.3937255f, 1),
                Specular = new Vector4(0.3231373f, 0.3607844f, 0.3937255f, 1),
            };
            */
            this.AmbientColor = new Vector3(0.05333332f, 0.09882354f, 0.1819608f);
        }
예제 #5
0
 public void Set(DirectionalLight light)
 {
     this.Direction = light.Direction;
     this.Diffuse   = light.Diffuse;
     this.Specular  = light.Specular;
 }