aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Terrain.BasicTerrain/TerrainEngine.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Terrain.BasicTerrain/TerrainEngine.cs')
-rw-r--r--OpenSim/Region/Terrain.BasicTerrain/TerrainEngine.cs26
1 files changed, 26 insertions, 0 deletions
diff --git a/OpenSim/Region/Terrain.BasicTerrain/TerrainEngine.cs b/OpenSim/Region/Terrain.BasicTerrain/TerrainEngine.cs
index d177ed5..f017e44 100644
--- a/OpenSim/Region/Terrain.BasicTerrain/TerrainEngine.cs
+++ b/OpenSim/Region/Terrain.BasicTerrain/TerrainEngine.cs
@@ -124,6 +124,15 @@ namespace OpenSim.Region.Terrain
124 } 124 }
125 125
126 /// <summary> 126 /// <summary>
127 /// Converts the heightmap to a 256x256 value 2D floating point array. Double precision version.
128 /// </summary>
129 /// <returns>An array of 256,256 values containing the heightmap</returns>
130 public double[,] getHeights2DD()
131 {
132 return heightmap.map;
133 }
134
135 /// <summary>
127 /// Imports a 1D floating point array into the 2D heightmap array 136 /// Imports a 1D floating point array into the 2D heightmap array
128 /// </summary> 137 /// </summary>
129 /// <param name="heights">The array to import (must have 65536 members)</param> 138 /// <param name="heights">The array to import (must have 65536 members)</param>
@@ -156,6 +165,23 @@ namespace OpenSim.Region.Terrain
156 } 165 }
157 166
158 /// <summary> 167 /// <summary>
168 /// Loads a 2D array of values into the heightmap (Double Precision Version)
169 /// </summary>
170 /// <param name="heights">An array of 256,256 float values</param>
171 public void setHeights2D(double[,] heights)
172 {
173 int x, y;
174 for (x = 0; x < w; x++)
175 {
176 for (y = 0; y < h; y++)
177 {
178 heightmap.set(x, y, heights[x, y]);
179 }
180 }
181 tainted++;
182 }
183
184 /// <summary>
159 /// Swaps the two heightmap buffers (the 'revert map' and the heightmap) 185 /// Swaps the two heightmap buffers (the 'revert map' and the heightmap)
160 /// </summary> 186 /// </summary>
161 public void swapRevertMaps() 187 public void swapRevertMaps()