aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes/TerrainChannel.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/TerrainChannel.cs')
-rw-r--r--OpenSim/Region/Framework/Scenes/TerrainChannel.cs32
1 files changed, 0 insertions, 32 deletions
diff --git a/OpenSim/Region/Framework/Scenes/TerrainChannel.cs b/OpenSim/Region/Framework/Scenes/TerrainChannel.cs
index 6fd9096..506ad24 100644
--- a/OpenSim/Region/Framework/Scenes/TerrainChannel.cs
+++ b/OpenSim/Region/Framework/Scenes/TerrainChannel.cs
@@ -49,7 +49,6 @@ namespace OpenSim.Region.Framework.Scenes
49 { 49 {
50 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 50 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
51 private static string LogHeader = "[TERRAIN CHANNEL]"; 51 private static string LogHeader = "[TERRAIN CHANNEL]";
52<<<<<<< HEAD
53 52
54 protected TerrainData m_terrainData; 53 protected TerrainData m_terrainData;
55 54
@@ -58,16 +57,7 @@ namespace OpenSim.Region.Framework.Scenes
58 public int Height { get { return m_terrainData.SizeY; } } // Y dimension 57 public int Height { get { return m_terrainData.SizeY; } } // Y dimension
59 public int Altitude { get { return m_terrainData.SizeZ; } } // Y dimension 58 public int Altitude { get { return m_terrainData.SizeZ; } } // Y dimension
60 59
61=======
62 60
63 protected TerrainData m_terrainData;
64
65 public int Width { get { return m_terrainData.SizeX; } } // X dimension
66 // Unfortunately, for historical reasons, in this module 'Width' is X and 'Height' is Y
67 public int Height { get { return m_terrainData.SizeY; } } // Y dimension
68 public int Altitude { get { return m_terrainData.SizeZ; } } // Y dimension
69
70>>>>>>> avn/ubitvar
71 // Default, not-often-used builder 61 // Default, not-often-used builder
72 public TerrainChannel() 62 public TerrainChannel()
73 { 63 {
@@ -168,15 +158,11 @@ namespace OpenSim.Region.Framework.Scenes
168 { 158 {
169 if (Double.IsNaN(value) || Double.IsInfinity(value)) 159 if (Double.IsNaN(value) || Double.IsInfinity(value))
170 return; 160 return;
171<<<<<<< HEAD
172
173=======
174 if (value < 0) 161 if (value < 0)
175 value = 0; 162 value = 0;
176 else 163 else
177 if (value > 655.35) 164 if (value > 655.35)
178 value = 655.35; 165 value = 655.35;
179>>>>>>> avn/ubitvar
180 m_terrainData[x, y] = (float)value; 166 m_terrainData[x, y] = (float)value;
181 } 167 }
182 } 168 }
@@ -382,13 +368,8 @@ namespace OpenSim.Region.Framework.Scenes
382 public int SizeY; 368 public int SizeY;
383 public int SizeZ; 369 public int SizeZ;
384 public float CompressionFactor; 370 public float CompressionFactor;
385<<<<<<< HEAD
386 public int[] Map;
387 public TerrainChannelXMLPackage(int pX, int pY, int pZ, float pCompressionFactor, int[] pMap)
388=======
389 public float[] Map; 371 public float[] Map;
390 public TerrainChannelXMLPackage(int pX, int pY, int pZ, float pCompressionFactor, float[] pMap) 372 public TerrainChannelXMLPackage(int pX, int pY, int pZ, float pCompressionFactor, float[] pMap)
391>>>>>>> avn/ubitvar
392 { 373 {
393 Version = 1; 374 Version = 1;
394 SizeX = pX; 375 SizeX = pX;
@@ -419,25 +400,13 @@ namespace OpenSim.Region.Framework.Scenes
419 // Fill the heightmap with the center bump terrain 400 // Fill the heightmap with the center bump terrain
420 private void PinHeadIsland() 401 private void PinHeadIsland()
421 { 402 {
422<<<<<<< HEAD
423=======
424 float cx = m_terrainData.SizeX * 0.5f; 403 float cx = m_terrainData.SizeX * 0.5f;
425 float cy = m_terrainData.SizeY * 0.5f; 404 float cy = m_terrainData.SizeY * 0.5f;
426 float h; 405 float h;
427>>>>>>> avn/ubitvar
428 for (int x = 0; x < Width; x++) 406 for (int x = 0; x < Width; x++)
429 { 407 {
430 for (int y = 0; y < Height; y++) 408 for (int y = 0; y < Height; y++)
431 { 409 {
432<<<<<<< HEAD
433 m_terrainData[x, y] = (float)TerrainUtil.PerlinNoise2D(x, y, 2, 0.125) * 10;
434 float spherFacA = (float)(TerrainUtil.SphericalFactor(x, y, m_terrainData.SizeX / 2.0, m_terrainData.SizeY / 2.0, 50) * 0.01d);
435 float spherFacB = (float)(TerrainUtil.SphericalFactor(x, y, m_terrainData.SizeX / 2.0, m_terrainData.SizeY / 2.0, 100) * 0.001d);
436 if (m_terrainData[x, y]< spherFacA)
437 m_terrainData[x, y]= spherFacA;
438 if (m_terrainData[x, y]< spherFacB)
439 m_terrainData[x, y] = spherFacB;
440=======
441 // h = (float)TerrainUtil.PerlinNoise2D(x, y, 2, 0.125) * 10; 410 // h = (float)TerrainUtil.PerlinNoise2D(x, y, 2, 0.125) * 10;
442 h = 1.0f; 411 h = 1.0f;
443 float spherFacA = (float)(TerrainUtil.SphericalFactor(x, y, cx, cy, 50) * 0.01d); 412 float spherFacA = (float)(TerrainUtil.SphericalFactor(x, y, cx, cy, 50) * 0.01d);
@@ -447,7 +416,6 @@ namespace OpenSim.Region.Framework.Scenes
447 if (h < spherFacB) 416 if (h < spherFacB)
448 h = spherFacB; 417 h = spherFacB;
449 m_terrainData[x, y] = h; 418 m_terrainData[x, y] = h;
450>>>>>>> avn/ubitvar
451 } 419 }
452 } 420 }
453 } 421 }