/// <summary> /// copy constructor /// </summary> /// <param name="instance">copy instance</param> public CSG(CSG instance) { Polygons = new List <CSGPolygon>(instance.Polygons.Count); foreach (var polygon in instance.Polygons) { Polygons.Add(new CSGPolygon(polygon)); } root = new CSGNode(); root.Build(Polygons); }
/// <summary> /// copy constructor /// </summary> /// <param name="instance">copy instance</param> public CSG(CSG instance) { Polygons = new List<CSGPolygon>(instance.Polygons.Count); foreach (var polygon in instance.Polygons) { Polygons.Add(new CSGPolygon(polygon)); } root = new CSGNode(); root.Build(Polygons); }
// Token: 0x06004176 RID: 16758 RVA: 0x0014A900 File Offset: 0x00148D00 public CSG Inverse() { CSG result = new CSG(this); foreach (CSGPolygon csgpolygon in this.Polygons) { csgpolygon.Flip(); } return(result); }
// Token: 0x0600416D RID: 16749 RVA: 0x0014A328 File Offset: 0x00148728 public CSG(CSG instance) { this.Polygons = new List <CSGPolygon>(instance.Polygons.Count); foreach (CSGPolygon instance2 in instance.Polygons) { this.Polygons.Add(new CSGPolygon(instance2)); } this.root = new CSGNode(); this.root.Build(this.Polygons); }
/// <summary> /// make a csg inverse operation of this tree /// </summary> /// <returns>new csg tree</returns> public CSG Inverse() { var a = new CSG(this); foreach (var polygon in Polygons) { polygon.Flip(); } return(a); }
/// <summary> /// make a csg union operation between this and parameter /// </summary> /// <param name="csg">csg tree</param> /// <returns>new csg tree</returns> public CSG Union(CSG csg) { var a = new CSG(this); var b = new CSG(csg); a.root.ClipTo(b.root); b.root.ClipTo(a.root); b.root.Invert(); b.root.ClipTo(a.root); b.root.Invert(); a.root.Build(b.root.AllPolygons()); return(a); }
// Token: 0x06004172 RID: 16754 RVA: 0x0014A764 File Offset: 0x00148B64 public CSG Union(CSG csg) { CSG csg2 = new CSG(this); CSG csg3 = new CSG(csg); csg2.root.ClipTo(csg3.root); csg3.root.ClipTo(csg2.root); csg3.root.Invert(); csg3.root.ClipTo(csg2.root); csg3.root.Invert(); csg2.root.Build(csg3.root.AllPolygons()); return(csg2); }
/// <summary> /// make a csg union operation between this and parameter /// </summary> /// <param name="csg">csg tree</param> /// <returns>new csg tree</returns> public CSG Union(CSG csg) { var a = new CSG(this); var b = new CSG(csg); a.root.ClipTo(b.root); b.root.ClipTo(a.root); b.root.Invert(); b.root.ClipTo(a.root); b.root.Invert(); a.root.Build(b.root.AllPolygons()); return a; }
/// <summary> /// make a csg inverse operation of this tree /// </summary> /// <returns>new csg tree</returns> public CSG Inverse() { var a = new CSG(this); foreach (var polygon in Polygons) { polygon.Flip(); } return a; }