aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorAdam Frisby2007-04-06 18:53:18 +0000
committerAdam Frisby2007-04-06 18:53:18 +0000
commite0b84e0aa1b15b78ad415a45373d667478090e6b (patch)
tree08b114a323ca7c22c0d594e47427689abba07d88
parent**BREAKING CHANGE** Changing the way terrain is stored and used internally. (diff)
downloadopensim-SC-e0b84e0aa1b15b78ad415a45373d667478090e6b.zip
opensim-SC-e0b84e0aa1b15b78ad415a45373d667478090e6b.tar.gz
opensim-SC-e0b84e0aa1b15b78ad415a45373d667478090e6b.tar.bz2
opensim-SC-e0b84e0aa1b15b78ad415a45373d667478090e6b.tar.xz
Added getHeights1D() function to TerrainEngine
-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>