Exemplo n.º 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;
 }
Exemplo n.º 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;
 }
Exemplo n.º 3
0
        public Color3D ReadColor3D()
        {
            Color3D color = new Color3D();

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

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