예제 #1
0
 public Polygon2DDiviser(Polygon2D parent)
 {
     Parent = parent;
     SubDivision = new Polygon2DCollection();
     Divisers = new LineSegment2DCollection();
     InnerPoints = new Point2DCollection();
     SubDivision.Add(Parent);
 }
 public Polygon2DDiviser(Polygon2D parent)
 {
     Parent      = parent;
     SubDivision = new Polygon2DCollection();
     Divisers    = new LineSegment2DCollection();
     InnerPoints = new Point2DCollection();
     SubDivision.Add(Parent);
 }
예제 #3
0
        public CompatibleDiviser(Polygon2D a, Polygon2D b)
        {
            this.firstPolygon = a;
            this.secondPolygon = b;

            this.firstPolygonCollection = new Polygon2DCollection();
            this.secondPolygonCollection = new Polygon2DCollection();

            targetDiviser = new TargetDiviser(b);
        }
        public void Union(Polygon2DCollection polygon2DCollection)
        {
            Capacity += polygon2DCollection.Capacity;

            Polygon2D[] polygons = new Polygon2D[Capacity];

            this.Polygons.CopyTo(polygons, 0);
            polygon2DCollection.Polygons.CopyTo(polygons, this.Count);
            this.Polygons = polygons;
            CurrentCount += polygon2DCollection.Count;
        }
        public void Union(Polygon2DCollection polygon2DCollection)
        {
            Capacity += polygon2DCollection.Capacity;

            Polygon2D[] polygons = new Polygon2D[Capacity];

            this.Polygons.CopyTo(polygons, 0);
            polygon2DCollection.Polygons.CopyTo(polygons, this.Count);
            this.Polygons = polygons;
            CurrentCount += polygon2DCollection.Count;
        }
        private void GetResult()
        {
            this.FirstResult = new Polygon2DCollection();
            this.SecondResult = new Polygon2DCollection();

            for (int i = 0; i < FirstPolygons.SubDivision.Count; i++)
            {
                if (FirstPolygons.SubDivision[i].VertexCount == 3)
                {
                    this.FirstResult.Add(FirstPolygons.SubDivision[i]);
                    this.SecondResult.Add(SecondPolygons.SubDivision[i]);
                }
            }
        }