From 6869633d76b2a6664743a608e4284b8dd7df85a6 Mon Sep 17 00:00:00 2001 From: Robert Adams Date: Sat, 28 Dec 2013 06:58:15 -0800 Subject: Add serialization/deserialization of region size to RegionInfo, GridRegion, and RegionData. This does not modify interfaces or handling of variable sized regions. This only enables the loading and storing of the region size and the reporting of the region size in grid service responses. The database tables already have the code to load and store the region size. --- OpenSim/Framework/Constants.cs | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'OpenSim/Framework/Constants.cs') diff --git a/OpenSim/Framework/Constants.cs b/OpenSim/Framework/Constants.cs index a2eb5ee..3468cea 100644 --- a/OpenSim/Framework/Constants.cs +++ b/OpenSim/Framework/Constants.cs @@ -30,8 +30,14 @@ namespace OpenSim.Framework { public class Constants { + // 'RegionSize' is the legacy region size. + // DO NOT USE THIS FOR ANY NEW CODE. Use Scene.RegionInfo.RegionSize[XYZ] as a region might not + // be the legacy region size. public const uint RegionSize = 256; public const uint RegionHeight = 4096; + // This could be a parameters but, really, a region of greater than this is pretty unmanageable + public const uint MaximumRegionSize = 8192; + public const byte TerrainPatchSize = 16; public const string DefaultTexture = "89556747-24cb-43ed-920b-47caed15465f"; -- cgit v1.1 From d9848943a96672b14fb9a6be58c4adc1e1552f3c Mon Sep 17 00:00:00 2001 From: Robert Adams Date: Sat, 4 Jan 2014 10:39:05 -0800 Subject: Add routines in Util.cs for conversion of region handles to region locations and for the conversion of region world location to region 'region' location. These routines will replace all the arithmatic scattered throughout OpenSimulator. --- OpenSim/Framework/Constants.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'OpenSim/Framework/Constants.cs') diff --git a/OpenSim/Framework/Constants.cs b/OpenSim/Framework/Constants.cs index 3468cea..3ba264c 100644 --- a/OpenSim/Framework/Constants.cs +++ b/OpenSim/Framework/Constants.cs @@ -38,7 +38,10 @@ namespace OpenSim.Framework // This could be a parameters but, really, a region of greater than this is pretty unmanageable public const uint MaximumRegionSize = 8192; - public const byte TerrainPatchSize = 16; + // Since terrain is stored in 16x16 heights, regions must be a multiple of this number and that is the minimum + public const int MinRegionSize = 16; + public const int TerrainPatchSize = 16; + public const string DefaultTexture = "89556747-24cb-43ed-920b-47caed15465f"; public enum EstateAccessCodex : uint -- cgit v1.1