diff options
author | UbitUmarov | 2018-05-08 07:01:38 +0100 |
---|---|---|
committer | UbitUmarov | 2018-05-08 07:01:38 +0100 |
commit | f7475d4a983e7744518932297a4292fcea9d0130 (patch) | |
tree | ccd312f614006ae9a9bb5b665dbd53d917675c58 | |
parent | breaking map (warp3d); remove warp3d viewport code not realy used and confusi... (diff) | |
download | opensim-SC-f7475d4a983e7744518932297a4292fcea9d0130.zip opensim-SC-f7475d4a983e7744518932297a4292fcea9d0130.tar.gz opensim-SC-f7475d4a983e7744518932297a4292fcea9d0130.tar.bz2 opensim-SC-f7475d4a983e7744518932297a4292fcea9d0130.tar.xz |
breaking map (warp3d)...
-rw-r--r-- | OpenSim/Region/CoreModules/World/Warp3DMap/Warp3DImageModule.cs | 16 | ||||
-rwxr-xr-x | bin/Warp3D.dll | bin | 69632 -> 69632 bytes |
2 files changed, 10 insertions, 6 deletions
diff --git a/OpenSim/Region/CoreModules/World/Warp3DMap/Warp3DImageModule.cs b/OpenSim/Region/CoreModules/World/Warp3DMap/Warp3DImageModule.cs index b4659cc..e0e851f 100644 --- a/OpenSim/Region/CoreModules/World/Warp3DMap/Warp3DImageModule.cs +++ b/OpenSim/Region/CoreModules/World/Warp3DMap/Warp3DImageModule.cs | |||
@@ -174,13 +174,16 @@ namespace OpenSim.Region.CoreModules.World.Warp3DMap | |||
174 | cameraPos = new Vector3( | 174 | cameraPos = new Vector3( |
175 | (m_scene.RegionInfo.RegionSizeX) * 0.5f, | 175 | (m_scene.RegionInfo.RegionSizeX) * 0.5f, |
176 | (m_scene.RegionInfo.RegionSizeY) * 0.5f, | 176 | (m_scene.RegionInfo.RegionSizeY) * 0.5f, |
177 | 250f); | 177 | 4096f); |
178 | 178 | ||
179 | cameraDir = -Vector3.UnitZ; | 179 | cameraDir = -Vector3.UnitZ; |
180 | viewWitdh = (int)m_scene.RegionInfo.RegionSizeX; | 180 | viewWitdh = (int)m_scene.RegionInfo.RegionSizeX; |
181 | viewHeigth = (int)m_scene.RegionInfo.RegionSizeY; | 181 | viewHeigth = (int)m_scene.RegionInfo.RegionSizeY; |
182 | orto = true; | 182 | orto = true; |
183 | 183 | ||
184 | // fov = warp_Math.rad2deg(2f * (float)Math.Atan2(viewWitdh,4096f)); | ||
185 | // orto = false; | ||
186 | |||
184 | Bitmap tile = GenMapTile(); | 187 | Bitmap tile = GenMapTile(); |
185 | m_primMesher = null; | 188 | m_primMesher = null; |
186 | return tile; | 189 | return tile; |
@@ -395,6 +398,7 @@ namespace OpenSim.Region.CoreModules.World.Warp3DMap | |||
395 | texture = new warp_Texture(image); | 398 | texture = new warp_Texture(image); |
396 | 399 | ||
397 | warp_Material material = new warp_Material(texture); | 400 | warp_Material material = new warp_Material(texture); |
401 | material.setColor(warp_Color.getColor(255,255,255)); | ||
398 | renderer.Scene.addMaterial("TerrainColor", material); | 402 | renderer.Scene.addMaterial("TerrainColor", material); |
399 | renderer.SetObjectMaterial("Terrain", "TerrainColor"); | 403 | renderer.SetObjectMaterial("Terrain", "TerrainColor"); |
400 | } | 404 | } |
@@ -470,6 +474,10 @@ namespace OpenSim.Region.CoreModules.World.Warp3DMap | |||
470 | 474 | ||
471 | string primID = prim.UUID.ToString(); | 475 | string primID = prim.UUID.ToString(); |
472 | 476 | ||
477 | warp_Vector primPos = ConvertVector(prim.GetWorldPosition()); | ||
478 | warp_Quaternion primRot = ConvertQuaternion(prim.GetWorldRotation()); | ||
479 | warp_Matrix m = warp_Matrix.quaternionMatrix(primRot); | ||
480 | |||
473 | // Create the prim faces | 481 | // Create the prim faces |
474 | // TODO: Implement the useTextures flag behavior | 482 | // TODO: Implement the useTextures flag behavior |
475 | for (int i = 0; i < renderMesh.Faces.Count; i++) | 483 | for (int i = 0; i < renderMesh.Faces.Count; i++) |
@@ -501,18 +509,14 @@ namespace OpenSim.Region.CoreModules.World.Warp3DMap | |||
501 | Primitive.TextureEntryFace teFace = prim.Shape.Textures.GetFace((uint)i); | 509 | Primitive.TextureEntryFace teFace = prim.Shape.Textures.GetFace((uint)i); |
502 | Color4 faceColor = teFace.RGBA; | 510 | Color4 faceColor = teFace.RGBA; |
503 | string materialName = String.Empty; | 511 | string materialName = String.Empty; |
512 | |||
504 | if (m_texturePrims && primScaleLenSquared > m_texturePrimSize*m_texturePrimSize) | 513 | if (m_texturePrims && primScaleLenSquared > m_texturePrimSize*m_texturePrimSize) |
505 | materialName = GetOrCreateMaterial(renderer, faceColor, teFace.TextureID); | 514 | materialName = GetOrCreateMaterial(renderer, faceColor, teFace.TextureID); |
506 | else | 515 | else |
507 | materialName = GetOrCreateMaterial(renderer, GetFaceColor(teFace)); | 516 | materialName = GetOrCreateMaterial(renderer, GetFaceColor(teFace)); |
508 | 517 | ||
509 | faceObj.scaleSelf(prim.Scale.X, prim.Scale.Z, prim.Scale.Y); | 518 | faceObj.scaleSelf(prim.Scale.X, prim.Scale.Z, prim.Scale.Y); |
510 | |||
511 | warp_Quaternion primRot = ConvertQuaternion(prim.GetWorldRotation()); | ||
512 | warp_Matrix m = warp_Matrix.quaternionMatrix(primRot); | ||
513 | faceObj.transform(m); | 519 | faceObj.transform(m); |
514 | |||
515 | warp_Vector primPos = ConvertVector(prim.GetWorldPosition()); | ||
516 | faceObj.setPos(primPos); | 520 | faceObj.setPos(primPos); |
517 | 521 | ||
518 | renderer.Scene.addObject(meshName, faceObj); | 522 | renderer.Scene.addObject(meshName, faceObj); |
diff --git a/bin/Warp3D.dll b/bin/Warp3D.dll index 2f9a13b..d80037c 100755 --- a/bin/Warp3D.dll +++ b/bin/Warp3D.dll | |||
Binary files differ | |||