aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/CoreModules
diff options
context:
space:
mode:
authorMelanie2010-10-06 05:44:19 +0100
committerMelanie2010-10-06 05:44:19 +0100
commitd45276b3f6a309f77ddfac1e83dbe2db377883fa (patch)
treebb01ca2c342a630be049aee0c62451fe198766c8 /OpenSim/Region/CoreModules
parentConvert worldview to GET (diff)
downloadopensim-SC_OLD-d45276b3f6a309f77ddfac1e83dbe2db377883fa.zip
opensim-SC_OLD-d45276b3f6a309f77ddfac1e83dbe2db377883fa.tar.gz
opensim-SC_OLD-d45276b3f6a309f77ddfac1e83dbe2db377883fa.tar.bz2
opensim-SC_OLD-d45276b3f6a309f77ddfac1e83dbe2db377883fa.tar.xz
Add and plumb the usetex URL parameter to worldview. Required but not yet
functional
Diffstat (limited to 'OpenSim/Region/CoreModules')
-rw-r--r--OpenSim/Region/CoreModules/World/LegacyMap/MapImageModule.cs2
-rw-r--r--OpenSim/Region/CoreModules/World/Warp3DMap/MapImageModule.cs20
2 files changed, 12 insertions, 10 deletions
diff --git a/OpenSim/Region/CoreModules/World/LegacyMap/MapImageModule.cs b/OpenSim/Region/CoreModules/World/LegacyMap/MapImageModule.cs
index c9ef1f4..f86c790 100644
--- a/OpenSim/Region/CoreModules/World/LegacyMap/MapImageModule.cs
+++ b/OpenSim/Region/CoreModules/World/LegacyMap/MapImageModule.cs
@@ -560,7 +560,7 @@ namespace OpenSim.Region.CoreModules.World.LegacyMap
560 return returnpt; 560 return returnpt;
561 } 561 }
562 562
563 public Bitmap CreateViewImage(Vector3 camPos, Vector3 camDir, float fov, int width, int height) 563 public Bitmap CreateViewImage(Vector3 camPos, Vector3 camDir, float fov, int width, int height, bool useTextures)
564 { 564 {
565 return null; 565 return null;
566 } 566 }
diff --git a/OpenSim/Region/CoreModules/World/Warp3DMap/MapImageModule.cs b/OpenSim/Region/CoreModules/World/Warp3DMap/MapImageModule.cs
index eca85d3..00b506e 100644
--- a/OpenSim/Region/CoreModules/World/Warp3DMap/MapImageModule.cs
+++ b/OpenSim/Region/CoreModules/World/Warp3DMap/MapImageModule.cs
@@ -128,16 +128,16 @@ namespace OpenSim.Region.CoreModules.World.Warp3DMap
128 { 128 {
129 Vector3 camPos = new Vector3(127.5f, 127.5f, 221.7025033688163f); 129 Vector3 camPos = new Vector3(127.5f, 127.5f, 221.7025033688163f);
130 Viewport viewport = new Viewport(camPos, -Vector3.UnitZ, 1024f, 0.1f, (int)Constants.RegionSize, (int)Constants.RegionSize, (float)Constants.RegionSize, (float)Constants.RegionSize); 130 Viewport viewport = new Viewport(camPos, -Vector3.UnitZ, 1024f, 0.1f, (int)Constants.RegionSize, (int)Constants.RegionSize, (float)Constants.RegionSize, (float)Constants.RegionSize);
131 return CreateMapTile(viewport); 131 return CreateMapTile(viewport, false);
132 } 132 }
133 133
134 public Bitmap CreateViewImage(Vector3 camPos, Vector3 camDir, float fov, int width, int height) 134 public Bitmap CreateViewImage(Vector3 camPos, Vector3 camDir, float fov, int width, int height, bool useTextures)
135 { 135 {
136 Viewport viewport = new Viewport(camPos, camDir, fov, (float)Constants.RegionSize, 0.1f, width, height); 136 Viewport viewport = new Viewport(camPos, camDir, fov, (float)Constants.RegionSize, 0.1f, width, height);
137 return CreateMapTile(viewport); 137 return CreateMapTile(viewport, useTextures);
138 } 138 }
139 139
140 public Bitmap CreateMapTile(Viewport viewport) 140 public Bitmap CreateMapTile(Viewport viewport, bool useTextures)
141 { 141 {
142 bool drawPrimVolume = true; 142 bool drawPrimVolume = true;
143 bool textureTerrain = true; 143 bool textureTerrain = true;
@@ -198,7 +198,7 @@ namespace OpenSim.Region.CoreModules.World.Warp3DMap
198 CreateWater(renderer); 198 CreateWater(renderer);
199 CreateTerrain(renderer, textureTerrain); 199 CreateTerrain(renderer, textureTerrain);
200 if (drawPrimVolume) 200 if (drawPrimVolume)
201 CreateAllPrims(renderer); 201 CreateAllPrims(renderer, useTextures);
202 202
203 renderer.Render(); 203 renderer.Render();
204 Bitmap bitmap = renderer.Scene.getImage(); 204 Bitmap bitmap = renderer.Scene.getImage();
@@ -325,7 +325,7 @@ namespace OpenSim.Region.CoreModules.World.Warp3DMap
325 renderer.SetObjectMaterial("Terrain", "TerrainColor"); 325 renderer.SetObjectMaterial("Terrain", "TerrainColor");
326 } 326 }
327 327
328 private void CreateAllPrims(WarpRenderer renderer) 328 private void CreateAllPrims(WarpRenderer renderer, bool useTextures)
329 { 329 {
330 if (m_primMesher == null) 330 if (m_primMesher == null)
331 return; 331 return;
@@ -333,14 +333,15 @@ namespace OpenSim.Region.CoreModules.World.Warp3DMap
333 m_scene.ForEachSOG( 333 m_scene.ForEachSOG(
334 delegate(SceneObjectGroup group) 334 delegate(SceneObjectGroup group)
335 { 335 {
336 CreatePrim(renderer, group.RootPart); 336 CreatePrim(renderer, group.RootPart, useTextures);
337 foreach (SceneObjectPart child in group.Parts) 337 foreach (SceneObjectPart child in group.Parts)
338 CreatePrim(renderer, child); 338 CreatePrim(renderer, child, useTextures);
339 } 339 }
340 ); 340 );
341 } 341 }
342 342
343 private void CreatePrim(WarpRenderer renderer, SceneObjectPart prim) 343 private void CreatePrim(WarpRenderer renderer, SceneObjectPart prim,
344 bool useTextures)
344 { 345 {
345 const float MIN_SIZE = 2f; 346 const float MIN_SIZE = 2f;
346 347
@@ -371,6 +372,7 @@ namespace OpenSim.Region.CoreModules.World.Warp3DMap
371 string primID = prim.UUID.ToString(); 372 string primID = prim.UUID.ToString();
372 373
373 // Create the prim faces 374 // Create the prim faces
375 // TODO: Implement the useTextures flag behavior
374 for (int i = 0; i < renderMesh.Faces.Count; i++) 376 for (int i = 0; i < renderMesh.Faces.Count; i++)
375 { 377 {
376 Face face = renderMesh.Faces[i]; 378 Face face = renderMesh.Faces[i];