diff options
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/Terrain.BasicTerrain/libTerrainBSD/Channel/Manipulators/AerobicErosion.cs | 29 |
1 files changed, 23 insertions, 6 deletions
diff --git a/OpenSim/Region/Terrain.BasicTerrain/libTerrainBSD/Channel/Manipulators/AerobicErosion.cs b/OpenSim/Region/Terrain.BasicTerrain/libTerrainBSD/Channel/Manipulators/AerobicErosion.cs index 870b9b2..97c2762 100644 --- a/OpenSim/Region/Terrain.BasicTerrain/libTerrainBSD/Channel/Manipulators/AerobicErosion.cs +++ b/OpenSim/Region/Terrain.BasicTerrain/libTerrainBSD/Channel/Manipulators/AerobicErosion.cs | |||
@@ -74,7 +74,7 @@ namespace libTerrain | |||
74 | /// <param name="carry">The percentage of rock which can be picked up to pickup 0..1</param> | 74 | /// <param name="carry">The percentage of rock which can be picked up to pickup 0..1</param> |
75 | /// <param name="rounds">The number of erosion rounds (recommended: 25+)</param> | 75 | /// <param name="rounds">The number of erosion rounds (recommended: 25+)</param> |
76 | /// <param name="lowest">Drop sediment at the lowest point?</param> | 76 | /// <param name="lowest">Drop sediment at the lowest point?</param> |
77 | public void AerobicErosion(double windspeed, double pickup_talus_minimum, double drop_talus_minimum, double carry, int rounds, bool lowest) | 77 | public void AerobicErosion(double windspeed, double pickup_talus_minimum, double drop_talus_minimum, double carry, int rounds, bool lowest, bool usingFluidDynamics) |
78 | { | 78 | { |
79 | Channel wind = new Channel(w, h) ; | 79 | Channel wind = new Channel(w, h) ; |
80 | Channel sediment = new Channel(w, h); | 80 | Channel sediment = new Channel(w, h); |
@@ -83,7 +83,15 @@ namespace libTerrain | |||
83 | wind = this.copy(); | 83 | wind = this.copy(); |
84 | wind.normalise(); // Cheap wind calculations | 84 | wind.normalise(); // Cheap wind calculations |
85 | wind *= windspeed; | 85 | wind *= windspeed; |
86 | wind.pertubation(30); // Can do better later | 86 | |
87 | if (usingFluidDynamics) | ||
88 | { | ||
89 | wind.navierStokes(20, 0.1, 0.0, 0.0); | ||
90 | } | ||
91 | else | ||
92 | { | ||
93 | wind.pertubation(30); // Can do better later | ||
94 | } | ||
87 | 95 | ||
88 | for (i = 0; i < rounds; i++) | 96 | for (i = 0; i < rounds; i++) |
89 | { | 97 | { |
@@ -115,10 +123,19 @@ namespace libTerrain | |||
115 | } | 123 | } |
116 | } | 124 | } |
117 | } | 125 | } |
118 | sediment.pertubation(10); // Sediment is blown around a bit | 126 | |
119 | sediment.seed++; | 127 | if (usingFluidDynamics) |
120 | wind.pertubation(15); // So is the wind | 128 | { |
121 | wind.seed++; | 129 | sediment.navierStokes(7, 0.1, 0.0, 0.1); |
130 | wind.navierStokes(10, 0.1, 0.0, 0.0); | ||
131 | } | ||
132 | else | ||
133 | { | ||
134 | wind.pertubation(15); // Can do better later | ||
135 | wind.seed++; | ||
136 | sediment.pertubation(10); // Sediment is blown around a bit | ||
137 | sediment.seed++; | ||
138 | } | ||
122 | 139 | ||
123 | // Convert some sand to rock | 140 | // Convert some sand to rock |
124 | for (x = 1; x < w - 1; x++) | 141 | for (x = 1; x < w - 1; x++) |