mirror of
https://github.com/opensim/opensim.git
synced 2026-08-07 09:45:47 +08:00
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.
This commit is contained in:
@@ -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; }
|
||||
|
||||
/// <summary>
|
||||
/// Squash the entire heightmap into a single dimensioned array
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
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);
|
||||
|
||||
Reference in New Issue
Block a user