Added getHeights1D() function to TerrainEngine

0.1-prestable
Adam Frisby 2007-04-06 18:53:18 +00:00
parent fb0dffbf13
commit e0b84e0aa1
1 changed files with 10 additions and 0 deletions

View File

@ -20,6 +20,16 @@ namespace OpenSim.Terrain
}
public float[] getHeights1D()
{
float[] heights = new float[w*h];
int i;
for(i=0;i<w*h;i++) {
heights[i] = (int)(i / w) + (i % w);
}
return heights;
}
/// <summary>
/// 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.
/// </summary>