示例#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;
 }
示例#2
0
        public Color3b(IColor3 other)
        {
            ITuple3_Byte _other = other.AsTupleByte();

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

            this.Red   = _other.X;
            this.Green = _other.Y;
            this.Blue  = _other.Z;
        }
示例#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;
        }
示例#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;
        }
示例#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));
        }
示例#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));
        }
示例#10
0
 public static Color4b ToColor4b(this IColor3 c, byte alpha = 0)
 {
     return(new Color4b(c, alpha));
 }
示例#11
0
 public static Color4f ToColor4f(this IColor3 c, float alpha = 0)
 {
     return(new Color4f(c, alpha));
 }
示例#12
0
        bool IEquatable <IColor3> .Equals(IColor3 other)
        {
            ITuple3_Float _other = other.AsTupleFloat();

            return(this.Equals(_other.X, _other.Y, _other.Z));
        }
示例#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));
        }
示例#14
0
        bool IEquatable <IColor3> .Equals(IColor3 other)
        {
            ITuple3_Byte _other = other.AsTupleByte();

            return(this.Equals(_other.X, _other.Y, _other.Z));
        }
示例#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));
        }