29 using System.Collections.Generic;
31 using System.Reflection;
34 using OpenSim.Framework;
35 using OpenSim.Server.Base;
36 using OpenSim.Framework.Servers.HttpServer;
37 using OpenSim.Region.Framework.Scenes;
38 using OpenSim.Region.Framework.Interfaces;
43 namespace OpenSim.
Region.OptionalModules.
World.WorldView
47 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
53 : base(
"GET",
"/worldview/" + rid)
55 m_WorldViewModule = fmodule;
61 httpResponse.ContentType =
"image/jpeg";
72 Dictionary<string, object> request =
73 new Dictionary<string, object>();
75 request[name] = httpRequest.QueryString[name];
77 return SendWorldView(request);
82 m_log.Debug(
"[WORLDVIEW]: Exception: " + e.ToString());
101 if (!request.ContainsKey(
"posX"))
103 if (!request.ContainsKey(
"posY"))
105 if (!request.ContainsKey(
"posZ"))
107 if (!request.ContainsKey(
"rotX"))
109 if (!request.ContainsKey(
"rotY"))
111 if (!request.ContainsKey(
"rotZ"))
113 if (!request.ContainsKey(
"fov"))
115 if (!request.ContainsKey(
"width"))
117 if (!request.ContainsKey(
"height"))
119 if (!request.ContainsKey(
"usetex"))
124 posX = Convert.ToSingle(request[
"posX"]);
125 posY = Convert.ToSingle(request[
"posY"]);
126 posZ = Convert.ToSingle(request[
"posZ"]);
127 rotX = Convert.ToSingle(request[
"rotX"]);
128 rotY = Convert.ToSingle(request[
"rotY"]);
129 rotZ = Convert.ToSingle(request[
"rotZ"]);
130 fov = Convert.ToSingle(request[
"fov"]);
131 width = Convert.ToInt32(request[
"width"]);
132 height = Convert.ToInt32(request[
"height"]);
133 usetex = Convert.ToBoolean(request[
"usetex"]);
140 Vector3 pos =
new Vector3(posX, posY, posZ);
141 Vector3 rot =
new Vector3(rotX, rotY, rotZ);
143 return m_WorldViewModule.GenerateWorldView(pos, rot, fov, width,
Byte[] SendWorldView(Dictionary< string, object > request)
Base streamed request handler.
WorldViewRequestHandler(WorldViewModule fmodule, string rid)
NameValueCollection QueryString
override byte[] ProcessRequest(string path, Stream requestData, IOSHttpRequest httpRequest, IOSHttpResponse httpResponse)
WorldViewModule m_WorldViewModule