From 7416809077227f35ab70ed44060e51f2bcf66937 Mon Sep 17 00:00:00 2001 From: Robert Adams Date: Wed, 2 Oct 2013 16:59:37 -0700 Subject: varregion: plug in TerrainData class and modify TerrainModule and LLClientView to use same. This passes a terrain info class around rather than passing a one dimensional array thus allowing variable regions. Update the database storage for variable region sizes. This should be downward compatible (same format for 256x256 regions). --- OpenSim/Region/Framework/Interfaces/ITerrainChannel.cs | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 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 3c060a4..cc8a236 100644 --- a/OpenSim/Region/Framework/Interfaces/ITerrainChannel.cs +++ b/OpenSim/Region/Framework/Interfaces/ITerrainChannel.cs @@ -25,6 +25,8 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +using OpenSim.Framework; + namespace OpenSim.Region.Framework.Interfaces { public interface ITerrainChannel @@ -35,18 +37,20 @@ namespace OpenSim.Region.Framework.Interfaces double this[int x, int y] { get; set; } + // Return the packaged terrain data for passing into lower levels of communication + TerrainData GetTerrainData(); + /// /// 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(); + + // Check if a location has been updated. Clears the taint flag as a side effect. bool Tainted(int x, int y); + ITerrainChannel MakeCopy(); string SaveToXmlString(); void LoadFromXmlString(string data); -- cgit v1.1