aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
authorMelanie2010-10-05 22:56:20 +0100
committerMelanie2010-10-05 22:56:20 +0100
commiteb491d2c3601fc4909370f100a802086a80dc043 (patch)
tree93649be9184f9da2d252105d3bdf54fd00821cac /OpenSim
parentMerge branch 'master' of melanie@opensimulator.org:/var/git/opensim (diff)
downloadopensim-SC_OLD-eb491d2c3601fc4909370f100a802086a80dc043.zip
opensim-SC_OLD-eb491d2c3601fc4909370f100a802086a80dc043.tar.gz
opensim-SC_OLD-eb491d2c3601fc4909370f100a802086a80dc043.tar.bz2
opensim-SC_OLD-eb491d2c3601fc4909370f100a802086a80dc043.tar.xz
Patch to allow other cam angles. Not complete. Thanks, Antont.
Diffstat (limited to 'OpenSim')
-rw-r--r--OpenSim/Region/CoreModules/World/Warp3DMap/MapImageModule.cs18
1 files changed, 14 insertions, 4 deletions
diff --git a/OpenSim/Region/CoreModules/World/Warp3DMap/MapImageModule.cs b/OpenSim/Region/CoreModules/World/Warp3DMap/MapImageModule.cs
index 49b4364..dab29d0 100644
--- a/OpenSim/Region/CoreModules/World/Warp3DMap/MapImageModule.cs
+++ b/OpenSim/Region/CoreModules/World/Warp3DMap/MapImageModule.cs
@@ -112,8 +112,21 @@ 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 = false; //true;
117 130
118 try 131 try
119 { 132 {
@@ -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