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.
---
.../libTerrainBSD/Channel/Generators/Fracture.cs | 10 +++++-----
.../libTerrainBSD/Channel/Generators/Gradient.cs | 8 ++++----
.../libTerrainBSD/Channel/Generators/HillPlanter.cs | 16 ++++++++--------
.../libTerrainBSD/Channel/Generators/Noise.cs | 2 +-
.../libTerrainBSD/Channel/Generators/Spiral.cs | 18 +++++++++---------
.../libTerrainBSD/Channel/Generators/Voronoi.cs | 12 ++++++------
.../libTerrainBSD/Channel/Generators/Worms.cs | 4 ++--
7 files changed, 35 insertions(+), 35 deletions(-)
(limited to 'OpenSim/Region/Terrain.BasicTerrain/libTerrainBSD/Channel/Generators')
diff --git a/OpenSim/Region/Terrain.BasicTerrain/libTerrainBSD/Channel/Generators/Fracture.cs b/OpenSim/Region/Terrain.BasicTerrain/libTerrainBSD/Channel/Generators/Fracture.cs
index 24a8fc4..b585caa 100644
--- a/OpenSim/Region/Terrain.BasicTerrain/libTerrainBSD/Channel/Generators/Fracture.cs
+++ b/OpenSim/Region/Terrain.BasicTerrain/libTerrainBSD/Channel/Generators/Fracture.cs
@@ -42,7 +42,7 @@ namespace libTerrain
///
///
///
- private int[] radialEdge256(int val)
+ private int[] RadialEdge256(int val)
{
// Four cases:
// 1. 000..255 return 0,val
@@ -79,7 +79,7 @@ namespace libTerrain
throw new Exception("Out of bounds parameter (val)");
}
- public void fracture(int number, double scalemin, double scalemax)
+ public void Fracture(int number, double scalemin, double scalemax)
{
Random rand = new Random(seed);
@@ -87,8 +87,8 @@ namespace libTerrain
{
int[] a, b;
- a = radialEdge256(rand.Next(1023)); // TODO: Broken
- b = radialEdge256(rand.Next(1023)); // TODO: Broken
+ a = RadialEdge256(rand.Next(1023)); // TODO: Broken
+ b = RadialEdge256(rand.Next(1023)); // TODO: Broken
double z = rand.NextDouble();
for (int x = 0; x < w; x++)
@@ -104,7 +104,7 @@ namespace libTerrain
}
}
}
- normalise();
+ Normalise();
}
}
}
\ No newline at end of file
diff --git a/OpenSim/Region/Terrain.BasicTerrain/libTerrainBSD/Channel/Generators/Gradient.cs b/OpenSim/Region/Terrain.BasicTerrain/libTerrainBSD/Channel/Generators/Gradient.cs
index c2ad882..0c9b3c3 100644
--- a/OpenSim/Region/Terrain.BasicTerrain/libTerrainBSD/Channel/Generators/Gradient.cs
+++ b/OpenSim/Region/Terrain.BasicTerrain/libTerrainBSD/Channel/Generators/Gradient.cs
@@ -35,7 +35,7 @@ namespace libTerrain
partial class Channel
{
- public void gradientCube()
+ public void GradientCube()
{
int x, y;
for (x = 0; x < w; x++)
@@ -45,10 +45,10 @@ namespace libTerrain
map[x, y] = x*y;
}
}
- normalise();
+ Normalise();
}
- public void gradientStripe()
+ public void GradientStripe()
{
int x, y;
for (x = 0; x < w; x++)
@@ -58,7 +58,7 @@ namespace libTerrain
map[x, y] = x;
}
}
- normalise();
+ Normalise();
}
}
}
\ No newline at end of file
diff --git a/OpenSim/Region/Terrain.BasicTerrain/libTerrainBSD/Channel/Generators/HillPlanter.cs b/OpenSim/Region/Terrain.BasicTerrain/libTerrainBSD/Channel/Generators/HillPlanter.cs
index e8a660f..3b8e963 100644
--- a/OpenSim/Region/Terrain.BasicTerrain/libTerrainBSD/Channel/Generators/HillPlanter.cs
+++ b/OpenSim/Region/Terrain.BasicTerrain/libTerrainBSD/Channel/Generators/HillPlanter.cs
@@ -44,7 +44,7 @@ namespace libTerrain
/// Whether to bias hills towards the center of the map
/// Whether to add hills together or to pick the largest value
/// Generates hill-shaped noise instead of consistent hills
- public void hillsSpheres(int number, double scale_min, double scale_range, bool island, bool additive, bool noisy)
+ public void HillsSpheres(int number, double scale_min, double scale_range, bool island, bool additive, bool noisy)
{
Random random = new Random(seed);
@@ -95,7 +95,7 @@ namespace libTerrain
}
}
- normalise();
+ Normalise();
}
///
@@ -108,7 +108,7 @@ namespace libTerrain
/// Whether to bias hills towards the center of the map
/// Whether to add hills together or to pick the largest value
/// Generates hill-shaped noise instead of consistent hills
- public void hillsCones(int number, double scale_min, double scale_range, bool island, bool additive, bool noisy)
+ public void HillsCones(int number, double scale_min, double scale_range, bool island, bool additive, bool noisy)
{
Random random = new Random(seed);
@@ -158,10 +158,10 @@ namespace libTerrain
}
}
- normalise();
+ Normalise();
}
- public void hillsBlocks(int number, double scale_min, double scale_range, bool island, bool additive, bool noisy)
+ public void HillsBlocks(int number, double scale_min, double scale_range, bool island, bool additive, bool noisy)
{
Random random = new Random(seed);
@@ -212,10 +212,10 @@ namespace libTerrain
}
}
- normalise();
+ Normalise();
}
- public void hillsSquared(int number, double scale_min, double scale_range, bool island, bool additive, bool noisy)
+ public void HillsSquared(int number, double scale_min, double scale_range, bool island, bool additive, bool noisy)
{
Random random = new Random(seed);
@@ -268,7 +268,7 @@ namespace libTerrain
}
}
- normalise();
+ Normalise();
}
}
diff --git a/OpenSim/Region/Terrain.BasicTerrain/libTerrainBSD/Channel/Generators/Noise.cs b/OpenSim/Region/Terrain.BasicTerrain/libTerrainBSD/Channel/Generators/Noise.cs
index e95fb2e..ebb1771 100644
--- a/OpenSim/Region/Terrain.BasicTerrain/libTerrainBSD/Channel/Generators/Noise.cs
+++ b/OpenSim/Region/Terrain.BasicTerrain/libTerrainBSD/Channel/Generators/Noise.cs
@@ -38,7 +38,7 @@ namespace libTerrain
/// Fills a channel with 0..1 noise
///
/// 3-Clause BSD Licensed
- public void noise()
+ public void Noise()
{
Random rand = new Random(seed);
int x, y;
diff --git a/OpenSim/Region/Terrain.BasicTerrain/libTerrainBSD/Channel/Generators/Spiral.cs b/OpenSim/Region/Terrain.BasicTerrain/libTerrainBSD/Channel/Generators/Spiral.cs
index 04ac283..aeff730 100644
--- a/OpenSim/Region/Terrain.BasicTerrain/libTerrainBSD/Channel/Generators/Spiral.cs
+++ b/OpenSim/Region/Terrain.BasicTerrain/libTerrainBSD/Channel/Generators/Spiral.cs
@@ -34,7 +34,7 @@ namespace libTerrain
{
partial class Channel
{
- private double[] coordinatesToPolar(int x, int y)
+ private double[] CoordinatesToPolar(int x, int y)
{
double theta = Math.Atan2(x - (w / 2), y - (h / 2));
@@ -48,7 +48,7 @@ namespace libTerrain
return coords;
}
- public int[] polarToCoordinates(double r, double theta) {
+ public int[] PolarToCoordinates(double r, double theta) {
double nx;
double ny;
@@ -78,14 +78,14 @@ namespace libTerrain
public void Polar()
{
- Channel n = this.copy();
+ Channel n = this.Copy();
int x, y;
for (x = 0; x < w; x++)
{
for (y = 0; y < h; y++)
{
- double[] coords = coordinatesToPolar(x,y);
+ double[] coords = CoordinatesToPolar(x,y);
coords[0] += w / 2.0;
coords[1] += h / 2.0;
@@ -105,8 +105,8 @@ namespace libTerrain
r += incRadius;
theta += incAngle;
- int[] coords = polarToCoordinates(r,theta);
- raise(coords[0], coords[1], 20, 1);
+ int[] coords = PolarToCoordinates(r,theta);
+ Raise(coords[0], coords[1], 20, 1);
}
}
@@ -122,11 +122,11 @@ namespace libTerrain
r += incRadius;
theta += incAngle;
- int[] coords = polarToCoordinates(r, theta);
+ int[] coords = PolarToCoordinates(r, theta);
points.Add(new Point2D(coords[0],coords[1]));
}
- voronoiDiagram(points, c);
+ VoronoiDiagram(points, c);
}
public void Spiral(double wid, double hig, double offset)
@@ -143,7 +143,7 @@ namespace libTerrain
map[x, y] += Math.Sin(dx / wid) + Math.Cos(dy / hig);
}
}
- normalise();
+ Normalise();
}
}
}
\ No newline at end of file
diff --git a/OpenSim/Region/Terrain.BasicTerrain/libTerrainBSD/Channel/Generators/Voronoi.cs b/OpenSim/Region/Terrain.BasicTerrain/libTerrainBSD/Channel/Generators/Voronoi.cs
index fdd369b..e973d14 100644
--- a/OpenSim/Region/Terrain.BasicTerrain/libTerrainBSD/Channel/Generators/Voronoi.cs
+++ b/OpenSim/Region/Terrain.BasicTerrain/libTerrainBSD/Channel/Generators/Voronoi.cs
@@ -42,7 +42,7 @@ namespace libTerrain
/// A multiple of the channel width and height which will have voronoi points generated in it.
/// This is to ensure a more even distribution of the points than pure random allocation.
/// The Voronoi diagram type. Usually an array with values consisting of [-1,1]. Experiment with the chain, you can have as many values as you like.
- public void voronoiDiagram(int pointsPerBlock, int blockSize, double[] c)
+ public void VoronoiDiagram(int pointsPerBlock, int blockSize, double[] c)
{
List points = new List();
Random generator = new Random(seed);
@@ -98,10 +98,10 @@ namespace libTerrain
}
// Normalise the result
- normalise();
+ Normalise();
}
- public void voronoiDiagram(List points, double[] c)
+ public void VoronoiDiagram(List points, double[] c)
{
Random generator = new Random(seed);
@@ -141,10 +141,10 @@ namespace libTerrain
}
// Normalise the result
- normalise();
+ Normalise();
}
- public void voroflatDiagram(int pointsPerBlock, int blockSize)
+ public void VoroflatDiagram(int pointsPerBlock, int blockSize)
{
List points = new List();
Random generator = new Random(seed);
@@ -203,7 +203,7 @@ namespace libTerrain
}
// Normalise the result
- normalise();
+ Normalise();
}
}
}
diff --git a/OpenSim/Region/Terrain.BasicTerrain/libTerrainBSD/Channel/Generators/Worms.cs b/OpenSim/Region/Terrain.BasicTerrain/libTerrainBSD/Channel/Generators/Worms.cs
index 38c8001..38a8023 100644
--- a/OpenSim/Region/Terrain.BasicTerrain/libTerrainBSD/Channel/Generators/Worms.cs
+++ b/OpenSim/Region/Terrain.BasicTerrain/libTerrainBSD/Channel/Generators/Worms.cs
@@ -42,7 +42,7 @@ namespace libTerrain
/// The maximum distance each worm will move each step
/// The size of the area around the worm modified
/// Do worms start in the middle, or randomly?
- public void worms(int number, int rounds, double movement, double size, bool centerspawn)
+ public void Worms(int number, int rounds, double movement, double size, bool centerspawn)
{
Random random = new Random(seed);
int i, j;
@@ -64,7 +64,7 @@ namespace libTerrain
{
rx += (random.NextDouble() * movement) - (movement / 2.0);
ry += (random.NextDouble() * movement) - (movement / 2.0);
- raise(rx, ry, size, 1.0);
+ Raise(rx, ry, size, 1.0);
}
}
}
--
cgit v1.1