diff options
author | Adam Frisby | 2007-04-06 18:53:18 +0000 |
---|---|---|
committer | Adam Frisby | 2007-04-06 18:53:18 +0000 |
commit | e0b84e0aa1b15b78ad415a45373d667478090e6b (patch) | |
tree | 08b114a323ca7c22c0d594e47427689abba07d88 /OpenSim.Terrain.BasicTerrain | |
parent | **BREAKING CHANGE** Changing the way terrain is stored and used internally. (diff) | |
download | opensim-SC_OLD-e0b84e0aa1b15b78ad415a45373d667478090e6b.zip opensim-SC_OLD-e0b84e0aa1b15b78ad415a45373d667478090e6b.tar.gz opensim-SC_OLD-e0b84e0aa1b15b78ad415a45373d667478090e6b.tar.bz2 opensim-SC_OLD-e0b84e0aa1b15b78ad415a45373d667478090e6b.tar.xz |
Added getHeights1D() function to TerrainEngine
Diffstat (limited to 'OpenSim.Terrain.BasicTerrain')
-rw-r--r-- | OpenSim.Terrain.BasicTerrain/TerrainEngine.cs | 10 |
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> |