예제 #1
0
 /// <summary>
 /// Constructs a Color4D from a Color3D and alpha value.
 /// </summary>
 /// <param name="rgb">RGB values</param>
 /// <param name="alpha">Alpha value</param>
 public Color4D(Color3D rgb, float alpha)
 {
     R = rgb.R;
     G = rgb.G;
     B = rgb.B;
     A = alpha;
 }
예제 #2
0
 /// <summary>
 /// Constructs a Color4D from a Color3D. Alpha is set to 1.0.
 /// </summary>
 /// <param name="rgb">RGB values</param>
 public Color4D(Color3D rgb)
 {
     R = rgb.R;
     G = rgb.G;
     B = rgb.B;
     A = 1.0f;
 }
예제 #3
0
        public Color3D ReadColor3D()
        {
            Color3D color = new Color3D();

            color.R = this.ReadSingle();
            color.G = this.ReadSingle();
            color.B = this.ReadSingle();

            return color;
        }
예제 #4
0
        public Material()
        {
            this.Name = "Material";
            this.diffuseColor = new Color3D(1f);
            this.ambientColor = new Color3D(1f);
            this.specularColor = new Color3D(0f);
            this.emissiveColor = new Color3D(0f);

            this.Opacity = 1f;
            this.SpecularExponent = 0f;
            this.FaceMap = false;
            this.TwoSided = false;
        }
예제 #5
0
        public Material()
        {
            this.Name          = "Material";
            this.diffuseColor  = new Color3D(1f);
            this.ambientColor  = new Color3D(1f);
            this.specularColor = new Color3D(0f);
            this.emissiveColor = new Color3D(0f);

            this.Opacity          = 1f;
            this.SpecularExponent = 0f;
            this.FaceMap          = false;
            this.TwoSided         = false;
        }
예제 #6
0
 /// <summary>
 /// Tests equality between this color and another color
 /// </summary>
 /// <param name="other">Color to test against</param>
 /// <returns>True if components are equal</returns>
 public bool Equals(Color3D other)
 {
     return((R == other.R) && (G == other.G) && (B == other.B));
 }
예제 #7
0
 public void WriteColor3D(Color3D color)
 {
     this.Write(color.R);
     this.Write(color.G);
     this.Write(color.B);
 }
예제 #8
0
 /// <summary>
 /// Tests equality between this color and another color
 /// </summary>
 /// <param name="other">Color to test against</param>
 /// <returns>True if components are equal</returns>
 public bool Equals(Color3D other)
 {
     return (R == other.R) && (G == other.G) && (B == other.B);
 }