Implemented inline voxel get

This commit is contained in:
CobaltXII
2018-12-29 15:16:24 -05:00
parent 284af581e7
commit 6bb3d9c92d

View File

@@ -9,4 +9,11 @@ struct world
unsigned int x_res;
unsigned int y_res;
unsigned int z_res;
// Get the voxel at the specified coordinates.
inline voxel get(unsigned int x, unsigned int y, unsigned int z)
{
return voxels[x + x_res * (y + y_res * z)];
}
};