aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
diff options
context:
space:
mode:
authorJonathan Freedman2010-10-05 19:45:37 -0400
committerJonathan Freedman2010-10-05 19:45:37 -0400
commit593fc5c87a482d8e97417bde64403b8f94d4f644 (patch)
tree6417b7874e5cf76e4b4c0c2b499f37efa7140317 /OpenSim/Region
parentMerge branch 'master' of git://opensimulator.org/git/opensim (diff)
parentAdd the view generating method to the image generator interface (diff)
downloadopensim-SC_OLD-593fc5c87a482d8e97417bde64403b8f94d4f644.zip
opensim-SC_OLD-593fc5c87a482d8e97417bde64403b8f94d4f644.tar.gz
opensim-SC_OLD-593fc5c87a482d8e97417bde64403b8f94d4f644.tar.bz2
opensim-SC_OLD-593fc5c87a482d8e97417bde64403b8f94d4f644.tar.xz
Merge branch 'master' of git://opensimulator.org/git/opensim
Diffstat (limited to 'OpenSim/Region')
-rw-r--r--OpenSim/Region/CoreModules/World/LegacyMap/MapImageModule.cs5
-rw-r--r--OpenSim/Region/CoreModules/World/Warp3DMap/MapImageModule.cs16
-rw-r--r--OpenSim/Region/Framework/Interfaces/ITerrain.cs2
3 files changed, 20 insertions, 3 deletions
diff --git a/OpenSim/Region/CoreModules/World/LegacyMap/MapImageModule.cs b/OpenSim/Region/CoreModules/World/LegacyMap/MapImageModule.cs
index 9e6e366..8408bf9 100644
--- a/OpenSim/Region/CoreModules/World/LegacyMap/MapImageModule.cs
+++ b/OpenSim/Region/CoreModules/World/LegacyMap/MapImageModule.cs
@@ -545,5 +545,10 @@ namespace OpenSim.Region.CoreModules.World.LegacyMap
545 545
546 return returnpt; 546 return returnpt;
547 } 547 }
548
549 public Bitmap CreateViewImage(Vector3 camPos, Vector3 camDir, float fov, int width, int height)
550 {
551 return null;
552 }
548 } 553 }
549} 554}
diff --git a/OpenSim/Region/CoreModules/World/Warp3DMap/MapImageModule.cs b/OpenSim/Region/CoreModules/World/Warp3DMap/MapImageModule.cs
index 49b4364..803a33a 100644
--- a/OpenSim/Region/CoreModules/World/Warp3DMap/MapImageModule.cs
+++ b/OpenSim/Region/CoreModules/World/Warp3DMap/MapImageModule.cs
@@ -112,6 +112,19 @@ namespace OpenSim.Region.CoreModules.World.Warp3DMap
112 112
113 public Bitmap CreateMapTile() 113 public Bitmap CreateMapTile()
114 { 114 {
115 Vector3 camPos = new Vector3(127.5f, 127.5f, 221.7025033688163f);
116 Viewport viewport = new Viewport(camPos, -Vector3.UnitZ, 1024f, 0.1f, (int)Constants.RegionSize, (int)Constants.RegionSize, (float)Constants.RegionSize, (float)Constants.RegionSize);
117 return CreateMapTile(viewport);
118 }
119
120 public Bitmap CreateViewImage(Vector3 camPos, Vector3 camDir, float fov, int width, int height)
121 {
122 Viewport viewport = new Viewport(camPos, camDir, fov, (float)Constants.RegionSize, 0.1f, width, height);
123 return CreateMapTile(viewport);
124 }
125
126 public Bitmap CreateMapTile(Viewport viewport)
127 {
115 bool drawPrimVolume = true; 128 bool drawPrimVolume = true;
116 bool textureTerrain = true; 129 bool textureTerrain = true;
117 130
@@ -128,9 +141,6 @@ namespace OpenSim.Region.CoreModules.World.Warp3DMap
128 141
129 m_colors.Clear(); 142 m_colors.Clear();
130 143
131 Vector3 camPos = new Vector3(127.5f, 127.5f, 221.7025033688163f);
132 Viewport viewport = new Viewport(camPos, -Vector3.UnitZ, 1024f, 0.1f, (int)Constants.RegionSize, (int)Constants.RegionSize, (float)Constants.RegionSize, (float)Constants.RegionSize);
133
134 int width = viewport.Width; 144 int width = viewport.Width;
135 int height = viewport.Height; 145 int height = viewport.Height;
136 146
diff --git a/OpenSim/Region/Framework/Interfaces/ITerrain.cs b/OpenSim/Region/Framework/Interfaces/ITerrain.cs
index 8aacb35..38cf020 100644
--- a/OpenSim/Region/Framework/Interfaces/ITerrain.cs
+++ b/OpenSim/Region/Framework/Interfaces/ITerrain.cs
@@ -26,6 +26,7 @@
26 */ 26 */
27 27
28using OpenSim.Framework; 28using OpenSim.Framework;
29using OpenMetaverse;
29 30
30namespace OpenSim.Region.Framework.Interfaces 31namespace OpenSim.Region.Framework.Interfaces
31{ 32{
@@ -74,6 +75,7 @@ namespace OpenSim.Region.Framework.Interfaces
74 public interface IMapImageGenerator 75 public interface IMapImageGenerator
75 { 76 {
76 System.Drawing.Bitmap CreateMapTile(); 77 System.Drawing.Bitmap CreateMapTile();
78 System.Drawing.Bitmap CreateViewImage(Vector3 camPos, Vector3 camDir, float fov, int width, int height);
77 byte[] WriteJpeg2000Image(); 79 byte[] WriteJpeg2000Image();
78 } 80 }
79} 81}