29 using System.Collections.Generic;
31 using System.Drawing.Imaging;
32 using System.Reflection;
38 using OpenMetaverse.Imaging;
39 using OpenSim.Framework;
40 using OpenSim.Framework.Servers;
41 using OpenSim.Region.Framework.Interfaces;
42 using OpenSim.Region.Framework.Scenes;
43 using OpenSim.Server.Base;
44 using OpenSim.Framework.Servers.HttpServer;
45 using OpenSim.Services.Interfaces;
49 [Extension(Path =
"/OpenSim/RegionModules", NodeName =
"RegionModule", Id =
"WorldViewModule")]
52 private static readonly ILog m_log =
53 LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
56 private bool m_Enabled =
false;
61 IConfig moduleConfig = config.Configs[
"Modules"];
62 if (moduleConfig == null)
65 if (moduleConfig.GetString(
"WorldViewModule",
String.Empty) != Name)
81 if (m_Generator == null)
87 m_log.Info(
"[WORLDVIEW]: Configured and enabled");
100 get {
return "WorldViewModule"; }
103 public Type ReplaceableInterface
113 int width,
int height,
bool usetex)
118 using (Bitmap bmp = m_Generator.CreateViewImage(pos, rot, fov, width, height, usetex))
120 using (MemoryStream str =
new MemoryStream())
122 bmp.Save(str, ImageFormat.Jpeg);
124 return str.ToArray();
void RegionLoaded(Scene scene)
This will be called once for every scene loaded. In a shared module this will be multiple times in on...
void AddRegion(Scene scene)
This is called whenever a Scene is added. For shared modules, this can happen several times...
byte[] GenerateWorldView(Vector3 pos, Vector3 rot, float fov, int width, int height, bool usetex)
Interface to OpenSimulator's built in HTTP server. Use this to register handlers (http, llsd, xmlrpc, etc.) for given URLs.
void Close()
This is the inverse to Initialise. After a Close(), this instance won't be usable anymore...
Interactive OpenSim region server
virtual RegionInfo RegionInfo
void Initialise(IConfigSource config)
This is called to initialize the region module. For shared modules, this is called exactly once...
void RemoveRegion(Scene scene)
This is called whenever a Scene is removed. For shared modules, this can happen several times...