mirror of
https://github.com/opensim/opensim.git
synced 2026-08-05 17:05:55 +08:00
* Terrain now uses the new StorageManager.
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user