From b8da9c3a64b84ab14642bad8c79d3b2ed62e62fb Mon Sep 17 00:00:00 2001 From: Adam Frisby Date: Mon, 23 Jul 2007 05:29:52 +0000 Subject: * Major style changes in libTerrain.Channel - now uses .NET-style naming syntax. * Issue#218 - Updated mySQL region table. --- .../Channel/Manipulators/AerobicErosion.cs | 30 +++++++++++----------- 1 file changed, 15 insertions(+), 15 deletions(-) (limited to 'OpenSim/Region/Terrain.BasicTerrain/libTerrainBSD/Channel/Manipulators/AerobicErosion.cs') diff --git a/OpenSim/Region/Terrain.BasicTerrain/libTerrainBSD/Channel/Manipulators/AerobicErosion.cs b/OpenSim/Region/Terrain.BasicTerrain/libTerrainBSD/Channel/Manipulators/AerobicErosion.cs index 97c2762..198c337 100644 --- a/OpenSim/Region/Terrain.BasicTerrain/libTerrainBSD/Channel/Manipulators/AerobicErosion.cs +++ b/OpenSim/Region/Terrain.BasicTerrain/libTerrainBSD/Channel/Manipulators/AerobicErosion.cs @@ -74,14 +74,14 @@ namespace libTerrain /// The percentage of rock which can be picked up to pickup 0..1 /// The number of erosion rounds (recommended: 25+) /// Drop sediment at the lowest point? - public void AerobicErosion(double windspeed, double pickup_talus_minimum, double drop_talus_minimum, double carry, int rounds, bool lowest, bool usingFluidDynamics) + public void AerobicErosion(double windspeed, double pickupTalusMinimum, double dropTalusMinimum, double carry, int rounds, bool lowest, bool usingFluidDynamics) { Channel wind = new Channel(w, h) ; Channel sediment = new Channel(w, h); int x, y, i, j; - wind = this.copy(); - wind.normalise(); // Cheap wind calculations + wind = this.Copy(); + wind.Normalise(); // Cheap wind calculations wind *= windspeed; if (usingFluidDynamics) @@ -90,7 +90,7 @@ namespace libTerrain } else { - wind.pertubation(30); // Can do better later + wind.Pertubation(30); // Can do better later } for (i = 0; i < rounds; i++) @@ -100,13 +100,13 @@ namespace libTerrain { for (y = 1; y < h - 1; y++) { - double me = get(x, y); + double me = Get(x, y); double surfacearea = 0.3; // Everything will erode even if it's flat. Just slower. for (j = 0; j < 9; j++) { - int[] coords = neighbours(NEIGHBOURS.NEIGHBOUR_MOORE, j); - double target = get(x + coords[0], y + coords[1]); + int[] coords = Neighbours(NeighbourSystem.Moore, j); + double target = Get(x + coords[0], y + coords[1]); surfacearea += Math.Abs(target - me); } @@ -116,7 +116,7 @@ namespace libTerrain if (amount < 0) amount = 0; - if (surfacearea > pickup_talus_minimum) + if (surfacearea > pickupTalusMinimum) { this.map[x, y] -= amount; sediment.map[x, y] += amount; @@ -131,9 +131,9 @@ namespace libTerrain } else { - wind.pertubation(15); // Can do better later + wind.Pertubation(15); // Can do better later wind.seed++; - sediment.pertubation(10); // Sediment is blown around a bit + sediment.Pertubation(10); // Sediment is blown around a bit sediment.seed++; } @@ -142,15 +142,15 @@ namespace libTerrain { for (y = 1; y < h - 1; y++) { - double me = get(x, y); + double me = Get(x, y); double surfacearea = 0.01; // Flat land does not get deposition double min = double.MaxValue; int[] minside = new int[2]; for (j = 0; j < 9; j++) { - int[] coords = neighbours(NEIGHBOURS.NEIGHBOUR_MOORE, j); - double target = get(x + coords[0], y + coords[1]); + int[] coords = Neighbours(NeighbourSystem.Moore, j); + double target = Get(x + coords[0], y + coords[1]); surfacearea += Math.Abs(target - me); @@ -166,7 +166,7 @@ namespace libTerrain if (amount < 0) amount = 0; - if (surfacearea > drop_talus_minimum) + if (surfacearea > dropTalusMinimum) { this.map[x + minside[0], y + minside[1]] += amount; sediment.map[x, y] -= amount; @@ -178,7 +178,7 @@ namespace libTerrain Channel myself = this; myself += sediment; - myself.normalise(); + myself.Normalise(); } } } \ No newline at end of file -- cgit v1.1