Пример #1
0
 public IfMaterial(IfModel ifModel, IfColor color, double specularColor = .5, double SpecularHighlight = 65, double transparency = 0)
 {
     IfColor           = color;
     IfModel           = ifModel;
     IfElements        = new List <IfElement>();
     SpecularColor     = specularColor;
     SpecularHighlight = specularColor;
     Transparency      = transparency;
     if (IfModel == null)
     {
         return;
     }
     New();
 }
Пример #2
0
        public static IfColor GetColor(IfColorEnum ifColorEnum)
        {
            IfColor res = null;

            switch (ifColorEnum)
            {
            case IfColorEnum.Red:
                res = new IfColor(1, 0, 0);
                break;

            case IfColorEnum.Green:
                res = new IfColor(0, 1, 0);
                break;

            case IfColorEnum.Blue:
                res = new IfColor(0, 0, 1);
                break;

            case IfColorEnum.DeepSkyBlue:
                res = new IfColor(1, 0, 0);
                break;

            case IfColorEnum.Pink:
                res = new IfColor(255, 20, 147);
                break;

            case IfColorEnum.Yellow:
                res = new IfColor(1, 0, 0);
                break;

            case IfColorEnum.Orange:
                res = new IfColor(255, 69, 0);
                break;

            case IfColorEnum.Tomato:
                res = new IfColor(255, 99, 71);
                break;

            case IfColorEnum.MediumPurple:
                res = new IfColor(147, 112, 219);
                break;

            case IfColorEnum.Violet:
                res = new IfColor(238, 130, 238);
                break;

            case IfColorEnum.Turquoise:
                res = new IfColor(173, 234, 234);
                break;

            case IfColorEnum.DarkGolden:
                res = new IfColor(184, 134, 11);
                break;

            case IfColorEnum.LightSlateGrey:
                res = new IfColor(119, 136, 153);
                break;

            case IfColorEnum.DodgerBlue:
                res = new IfColor(30, 144, 255);
                break;
            }
            return(res);
        }
Пример #3
0
 public IfMaterial(IfModel ifModel, IfColor color) : this(ifModel, color, .5, 65, 0)
 {
 }