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/Region/Framework/Interfaces/ITerrainChannel.cs | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
(limited to 'OpenSim/Region/Framework/Interfaces/ITerrainChannel.cs')
diff --git a/OpenSim/Region/Framework/Interfaces/ITerrainChannel.cs b/OpenSim/Region/Framework/Interfaces/ITerrainChannel.cs
index e467701..3c060a4 100644
--- a/OpenSim/Region/Framework/Interfaces/ITerrainChannel.cs
+++ b/OpenSim/Region/Framework/Interfaces/ITerrainChannel.cs
@@ -29,15 +29,21 @@ namespace OpenSim.Region.Framework.Interfaces
{
public interface ITerrainChannel
{
- int Height { get; }
+ int Width { get;} // X dimension
+ int Height { get;} // Y dimension
+ int Altitude { get;} // Z dimension
+
double this[int x, int y] { get; set; }
- int Width { get; }
///
/// Squash the entire heightmap into a single dimensioned array
///
///
float[] GetFloatsSerialised();
+ // Get version of map as a single dimensioned array and each value compressed
+ // into an int (compressedHeight = (int)(floatHeight * Constants.TerrainCompression);)
+ // This is done to make the map smaller as it can get pretty larger for variable sized regions.
+ short[] GetCompressedMap();
double[,] GetDoubles();
bool Tainted(int x, int y);
--
cgit v1.1