aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim.Terrain.BasicTerrain/TerrainEngine.cs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim.Terrain.BasicTerrain/TerrainEngine.cs20
1 files changed, 20 insertions, 0 deletions
diff --git a/OpenSim.Terrain.BasicTerrain/TerrainEngine.cs b/OpenSim.Terrain.BasicTerrain/TerrainEngine.cs
index 45da742..87dbf7e 100644
--- a/OpenSim.Terrain.BasicTerrain/TerrainEngine.cs
+++ b/OpenSim.Terrain.BasicTerrain/TerrainEngine.cs
@@ -7,10 +7,19 @@ namespace OpenSim.Terrain
7{ 7{
8 public class TerrainEngine 8 public class TerrainEngine
9 { 9 {
10 /// <summary>
11 /// A [normally] 256x256 heightmap
12 /// </summary>
10 public float[,] map; 13 public float[,] map;
14 /// <summary>
15 /// A 256x256 heightmap storing water height values
16 /// </summary>
11 public float[,] water; 17 public float[,] water;
12 int w, h; 18 int w, h;
13 19
20 /// <summary>
21 /// Generate a new TerrainEngine instance and creates a new heightmap
22 /// </summary>
14 public TerrainEngine() 23 public TerrainEngine()
15 { 24 {
16 w = 256; 25 w = 256;
@@ -90,6 +99,14 @@ namespace OpenSim.Terrain
90 RaiseLower.raiseSphere(this.map, rx, ry, size, amount); 99 RaiseLower.raiseSphere(this.map, rx, ry, size, amount);
91 } 100 }
92 } 101 }
102
103 /// <summary>
104 /// Lowers the land in a sphere around the specified coordinates
105 /// </summary>
106 /// <param name="rx">The center of the sphere at the X axis</param>
107 /// <param name="ry">The center of the sphere at the Y axis</param>
108 /// <param name="size">The radius of the sphere in meters</param>
109 /// <param name="amount">Scale the height of the sphere by this amount (recommended 0..2)</param>
93 public void lower(double rx, double ry, double size, double amount) 110 public void lower(double rx, double ry, double size, double amount)
94 { 111 {
95 lock (map) 112 lock (map)
@@ -98,6 +115,9 @@ namespace OpenSim.Terrain
98 } 115 }
99 } 116 }
100 117
118 /// <summary>
119 /// Generates a simple set of hills in the shape of an island
120 /// </summary>
101 public void hills() 121 public void hills()
102 { 122 {
103 lock (map) 123 lock (map)