Пример #1
0
 public Class145.Class148 method_3()
 {
     this.class148_0 = this.class33_0.method_4();
     if (this.class148_0 != null)
     {
         this.class148_0.vmethod_0(this.class33_0);
     }
     return(this.class148_0);
 }
Пример #2
0
 public override void vmethod_0(Class145.Class146 scanBeam)
 {
     this.class148_0 = scanBeam.method_3();
     if (this.class148_0 != null && this.class148_0.point2D_0.Y == scanBeam.double_1)
     {
         this.double_0 = this.class148_0.point2D_0.X;
         Class145.Class146 class146 = scanBeam;
         int int0 = class146.int_0;
         int num  = int0;
         class146.int_0 = int0 + 1;
         this.int_0     = num;
         scanBeam.class34_0.Add(this);
     }
 }
Пример #3
0
        internal static void smethod_1(Polygon2D polygon, byte type, List <Class145.Class148.Class149> 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    = Math.Sign(point2D.Y - item.Y);
                    if (num1 == 0)
                    {
                        num1 = Math.Sign(point2D.X - item.X);
                    }
                    if (num1 != 0)
                    {
                        num++;
                        break;
                    }
                    else
                    {
                        num++;
                    }
                }
                else
                {
                    break;
                }
            }
            Class145.Class148          class150  = null;
            Action <Class145.Class148> class1480 = null;

            while (true)
            {
                if (num <= count)
                {
                    Point2D item1 = polygon[num % count];
                    int     num2  = Math.Sign(item1.Y - point2D.Y);
                    if (num2 == 0)
                    {
                        num2 = Math.Sign(item1.X - point2D.X);
                    }
                    if (num2 != 0)
                    {
                        if (num2 == num1)
                        {
                            if (num2 <= 0)
                            {
                                Class145.Class148 class148 = new Class145.Class148.Class150(point2D);
                                class1480 = (Class145.Class148 prev) => class148.class148_0 = prev;
                                class150  = class148;
                            }
                            else
                            {
                                Class145.Class148 class1501 = new Class145.Class148.Class150(point2D);
                                class1480 = (Class145.Class148 prev) => prev.class148_0 = class1501;
                                class150  = class1501;
                            }
                        }
                        else if (num2 <= 0 || num1 >= 0)
                        {
                            Class145.Class148.Class151 class151 = new Class145.Class148.Class151(point2D);
                            Class145.Class148.Class152 class152 = new Class145.Class148.Class152(point2D);
                            class1480 = (Class145.Class148 prev) => prev.class148_0 = class152;
                            class150  = class151;
                        }
                        else
                        {
                            Class145.Class148.Class149 class149 = new Class145.Class148.Class149(point2D);
                            class1480 = (Class145.Class148 prev) => class149.class148_1 = prev;
                            class150  = class149;
                            localMinimumList.Add(class149);
                        }
                        num1    = num2;
                        point2D = item1;
                        num++;
                        break;
                    }
                    else
                    {
                        num++;
                    }
                }
                else
                {
                    break;
                }
            }
            int num3 = count + 2;

            while (num < num3)
            {
                Point2D point2D1 = polygon[num % count];
                int     num4     = Math.Sign(point2D1.Y - point2D.Y);
                if (num4 == 0)
                {
                    num4 = Math.Sign(point2D1.X - point2D.X);
                }
                if (num4 != 0)
                {
                    if (num4 == num1)
                    {
                        if (num4 <= 0)
                        {
                            class150 = new Class145.Class148.Class150(point2D)
                            {
                                class148_0 = class150
                            };
                        }
                        else
                        {
                            Class145.Class148 class1481 = new Class145.Class148.Class150(point2D);
                            class150.class148_0 = class1481;
                            class150            = class1481;
                        }
                    }
                    else if (num4 <= 0 || num1 >= 0)
                    {
                        Class145.Class148.Class151 class1511 = new Class145.Class148.Class151(point2D);
                        class150.class148_0 = new Class145.Class148.Class152(point2D);
                        class150            = class1511;
                    }
                    else
                    {
                        Class145.Class148.Class149 class1491 = new Class145.Class148.Class149(point2D)
                        {
                            class148_1 = class150
                        };
                        class150 = class1491;
                        localMinimumList.Add(class1491);
                    }
                    num1    = num4;
                    point2D = point2D1;
                }
                num++;
            }
            if (class1480 != null)
            {
                class1480(class150);
            }
        }
Пример #4
0
 public void method_0(Class145.Class148 v, int id)
 {
     this.class148_0 = v;
     this.double_0   = v.point2D_0.X;
     this.int_0      = id;
 }
Пример #5
0
 public void method_0()
 {
     this.class148_0 = this.method_3();
     while (this.class148_0 != null)
     {
         this.list_3.Clear();
         this.double_1 = this.class148_0.point2D_0.Y;
         Class145.Class155.Class156 class1560 = this.class156_0;
         Class145.Class148          class1480 = this.class148_0;
         Class145.Class146          class146  = this;
         int int0 = class146.int_0;
         int num  = int0;
         class146.int_0 = int0 + 1;
         class1560.method_0(class1480, num);
         this.class34_0.Add(this.class156_0);
         int num1 = 0;
         while (true)
         {
             if (num1 < this.list_1.Count)
             {
                 Class145.Class147 item = this.list_1[num1];
                 if (item.point2D_1.Y > this.double_1)
                 {
                     Class145.Class155.Class157 class1570 = this.class157_0;
                     Class145.Class146          class1461 = this;
                     int int01 = class1461.int_0;
                     int num2  = int01;
                     class1461.int_0 = int01 + 1;
                     class1570.method_0(item, num1, num2);
                     this.class34_0.Add(this.class157_0);
                     break;
                 }
                 else
                 {
                     num1++;
                 }
             }
             else
             {
                 break;
             }
         }
         Class145.Class155 class155 = this.class34_0.method_4();
         this.double_0 = class155.double_0;
         while (true)
         {
             class155.vmethod_1(this);
             class155.vmethod_0(this);
             class155 = this.class34_0.method_4();
             if (class155 == null)
             {
                 break;
             }
             if (class155.double_0 != this.double_0)
             {
                 this.method_1();
                 this.double_0 = class155.double_0;
             }
         }
         this.method_1();
         List <Class145.Class147> list1 = this.list_1;
         this.list_1 = this.list_3;
         this.list_3 = list1;
     }
 }