Esempio n. 1
0
 public Class100(VattiClipper2DV3.Class102 startVertex, VattiClipper2DV3.Class102 endVertex)
 {
     this.point2D_0  = startVertex.point2D_0;
     this.point2D_1  = endVertex.point2D_0;
     this.class102_0 = startVertex;
     this.class102_1 = endVertex;
 }
Esempio n. 2
0
        internal static void smethod_0(Polygon2D polygon, byte type, List <VattiClipper2DV3.Class102.Class103> localMinimumList)
        {
            if (polygon.Count == 0)
            {
                return;
            }
            Point2D item    = polygon[0];
            Point2D point2D = item;
            int     num     = 1;
            int     num1    = 0;
            int     count   = polygon.Count;

            while (true)
            {
                if (num < count)
                {
                    point2D = polygon[num];
                    num1    = System.Math.Sign(point2D.Y - item.Y);
                    if (num1 == 0)
                    {
                        num1 = System.Math.Sign(point2D.X - item.X);
                    }
                    if (num1 != 0)
                    {
                        num++;
                        break;
                    }
                    else
                    {
                        num++;
                    }
                }
                else
                {
                    break;
                }
            }
            VattiClipper2DV3.Class102          class102  = null;
            Action <VattiClipper2DV3.Class102> class1020 = null;

            while (true)
            {
                if (num <= count)
                {
                    Point2D item1 = polygon[num % count];
                    int     num2  = System.Math.Sign(item1.Y - point2D.Y);
                    if (num2 == 0)
                    {
                        num2 = System.Math.Sign(item1.X - point2D.X);
                    }
                    if (num2 != 0)
                    {
                        if (num2 == num1)
                        {
                            if (num2 <= 0)
                            {
                                VattiClipper2DV3.Class102 class1021 = new VattiClipper2DV3.Class102(point2D);
                                class1020 = (VattiClipper2DV3.Class102 prev) => class1021.class102_0 = prev;
                                class102  = class1021;
                            }
                            else
                            {
                                VattiClipper2DV3.Class102 class1022 = new VattiClipper2DV3.Class102(point2D);
                                class1020 = (VattiClipper2DV3.Class102 prev) => prev.class102_0 = class1022;
                                class102  = class1022;
                            }
                        }
                        else if (num2 <= 0 || num1 >= 0)
                        {
                            VattiClipper2DV3.Class102 class1023 = new VattiClipper2DV3.Class102(point2D);
                            class1020 = (VattiClipper2DV3.Class102 prev) => prev.class102_0 = class1023;
                            class102  = class1023;
                        }
                        else
                        {
                            VattiClipper2DV3.Class102.Class103 class103 = new VattiClipper2DV3.Class102.Class103(point2D);
                            class1020 = (VattiClipper2DV3.Class102 prev) => class103.class102_1 = prev;
                            class102  = class103;
                            localMinimumList.Add(class103);
                        }
                        num1    = num2;
                        point2D = item1;
                        num++;
                        break;
                    }
                    else
                    {
                        num++;
                    }
                }
                else
                {
                    break;
                }
            }
            int num3 = count + 2;

            while (num < num3)
            {
                Point2D point2D1 = polygon[num % count];
                int     num4     = System.Math.Sign(point2D1.Y - point2D.Y);
                if (num4 == 0)
                {
                    num4 = System.Math.Sign(point2D1.X - point2D.X);
                }
                if (num4 != 0)
                {
                    if (num4 == num1)
                    {
                        if (num4 <= 0)
                        {
                            class102 = new VattiClipper2DV3.Class102(point2D)
                            {
                                class102_0 = class102
                            };
                        }
                        else
                        {
                            VattiClipper2DV3.Class102 class1024 = new VattiClipper2DV3.Class102(point2D);
                            class102.class102_0 = class1024;
                            class102            = class1024;
                        }
                    }
                    else if (num4 <= 0 || num1 >= 0)
                    {
                        VattiClipper2DV3.Class102 class1025 = new VattiClipper2DV3.Class102(point2D);
                        class102.class102_0 = class1025;
                        class102            = class1025;
                    }
                    else
                    {
                        VattiClipper2DV3.Class102.Class103 class1031 = new VattiClipper2DV3.Class102.Class103(point2D)
                        {
                            class102_1 = class102
                        };
                        class102 = class1031;
                        localMinimumList.Add(class1031);
                    }
                    num1    = num4;
                    point2D = point2D1;
                }
                num++;
            }
            if (class1020 != null)
            {
                class1020(class102);
            }
        }