aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/Modules/Terrain/PaintBrushes/ErodeSphere.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Environment/Modules/Terrain/PaintBrushes/ErodeSphere.cs')
-rw-r--r--OpenSim/Region/Environment/Modules/Terrain/PaintBrushes/ErodeSphere.cs26
1 files changed, 13 insertions, 13 deletions
diff --git a/OpenSim/Region/Environment/Modules/Terrain/PaintBrushes/ErodeSphere.cs b/OpenSim/Region/Environment/Modules/Terrain/PaintBrushes/ErodeSphere.cs
index a8942dc..cfb1f60 100644
--- a/OpenSim/Region/Environment/Modules/Terrain/PaintBrushes/ErodeSphere.cs
+++ b/OpenSim/Region/Environment/Modules/Terrain/PaintBrushes/ErodeSphere.cs
@@ -25,8 +25,8 @@
25 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 */ 26 */
27 27
28using OpenSim.Region.Environment.Interfaces;
29using System; 28using System;
29using OpenSim.Region.Environment.Interfaces;
30 30
31namespace OpenSim.Region.Environment.Modules.Terrain.PaintBrushes 31namespace OpenSim.Region.Environment.Modules.Terrain.PaintBrushes
32{ 32{
@@ -35,18 +35,12 @@ namespace OpenSim.Region.Environment.Modules.Terrain.PaintBrushes
35 /// </summary> 35 /// </summary>
36 public class ErodeSphere : ITerrainPaintableEffect 36 public class ErodeSphere : ITerrainPaintableEffect
37 { 37 {
38 NeighbourSystem type = NeighbourSystem.Moore; // Parameter 38 private double rainHeight = 0.2;
39 39 private int rounds = 10;
40 double rainHeight = 0.2; 40 private NeighbourSystem type = NeighbourSystem.Moore; // Parameter
41 int rounds = 10; 41 private double waterSaturation = 0.30; // Can carry 1% of water in height
42 double waterSaturation = 0.30; // Can carry 1% of water in height
43 42
44 #region Supporting Functions 43 #region Supporting Functions
45 private enum NeighbourSystem
46 {
47 Moore,
48 VonNeumann
49 } ;
50 44
51 private int[] Neighbours(NeighbourSystem type, int index) 45 private int[] Neighbours(NeighbourSystem type, int index)
52 { 46 {
@@ -146,6 +140,12 @@ namespace OpenSim.Region.Environment.Modules.Terrain.PaintBrushes
146 return coord; 140 return coord;
147 } 141 }
148 142
143 private enum NeighbourSystem
144 {
145 Moore,
146 VonNeumann
147 } ;
148
149 #endregion 149 #endregion
150 150
151 #region ITerrainPaintableEffect Members 151 #region ITerrainPaintableEffect Members
@@ -266,7 +266,7 @@ namespace OpenSim.Region.Environment.Modules.Terrain.PaintBrushes
266 // Calculate how much water we can move 266 // Calculate how much water we can move
267 double waterMin = Math.Min(water[x, y], altitudeDelta); 267 double waterMin = Math.Min(water[x, y], altitudeDelta);
268 double waterDelta = waterMin * ((water[coords[0], coords[1]] + map[coords[0], coords[1]]) 268 double waterDelta = waterMin * ((water[coords[0], coords[1]] + map[coords[0], coords[1]])
269 / altitudeTotal); 269 / altitudeTotal);
270 270
271 double sedimentDelta = sediment[x, y] * (waterDelta / water[x, y]); 271 double sedimentDelta = sediment[x, y] * (waterDelta / water[x, y]);
272 272
@@ -309,4 +309,4 @@ namespace OpenSim.Region.Environment.Modules.Terrain.PaintBrushes
309 309
310 #endregion 310 #endregion
311 } 311 }
312} 312} \ No newline at end of file