diff options
author | Melanie Thielker | 2017-01-05 19:07:37 +0000 |
---|---|---|
committer | Melanie Thielker | 2017-01-05 19:07:37 +0000 |
commit | b16abc8166c29585cb76cc55c3bdd76e5833cb4f (patch) | |
tree | 6a34f465a74b7a3a6dc00a3d7aa8dcc25ac3e3a5 /OpenSim/Region/CoreModules/World/Warp3DMap | |
parent | Make it possible to disable the bakes module in the way it is described in co... (diff) | |
download | opensim-SC_OLD-b16abc8166c29585cb76cc55c3bdd76e5833cb4f.zip opensim-SC_OLD-b16abc8166c29585cb76cc55c3bdd76e5833cb4f.tar.gz opensim-SC_OLD-b16abc8166c29585cb76cc55c3bdd76e5833cb4f.tar.bz2 opensim-SC_OLD-b16abc8166c29585cb76cc55c3bdd76e5833cb4f.tar.xz |
Massive tab and trailing space cleanup
Diffstat (limited to 'OpenSim/Region/CoreModules/World/Warp3DMap')
-rw-r--r-- | OpenSim/Region/CoreModules/World/Warp3DMap/TerrainSplat.cs | 4 | ||||
-rw-r--r-- | OpenSim/Region/CoreModules/World/Warp3DMap/Warp3DImageModule.cs | 22 |
2 files changed, 13 insertions, 13 deletions
diff --git a/OpenSim/Region/CoreModules/World/Warp3DMap/TerrainSplat.cs b/OpenSim/Region/CoreModules/World/Warp3DMap/TerrainSplat.cs index 4719ba3..226b330 100644 --- a/OpenSim/Region/CoreModules/World/Warp3DMap/TerrainSplat.cs +++ b/OpenSim/Region/CoreModules/World/Warp3DMap/TerrainSplat.cs | |||
@@ -226,7 +226,7 @@ namespace OpenSim.Region.CoreModules.World.Warp3DMap | |||
226 | float pctX = (float)x / 255f; | 226 | float pctX = (float)x / 255f; |
227 | float pctY = (float)y / 255f; | 227 | float pctY = (float)y / 255f; |
228 | 228 | ||
229 | // Use bilinear interpolation between the four corners of start height and | 229 | // Use bilinear interpolation between the four corners of start height and |
230 | // height range to select the current values at this position | 230 | // height range to select the current values at this position |
231 | float startHeight = ImageUtils.Bilinear( | 231 | float startHeight = ImageUtils.Bilinear( |
232 | startHeights[0], | 232 | startHeights[0], |
@@ -257,7 +257,7 @@ namespace OpenSim.Region.CoreModules.World.Warp3DMap | |||
257 | float highFreq = Perlin.turbulence2(vec.X, vec.Y, 2f) * 2.25f; | 257 | float highFreq = Perlin.turbulence2(vec.X, vec.Y, 2f) * 2.25f; |
258 | float noise = (lowFreq + highFreq) * 2f; | 258 | float noise = (lowFreq + highFreq) * 2f; |
259 | 259 | ||
260 | // Combine the current height, generated noise, start height, and height range parameters, then scale all of it | 260 | // Combine the current height, generated noise, start height, and height range parameters, then scale all of it |
261 | float layer = ((height + noise - startHeight) / heightRange) * 4f; | 261 | float layer = ((height + noise - startHeight) / heightRange) * 4f; |
262 | if (Single.IsNaN(layer)) | 262 | if (Single.IsNaN(layer)) |
263 | layer = 0f; | 263 | layer = 0f; |
diff --git a/OpenSim/Region/CoreModules/World/Warp3DMap/Warp3DImageModule.cs b/OpenSim/Region/CoreModules/World/Warp3DMap/Warp3DImageModule.cs index cb37067..4934ebd 100644 --- a/OpenSim/Region/CoreModules/World/Warp3DMap/Warp3DImageModule.cs +++ b/OpenSim/Region/CoreModules/World/Warp3DMap/Warp3DImageModule.cs | |||
@@ -96,9 +96,9 @@ namespace OpenSim.Region.CoreModules.World.Warp3DMap | |||
96 | 96 | ||
97 | m_Enabled = true; | 97 | m_Enabled = true; |
98 | 98 | ||
99 | m_drawPrimVolume | 99 | m_drawPrimVolume |
100 | = Util.GetConfigVarFromSections<bool>(m_config, "DrawPrimOnMapTile", configSections, m_drawPrimVolume); | 100 | = Util.GetConfigVarFromSections<bool>(m_config, "DrawPrimOnMapTile", configSections, m_drawPrimVolume); |
101 | m_textureTerrain | 101 | m_textureTerrain |
102 | = Util.GetConfigVarFromSections<bool>(m_config, "TextureOnMapTile", configSections, m_textureTerrain); | 102 | = Util.GetConfigVarFromSections<bool>(m_config, "TextureOnMapTile", configSections, m_textureTerrain); |
103 | m_texturePrims | 103 | m_texturePrims |
104 | = Util.GetConfigVarFromSections<bool>(m_config, "TexturePrims", configSections, m_texturePrims); | 104 | = Util.GetConfigVarFromSections<bool>(m_config, "TexturePrims", configSections, m_texturePrims); |
@@ -277,7 +277,7 @@ namespace OpenSim.Region.CoreModules.World.Warp3DMap | |||
277 | m_scene.RegionInfo.RegionSizeY * 0.5f - 0.5f); | 277 | m_scene.RegionInfo.RegionSizeY * 0.5f - 0.5f); |
278 | 278 | ||
279 | warp_Material waterColorMaterial = new warp_Material(ConvertColor(WATER_COLOR)); | 279 | warp_Material waterColorMaterial = new warp_Material(ConvertColor(WATER_COLOR)); |
280 | waterColorMaterial.setReflectivity(0); // match water color with standard map module thanks lkalif | 280 | waterColorMaterial.setReflectivity(0); // match water color with standard map module thanks lkalif |
281 | waterColorMaterial.setTransparency((byte)((1f - WATER_COLOR.A) * 255f)); | 281 | waterColorMaterial.setTransparency((byte)((1f - WATER_COLOR.A) * 255f)); |
282 | renderer.Scene.addMaterial("WaterColor", waterColorMaterial); | 282 | renderer.Scene.addMaterial("WaterColor", waterColorMaterial); |
283 | renderer.SetObjectMaterial("Water", "WaterColor"); | 283 | renderer.SetObjectMaterial("Water", "WaterColor"); |
@@ -292,7 +292,7 @@ namespace OpenSim.Region.CoreModules.World.Warp3DMap | |||
292 | 292 | ||
293 | float regionsx = m_scene.RegionInfo.RegionSizeX; | 293 | float regionsx = m_scene.RegionInfo.RegionSizeX; |
294 | float regionsy = m_scene.RegionInfo.RegionSizeY; | 294 | float regionsy = m_scene.RegionInfo.RegionSizeY; |
295 | 295 | ||
296 | // 'diff' is the difference in scale between the real region size and the size of terrain we're buiding | 296 | // 'diff' is the difference in scale between the real region size and the size of terrain we're buiding |
297 | float diff = regionsx / 256f; | 297 | float diff = regionsx / 256f; |
298 | 298 | ||
@@ -377,7 +377,7 @@ namespace OpenSim.Region.CoreModules.World.Warp3DMap | |||
377 | warp_Material material = new warp_Material(texture); | 377 | warp_Material material = new warp_Material(texture); |
378 | material.setReflectivity(50); | 378 | material.setReflectivity(50); |
379 | renderer.Scene.addMaterial("TerrainColor", material); | 379 | renderer.Scene.addMaterial("TerrainColor", material); |
380 | renderer.Scene.material("TerrainColor").setReflectivity(0); // reduces tile seams a bit thanks lkalif | 380 | renderer.Scene.material("TerrainColor").setReflectivity(0); // reduces tile seams a bit thanks lkalif |
381 | renderer.SetObjectMaterial("Terrain", "TerrainColor"); | 381 | renderer.SetObjectMaterial("Terrain", "TerrainColor"); |
382 | } | 382 | } |
383 | 383 | ||
@@ -530,7 +530,7 @@ namespace OpenSim.Region.CoreModules.World.Warp3DMap | |||
530 | 530 | ||
531 | if (!fetched) | 531 | if (!fetched) |
532 | { | 532 | { |
533 | // Fetch the texture, decode and get the average color, | 533 | // Fetch the texture, decode and get the average color, |
534 | // then save it to a temporary metadata asset | 534 | // then save it to a temporary metadata asset |
535 | AssetBase textureAsset = m_scene.AssetService.Get(face.TextureID.ToString()); | 535 | AssetBase textureAsset = m_scene.AssetService.Get(face.TextureID.ToString()); |
536 | if (textureAsset != null) | 536 | if (textureAsset != null) |
@@ -616,7 +616,7 @@ namespace OpenSim.Region.CoreModules.World.Warp3DMap | |||
616 | catch (Exception e) | 616 | catch (Exception e) |
617 | { | 617 | { |
618 | m_log.Warn(string.Format("[WARP 3D IMAGE MODULE]: Failed to decode asset {0}, exception ", id), e); | 618 | m_log.Warn(string.Format("[WARP 3D IMAGE MODULE]: Failed to decode asset {0}, exception ", id), e); |
619 | } | 619 | } |
620 | } | 620 | } |
621 | 621 | ||
622 | return ret; | 622 | return ret; |
@@ -678,10 +678,10 @@ namespace OpenSim.Region.CoreModules.World.Warp3DMap | |||
678 | { | 678 | { |
679 | width = bitmap.Width; | 679 | width = bitmap.Width; |
680 | height = bitmap.Height; | 680 | height = bitmap.Height; |
681 | 681 | ||
682 | BitmapData bitmapData = bitmap.LockBits(new Rectangle(0, 0, width, height), ImageLockMode.ReadOnly, bitmap.PixelFormat); | 682 | BitmapData bitmapData = bitmap.LockBits(new Rectangle(0, 0, width, height), ImageLockMode.ReadOnly, bitmap.PixelFormat); |
683 | pixelBytes = (bitmap.PixelFormat == PixelFormat.Format24bppRgb) ? 3 : 4; | 683 | pixelBytes = (bitmap.PixelFormat == PixelFormat.Format24bppRgb) ? 3 : 4; |
684 | 684 | ||
685 | // Sum up the individual channels | 685 | // Sum up the individual channels |
686 | unsafe | 686 | unsafe |
687 | { | 687 | { |
@@ -690,7 +690,7 @@ namespace OpenSim.Region.CoreModules.World.Warp3DMap | |||
690 | for (int y = 0; y < height; y++) | 690 | for (int y = 0; y < height; y++) |
691 | { | 691 | { |
692 | byte* row = (byte*)bitmapData.Scan0 + (y * bitmapData.Stride); | 692 | byte* row = (byte*)bitmapData.Scan0 + (y * bitmapData.Stride); |
693 | 693 | ||
694 | for (int x = 0; x < width; x++) | 694 | for (int x = 0; x < width; x++) |
695 | { | 695 | { |
696 | b += row[x * pixelBytes + 0]; | 696 | b += row[x * pixelBytes + 0]; |
@@ -705,7 +705,7 @@ namespace OpenSim.Region.CoreModules.World.Warp3DMap | |||
705 | for (int y = 0; y < height; y++) | 705 | for (int y = 0; y < height; y++) |
706 | { | 706 | { |
707 | byte* row = (byte*)bitmapData.Scan0 + (y * bitmapData.Stride); | 707 | byte* row = (byte*)bitmapData.Scan0 + (y * bitmapData.Stride); |
708 | 708 | ||
709 | for (int x = 0; x < width; x++) | 709 | for (int x = 0; x < width; x++) |
710 | { | 710 | { |
711 | b += row[x * pixelBytes + 0]; | 711 | b += row[x * pixelBytes + 0]; |