Added setHeights1D to allow importing from a 1D array

0.1-prestable
Adam Frisby 2007-04-07 16:30:16 +00:00
parent 30a5e028c5
commit 55aaf8060f
1 changed files with 9 additions and 0 deletions

View File

@ -30,6 +30,15 @@ namespace OpenSim.Terrain
return heights;
}
public void setHeights1D(float[] heights)
{
int i;
for (i = 0; i < w * h; i++)
{
map[i / w, i % w] = heights[i];
}
}
/// <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>