aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Interfaces
diff options
context:
space:
mode:
authorRobert Adams2013-09-25 17:21:20 -0700
committerRobert Adams2013-09-28 07:33:56 -0700
commit8c1d80fdfd104b94cb7a4fd247b3baa2a9988ea1 (patch)
tree0423a4cd16f354f21d12162eaa351d9e13ba52fd /OpenSim/Region/Framework/Interfaces
parentRemove time based terrain storage in SQLite so revision number can be used (diff)
downloadopensim-SC-8c1d80fdfd104b94cb7a4fd247b3baa2a9988ea1.zip
opensim-SC-8c1d80fdfd104b94cb7a4fd247b3baa2a9988ea1.tar.gz
opensim-SC-8c1d80fdfd104b94cb7a4fd247b3baa2a9988ea1.tar.bz2
opensim-SC-8c1d80fdfd104b94cb7a4fd247b3baa2a9988ea1.tar.xz
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.
Diffstat (limited to 'OpenSim/Region/Framework/Interfaces')
-rw-r--r--OpenSim/Region/Framework/Interfaces/ISimulationDataStore.cs40
-rw-r--r--OpenSim/Region/Framework/Interfaces/ITerrainChannel.cs10
2 files changed, 28 insertions, 22 deletions
diff --git a/OpenSim/Region/Framework/Interfaces/ISimulationDataStore.cs b/OpenSim/Region/Framework/Interfaces/ISimulationDataStore.cs
index c936a84..847d245 100644
--- a/OpenSim/Region/Framework/Interfaces/ISimulationDataStore.cs
+++ b/OpenSim/Region/Framework/Interfaces/ISimulationDataStore.cs
@@ -134,26 +134,26 @@ namespace OpenSim.Region.Framework.Interfaces
134 Dictionary<string, string> GetExtra(UUID regionID); 134 Dictionary<string, string> GetExtra(UUID regionID);
135 135
136 void Shutdown(); 136 void Shutdown();
137 } 137 }
138 138
139 // The terrain is stored as a blob in the database with a 'revision' field. 139 // The terrain is stored as a blob in the database with a 'revision' field.
140 // Some implementations of terrain storage would fill the revision field with 140 // Some implementations of terrain storage would fill the revision field with
141 // the time the terrain was stored. When real revisions were added and this 141 // the time the terrain was stored. When real revisions were added and this
142 // feature removed, that left some old entries with the time in the revision 142 // feature removed, that left some old entries with the time in the revision
143 // field. 143 // field.
144 // Thus, if revision is greater than 'RevisionHigh' then terrain db entry is 144 // Thus, if revision is greater than 'RevisionHigh' then terrain db entry is
145 // left over and it is presumed to be 'Legacy256'. 145 // left over and it is presumed to be 'Legacy256'.
146 // Numbers are arbitrary and are chosen to to reduce possible mis-interpretation. 146 // Numbers are arbitrary and are chosen to to reduce possible mis-interpretation.
147 // If a revision does not match any of these, it is assumed to be Legacy256. 147 // If a revision does not match any of these, it is assumed to be Legacy256.
148 public enum DBTerrainRevision 148 public enum DBTerrainRevision
149 { 149 {
150 // Terrain is 'double[256,256]' 150 // Terrain is 'double[256,256]'
151 Legacy256 = 11, 151 Legacy256 = 11,
152 // Terrain is 'int32, int32, float[,]' where the shorts are X and Y dimensions 152 // Terrain is 'int32, int32, float[,]' where the shorts are X and Y dimensions
153 // The dimensions are presumed to be multiples of 16 and, more likely, multiples of 256. 153 // The dimensions are presumed to be multiples of 16 and, more likely, multiples of 256.
154 Variable2D = 22, 154 Variable2D = 22,
155 // A revision that is not listed above or any revision greater than this value is 'Legacy256'. 155 // A revision that is not listed above or any revision greater than this value is 'Legacy256'.
156 RevisionHigh = 1234 156 RevisionHigh = 1234
157 } 157 }
158 158
159} 159}
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
29{ 29{
30 public interface ITerrainChannel 30 public interface ITerrainChannel
31 { 31 {
32 int Height { get; } 32 int Width { get;} // X dimension
33 int Height { get;} // Y dimension
34 int Altitude { get;} // Z dimension
35
33 double this[int x, int y] { get; set; } 36 double this[int x, int y] { get; set; }
34 int Width { get; }
35 37
36 /// <summary> 38 /// <summary>
37 /// Squash the entire heightmap into a single dimensioned array 39 /// Squash the entire heightmap into a single dimensioned array
38 /// </summary> 40 /// </summary>
39 /// <returns></returns> 41 /// <returns></returns>
40 float[] GetFloatsSerialised(); 42 float[] GetFloatsSerialised();
43 // Get version of map as a single dimensioned array and each value compressed
44 // into an int (compressedHeight = (int)(floatHeight * Constants.TerrainCompression);)
45 // This is done to make the map smaller as it can get pretty larger for variable sized regions.
46 short[] GetCompressedMap();
41 47
42 double[,] GetDoubles(); 48 double[,] GetDoubles();
43 bool Tainted(int x, int y); 49 bool Tainted(int x, int y);