Esempio n. 1
0
        private void Flipping()
        {
            Polygon2DAdorner leftPolygon = this.LeftPolygon;
            Polygon2DAdorner rightPolygon = this.RightPolygon;

            while(leftPolygon != null)
            {
                if (StatusController.Triangulator != TriangulationTech.Single)
                {
                    Fliper fliper = new Fliper(leftPolygon.polygon, rightPolygon.polygon);

                    fliper.Flipping(leftPolygon.GhostTriangles);
                }

                else if (StatusController.availablePartition == Partition.Left)
                {
                    Fliper fliper = new Fliper(leftPolygon.polygon, leftPolygon.polygon);

                    fliper.Flipping(leftPolygon.GhostTriangles);
                }

                else
                {
                    Fliper fliper = new Fliper(rightPolygon.polygon, rightPolygon.polygon);

                    fliper.Flipping(rightPolygon.GhostTriangles);
                }

                leftPolygon = leftPolygon.Next();
                rightPolygon = rightPolygon.Next();
            }

            this.Invalidate();
        }
Esempio n. 2
0
        private void flipMenuItem_Click_1(object sender, System.EventArgs e)
        {
            Fliper fliper = new Fliper(this.FirstPolygon, this.SecondPolygon);

            fliper.Flipping(this.LeftPolygon.GhostTriangles);

            this.Invalidate();
        }