Exemple #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;
 }
Exemple #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;
 }
        public Color3D ReadColor3D()
        {
            Color3D color = new Color3D();

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

            return color;
        }
Exemple #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;
        }
        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;
        }
Exemple #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));
 }
 public void WriteColor3D(Color3D color)
 {
     this.Write(color.R);
     this.Write(color.G);
     this.Write(color.B);
 }
Exemple #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);
 }