Drought.World.HeightMap.setHeight C# (CSharp) Method

setHeight() public method

public setHeight ( float x, float y, float height ) : void
x float
y float
height float
return void
        public void setHeight(float x, float y, float height)
        {
            map[(int)x, (int)y] = height;
        }

Usage Example

Example #1
0
        public HeightMap clone()
        {
            HeightMap heightMap = new HeightMap(width, height);
            for (int x = 0; x < width; x++)
                for (int y = 0; y < height; y++)
                    heightMap.setHeight(x, y, map[x, y]);

            return heightMap;
        }