From 855122add1e01f277af4b4732cd1b9463bfbd8e5 Mon Sep 17 00:00:00 2001 From: Adam Frisby Date: Sun, 22 Apr 2007 02:58:39 +0000 Subject: [PATCH] Comments (Part 2/2) --- OpenSim.Terrain.BasicTerrain/TerrainEngine.cs | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/OpenSim.Terrain.BasicTerrain/TerrainEngine.cs b/OpenSim.Terrain.BasicTerrain/TerrainEngine.cs index cd40d0f7cf..38c4d0f4eb 100644 --- a/OpenSim.Terrain.BasicTerrain/TerrainEngine.cs +++ b/OpenSim.Terrain.BasicTerrain/TerrainEngine.cs @@ -160,6 +160,10 @@ namespace OpenSim.Terrain tainted++; } + /// + /// Writes the current terrain heightmap to disk, in the format of a 65536 entry double[] array. + /// + /// The desired output filename public void writeToFileF64(string filename) { System.IO.FileInfo file = new System.IO.FileInfo(filename); @@ -179,6 +183,10 @@ namespace OpenSim.Terrain s.Close(); } + /// + /// Writes the current terrain heightmap to disk, in the format of a 65536 entry float[] array + /// + /// The desired output filename public void writeToFileF32(string filename) { System.IO.FileInfo file = new System.IO.FileInfo(filename); @@ -198,6 +206,10 @@ namespace OpenSim.Terrain s.Close(); } + /// + /// Sets the random seed to be used by procedural functions which involve random numbers. + /// + /// The desired seed public void setSeed(int val) { heightmap.seed = val; @@ -252,12 +264,24 @@ namespace OpenSim.Terrain tainted++; } + /// + /// Multiplies the heightfield by val + /// + /// The heightfield + /// The multiplier + /// public static TerrainEngine operator *(TerrainEngine meep, Double val) { meep.heightmap *= val; meep.tainted++; return meep; } + /// + /// Returns the height at the coordinates x,y + /// + /// X Coordinate + /// Y Coordinate + /// public float this[int x, int y] { get