* Terrain now uses the new StorageManager.

This commit is contained in:
Adam Frisby
2007-07-15 15:51:09 +00:00
parent 6d455f3b6c
commit 2dea3dbd6b
3 changed files with 32 additions and 6 deletions

View File

@@ -123,6 +123,15 @@ namespace OpenSim.Region.Terrain
return heights;
}
/// <summary>
/// Converts the heightmap to a 256x256 value 2D floating point array. Double precision version.
/// </summary>
/// <returns>An array of 256,256 values containing the heightmap</returns>
public double[,] getHeights2DD()
{
return heightmap.map;
}
/// <summary>
/// Imports a 1D floating point array into the 2D heightmap array
/// </summary>
@@ -155,6 +164,23 @@ namespace OpenSim.Region.Terrain
tainted++;
}
/// <summary>
/// Loads a 2D array of values into the heightmap (Double Precision Version)
/// </summary>
/// <param name="heights">An array of 256,256 float values</param>
public void setHeights2D(double[,] heights)
{
int x, y;
for (x = 0; x < w; x++)
{
for (y = 0; y < h; y++)
{
heightmap.set(x, y, heights[x, y]);
}
}
tainted++;
}
/// <summary>
/// Swaps the two heightmap buffers (the 'revert map' and the heightmap)
/// </summary>