From fbc9072a5ca4ae3c8474964fbd4ef663eeed1377 Mon Sep 17 00:00:00 2001 From: Robert Adams Date: Wed, 25 Sep 2013 17:21:20 -0700 Subject: 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. --- OpenSim/Framework/Constants.cs | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'OpenSim/Framework/Constants.cs') diff --git a/OpenSim/Framework/Constants.cs b/OpenSim/Framework/Constants.cs index a2eb5ee..7979132 100644 --- a/OpenSim/Framework/Constants.cs +++ b/OpenSim/Framework/Constants.cs @@ -30,9 +30,18 @@ namespace OpenSim.Framework { public class Constants { + // 'RegionSize' captures the legacy region size. + // DO NOT USE THIS FOR ANY NEW CODE. Use Scene.RegionSize[XYZ] as a region might not + // be the legacy region size. public const uint RegionSize = 256; public const uint RegionHeight = 4096; + + // Terrain heightmap is kept as shorts that are the float value times this compression factor + public const float TerrainCompression = 100.0f; + // 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 byte TerrainPatchSize = 16; + public const string DefaultTexture = "89556747-24cb-43ed-920b-47caed15465f"; public enum EstateAccessCodex : uint -- cgit v1.1