diff options
author | Adam Frisby | 2007-07-24 05:22:33 +0000 |
---|---|---|
committer | Adam Frisby | 2007-07-24 05:22:33 +0000 |
commit | d8997b59d30b63218f594d840d924a10287ce509 (patch) | |
tree | f96960b2605c8da0d6b0a0d9a905db28a62fca67 /OpenSim/Region/Terrain.BasicTerrain/libTerrainBSD/Channel/Generators/Spiral.cs | |
parent | * Terrain Fracture Generator now produces more appropriate results. (diff) | |
download | opensim-SC-d8997b59d30b63218f594d840d924a10287ce509.zip opensim-SC-d8997b59d30b63218f594d840d924a10287ce509.tar.gz opensim-SC-d8997b59d30b63218f594d840d924a10287ce509.tar.bz2 opensim-SC-d8997b59d30b63218f594d840d924a10287ce509.tar.xz |
* Terrain should now send just updated patches.
Diffstat (limited to 'OpenSim/Region/Terrain.BasicTerrain/libTerrainBSD/Channel/Generators/Spiral.cs')
-rw-r--r-- | OpenSim/Region/Terrain.BasicTerrain/libTerrainBSD/Channel/Generators/Spiral.cs | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/OpenSim/Region/Terrain.BasicTerrain/libTerrainBSD/Channel/Generators/Spiral.cs b/OpenSim/Region/Terrain.BasicTerrain/libTerrainBSD/Channel/Generators/Spiral.cs index aeff730..80abfe5 100644 --- a/OpenSim/Region/Terrain.BasicTerrain/libTerrainBSD/Channel/Generators/Spiral.cs +++ b/OpenSim/Region/Terrain.BasicTerrain/libTerrainBSD/Channel/Generators/Spiral.cs | |||
@@ -36,7 +36,6 @@ namespace libTerrain | |||
36 | { | 36 | { |
37 | private double[] CoordinatesToPolar(int x, int y) | 37 | private double[] CoordinatesToPolar(int x, int y) |
38 | { | 38 | { |
39 | |||
40 | double theta = Math.Atan2(x - (w / 2), y - (h / 2)); | 39 | double theta = Math.Atan2(x - (w / 2), y - (h / 2)); |
41 | double rx = (double)x - ((double)w / 2); | 40 | double rx = (double)x - ((double)w / 2); |
42 | double ry = (double)y - ((double)h / 2); | 41 | double ry = (double)y - ((double)h / 2); |
@@ -78,6 +77,8 @@ namespace libTerrain | |||
78 | 77 | ||
79 | public void Polar() | 78 | public void Polar() |
80 | { | 79 | { |
80 | SetDiff(); | ||
81 | |||
81 | Channel n = this.Copy(); | 82 | Channel n = this.Copy(); |
82 | 83 | ||
83 | int x, y; | 84 | int x, y; |
@@ -97,6 +98,8 @@ namespace libTerrain | |||
97 | 98 | ||
98 | public void SpiralPlanter(int steps, double incAngle, double incRadius, double offsetRadius, double offsetAngle) | 99 | public void SpiralPlanter(int steps, double incAngle, double incRadius, double offsetRadius, double offsetAngle) |
99 | { | 100 | { |
101 | SetDiff(); | ||
102 | |||
100 | int i; | 103 | int i; |
101 | double r = offsetRadius; | 104 | double r = offsetRadius; |
102 | double theta = offsetAngle; | 105 | double theta = offsetAngle; |
@@ -112,6 +115,8 @@ namespace libTerrain | |||
112 | 115 | ||
113 | public void SpiralCells(int steps, double incAngle, double incRadius, double offsetRadius, double offsetAngle, double[] c) | 116 | public void SpiralCells(int steps, double incAngle, double incRadius, double offsetRadius, double offsetAngle, double[] c) |
114 | { | 117 | { |
118 | SetDiff(); | ||
119 | |||
115 | List<Point2D> points = new List<Point2D>(); | 120 | List<Point2D> points = new List<Point2D>(); |
116 | 121 | ||
117 | int i; | 122 | int i; |
@@ -131,6 +136,8 @@ namespace libTerrain | |||
131 | 136 | ||
132 | public void Spiral(double wid, double hig, double offset) | 137 | public void Spiral(double wid, double hig, double offset) |
133 | { | 138 | { |
139 | SetDiff(); | ||
140 | |||
134 | int x, y, z; | 141 | int x, y, z; |
135 | z = 0; | 142 | z = 0; |
136 | for (x = 0; x < w; x++) | 143 | for (x = 0; x < w; x++) |