public Mesh GetMesh() { Mesh m = new Mesh(); int[] map = new int[Vertices.Count]; for (int i = 0; i < Vertices.Count; i++) { map[i] = -1; } for (int i = 0; i < Vertices.Count; i++) { ECVertex v = Vertices[i]; if (v.IsValid()) { map[i] = m.AddVertex(new Point3d(v.X, v.Y, v.Z)); } } for (int i = 0; i < Faces.Count; i++) { ECFace f = Faces[i]; if (f.IsValid()) { Triangle t = new Triangle(map[f.GetVertex(0).UId], map[f.GetVertex(1).UId], map[f.GetVertex(2).UId]); m.AddFace(t); } } return(m); }
public void KillVertex(ECVertex v) { if (v.IsValid()) { v.Kill(); ValidVerticesCount--; } }