public CubeMesh(ref GameMap.Map map) { grid = map.GetCubeGrid(); width = grid.width; height = grid.height; depth = grid.depth; GetCubeVertices(); GetCubeTriangles(); GetCubeNormals(); }
public MarchingMesh(ref GameMap.Map map) { grid = map.GetMarchingGrid(); width = grid.width; height = grid.height; depth = grid.depth; edgeTable = data.edgeTable; triTable = data.triTable; for (int i = 0; i < width - 1; i++) { for (int f = 0; f < height; f++) { for (int g = 0; g < depth - 1; g++) { Polygonize(i, f, g); } } } }