Add the parameter plumbing and image generation
parent
17316170a5
commit
abfcd168fc
|
@ -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];
|
return new Byte[0];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -89,6 +89,9 @@ namespace OpenSim.Region.OptionalModules.World.WorldView
|
||||||
float rotX;
|
float rotX;
|
||||||
float rotY;
|
float rotY;
|
||||||
float rotZ;
|
float rotZ;
|
||||||
|
float fov;
|
||||||
|
int width;
|
||||||
|
int height;
|
||||||
|
|
||||||
if (!request.ContainsKey("posX"))
|
if (!request.ContainsKey("posX"))
|
||||||
return new Byte[0];
|
return new Byte[0];
|
||||||
|
@ -102,6 +105,12 @@ namespace OpenSim.Region.OptionalModules.World.WorldView
|
||||||
return new Byte[0];
|
return new Byte[0];
|
||||||
if (!request.ContainsKey("rotZ"))
|
if (!request.ContainsKey("rotZ"))
|
||||||
return new Byte[0];
|
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
|
try
|
||||||
{
|
{
|
||||||
|
@ -111,6 +120,9 @@ namespace OpenSim.Region.OptionalModules.World.WorldView
|
||||||
rotX = Convert.ToSingle(request["rotX"]);
|
rotX = Convert.ToSingle(request["rotX"]);
|
||||||
rotY = Convert.ToSingle(request["rotY"]);
|
rotY = Convert.ToSingle(request["rotY"]);
|
||||||
rotZ = Convert.ToSingle(request["rotZ"]);
|
rotZ = Convert.ToSingle(request["rotZ"]);
|
||||||
|
fov = Convert.ToSingle(request["fov"]);
|
||||||
|
width = Convert.ToInt32(request["width"]);
|
||||||
|
height = Convert.ToInt32(request["height"]);
|
||||||
}
|
}
|
||||||
catch
|
catch
|
||||||
{
|
{
|
||||||
|
@ -120,7 +132,8 @@ namespace OpenSim.Region.OptionalModules.World.WorldView
|
||||||
Vector3 pos = new Vector3(posX, posY, posZ);
|
Vector3 pos = new Vector3(posX, posY, posZ);
|
||||||
Vector3 rot = new Vector3(rotX, rotY, rotZ);
|
Vector3 rot = new Vector3(rotX, rotY, rotZ);
|
||||||
|
|
||||||
return m_WorldViewModule.GenerateWorldView(pos, rot);
|
return m_WorldViewModule.GenerateWorldView(pos, rot, fov, width,
|
||||||
|
height);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue