Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public void Load(string heightMapFileName, float blockScale, float heightScale)
- {
- Initialize();
- vertexCountX = texture.Width;
- vertexCountZ = texture.Height;
- this.blockScale = blockScale;
- this.heightScale = heightScale;
- FileStream fileStream = File.OpenRead(Game.Content.RootDirectory + "/" + heightMapFileName + ".raw");
- int heightMapSize = vertexCountX * vertexCountZ;
- heightMap = new byte[heightMapSize];
- fileStream.Read(heightMap, 0, heightMapSize);
- fileStream.Close();
- GenerateTerrainMesh();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement