TerraForge3D  2.3.1
3D Terrain And Landscape Generator

◆ Clone()

Mesh * Mesh::Clone ( )

Definition at line 431 of file Mesh.cpp.

432{
433 Mesh *cloneMesh = new Mesh();
434 cloneMesh->res = res;
435 cloneMesh->sc = sc;
436 cloneMesh->maxHeight = maxHeight;
437 cloneMesh->vertexCount = vertexCount;
438 cloneMesh->indexCount = indexCount;
439 cloneMesh->vert = new Vert[vertexCount];
440 memcpy(cloneMesh->vert, vert, sizeof(Vert) * vertexCount);
441 cloneMesh->indices = new int[indexCount];
442 memcpy(cloneMesh->indices, indices, sizeof(int) * indexCount);
443 return cloneMesh;
444}
Definition: Mesh.h:21
Definition: Mesh.h:13