diff options
author | Jeff Ames | 2008-03-25 03:49:08 +0000 |
---|---|---|
committer | Jeff Ames | 2008-03-25 03:49:08 +0000 |
commit | 9d1b42c39a779c84dd091a817d2f6e5f434777c4 (patch) | |
tree | 0c1c0ad1db253daf3f8fa8389d2a5ae98b899c11 /OpenSim/Region/Terrain.BasicTerrain/libTerrainBSD/Channel/Editing/Flatten.cs | |
parent | Fix a couple more warnings. (diff) | |
download | opensim-SC_OLD-9d1b42c39a779c84dd091a817d2f6e5f434777c4.zip opensim-SC_OLD-9d1b42c39a779c84dd091a817d2f6e5f434777c4.tar.gz opensim-SC_OLD-9d1b42c39a779c84dd091a817d2f6e5f434777c4.tar.bz2 opensim-SC_OLD-9d1b42c39a779c84dd091a817d2f6e5f434777c4.tar.xz |
Comment out unused private methods.
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/Terrain.BasicTerrain/libTerrainBSD/Channel/Editing/Flatten.cs | 85 |
1 files changed, 43 insertions, 42 deletions
diff --git a/OpenSim/Region/Terrain.BasicTerrain/libTerrainBSD/Channel/Editing/Flatten.cs b/OpenSim/Region/Terrain.BasicTerrain/libTerrainBSD/Channel/Editing/Flatten.cs index aa102b8..ba076c2 100644 --- a/OpenSim/Region/Terrain.BasicTerrain/libTerrainBSD/Channel/Editing/Flatten.cs +++ b/OpenSim/Region/Terrain.BasicTerrain/libTerrainBSD/Channel/Editing/Flatten.cs | |||
@@ -70,48 +70,49 @@ namespace libTerrain | |||
70 | Blend(flat, temp); | 70 | Blend(flat, temp); |
71 | } | 71 | } |
72 | 72 | ||
73 | private void FlattenFast(double rx, double ry, double size, double amount) | 73 | // TODO: unused |
74 | { | 74 | // private void FlattenFast(double rx, double ry, double size, double amount) |
75 | int x, y; | 75 | // { |
76 | double avg = 0; | 76 | // int x, y; |
77 | double div = 0; | 77 | // double avg = 0; |
78 | 78 | // double div = 0; | |
79 | int minX = Math.Max(0, (int) (rx - (size + 1))); | 79 | |
80 | int maxX = Math.Min(w, (int) (rx + (size + 1))); | 80 | // int minX = Math.Max(0, (int) (rx - (size + 1))); |
81 | int minY = Math.Max(0, (int) (ry - (size + 1))); | 81 | // int maxX = Math.Min(w, (int) (rx + (size + 1))); |
82 | int maxY = Math.Min(h, (int) (ry + (size + 1))); | 82 | // int minY = Math.Max(0, (int) (ry - (size + 1))); |
83 | 83 | // int maxY = Math.Min(h, (int) (ry + (size + 1))); | |
84 | for (x = minX; x < maxX; x++) | 84 | |
85 | { | 85 | // for (x = minX; x < maxX; x++) |
86 | for (y = minY; y < maxY; y++) | 86 | // { |
87 | { | 87 | // for (y = minY; y < maxY; y++) |
88 | double z = size; | 88 | // { |
89 | z *= z; | 89 | // double z = size; |
90 | z -= ((x - rx)*(x - rx)) + ((y - ry)*(y - ry)); | 90 | // z *= z; |
91 | 91 | // z -= ((x - rx)*(x - rx)) + ((y - ry)*(y - ry)); | |
92 | if (z < 0) | 92 | |
93 | z = 0; | 93 | // if (z < 0) |
94 | 94 | // z = 0; | |
95 | avg += z*amount; | 95 | |
96 | div += z; | 96 | // avg += z*amount; |
97 | } | 97 | // div += z; |
98 | } | 98 | // } |
99 | 99 | // } | |
100 | double height = avg/div; | 100 | |
101 | 101 | // double height = avg/div; | |
102 | for (x = minX; x < maxX; x++) | 102 | |
103 | { | 103 | // for (x = minX; x < maxX; x++) |
104 | for (y = minY; y < maxY; y++) | 104 | // { |
105 | { | 105 | // for (y = minY; y < maxY; y++) |
106 | double z = size; | 106 | // { |
107 | z *= z; | 107 | // double z = size; |
108 | z -= ((x - rx)*(x - rx)) + ((y - ry)*(y - ry)); | 108 | // z *= z; |
109 | 109 | // z -= ((x - rx)*(x - rx)) + ((y - ry)*(y - ry)); | |
110 | if (z > 0.0) | 110 | |
111 | Set(x, y, Tools.LinearInterpolate(map[x, y], height, z)); | 111 | // if (z > 0.0) |
112 | } | 112 | // Set(x, y, Tools.LinearInterpolate(map[x, y], height, z)); |
113 | } | 113 | // } |
114 | } | 114 | // } |
115 | // } | ||
115 | 116 | ||
116 | public void Flatten(Channel mask, double amount) | 117 | public void Flatten(Channel mask, double amount) |
117 | { | 118 | { |