diff options
Diffstat (limited to 'OpenSim/Region/Terrain.BasicTerrain/libTerrainBSD/Channel/Grid.cs')
-rw-r--r-- | OpenSim/Region/Terrain.BasicTerrain/libTerrainBSD/Channel/Grid.cs | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/OpenSim/Region/Terrain.BasicTerrain/libTerrainBSD/Channel/Grid.cs b/OpenSim/Region/Terrain.BasicTerrain/libTerrainBSD/Channel/Grid.cs index 5ba4ca6..a9106b4 100644 --- a/OpenSim/Region/Terrain.BasicTerrain/libTerrainBSD/Channel/Grid.cs +++ b/OpenSim/Region/Terrain.BasicTerrain/libTerrainBSD/Channel/Grid.cs | |||
@@ -34,10 +34,10 @@ namespace libTerrain | |||
34 | { | 34 | { |
35 | partial class Channel | 35 | partial class Channel |
36 | { | 36 | { |
37 | public Channel normalise() | 37 | public Channel Normalise() |
38 | { | 38 | { |
39 | double max = findMax(); | 39 | double max = FindMax(); |
40 | double min = findMin(); | 40 | double min = FindMin(); |
41 | 41 | ||
42 | int x, y; | 42 | int x, y; |
43 | 43 | ||
@@ -52,10 +52,10 @@ namespace libTerrain | |||
52 | return this; | 52 | return this; |
53 | } | 53 | } |
54 | 54 | ||
55 | public Channel normalise(double minv, double maxv) | 55 | public Channel Normalise(double minv, double maxv) |
56 | { | 56 | { |
57 | double max = findMax(); | 57 | double max = FindMax(); |
58 | double min = findMin(); | 58 | double min = FindMin(); |
59 | 59 | ||
60 | int x, y; | 60 | int x, y; |
61 | 61 | ||
@@ -74,7 +74,7 @@ namespace libTerrain | |||
74 | return this; | 74 | return this; |
75 | } | 75 | } |
76 | 76 | ||
77 | public Channel clip() | 77 | public Channel Clip() |
78 | { | 78 | { |
79 | int x, y; | 79 | int x, y; |
80 | 80 | ||
@@ -82,14 +82,14 @@ namespace libTerrain | |||
82 | { | 82 | { |
83 | for (y = 0; y < h; y++) | 83 | for (y = 0; y < h; y++) |
84 | { | 84 | { |
85 | setClip(x, y, map[x, y]); | 85 | SetClip(x, y, map[x, y]); |
86 | } | 86 | } |
87 | } | 87 | } |
88 | 88 | ||
89 | return this; | 89 | return this; |
90 | } | 90 | } |
91 | 91 | ||
92 | public Channel clip(double min, double max) | 92 | public Channel Clip(double min, double max) |
93 | { | 93 | { |
94 | int x, y; | 94 | int x, y; |
95 | for (x = 0; x < w; x++) | 95 | for (x = 0; x < w; x++) |
@@ -105,7 +105,7 @@ namespace libTerrain | |||
105 | return this; | 105 | return this; |
106 | } | 106 | } |
107 | 107 | ||
108 | public Channel crop(int x1, int y1, int x2, int y2) | 108 | public Channel Crop(int x1, int y1, int x2, int y2) |
109 | { | 109 | { |
110 | int width = x1 - x2 + 1; | 110 | int width = x1 - x2 + 1; |
111 | int height = y1 - y2 + 1; | 111 | int height = y1 - y2 + 1; |
@@ -130,7 +130,7 @@ namespace libTerrain | |||
130 | return this; | 130 | return this; |
131 | } | 131 | } |
132 | 132 | ||
133 | public Channel addClip(Channel other) | 133 | public Channel AddClip(Channel other) |
134 | { | 134 | { |
135 | int x, y; | 135 | int x, y; |
136 | for (x = 0; x < w; x++) | 136 | for (x = 0; x < w; x++) |
@@ -147,7 +147,7 @@ namespace libTerrain | |||
147 | return this; | 147 | return this; |
148 | } | 148 | } |
149 | 149 | ||
150 | public void smooth(double amount) | 150 | public void Smooth(double amount) |
151 | { | 151 | { |
152 | double area = amount; | 152 | double area = amount; |
153 | double step = amount / 4.0; | 153 | double step = amount / 4.0; |
@@ -167,7 +167,7 @@ namespace libTerrain | |||
167 | for (l = 0.0 - area; l < area; l += step) | 167 | for (l = 0.0 - area; l < area; l += step) |
168 | { | 168 | { |
169 | avgsteps++; | 169 | avgsteps++; |
170 | average += getBilinearInterpolate(x + n, y + l); | 170 | average += GetBilinearInterpolate(x + n, y + l); |
171 | } | 171 | } |
172 | } | 172 | } |
173 | 173 | ||
@@ -177,7 +177,7 @@ namespace libTerrain | |||
177 | map = manipulate; | 177 | map = manipulate; |
178 | } | 178 | } |
179 | 179 | ||
180 | public void pertubation(double amount) | 180 | public void Pertubation(double amount) |
181 | { | 181 | { |
182 | // Simple pertubation filter | 182 | // Simple pertubation filter |
183 | double[,] manipulated = new double[w, h]; | 183 | double[,] manipulated = new double[w, h]; |
@@ -191,14 +191,14 @@ namespace libTerrain | |||
191 | { | 191 | { |
192 | double offset_x = (double)x + (generator.NextDouble() * amount) - (amount / 2.0); | 192 | double offset_x = (double)x + (generator.NextDouble() * amount) - (amount / 2.0); |
193 | double offset_y = (double)y + (generator.NextDouble() * amount) - (amount / 2.0); | 193 | double offset_y = (double)y + (generator.NextDouble() * amount) - (amount / 2.0); |
194 | double p = getBilinearInterpolate(offset_x, offset_y); | 194 | double p = GetBilinearInterpolate(offset_x, offset_y); |
195 | manipulated[x, y] = p; | 195 | manipulated[x, y] = p; |
196 | } | 196 | } |
197 | } | 197 | } |
198 | map = manipulated; | 198 | map = manipulated; |
199 | } | 199 | } |
200 | 200 | ||
201 | public void pertubationMask(Channel mask) | 201 | public void PertubationMask(Channel mask) |
202 | { | 202 | { |
203 | // Simple pertubation filter | 203 | // Simple pertubation filter |
204 | double[,] manipulated = new double[w, h]; | 204 | double[,] manipulated = new double[w, h]; |
@@ -225,14 +225,14 @@ namespace libTerrain | |||
225 | if (offset_x < 0) | 225 | if (offset_x < 0) |
226 | offset_x = 0; | 226 | offset_x = 0; |
227 | 227 | ||
228 | double p = getBilinearInterpolate(offset_x, offset_y); | 228 | double p = GetBilinearInterpolate(offset_x, offset_y); |
229 | manipulated[x, y] = p; | 229 | manipulated[x, y] = p; |
230 | } | 230 | } |
231 | } | 231 | } |
232 | map = manipulated; | 232 | map = manipulated; |
233 | } | 233 | } |
234 | 234 | ||
235 | public Channel blend(Channel other, double amount) | 235 | public Channel Blend(Channel other, double amount) |
236 | { | 236 | { |
237 | int x, y; | 237 | int x, y; |
238 | for (x = 0; x < w; x++) | 238 | for (x = 0; x < w; x++) |
@@ -245,7 +245,7 @@ namespace libTerrain | |||
245 | return this; | 245 | return this; |
246 | } | 246 | } |
247 | 247 | ||
248 | public Channel blend(Channel other, Channel amount) | 248 | public Channel Blend(Channel other, Channel amount) |
249 | { | 249 | { |
250 | int x, y; | 250 | int x, y; |
251 | for (x = 0; x < w; x++) | 251 | for (x = 0; x < w; x++) |