diff options
author | Melanie | 2010-10-06 03:32:01 +0100 |
---|---|---|
committer | Melanie | 2010-10-06 03:32:01 +0100 |
commit | abfcd168fcdd65c83b66f4506f1d589e4a5f10ef (patch) | |
tree | c6cf78287979ddd38ec04e09d35151f1d2131c00 /OpenSim | |
parent | Add WOrldView request handler and plumbing (diff) | |
download | opensim-SC_OLD-abfcd168fcdd65c83b66f4506f1d589e4a5f10ef.zip opensim-SC_OLD-abfcd168fcdd65c83b66f4506f1d589e4a5f10ef.tar.gz opensim-SC_OLD-abfcd168fcdd65c83b66f4506f1d589e4a5f10ef.tar.bz2 opensim-SC_OLD-abfcd168fcdd65c83b66f4506f1d589e4a5f10ef.tar.xz |
Add the parameter plumbing and image generation
Diffstat (limited to 'OpenSim')
-rw-r--r-- | OpenSim/Region/OptionalModules/World/WorldView/WorldViewModule.cs | 9 | ||||
-rw-r--r-- | OpenSim/Region/OptionalModules/World/WorldView/WorldViewRequestHandler.cs | 15 |
2 files changed, 22 insertions, 2 deletions
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 | |||
100 | { | 100 | { |
101 | } | 101 | } |
102 | 102 | ||
103 | public byte[] GenerateWorldView(Vector3 pos, Vector3 rot) | 103 | public byte[] GenerateWorldView(Vector3 pos, Vector3 rot, float fov, |
104 | int width, int height) | ||
104 | { | 105 | { |
106 | if (!m_Enabled) | ||
107 | return new Byte[0]; | ||
108 | |||
109 | Bitmap bmp = m_Generator.CreateViewImage(pos, rot, fov, width, | ||
110 | height); | ||
111 | |||
105 | return new Byte[0]; | 112 | return new Byte[0]; |
106 | } | 113 | } |
107 | } | 114 | } |
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 | |||
89 | float rotX; | 89 | float rotX; |
90 | float rotY; | 90 | float rotY; |
91 | float rotZ; | 91 | float rotZ; |
92 | float fov; | ||
93 | int width; | ||
94 | int height; | ||
92 | 95 | ||
93 | if (!request.ContainsKey("posX")) | 96 | if (!request.ContainsKey("posX")) |
94 | return new Byte[0]; | 97 | return new Byte[0]; |
@@ -102,6 +105,12 @@ namespace OpenSim.Region.OptionalModules.World.WorldView | |||
102 | return new Byte[0]; | 105 | return new Byte[0]; |
103 | if (!request.ContainsKey("rotZ")) | 106 | if (!request.ContainsKey("rotZ")) |
104 | return new Byte[0]; | 107 | return new Byte[0]; |
108 | if (!request.ContainsKey("fov")) | ||
109 | return new Byte[0]; | ||
110 | if (!request.ContainsKey("width")) | ||
111 | return new Byte[0]; | ||
112 | if (!request.ContainsKey("height")) | ||
113 | return new Byte[0]; | ||
105 | 114 | ||
106 | try | 115 | try |
107 | { | 116 | { |
@@ -111,6 +120,9 @@ namespace OpenSim.Region.OptionalModules.World.WorldView | |||
111 | rotX = Convert.ToSingle(request["rotX"]); | 120 | rotX = Convert.ToSingle(request["rotX"]); |
112 | rotY = Convert.ToSingle(request["rotY"]); | 121 | rotY = Convert.ToSingle(request["rotY"]); |
113 | rotZ = Convert.ToSingle(request["rotZ"]); | 122 | rotZ = Convert.ToSingle(request["rotZ"]); |
123 | fov = Convert.ToSingle(request["fov"]); | ||
124 | width = Convert.ToInt32(request["width"]); | ||
125 | height = Convert.ToInt32(request["height"]); | ||
114 | } | 126 | } |
115 | catch | 127 | catch |
116 | { | 128 | { |
@@ -120,7 +132,8 @@ namespace OpenSim.Region.OptionalModules.World.WorldView | |||
120 | Vector3 pos = new Vector3(posX, posY, posZ); | 132 | Vector3 pos = new Vector3(posX, posY, posZ); |
121 | Vector3 rot = new Vector3(rotX, rotY, rotZ); | 133 | Vector3 rot = new Vector3(rotX, rotY, rotZ); |
122 | 134 | ||
123 | return m_WorldViewModule.GenerateWorldView(pos, rot); | 135 | return m_WorldViewModule.GenerateWorldView(pos, rot, fov, width, |
136 | height); | ||
124 | } | 137 | } |
125 | } | 138 | } |
126 | } | 139 | } |