Example #1
0
 public Mat(string name, IColor3 diffuse)
 {
     this.Name     = name;
     this.Ambient  = null;
     this.Diffuse  = diffuse;
     this.Specular = null;
     this.Model    = MaterialFormat.IlluminationModel.ColorOnAmbientOff;
 }
Example #2
0
        public Color3b(IColor3 other)
        {
            ITuple3_Byte _other = other.AsTupleByte();

            this.Red   = _other.X;
            this.Green = _other.Y;
            this.Blue  = _other.Z;
        }
Example #3
0
 public static Color3b ToColor3b(this IColor3 c)
 {
     if (c is Color3b)
     {
         return((Color3b)c);
     }
     return(new Color3b(c));
 }
Example #4
0
 public static Color3f ToColor3f(this IColor3 c)
 {
     if (c is Color3f)
     {
         return((Color3f)c);
     }
     return(new Color3f(c));
 }
Example #5
0
        public Color3f(IColor3 other)
        {
            ITuple3_Float _other = other.AsTupleFloat();

            this.Red   = _other.X;
            this.Green = _other.Y;
            this.Blue  = _other.Z;
        }
Example #6
0
        public Color4b(IColor3 other, byte alpha)
        {
            ITuple3_Byte _other = other.AsTupleByte();

            this.Red   = _other.X;
            this.Green = _other.Y;
            this.Blue  = _other.Z;
            this.Alpha = alpha;
        }
Example #7
0
        public Color4f(IColor3 other, float alpha)
        {
            ITuple3_Float _other = other.AsTupleFloat();

            this.Red   = _other.X;
            this.Green = _other.Y;
            this.Blue  = _other.Z;
            this.Alpha = alpha;
        }
Example #8
0
        public static ITuple3_Byte AsTupleByte(this IColor3 v)
        {
            ITuple3_Byte ret = v as ITuple3_Byte;

            if (ret != null)
            {
                return(ret);
            }
            return(VectorUtils.Convert <ITuple3_Byte>(v));
        }
Example #9
0
        public static ITuple3_Float AsTupleFloat(this IColor3 v)
        {
            ITuple3_Float ret = v as ITuple3_Float;

            if (ret != null)
            {
                return(ret);
            }
            return(VectorUtils.Convert <IColor3, ITuple3_Float>(v));
        }
Example #10
0
 public static Color4b ToColor4b(this IColor3 c, byte alpha = 0)
 {
     return(new Color4b(c, alpha));
 }
Example #11
0
 public static Color4f ToColor4f(this IColor3 c, float alpha = 0)
 {
     return(new Color4f(c, alpha));
 }
Example #12
0
        bool IEquatable <IColor3> .Equals(IColor3 other)
        {
            ITuple3_Float _other = other.AsTupleFloat();

            return(this.Equals(_other.X, _other.Y, _other.Z));
        }
Example #13
0
        bool IEpsilonEquatable <IColor3> .EpsilonEquals(IColor3 other, double epsilon)
        {
            ITuple3_Float _other = other.AsTupleFloat();

            return(this.EpsilonEquals(_other.X, _other.Y, _other.Z, (float)epsilon));
        }
Example #14
0
        bool IEquatable <IColor3> .Equals(IColor3 other)
        {
            ITuple3_Byte _other = other.AsTupleByte();

            return(this.Equals(_other.X, _other.Y, _other.Z));
        }
Example #15
0
        bool IEpsilonEquatable <IColor3> .EpsilonEquals(IColor3 other, double epsilon)
        {
            ITuple3_Byte _other = other.AsTupleByte();

            return(this.EpsilonEquals(_other.X, _other.Y, _other.Z, (byte)epsilon));
        }