Esempio n. 1
0
 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);
     }
 }
Esempio n. 2
0
 public PasteVertex PasteVertexOfCopyVertex(CopyVertex copyVertex)
 {
     foreach (PasteVertex pasteVertex in pasteVertices)
     {
         if (pasteVertex.copyVertex.ID == copyVertex.ID)
         {
             return(pasteVertex);
         }
     }
     return(null);
 }
Esempio n. 3
0
        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);
            }
        }
Esempio n. 4
0
        public PasteVertex PasteVertexOfTriangleIndex(int triangleIndex)
        {
            CopyVertex copyVertex = vertices[triangleIndex];

            return(PasteVertexOfCopyVertex(copyVertex));
        }