diff options
author | UbitUmarov | 2018-05-18 05:31:45 +0100 |
---|---|---|
committer | UbitUmarov | 2018-05-18 05:31:45 +0100 |
commit | 631308a1d14fd510454e0e9a84c965c9a5159a02 (patch) | |
tree | 35ff410072c528041b626e5c2d2f972e5a42beba /OpenSim/Region | |
parent | Warp3D tried to do something in RegionLoaded even when the module was disabled (diff) | |
download | opensim-SC-631308a1d14fd510454e0e9a84c965c9a5159a02.zip opensim-SC-631308a1d14fd510454e0e9a84c965c9a5159a02.tar.gz opensim-SC-631308a1d14fd510454e0e9a84c965c9a5159a02.tar.bz2 opensim-SC-631308a1d14fd510454e0e9a84c965c9a5159a02.tar.xz |
map...
Diffstat (limited to 'OpenSim/Region')
-rw-r--r-- | OpenSim/Region/CoreModules/World/Warp3DMap/Warp3DImageModule.cs | 22 |
1 files changed, 10 insertions, 12 deletions
diff --git a/OpenSim/Region/CoreModules/World/Warp3DMap/Warp3DImageModule.cs b/OpenSim/Region/CoreModules/World/Warp3DMap/Warp3DImageModule.cs index ac1caae..74ab32e 100644 --- a/OpenSim/Region/CoreModules/World/Warp3DMap/Warp3DImageModule.cs +++ b/OpenSim/Region/CoreModules/World/Warp3DMap/Warp3DImageModule.cs | |||
@@ -70,7 +70,7 @@ namespace OpenSim.Region.CoreModules.World.Warp3DMap | |||
70 | private IRendering m_primMesher; | 70 | private IRendering m_primMesher; |
71 | internal IJ2KDecoder m_imgDecoder; | 71 | internal IJ2KDecoder m_imgDecoder; |
72 | 72 | ||
73 | // caches per rendering | 73 | // caches per rendering |
74 | private Dictionary<string, warp_Texture> m_warpTextures = new Dictionary<string, warp_Texture>(); | 74 | private Dictionary<string, warp_Texture> m_warpTextures = new Dictionary<string, warp_Texture>(); |
75 | private Dictionary<UUID, int> m_colors = new Dictionary<UUID, int>(); | 75 | private Dictionary<UUID, int> m_colors = new Dictionary<UUID, int>(); |
76 | 76 | ||
@@ -239,7 +239,7 @@ namespace OpenSim.Region.CoreModules.World.Warp3DMap | |||
239 | renderer.Scene.defaultCamera.setOrthographic(true, viewWitdh, viewHeigth); | 239 | renderer.Scene.defaultCamera.setOrthographic(true, viewWitdh, viewHeigth); |
240 | else | 240 | else |
241 | renderer.Scene.defaultCamera.setFov(fov); | 241 | renderer.Scene.defaultCamera.setFov(fov); |
242 | 242 | ||
243 | renderer.Scene.defaultCamera.setPos(pos); | 243 | renderer.Scene.defaultCamera.setPos(pos); |
244 | renderer.Scene.defaultCamera.lookAt(lookat); | 244 | renderer.Scene.defaultCamera.lookAt(lookat); |
245 | #endregion Camera | 245 | #endregion Camera |
@@ -442,7 +442,7 @@ namespace OpenSim.Region.CoreModules.World.Warp3DMap | |||
442 | } | 442 | } |
443 | ); | 443 | ); |
444 | } | 444 | } |
445 | 445 | ||
446 | private void CreatePrim(WarpRenderer renderer, SceneObjectPart prim) | 446 | private void CreatePrim(WarpRenderer renderer, SceneObjectPart prim) |
447 | { | 447 | { |
448 | if ((PCode)prim.Shape.PCode != PCode.Prim) | 448 | if ((PCode)prim.Shape.PCode != PCode.Prim) |
@@ -456,17 +456,15 @@ namespace OpenSim.Region.CoreModules.World.Warp3DMap | |||
456 | if(screenFactor < 0) | 456 | if(screenFactor < 0) |
457 | return; | 457 | return; |
458 | 458 | ||
459 | int p2 = (int)( -(float)Math.Log(screenFactor) * 1.442695f * 0.5 - 1); | 459 | int p2 = (int)(-(float)Math.Log(screenFactor) * 1.442695f * 0.5 - 1); |
460 | 460 | ||
461 | if(p2 < 0) | 461 | if(p2 < 0) |
462 | p2 = 0; | 462 | p2 = 0; |
463 | else if(p2>3) | 463 | else if(p2 > 3) |
464 | p2 = 3; | 464 | p2 = 3; |
465 | 465 | ||
466 | DetailLevel lod = (DetailLevel)(3 - p2); | 466 | DetailLevel lod = (DetailLevel)(3 - p2); |
467 | 467 | ||
468 | // DetailLevel lod = DetailLevel.High; | ||
469 | |||
470 | FacetedMesh renderMesh = null; | 468 | FacetedMesh renderMesh = null; |
471 | Primitive omvPrim = prim.Shape.ToOmvPrimitive(prim.OffsetPosition, prim.RotationOffset); | 469 | Primitive omvPrim = prim.Shape.ToOmvPrimitive(prim.OffsetPosition, prim.RotationOffset); |
472 | 470 | ||
@@ -557,7 +555,7 @@ namespace OpenSim.Region.CoreModules.World.Warp3DMap | |||
557 | warp_Vertex vert = new warp_Vertex(pos, v.TexCoord.X, v.TexCoord.Y); | 555 | warp_Vertex vert = new warp_Vertex(pos, v.TexCoord.X, v.TexCoord.Y); |
558 | faceObj.addVertex(vert); | 556 | faceObj.addVertex(vert); |
559 | } | 557 | } |
560 | } | 558 | } |
561 | else | 559 | else |
562 | { | 560 | { |
563 | float tu; | 561 | float tu; |
@@ -601,10 +599,10 @@ namespace OpenSim.Region.CoreModules.World.Warp3DMap | |||
601 | tv += offsetv; | 599 | tv += offsetv; |
602 | vert = new warp_Vertex(pos, tu, tv); | 600 | vert = new warp_Vertex(pos, tu, tv); |
603 | } | 601 | } |
604 | 602 | ||
605 | faceObj.addVertex(vert); | 603 | faceObj.addVertex(vert); |
606 | } | 604 | } |
607 | } | 605 | } |
608 | 606 | ||
609 | for (int j = 0; j < face.Indices.Count; j += 3) | 607 | for (int j = 0; j < face.Indices.Count; j += 3) |
610 | { | 608 | { |
@@ -719,7 +717,7 @@ namespace OpenSim.Region.CoreModules.World.Warp3DMap | |||
719 | } | 717 | } |
720 | else | 718 | else |
721 | color = warp_Color.multiply(color, warp_Color.Grey); | 719 | color = warp_Color.multiply(color, warp_Color.Grey); |
722 | 720 | ||
723 | mat.setColor(color); | 721 | mat.setColor(color); |
724 | renderer.Scene.addMaterial(materialName, mat); | 722 | renderer.Scene.addMaterial(materialName, mat); |
725 | 723 | ||
@@ -738,7 +736,7 @@ namespace OpenSim.Region.CoreModules.World.Warp3DMap | |||
738 | byte[] asset = m_scene.AssetService.GetData(id.ToString()); | 736 | byte[] asset = m_scene.AssetService.GetData(id.ToString()); |
739 | 737 | ||
740 | if (asset != null) | 738 | if (asset != null) |
741 | { | 739 | { |
742 | IJ2KDecoder imgDecoder = m_scene.RequestModuleInterface<IJ2KDecoder>(); | 740 | IJ2KDecoder imgDecoder = m_scene.RequestModuleInterface<IJ2KDecoder>(); |
743 | try | 741 | try |
744 | { | 742 | { |