aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Interfaces
diff options
context:
space:
mode:
authorRobert Adams2013-10-02 16:59:37 -0700
committerRobert Adams2013-10-07 13:57:40 -0700
commit7416809077227f35ab70ed44060e51f2bcf66937 (patch)
tree7578cbfed07777d5c60af986791dc7d8b09b2cd5 /OpenSim/Region/Framework/Interfaces
parentvarregion: remove scattered use of Constants.RegionSize by having routines re... (diff)
downloadopensim-SC_OLD-7416809077227f35ab70ed44060e51f2bcf66937.zip
opensim-SC_OLD-7416809077227f35ab70ed44060e51f2bcf66937.tar.gz
opensim-SC_OLD-7416809077227f35ab70ed44060e51f2bcf66937.tar.bz2
opensim-SC_OLD-7416809077227f35ab70ed44060e51f2bcf66937.tar.xz
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).
Diffstat (limited to 'OpenSim/Region/Framework/Interfaces')
-rw-r--r--OpenSim/Region/Framework/Interfaces/ISimulationDataStore.cs20
-rw-r--r--OpenSim/Region/Framework/Interfaces/ITerrainChannel.cs12
2 files changed, 8 insertions, 24 deletions
diff --git a/OpenSim/Region/Framework/Interfaces/ISimulationDataStore.cs b/OpenSim/Region/Framework/Interfaces/ISimulationDataStore.cs
index 847d245..5ba5b31 100644
--- a/OpenSim/Region/Framework/Interfaces/ISimulationDataStore.cs
+++ b/OpenSim/Region/Framework/Interfaces/ISimulationDataStore.cs
@@ -136,24 +136,4 @@ namespace OpenSim.Region.Framework.Interfaces
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.
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
142 // feature removed, that left some old entries with the time in the revision
143 // field.
144 // Thus, if revision is greater than 'RevisionHigh' then terrain db entry is
145 // left over and it is presumed to be 'Legacy256'.
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.
148 public enum DBTerrainRevision
149 {
150 // Terrain is 'double[256,256]'
151 Legacy256 = 11,
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.
154 Variable2D = 22,
155 // A revision that is not listed above or any revision greater than this value is 'Legacy256'.
156 RevisionHigh = 1234
157 }
158
159} 139}
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 @@
25 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 */ 26 */
27 27
28using OpenSim.Framework;
29
28namespace OpenSim.Region.Framework.Interfaces 30namespace OpenSim.Region.Framework.Interfaces
29{ 31{
30 public interface ITerrainChannel 32 public interface ITerrainChannel
@@ -35,18 +37,20 @@ namespace OpenSim.Region.Framework.Interfaces
35 37
36 double this[int x, int y] { get; set; } 38 double this[int x, int y] { get; set; }
37 39
40 // Return the packaged terrain data for passing into lower levels of communication
41 TerrainData GetTerrainData();
42
38 /// <summary> 43 /// <summary>
39 /// Squash the entire heightmap into a single dimensioned array 44 /// Squash the entire heightmap into a single dimensioned array
40 /// </summary> 45 /// </summary>
41 /// <returns></returns> 46 /// <returns></returns>
42 float[] GetFloatsSerialised(); 47 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();
47 48
48 double[,] GetDoubles(); 49 double[,] GetDoubles();
50
51 // Check if a location has been updated. Clears the taint flag as a side effect.
49 bool Tainted(int x, int y); 52 bool Tainted(int x, int y);
53
50 ITerrainChannel MakeCopy(); 54 ITerrainChannel MakeCopy();
51 string SaveToXmlString(); 55 string SaveToXmlString();
52 void LoadFromXmlString(string data); 56 void LoadFromXmlString(string data);