コード例 #1
0
ファイル: Copy.cs プロジェクト: swipswaps/mesh_maker_vr
 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);
     }
 }
コード例 #2
0
ファイル: Copy.cs プロジェクト: swipswaps/mesh_maker_vr
 public PasteVertex PasteVertexOfCopyVertex(CopyVertex copyVertex)
 {
     foreach (PasteVertex pasteVertex in pasteVertices)
     {
         if (pasteVertex.copyVertex.ID == copyVertex.ID)
         {
             return(pasteVertex);
         }
     }
     return(null);
 }
コード例 #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);
            }
        }
コード例 #4
0
ファイル: Copy.cs プロジェクト: swipswaps/mesh_maker_vr
        public PasteVertex PasteVertexOfTriangleIndex(int triangleIndex)
        {
            CopyVertex copyVertex = vertices[triangleIndex];

            return(PasteVertexOfCopyVertex(copyVertex));
        }