aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorUbitUmarov2018-05-26 03:18:53 +0100
committerUbitUmarov2018-05-26 03:18:53 +0100
commit8f0f1028697abf378f4e210f0bb02f8db1798190 (patch)
treeee211a00751b849a832f167d8aa5d63d7e373df1
parentmap... (diff)
downloadopensim-SC-8f0f1028697abf378f4e210f0bb02f8db1798190.zip
opensim-SC-8f0f1028697abf378f4e210f0bb02f8db1798190.tar.gz
opensim-SC-8f0f1028697abf378f4e210f0bb02f8db1798190.tar.bz2
opensim-SC-8f0f1028697abf378f4e210f0bb02f8db1798190.tar.xz
fix one english typo
-rw-r--r--OpenSim/Region/CoreModules/World/Warp3DMap/Warp3DImageModule.cs23
1 files changed, 8 insertions, 15 deletions
diff --git a/OpenSim/Region/CoreModules/World/Warp3DMap/Warp3DImageModule.cs b/OpenSim/Region/CoreModules/World/Warp3DMap/Warp3DImageModule.cs
index 74ab32e..d76bdf7 100644
--- a/OpenSim/Region/CoreModules/World/Warp3DMap/Warp3DImageModule.cs
+++ b/OpenSim/Region/CoreModules/World/Warp3DMap/Warp3DImageModule.cs
@@ -77,7 +77,7 @@ namespace OpenSim.Region.CoreModules.World.Warp3DMap
77 private IConfigSource m_config; 77 private IConfigSource m_config;
78 private bool m_drawPrimVolume = true; // true if should render the prims on the tile 78 private bool m_drawPrimVolume = true; // true if should render the prims on the tile
79 private bool m_textureTerrain = true; // true if to create terrain splatting texture 79 private bool m_textureTerrain = true; // true if to create terrain splatting texture
80 private bool m_textureAvegareTerrain = false; // replace terrain textures by their average color 80 private bool m_textureAverageTerrain = false; // replace terrain textures by their average color
81 private bool m_texturePrims = true; // true if should texture the rendered prims 81 private bool m_texturePrims = true; // true if should texture the rendered prims
82 private float m_texturePrimSize = 48f; // size of prim before we consider texturing it 82 private float m_texturePrimSize = 48f; // size of prim before we consider texturing it
83 private bool m_renderMeshes = false; // true if to render meshes rather than just bounding boxes 83 private bool m_renderMeshes = false; // true if to render meshes rather than just bounding boxes
@@ -105,9 +105,9 @@ namespace OpenSim.Region.CoreModules.World.Warp3DMap
105 Util.GetConfigVarFromSections<bool>(m_config, "DrawPrimOnMapTile", configSections, m_drawPrimVolume); 105 Util.GetConfigVarFromSections<bool>(m_config, "DrawPrimOnMapTile", configSections, m_drawPrimVolume);
106 m_textureTerrain = 106 m_textureTerrain =
107 Util.GetConfigVarFromSections<bool>(m_config, "TextureOnMapTile", configSections, m_textureTerrain); 107 Util.GetConfigVarFromSections<bool>(m_config, "TextureOnMapTile", configSections, m_textureTerrain);
108 m_textureAvegareTerrain = 108 m_textureAverageTerrain =
109 Util.GetConfigVarFromSections<bool>(m_config, "AverageTextureColorOnMapTile", configSections, m_textureAvegareTerrain); 109 Util.GetConfigVarFromSections<bool>(m_config, "AverageTextureColorOnMapTile", configSections, m_textureAverageTerrain);
110 if(m_textureAvegareTerrain) 110 if(m_textureAverageTerrain)
111 m_textureTerrain = true; 111 m_textureTerrain = true;
112 m_texturePrims = 112 m_texturePrims =
113 Util.GetConfigVarFromSections<bool>(m_config, "TexturePrims", configSections, m_texturePrims); 113 Util.GetConfigVarFromSections<bool>(m_config, "TexturePrims", configSections, m_texturePrims);
@@ -341,7 +341,6 @@ namespace OpenSim.Region.CoreModules.World.Warp3DMap
341 npointsy++; 341 npointsy++;
342 342
343 // Create all the vertices for the terrain 343 // Create all the vertices for the terrain
344 // for texture fliped on Y
345 warp_Object obj = new warp_Object(); 344 warp_Object obj = new warp_Object();
346 warp_Vector pos; 345 warp_Vector pos;
347 float x, y; 346 float x, y;
@@ -367,8 +366,7 @@ namespace OpenSim.Region.CoreModules.World.Warp3DMap
367 pos = ConvertVector(x , y , (float)terrain[(int)(x - diff), lastY]); 366 pos = ConvertVector(x , y , (float)terrain[(int)(x - diff), lastY]);
368 obj.addVertex(new warp_Vertex(pos, 1.0f, 1.0f)); 367 obj.addVertex(new warp_Vertex(pos, 1.0f, 1.0f));
369 368
370 // Now that we have all the vertices, make another pass and 369 // create triangles.
371 // create the list of triangle indices.
372 int limx = npointsx - 1; 370 int limx = npointsx - 1;
373 int limy = npointsy - 1; 371 int limy = npointsy - 1;
374 for (int j = 0; j < limy; j++) 372 for (int j = 0; j < limy; j++)
@@ -412,15 +410,11 @@ namespace OpenSim.Region.CoreModules.World.Warp3DMap
412 heightRanges[1] = (float)regionInfo.Elevation2NW; 410 heightRanges[1] = (float)regionInfo.Elevation2NW;
413 heightRanges[2] = (float)regionInfo.Elevation2SE; 411 heightRanges[2] = (float)regionInfo.Elevation2SE;
414 heightRanges[3] = (float)regionInfo.Elevation2NE; 412 heightRanges[3] = (float)regionInfo.Elevation2NE;
415 413
416 uint globalX, globalY;
417 Util.RegionHandleToWorldLoc(m_scene.RegionInfo.RegionHandle, out globalX, out globalY);
418
419 warp_Texture texture; 414 warp_Texture texture;
420 // get texture fliped on Y
421 using (Bitmap image = TerrainSplat.Splat(terrain, textureIDs, startHeights, heightRanges, 415 using (Bitmap image = TerrainSplat.Splat(terrain, textureIDs, startHeights, heightRanges,
422 m_scene.RegionInfo.WorldLocX, m_scene.RegionInfo.WorldLocY, 416 m_scene.RegionInfo.WorldLocX, m_scene.RegionInfo.WorldLocY,
423 m_scene.AssetService, m_imgDecoder, m_textureTerrain, m_textureAvegareTerrain, true, 417 m_scene.AssetService, m_imgDecoder, m_textureTerrain, m_textureAverageTerrain,
424 twidth, twidth)) 418 twidth, twidth))
425 texture = new warp_Texture(image); 419 texture = new warp_Texture(image);
426 420
@@ -737,10 +731,9 @@ namespace OpenSim.Region.CoreModules.World.Warp3DMap
737 731
738 if (asset != null) 732 if (asset != null)
739 { 733 {
740 IJ2KDecoder imgDecoder = m_scene.RequestModuleInterface<IJ2KDecoder>();
741 try 734 try
742 { 735 {
743 using (Bitmap img = (Bitmap)imgDecoder.DecodeToImage(asset)) 736 using (Bitmap img = (Bitmap)m_imgDecoder.DecodeToImage(asset))
744 ret = new warp_Texture(img); 737 ret = new warp_Texture(img);
745 } 738 }
746 catch (Exception e) 739 catch (Exception e)