Added the genMesh method to the Terrain class.