public void CopySelectionVertices() { vertices = new List <CopyVertex>(); foreach (SelectedVertex selectedVertex in mesh.selection.selectedVertices) { CopyVertex copyVertex = new CopyVertex(); copyVertex.position = mesh.vertices.vertices[selectedVertex.index].position; copyVertex.indexFromMesh = selectedVertex.index; vertices.Add(copyVertex); } }
public PasteVertex PasteVertexOfCopyVertex(CopyVertex copyVertex) { foreach (PasteVertex pasteVertex in pasteVertices) { if (pasteVertex.copyVertex.ID == copyVertex.ID) { return(pasteVertex); } } return(null); }
public void WallCopyPasteEdges(List <Edge> copyExteriorEdges, Copy copy) { for (int i = 0; i < copyExteriorEdges.Count; i++) { Edge edge = copyExteriorEdges[i]; CopyVertex copyVertexA = copy.CopyVertexOfVertex(edge.a); CopyVertex copyVertexB = copy.CopyVertexOfVertex(edge.b); PasteVertex pasteVertexA = copy.PasteVertexOfCopyVertex(copyVertexA); PasteVertex pasteVertexB = copy.PasteVertexOfCopyVertex(copyVertexB); Vertex a = mesh.vertices.vertices[copyVertexA.indexFromMesh]; Vertex b = mesh.vertices.vertices[pasteVertexA.indexInMesh]; Vertex c = mesh.vertices.vertices[pasteVertexB.indexInMesh]; Vertex d = mesh.vertices.vertices[copyVertexB.indexFromMesh]; mesh.triangles.AddQuadByVertices(d.instance, c.instance, b.instance, a.instance, edge.materialIndex); } }
public PasteVertex PasteVertexOfTriangleIndex(int triangleIndex) { CopyVertex copyVertex = vertices[triangleIndex]; return(PasteVertexOfCopyVertex(copyVertex)); }