/// <summary> /// Constructor. /// </summary> public C2DHoledPolygon(C2DHoledPolygon Other) { _Rim = new C2DPolygon(Other.Rim); for (int i = 0; i < Other.HoleCount; i++) { _Holes.Add(new C2DPolygon(Other.GetHole(i))); } }
/// <summary> /// Constructor. /// </summary> public C2DHoledPolygon(C2DHoledPolygon Other) { _Rim = new C2DPolygon(Other.Rim); for (var i = 0; i < Other.HoleCount; i++) { _Holes.Add(new C2DPolygon(Other.GetHole(i))); } }
/// <summary> /// Assignment. /// </summary> /// <param name="Other">Other polygon to set this to.</param> public void Set(C2DHoledPolygon Other) { _Holes.Clear(); _Rim = new C2DPolygon(Other.Rim); for (int i = 0; i < Other.HoleCount; i++) { _Holes.Add(new C2DPolygon(Other.GetHole(i))); } }
/// <summary> /// Gets the overlaps of the 2 shapes. /// </summary> /// <param name="Other">The other shape.</param> /// <param name="Polygons">The set to recieve the result.</param> /// <param name="grid">The degenerate settings.</param> public void GetOverlaps(C2DHoledPolygon Other, List <C2DHoledPolygon> Polygons, CGrid grid) { var NewPolys = new List <C2DHoledPolyBase>(); base.GetOverlaps(Other, NewPolys, grid); for (var i = 0; i < NewPolys.Count; i++) { Polygons.Add(new C2DHoledPolygon(NewPolys[i])); } }
/// <summary> /// Gets the union of the 2 shapes. /// </summary> /// <param name="Other">The other shape.</param> /// <param name="Polygons">The set to recieve the result.</param> /// <param name="grid">The degenerate settings.</param> public void GetUnion(C2DHoledPolygon Other, List <C2DHoledPolygon> Polygons, CGrid grid) { List <C2DHoledPolyBase> NewPolys = new List <C2DHoledPolyBase>(); base.GetUnion(Other, NewPolys, grid); for (int i = 0; i < NewPolys.Count; i++) { Polygons.Add(new C2DHoledPolygon(NewPolys[i])); } }
/// <summary> /// Gets the union of the 2 shapes. /// </summary> /// <param name="Other">The other shape.</param> /// <param name="Polygons">The set to recieve the result.</param> /// <param name="grid">The degenerate settings.</param> public void GetUnion(C2DHoledPolygon Other, List<C2DHoledPolygon> Polygons, CGrid grid) { List<C2DHoledPolyBase> NewPolys = new List<C2DHoledPolyBase>(); base.GetUnion(Other, NewPolys, grid); for (int i = 0; i < NewPolys.Count; i++) Polygons.Add(new C2DHoledPolygon(NewPolys[i])); }