aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Terrain.BasicTerrain/libTerrainBSD/Channel/Manipulators/HydraulicErosion.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Terrain.BasicTerrain/libTerrainBSD/Channel/Manipulators/HydraulicErosion.cs')
-rw-r--r--OpenSim/Region/Terrain.BasicTerrain/libTerrainBSD/Channel/Manipulators/HydraulicErosion.cs14
1 files changed, 7 insertions, 7 deletions
diff --git a/OpenSim/Region/Terrain.BasicTerrain/libTerrainBSD/Channel/Manipulators/HydraulicErosion.cs b/OpenSim/Region/Terrain.BasicTerrain/libTerrainBSD/Channel/Manipulators/HydraulicErosion.cs
index e3463c1..5ace241 100644
--- a/OpenSim/Region/Terrain.BasicTerrain/libTerrainBSD/Channel/Manipulators/HydraulicErosion.cs
+++ b/OpenSim/Region/Terrain.BasicTerrain/libTerrainBSD/Channel/Manipulators/HydraulicErosion.cs
@@ -34,17 +34,17 @@ namespace libTerrain
34{ 34{
35 partial class Channel 35 partial class Channel
36 { 36 {
37 public void hydraulicErosion(Channel rain, double evaporation, double solubility, int frequency, int rounds) 37 public void HydraulicErosion(Channel rain, double evaporation, double solubility, int frequency, int rounds)
38 { 38 {
39 Channel water = new Channel(w, h); 39 Channel water = new Channel(w, h);
40 Channel sediment = new Channel(w, h); 40 Channel sediment = new Channel(w, h);
41 Channel terrain = this; 41 Channel terrain = this;
42 Channel waterFlow = new Channel(w, h); 42 Channel waterFlow = new Channel(w, h);
43 43
44 NEIGHBOURS type = NEIGHBOURS.NEIGHBOUR_MOORE; 44 NeighbourSystem type = NeighbourSystem.Moore;
45 int NEIGHBOUR_ME = 4; 45 int NEIGHBOUR_ME = 4;
46 46
47 int NEIGHBOUR_MAX = type == NEIGHBOURS.NEIGHBOUR_MOORE ? 9 : 5; 47 int NEIGHBOUR_MAX = type == NeighbourSystem.Moore ? 9 : 5;
48 48
49 for (int i = 0; i < rounds; i++) 49 for (int i = 0; i < rounds; i++)
50 { 50 {
@@ -66,7 +66,7 @@ namespace libTerrain
66 { 66 {
67 if (j != NEIGHBOUR_ME) 67 if (j != NEIGHBOUR_ME)
68 { 68 {
69 int[] coords = neighbours(type, j); 69 int[] coords = Neighbours(type, j);
70 coords[0] += x; 70 coords[0] += x;
71 coords[1] += y; 71 coords[1] += y;
72 72
@@ -107,13 +107,13 @@ namespace libTerrain
107 { 107 {
108 if (j != NEIGHBOUR_ME) 108 if (j != NEIGHBOUR_ME)
109 { 109 {
110 int[] coords = neighbours(type, j); 110 int[] coords = Neighbours(type, j);
111 coords[0] += x; 111 coords[0] += x;
112 coords[1] += y; 112 coords[1] += y;
113 113
114 if (diffs[j] > 0) 114 if (diffs[j] > 0)
115 { 115 {
116 waterFlow.setWrap(coords[0], coords[1], waterFlow.map[coords[0], coords[1]] + diffs[j] * totalInverseDiff); 116 waterFlow.SetWrap(coords[0], coords[1], waterFlow.map[coords[0], coords[1]] + diffs[j] * totalInverseDiff);
117 } 117 }
118 } 118 }
119 } 119 }
@@ -121,7 +121,7 @@ namespace libTerrain
121 } 121 }
122 122
123 water += waterFlow; 123 water += waterFlow;
124 waterFlow.fill(0); 124 waterFlow.Fill(0);
125 125
126 water *= evaporation; 126 water *= evaporation;
127 127