/// <summary> /// Constructor /// </summary> /// <param name="sceneManager"></param> /// <param name="layerParams"></param> public ObjectLayer(SceneManager sceneManager, LayerParams layerParams) : base(layerParams) { _sceneManager = sceneManager; _polygonList = new List<Polygon>(); m_layerRegion = new BBOXF(256000, 256000, 256512, 256512); }
public BaseLayer(LayerParams layerParams) { this.m_name = layerParams.name; this.m_imgCacheSize = new Size(layerParams.size_w, layerParams.size_h); this.m_pollingInterval = layerParams.updateInterval; this.m_imgCache = null; ThreadStart layerMonitorStart = new ThreadStart(LayerMonitor); Thread layerMonitorThread = new Thread(layerMonitorStart); layerMonitorThread.Name = string.Format("{0} monitor thread", this.m_name); layerMonitorThread.Start(); }
public TerrainLayer(SceneManager sceneManager, LayerParams layerParams) : base(layerParams) { _sceneManager = sceneManager; m_regionNumber = 0; }
public void Initialise(OpenSimBase openSim) { m_log.Info("[MapService]: initialized!"); _app = openSim; _httpd = openSim.HttpServer; layerDict = new Dictionary<string, BaseLayer>(); // read app config from OpenSim.MapService.ini LayerParams objLayerParams = new LayerParams(); LayerParams terrainLayerParams = new LayerParams(); LayerParams agentLayerParams = new LayerParams(); try { m_config = new IniConfigSource("OpenSim.MapService.ini"); getLayerParams(m_config.Configs["Object"], ref objLayerParams); getLayerParams(m_config.Configs["Terrain"], ref terrainLayerParams); getLayerParams(m_config.Configs["Agent"], ref agentLayerParams); } catch (Exception e) { Console.WriteLine("Read Map Service config failure"); Console.WriteLine(e.ToString()); } // initailize new feature layers and register them m_objectLayer = new ObjectLayer(_app.SceneManager, objLayerParams); m_terrainLayer = new TerrainLayer(_app.SceneManager, terrainLayerParams); m_agentLayer = new AgentLayer(_app.SceneManager, agentLayerParams); layerDict.Add(m_objectLayer.Name, m_objectLayer); layerDict.Add(m_terrainLayer.Name, m_terrainLayer); layerDict.Add(m_agentLayer.Name, m_agentLayer); // register ows handler string httpMethod = "GET"; string path = "/ows"; OWSStreamHandler h = new OWSStreamHandler(httpMethod, path, owsHandler); _httpd.AddStreamHandler(h); }
private void getLayerParams(IConfig config, ref LayerParams layerParams) { layerParams.name = config.GetString("name"); string[] sizes = config.GetString("size").Split(' '); layerParams.size_w = Int32.Parse(sizes[0]); layerParams.size_h = Int32.Parse(sizes[1]); layerParams.updateInterval = config.GetInt("update_interval"); }
/// <summary> /// Constructor /// </summary> /// <param name="sceneManager"></param> /// <param name="layerParams"></param> public AgentLayer(SceneManager sceneManager, LayerParams layerParams) : base(layerParams) { this._sceneManager = sceneManager; agentList = new Dictionary<UUID, AgentInfo>(); }