Function Polygon.CompressMesh
CompressMesh
(List<Int3> vertices, List<int> triangles, List<uint> tags, outInt3[] outVertices, out int[] outTriangles, out uint[] outTags)
Compress the mesh by removing duplicate vertices.
Public
Static
void CompressMesh (
List<Int3> | vertices | Vertices of the input mesh |
List<int> | triangles | Triangles of the input mesh |
List<uint> | tags | Tags of the input mesh. One for each triangle. |
outInt3[] | outVertices | Vertices of the output mesh. |
out int[] | outTriangles | Triangles of the output mesh. |
out uint[] | outTags | Tags of the output mesh. One for each triangle. |
Compress the mesh by removing duplicate vertices.
Vertices that differ by only 1 along the y coordinate will also be merged together.
Warning
This function is not threadsafe. It uses some cached structures to reduce allocations.