29 using System.Collections.Generic;
30 using System.Reflection;
32 using OpenSim.Framework;
33 using OpenSim.Region.Framework.Scenes;
34 using OpenSim.Services.Interfaces;
40 namespace OpenSim.
Region.CoreModules.ServiceConnectorsOut.Grid
44 private static readonly ILog m_log =
46 MethodBase.GetCurrentMethod().DeclaringType);
48 private Scene m_scene;
49 private Dictionary<ulong, GridRegion> m_neighbours =
new Dictionary<ulong, GridRegion>();
51 public string RegionName
53 get {
return m_scene.RegionInfo.RegionName; }
59 m_scene.EventManager.OnRegionUp += OnRegionUp;
62 private void OnRegionUp(
GridRegion otherRegion)
65 if (otherRegion == null)
68 m_log.DebugFormat(
"[REGION CACHE]: (on region {0}) Region {1} is up @ {2}-{3}",
69 m_scene.RegionInfo.RegionName, otherRegion.RegionName, Util.WorldToRegionLoc((uint)otherRegion.
RegionLocX), Util.WorldToRegionLoc((uint)otherRegion.
RegionLocY));
71 m_neighbours[otherRegion.RegionHandle] = otherRegion;
76 m_scene.EventManager.OnRegionUp -= OnRegionUp;
82 return new List<GridRegion>(m_neighbours.Values);
OpenSim.Services.Interfaces.GridRegion GridRegion
int RegionLocX
The location of this region in meters. DANGER DANGER! Note that this name means something different i...
int RegionLocY
The location of this region in meters. DANGER DANGER! Note that this name means something different i...
GridRegion GetRegionByPosition(int x, int y)
List< GridRegion > GetNeighbours()