Esempio n. 1
0
 public MeshData CalculateMeshData()
 {
     // Go through each block and make it generate its mesh. Pass it the MeshData for this chunk to add to
     for (int x = 0; x < CHUNK_SIZE; x++)
     {
         for (int y = 0; y < CHUNK_SIZE; y++)
         {
             for (int z = 0; z < CHUNK_SIZE; z++)
             {
                 Voxel voxel = GetVoxel(x, y, z);
                 voxel.CalculateMeshData(MeshData);
             }
         }
     }
     return(MeshData);
 }