Move some terrain tile mesh calculations to the mesh class