From 9d1b42c39a779c84dd091a817d2f6e5f434777c4 Mon Sep 17 00:00:00 2001 From: Jeff Ames Date: Tue, 25 Mar 2008 03:49:08 +0000 Subject: Comment out unused private methods. --- .../Region/Terrain.BasicTerrain/TerrainEngine.cs | 48 ++++++------ .../libTerrainBSD/Channel/Editing/Flatten.cs | 85 +++++++++++----------- .../Channel/Manipulators/NavierStokes.cs | 13 ++-- 3 files changed, 72 insertions(+), 74 deletions(-) (limited to 'OpenSim/Region/Terrain.BasicTerrain') diff --git a/OpenSim/Region/Terrain.BasicTerrain/TerrainEngine.cs b/OpenSim/Region/Terrain.BasicTerrain/TerrainEngine.cs index 308f35b..4ab535b 100644 --- a/OpenSim/Region/Terrain.BasicTerrain/TerrainEngine.cs +++ b/OpenSim/Region/Terrain.BasicTerrain/TerrainEngine.cs @@ -310,37 +310,33 @@ namespace OpenSim.Region.Terrain } } - lastEdit = DateTime.Now; return; } - - - - /// - /// Checks to make sure the terrain is within baked values +/- maxRaise/minLower - /// - private void SetTerrainWithinBounds() - { - int x, y; - for (x = 0; x < w; x++) - { - for (y = 0; y < h; y++) - { - if ((heightmap.Get(x, y) > revertmap.Get(x, y) + maxRaise)) - { - heightmap.map[x, y] = revertmap.Get(x, y) + maxRaise; - } - if ((heightmap.Get(x, y) > revertmap.Get(x, y) - minLower)) - { - heightmap.map[x, y] = revertmap.Get(x, y) - minLower; - } - } - } - } - +// TODO: unused +// /// +// /// Checks to make sure the terrain is within baked values +/- maxRaise/minLower +// /// +// private void SetTerrainWithinBounds() +// { +// int x, y; +// for (x = 0; x < w; x++) +// { +// for (y = 0; y < h; y++) +// { +// if ((heightmap.Get(x, y) > revertmap.Get(x, y) + maxRaise)) +// { +// heightmap.map[x, y] = revertmap.Get(x, y) + maxRaise; +// } +// if ((heightmap.Get(x, y) > revertmap.Get(x, y) - minLower)) +// { +// heightmap.map[x, y] = revertmap.Get(x, y) - minLower; +// } +// } +// } +// } /// /// Converts the heightmap to a 65536 value 1D floating point array 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 Blend(flat, temp); } - private void FlattenFast(double rx, double ry, double size, double amount) - { - int x, y; - double avg = 0; - double div = 0; - - int minX = Math.Max(0, (int) (rx - (size + 1))); - int maxX = Math.Min(w, (int) (rx + (size + 1))); - int minY = Math.Max(0, (int) (ry - (size + 1))); - int maxY = Math.Min(h, (int) (ry + (size + 1))); - - for (x = minX; x < maxX; x++) - { - for (y = minY; y < maxY; y++) - { - double z = size; - z *= z; - z -= ((x - rx)*(x - rx)) + ((y - ry)*(y - ry)); - - if (z < 0) - z = 0; - - avg += z*amount; - div += z; - } - } - - double height = avg/div; - - for (x = minX; x < maxX; x++) - { - for (y = minY; y < maxY; y++) - { - double z = size; - z *= z; - z -= ((x - rx)*(x - rx)) + ((y - ry)*(y - ry)); - - if (z > 0.0) - Set(x, y, Tools.LinearInterpolate(map[x, y], height, z)); - } - } - } +// TODO: unused +// private void FlattenFast(double rx, double ry, double size, double amount) +// { +// int x, y; +// double avg = 0; +// double div = 0; + +// int minX = Math.Max(0, (int) (rx - (size + 1))); +// int maxX = Math.Min(w, (int) (rx + (size + 1))); +// int minY = Math.Max(0, (int) (ry - (size + 1))); +// int maxY = Math.Min(h, (int) (ry + (size + 1))); + +// for (x = minX; x < maxX; x++) +// { +// for (y = minY; y < maxY; y++) +// { +// double z = size; +// z *= z; +// z -= ((x - rx)*(x - rx)) + ((y - ry)*(y - ry)); + +// if (z < 0) +// z = 0; + +// avg += z*amount; +// div += z; +// } +// } + +// double height = avg/div; + +// for (x = minX; x < maxX; x++) +// { +// for (y = minY; y < maxY; y++) +// { +// double z = size; +// z *= z; +// z -= ((x - rx)*(x - rx)) + ((y - ry)*(y - ry)); + +// if (z > 0.0) +// Set(x, y, Tools.LinearInterpolate(map[x, y], height, z)); +// } +// } +// } public void Flatten(Channel mask, double amount) { diff --git a/OpenSim/Region/Terrain.BasicTerrain/libTerrainBSD/Channel/Manipulators/NavierStokes.cs b/OpenSim/Region/Terrain.BasicTerrain/libTerrainBSD/Channel/Manipulators/NavierStokes.cs index 7840f8b..8f12637 100644 --- a/OpenSim/Region/Terrain.BasicTerrain/libTerrainBSD/Channel/Manipulators/NavierStokes.cs +++ b/OpenSim/Region/Terrain.BasicTerrain/libTerrainBSD/Channel/Manipulators/NavierStokes.cs @@ -40,12 +40,13 @@ namespace libTerrain return ((i) + (N + 2)*(j)); } - private static void nsSwap(ref double x0, ref double x) - { - double tmp = x0; - x0 = x; - x = tmp; - } +// TODO: unused +// private static void nsSwap(ref double x0, ref double x) +// { +// double tmp = x0; +// x0 = x; +// x = tmp; +// } private static void nsSwap(ref double[] x0, ref double[] x) { -- cgit v1.1