varregion: serious rework of TerrainChannel:

-- addition of varaible region size in X and Y
    -- internal storage of heightmap changed from double[] to short[]
    -- helper routines for handling internal structure while keeping existing API
    -- to and from XML that adds region size information (for downward compatibility,
        output in the legacy XML format if X and Y are 256)
Updated and commented Constants.RegionSize but didn't change the name for compatibility.
This commit is contained in:
Robert Adams
2013-09-25 17:21:20 -07:00
parent aea5d3a842
commit 8c1d80fdfd
9 changed files with 255 additions and 143 deletions

View File

@@ -472,7 +472,7 @@ namespace OpenSim.Framework
/// The x co-ordinate of this region in map tiles (e.g. 1000).
/// Coordinate is scaled as world coordinates divided by the legacy region size
/// and is thus is the number of legacy regions.
/// This entrypoint exists for downward compatability for external modules.
/// DO NOT USE FOR NEW CODE! This entrypoint exists for downward compatability with external modules.
/// </summary>
public uint RegionLocX
{
@@ -480,6 +480,18 @@ namespace OpenSim.Framework
set { LegacyRegionLocX = value; }
}
/// <summary>
/// The y co-ordinate of this region in map tiles (e.g. 1000).
/// Coordinate is scaled as world coordinates divided by the legacy region size
/// and is thus is the number of legacy regions.
/// DO NOT USE FOR NEW CODE! This entrypoint exists for downward compatability with external modules.
/// </summary>
public uint RegionLocY
{
get { return LegacyRegionLocY; }
set { LegacyRegionLocY = value; }
}
public void SetDefaultRegionSize()
{
RegionWorldLocX = 0;
@@ -490,19 +502,6 @@ namespace OpenSim.Framework
RegionSizeZ = Constants.RegionHeight;
}
/// <summary>
/// The y co-ordinate of this region in map tiles (e.g. 1000).
/// Coordinate is scaled as world coordinates divided by the legacy region size
/// and is thus is the number of legacy regions.
/// This entrypoint exists for downward compatability for external modules.
/// </summary>
public uint RegionLocY
{
get { return LegacyRegionLocY; }
set { LegacyRegionLocY = value; }
}
// A unique region handle is created from the region's world coordinates.
// This cannot be changed because some code expects to receive the region handle and then
// compute the region coordinates from it.