varregion: add linkage for region size in creations and conversions
of GridRegion. New variables for size and code to initialize same.varregion
parent
f66737fe56
commit
6df7d4219d
|
@ -441,6 +441,8 @@ namespace OpenSim.Services.GridService
|
||||||
RegionData rdata = new RegionData();
|
RegionData rdata = new RegionData();
|
||||||
rdata.posX = (int)rinfo.RegionLocX;
|
rdata.posX = (int)rinfo.RegionLocX;
|
||||||
rdata.posY = (int)rinfo.RegionLocY;
|
rdata.posY = (int)rinfo.RegionLocY;
|
||||||
|
rdata.sizeX = rinfo.RegionSizeX;
|
||||||
|
rdata.sizeY = rinfo.RegionSizeY;
|
||||||
rdata.RegionID = rinfo.RegionID;
|
rdata.RegionID = rinfo.RegionID;
|
||||||
rdata.RegionName = rinfo.RegionName;
|
rdata.RegionName = rinfo.RegionName;
|
||||||
rdata.Data = rinfo.ToKeyValuePairs();
|
rdata.Data = rinfo.ToKeyValuePairs();
|
||||||
|
@ -454,6 +456,8 @@ namespace OpenSim.Services.GridService
|
||||||
GridRegion rinfo = new GridRegion(rdata.Data);
|
GridRegion rinfo = new GridRegion(rdata.Data);
|
||||||
rinfo.RegionLocX = rdata.posX;
|
rinfo.RegionLocX = rdata.posX;
|
||||||
rinfo.RegionLocY = rdata.posY;
|
rinfo.RegionLocY = rdata.posY;
|
||||||
|
rinfo.RegionSizeX = rdata.sizeX;
|
||||||
|
rinfo.RegionSizeY = rdata.sizeY;
|
||||||
rinfo.RegionID = rdata.RegionID;
|
rinfo.RegionID = rdata.RegionID;
|
||||||
rinfo.RegionName = rdata.RegionName;
|
rinfo.RegionName = rdata.RegionName;
|
||||||
rinfo.ScopeID = rdata.ScopeID;
|
rinfo.ScopeID = rdata.ScopeID;
|
||||||
|
|
|
@ -185,6 +185,9 @@ namespace OpenSim.Services.Interfaces
|
||||||
}
|
}
|
||||||
protected int m_regionLocX;
|
protected int m_regionLocX;
|
||||||
|
|
||||||
|
public int RegionSizeX { get; set; }
|
||||||
|
public int RegionSizeY { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The location of this region in meters.
|
/// The location of this region in meters.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -222,6 +225,8 @@ namespace OpenSim.Services.Interfaces
|
||||||
{
|
{
|
||||||
m_regionLocX = regionLocX;
|
m_regionLocX = regionLocX;
|
||||||
m_regionLocY = regionLocY;
|
m_regionLocY = regionLocY;
|
||||||
|
RegionSizeX = (int)Constants.RegionSize;
|
||||||
|
RegionSizeY = (int)Constants.RegionSize;
|
||||||
|
|
||||||
m_internalEndPoint = internalEndPoint;
|
m_internalEndPoint = internalEndPoint;
|
||||||
m_externalHostName = externalUri;
|
m_externalHostName = externalUri;
|
||||||
|
@ -231,6 +236,8 @@ namespace OpenSim.Services.Interfaces
|
||||||
{
|
{
|
||||||
m_regionLocX = regionLocX;
|
m_regionLocX = regionLocX;
|
||||||
m_regionLocY = regionLocY;
|
m_regionLocY = regionLocY;
|
||||||
|
RegionSizeX = (int)Constants.RegionSize;
|
||||||
|
RegionSizeY = (int)Constants.RegionSize;
|
||||||
|
|
||||||
m_externalHostName = externalUri;
|
m_externalHostName = externalUri;
|
||||||
|
|
||||||
|
@ -241,6 +248,8 @@ namespace OpenSim.Services.Interfaces
|
||||||
{
|
{
|
||||||
m_regionLocX = (int)(xcell * Constants.RegionSize);
|
m_regionLocX = (int)(xcell * Constants.RegionSize);
|
||||||
m_regionLocY = (int)(ycell * Constants.RegionSize);
|
m_regionLocY = (int)(ycell * Constants.RegionSize);
|
||||||
|
RegionSizeX = (int)Constants.RegionSize;
|
||||||
|
RegionSizeY = (int)Constants.RegionSize;
|
||||||
}
|
}
|
||||||
|
|
||||||
public GridRegion(RegionInfo ConvertFrom)
|
public GridRegion(RegionInfo ConvertFrom)
|
||||||
|
@ -248,6 +257,8 @@ namespace OpenSim.Services.Interfaces
|
||||||
m_regionName = ConvertFrom.RegionName;
|
m_regionName = ConvertFrom.RegionName;
|
||||||
m_regionLocX = (int)(ConvertFrom.RegionWorldLocX);
|
m_regionLocX = (int)(ConvertFrom.RegionWorldLocX);
|
||||||
m_regionLocY = (int)(ConvertFrom.RegionWorldLocY);
|
m_regionLocY = (int)(ConvertFrom.RegionWorldLocY);
|
||||||
|
RegionSizeX = (int)ConvertFrom.RegionSizeX;
|
||||||
|
RegionSizeY = (int)ConvertFrom.RegionSizeY;
|
||||||
m_internalEndPoint = ConvertFrom.InternalEndPoint;
|
m_internalEndPoint = ConvertFrom.InternalEndPoint;
|
||||||
m_externalHostName = ConvertFrom.ExternalHostName;
|
m_externalHostName = ConvertFrom.ExternalHostName;
|
||||||
m_httpPort = ConvertFrom.HttpPort;
|
m_httpPort = ConvertFrom.HttpPort;
|
||||||
|
@ -266,6 +277,8 @@ namespace OpenSim.Services.Interfaces
|
||||||
m_regionName = ConvertFrom.RegionName;
|
m_regionName = ConvertFrom.RegionName;
|
||||||
m_regionLocX = ConvertFrom.RegionLocX;
|
m_regionLocX = ConvertFrom.RegionLocX;
|
||||||
m_regionLocY = ConvertFrom.RegionLocY;
|
m_regionLocY = ConvertFrom.RegionLocY;
|
||||||
|
RegionSizeX = ConvertFrom.RegionSizeX;
|
||||||
|
RegionSizeY = ConvertFrom.RegionSizeY;
|
||||||
m_internalEndPoint = ConvertFrom.InternalEndPoint;
|
m_internalEndPoint = ConvertFrom.InternalEndPoint;
|
||||||
m_externalHostName = ConvertFrom.ExternalHostName;
|
m_externalHostName = ConvertFrom.ExternalHostName;
|
||||||
m_httpPort = ConvertFrom.HttpPort;
|
m_httpPort = ConvertFrom.HttpPort;
|
||||||
|
@ -373,6 +386,8 @@ namespace OpenSim.Services.Interfaces
|
||||||
kvp["uuid"] = RegionID.ToString();
|
kvp["uuid"] = RegionID.ToString();
|
||||||
kvp["locX"] = RegionLocX.ToString();
|
kvp["locX"] = RegionLocX.ToString();
|
||||||
kvp["locY"] = RegionLocY.ToString();
|
kvp["locY"] = RegionLocY.ToString();
|
||||||
|
kvp["sizeX"] = RegionSizeX.ToString();
|
||||||
|
kvp["sizeY"] = RegionSizeY.ToString();
|
||||||
kvp["regionName"] = RegionName;
|
kvp["regionName"] = RegionName;
|
||||||
kvp["serverIP"] = ExternalHostName; //ExternalEndPoint.Address.ToString();
|
kvp["serverIP"] = ExternalHostName; //ExternalEndPoint.Address.ToString();
|
||||||
kvp["serverHttpPort"] = HttpPort.ToString();
|
kvp["serverHttpPort"] = HttpPort.ToString();
|
||||||
|
@ -399,6 +414,12 @@ namespace OpenSim.Services.Interfaces
|
||||||
if (kvp.ContainsKey("locY"))
|
if (kvp.ContainsKey("locY"))
|
||||||
RegionLocY = Convert.ToInt32((string)kvp["locY"]);
|
RegionLocY = Convert.ToInt32((string)kvp["locY"]);
|
||||||
|
|
||||||
|
if (kvp.ContainsKey("sizeX"))
|
||||||
|
RegionSizeX = Convert.ToInt32((string)kvp["sizeX"]);
|
||||||
|
|
||||||
|
if (kvp.ContainsKey("sizeY"))
|
||||||
|
RegionSizeY = Convert.ToInt32((string)kvp["sizeY"]);
|
||||||
|
|
||||||
if (kvp.ContainsKey("regionName"))
|
if (kvp.ContainsKey("regionName"))
|
||||||
RegionName = (string)kvp["regionName"];
|
RegionName = (string)kvp["regionName"];
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue