aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim.Terrain.BasicTerrain
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim.Terrain.BasicTerrain/TerrainEngine.cs10
1 files changed, 10 insertions, 0 deletions
diff --git a/OpenSim.Terrain.BasicTerrain/TerrainEngine.cs b/OpenSim.Terrain.BasicTerrain/TerrainEngine.cs
index f805d18..0f5efa5 100644
--- a/OpenSim.Terrain.BasicTerrain/TerrainEngine.cs
+++ b/OpenSim.Terrain.BasicTerrain/TerrainEngine.cs
@@ -20,6 +20,16 @@ namespace OpenSim.Terrain
20 20
21 } 21 }
22 22
23 public float[] getHeights1D()
24 {
25 float[] heights = new float[w*h];
26 int i;
27 for(i=0;i<w*h;i++) {
28 heights[i] = (int)(i / w) + (i % w);
29 }
30 return heights;
31 }
32
23 /// <summary> 33 /// <summary>
24 /// Swaps the references between the height and water buffers to allow you to edit the water heightmap. Remember to swap back when you are done. 34 /// Swaps the references between the height and water buffers to allow you to edit the water heightmap. Remember to swap back when you are done.
25 /// </summary> 35 /// </summary>