diff options
author | Jeff Ames | 2008-05-16 01:22:11 +0000 |
---|---|---|
committer | Jeff Ames | 2008-05-16 01:22:11 +0000 |
commit | 65c5efe43b68700bad94076d4cd421160203c5de (patch) | |
tree | 589b56649ed02f4942671fd6e51c6dc43f682e0d /OpenSim/Region/Environment/Modules/World/Terrain/PaintBrushes | |
parent | Thank you very much, mjm for : (diff) | |
download | opensim-SC-65c5efe43b68700bad94076d4cd421160203c5de.zip opensim-SC-65c5efe43b68700bad94076d4cd421160203c5de.tar.gz opensim-SC-65c5efe43b68700bad94076d4cd421160203c5de.tar.bz2 opensim-SC-65c5efe43b68700bad94076d4cd421160203c5de.tar.xz |
Formatting cleanup.
Diffstat (limited to 'OpenSim/Region/Environment/Modules/World/Terrain/PaintBrushes')
4 files changed, 12 insertions, 12 deletions
diff --git a/OpenSim/Region/Environment/Modules/World/Terrain/PaintBrushes/FlattenSphere.cs b/OpenSim/Region/Environment/Modules/World/Terrain/PaintBrushes/FlattenSphere.cs index 0c4e3de..7bf88f0 100644 --- a/OpenSim/Region/Environment/Modules/World/Terrain/PaintBrushes/FlattenSphere.cs +++ b/OpenSim/Region/Environment/Modules/World/Terrain/PaintBrushes/FlattenSphere.cs | |||
@@ -43,14 +43,14 @@ namespace OpenSim.Region.Environment.Modules.World.Terrain.PaintBrushes | |||
43 | double sum = 0.0; | 43 | double sum = 0.0; |
44 | double step2 = 0.0; | 44 | double step2 = 0.0; |
45 | 45 | ||
46 | // compute delta map | 46 | // compute delta map |
47 | for (x = 0; x < map.Width; x++) | 47 | for (x = 0; x < map.Width; x++) |
48 | { | 48 | { |
49 | for (y = 0; y < map.Height; y++) | 49 | for (y = 0; y < map.Height; y++) |
50 | { | 50 | { |
51 | double z = TerrainUtil.SphericalFactor(x, y, rx, ry, strength); | 51 | double z = TerrainUtil.SphericalFactor(x, y, rx, ry, strength); |
52 | 52 | ||
53 | if (z > 0) // add in non-zero amount | 53 | if (z > 0) // add in non-zero amount |
54 | { | 54 | { |
55 | sum += map[x, y] * z; | 55 | sum += map[x, y] * z; |
56 | step2 += z; | 56 | step2 += z; |
@@ -60,14 +60,14 @@ namespace OpenSim.Region.Environment.Modules.World.Terrain.PaintBrushes | |||
60 | 60 | ||
61 | double avg = sum / step2; | 61 | double avg = sum / step2; |
62 | 62 | ||
63 | // blend in map | 63 | // blend in map |
64 | for (x = 0; x < map.Width; x++) | 64 | for (x = 0; x < map.Width; x++) |
65 | { | 65 | { |
66 | for (y = 0; y < map.Height; y++) | 66 | for (y = 0; y < map.Height; y++) |
67 | { | 67 | { |
68 | double z = TerrainUtil.SphericalFactor(x, y, rx, ry, strength) * duration; | 68 | double z = TerrainUtil.SphericalFactor(x, y, rx, ry, strength) * duration; |
69 | 69 | ||
70 | if (z > 0) // add in non-zero amount | 70 | if (z > 0) // add in non-zero amount |
71 | { | 71 | { |
72 | if (z > 1.0) | 72 | if (z > 1.0) |
73 | z = 1.0; | 73 | z = 1.0; |
diff --git a/OpenSim/Region/Environment/Modules/World/Terrain/PaintBrushes/OlsenSphere.cs b/OpenSim/Region/Environment/Modules/World/Terrain/PaintBrushes/OlsenSphere.cs index f2a1800..6df8408 100644 --- a/OpenSim/Region/Environment/Modules/World/Terrain/PaintBrushes/OlsenSphere.cs +++ b/OpenSim/Region/Environment/Modules/World/Terrain/PaintBrushes/OlsenSphere.cs | |||
@@ -32,8 +32,8 @@ namespace OpenSim.Region.Environment.Modules.World.Terrain.PaintBrushes | |||
32 | { | 32 | { |
33 | /// <summary> | 33 | /// <summary> |
34 | /// Speed-Optimised Hybrid Erosion Brush | 34 | /// Speed-Optimised Hybrid Erosion Brush |
35 | /// | 35 | /// |
36 | /// As per Jacob Olsen's Paper | 36 | /// As per Jacob Olsen's Paper |
37 | /// http://www.oddlabs.com/download/terrain_generation.pdf | 37 | /// http://www.oddlabs.com/download/terrain_generation.pdf |
38 | /// </summary> | 38 | /// </summary> |
39 | public class OlsenSphere : ITerrainPaintableEffect | 39 | public class OlsenSphere : ITerrainPaintableEffect |
@@ -164,7 +164,7 @@ namespace OpenSim.Region.Environment.Modules.World.Terrain.PaintBrushes | |||
164 | { | 164 | { |
165 | double z = TerrainUtil.SphericalFactor(x, y, rx, ry, strength); | 165 | double z = TerrainUtil.SphericalFactor(x, y, rx, ry, strength); |
166 | 166 | ||
167 | if (z > 0) // add in non-zero amount | 167 | if (z > 0) // add in non-zero amount |
168 | { | 168 | { |
169 | const int NEIGHBOUR_ME = 4; | 169 | const int NEIGHBOUR_ME = 4; |
170 | const int NEIGHBOUR_MAX = 9; | 170 | const int NEIGHBOUR_MAX = 9; |
diff --git a/OpenSim/Region/Environment/Modules/World/Terrain/PaintBrushes/SmoothSphere.cs b/OpenSim/Region/Environment/Modules/World/Terrain/PaintBrushes/SmoothSphere.cs index 49946fd..fc0a579 100644 --- a/OpenSim/Region/Environment/Modules/World/Terrain/PaintBrushes/SmoothSphere.cs +++ b/OpenSim/Region/Environment/Modules/World/Terrain/PaintBrushes/SmoothSphere.cs | |||
@@ -43,14 +43,14 @@ namespace OpenSim.Region.Environment.Modules.World.Terrain.PaintBrushes | |||
43 | double area = strength; | 43 | double area = strength; |
44 | double step = strength / 4.0; | 44 | double step = strength / 4.0; |
45 | 45 | ||
46 | // compute delta map | 46 | // compute delta map |
47 | for (x = 0; x < map.Width; x++) | 47 | for (x = 0; x < map.Width; x++) |
48 | { | 48 | { |
49 | for (y = 0; y < map.Height; y++) | 49 | for (y = 0; y < map.Height; y++) |
50 | { | 50 | { |
51 | double z = TerrainUtil.SphericalFactor(x, y, rx, ry, strength); | 51 | double z = TerrainUtil.SphericalFactor(x, y, rx, ry, strength); |
52 | 52 | ||
53 | if (z > 0) // add in non-zero amount | 53 | if (z > 0) // add in non-zero amount |
54 | { | 54 | { |
55 | double average = 0.0; | 55 | double average = 0.0; |
56 | int avgsteps = 0; | 56 | int avgsteps = 0; |
@@ -69,14 +69,14 @@ namespace OpenSim.Region.Environment.Modules.World.Terrain.PaintBrushes | |||
69 | } | 69 | } |
70 | } | 70 | } |
71 | } | 71 | } |
72 | // blend in map | 72 | // blend in map |
73 | for (x = 0; x < map.Width; x++) | 73 | for (x = 0; x < map.Width; x++) |
74 | { | 74 | { |
75 | for (y = 0; y < map.Height; y++) | 75 | for (y = 0; y < map.Height; y++) |
76 | { | 76 | { |
77 | double z = TerrainUtil.SphericalFactor(x, y, rx, ry, strength); | 77 | double z = TerrainUtil.SphericalFactor(x, y, rx, ry, strength); |
78 | 78 | ||
79 | if (z > 0) // add in non-zero amount | 79 | if (z > 0) // add in non-zero amount |
80 | { | 80 | { |
81 | double da = z; | 81 | double da = z; |
82 | double a = (map[x, y] - tweak[x, y]) * da; | 82 | double a = (map[x, y] - tweak[x, y]) * da; |
diff --git a/OpenSim/Region/Environment/Modules/World/Terrain/PaintBrushes/WeatherSphere.cs b/OpenSim/Region/Environment/Modules/World/Terrain/PaintBrushes/WeatherSphere.cs index 753d171..b3aa732 100644 --- a/OpenSim/Region/Environment/Modules/World/Terrain/PaintBrushes/WeatherSphere.cs +++ b/OpenSim/Region/Environment/Modules/World/Terrain/PaintBrushes/WeatherSphere.cs | |||
@@ -160,7 +160,7 @@ namespace OpenSim.Region.Environment.Modules.World.Terrain.PaintBrushes | |||
160 | { | 160 | { |
161 | double z = TerrainUtil.SphericalFactor(x, y, rx, ry, strength); | 161 | double z = TerrainUtil.SphericalFactor(x, y, rx, ry, strength); |
162 | 162 | ||
163 | if (z > 0) // add in non-zero amount | 163 | if (z > 0) // add in non-zero amount |
164 | { | 164 | { |
165 | const int NEIGHBOUR_ME = 4; | 165 | const int NEIGHBOUR_ME = 4; |
166 | const int NEIGHBOUR_MAX = 9; | 166 | const int NEIGHBOUR_MAX = 9; |