From abfcd168fcdd65c83b66f4506f1d589e4a5f10ef Mon Sep 17 00:00:00 2001 From: Melanie Date: Wed, 6 Oct 2010 03:32:01 +0100 Subject: Add the parameter plumbing and image generation --- .../OptionalModules/World/WorldView/WorldViewModule.cs | 9 ++++++++- .../World/WorldView/WorldViewRequestHandler.cs | 15 ++++++++++++++- 2 files changed, 22 insertions(+), 2 deletions(-) (limited to 'OpenSim/Region') diff --git a/OpenSim/Region/OptionalModules/World/WorldView/WorldViewModule.cs b/OpenSim/Region/OptionalModules/World/WorldView/WorldViewModule.cs index 098b741..a2e47c3 100644 --- a/OpenSim/Region/OptionalModules/World/WorldView/WorldViewModule.cs +++ b/OpenSim/Region/OptionalModules/World/WorldView/WorldViewModule.cs @@ -100,8 +100,15 @@ namespace OpenSim.Region.OptionalModules.World.WorldView { } - public byte[] GenerateWorldView(Vector3 pos, Vector3 rot) + public byte[] GenerateWorldView(Vector3 pos, Vector3 rot, float fov, + int width, int height) { + if (!m_Enabled) + return new Byte[0]; + + Bitmap bmp = m_Generator.CreateViewImage(pos, rot, fov, width, + height); + return new Byte[0]; } } diff --git a/OpenSim/Region/OptionalModules/World/WorldView/WorldViewRequestHandler.cs b/OpenSim/Region/OptionalModules/World/WorldView/WorldViewRequestHandler.cs index a9cf1f1..8b2fa29 100644 --- a/OpenSim/Region/OptionalModules/World/WorldView/WorldViewRequestHandler.cs +++ b/OpenSim/Region/OptionalModules/World/WorldView/WorldViewRequestHandler.cs @@ -89,6 +89,9 @@ namespace OpenSim.Region.OptionalModules.World.WorldView float rotX; float rotY; float rotZ; + float fov; + int width; + int height; if (!request.ContainsKey("posX")) return new Byte[0]; @@ -102,6 +105,12 @@ namespace OpenSim.Region.OptionalModules.World.WorldView return new Byte[0]; if (!request.ContainsKey("rotZ")) return new Byte[0]; + if (!request.ContainsKey("fov")) + return new Byte[0]; + if (!request.ContainsKey("width")) + return new Byte[0]; + if (!request.ContainsKey("height")) + return new Byte[0]; try { @@ -111,6 +120,9 @@ namespace OpenSim.Region.OptionalModules.World.WorldView rotX = Convert.ToSingle(request["rotX"]); rotY = Convert.ToSingle(request["rotY"]); rotZ = Convert.ToSingle(request["rotZ"]); + fov = Convert.ToSingle(request["fov"]); + width = Convert.ToInt32(request["width"]); + height = Convert.ToInt32(request["height"]); } catch { @@ -120,7 +132,8 @@ namespace OpenSim.Region.OptionalModules.World.WorldView Vector3 pos = new Vector3(posX, posY, posZ); Vector3 rot = new Vector3(rotX, rotY, rotZ); - return m_WorldViewModule.GenerateWorldView(pos, rot); + return m_WorldViewModule.GenerateWorldView(pos, rot, fov, width, + height); } } } -- cgit v1.1