public static Vector3[,] GenerateRealMap(this TerrainFile @this) { const float scale = 3.2f; //3.125f; var heightMap = @this.GenerateHeightMap(); var centerX = (heightMap.GetLength(0) - 1) / 2; var centerY = (heightMap.GetLength(1) - 1) / 2; var weight = heightMap.GetLength(0); var height = heightMap.GetLength(1); var inGameValues = new Vector3[weight, height]; for (var x = 0; x < weight; x++) { for (var y = 0; y < height; y++) { var value = heightMap[x, y]; var realX = x - centerX; var realY = y - centerY; var inGame = new Vector2(realX, realY); inGame *= scale; inGameValues[x, y] = new Vector3(inGame.X, value, inGame.Y); } } return(inGameValues); }