From 2dea3dbd6bb4e382dfb1a7dddd5c104dc889e83c Mon Sep 17 00:00:00 2001 From: Adam Frisby Date: Sun, 15 Jul 2007 15:51:09 +0000 Subject: * Terrain now uses the new StorageManager. --- .../Region/Terrain.BasicTerrain/TerrainEngine.cs | 26 ++++++++++++++++++++++ 1 file changed, 26 insertions(+) (limited to 'OpenSim/Region/Terrain.BasicTerrain') diff --git a/OpenSim/Region/Terrain.BasicTerrain/TerrainEngine.cs b/OpenSim/Region/Terrain.BasicTerrain/TerrainEngine.cs index d177ed5..f017e44 100644 --- a/OpenSim/Region/Terrain.BasicTerrain/TerrainEngine.cs +++ b/OpenSim/Region/Terrain.BasicTerrain/TerrainEngine.cs @@ -124,6 +124,15 @@ namespace OpenSim.Region.Terrain } /// + /// Converts the heightmap to a 256x256 value 2D floating point array. Double precision version. + /// + /// An array of 256,256 values containing the heightmap + public double[,] getHeights2DD() + { + return heightmap.map; + } + + /// /// Imports a 1D floating point array into the 2D heightmap array /// /// The array to import (must have 65536 members) @@ -156,6 +165,23 @@ namespace OpenSim.Region.Terrain } /// + /// Loads a 2D array of values into the heightmap (Double Precision Version) + /// + /// An array of 256,256 float values + public void setHeights2D(double[,] heights) + { + int x, y; + for (x = 0; x < w; x++) + { + for (y = 0; y < h; y++) + { + heightmap.set(x, y, heights[x, y]); + } + } + tainted++; + } + + /// /// Swaps the two heightmap buffers (the 'revert map' and the heightmap) /// public void swapRevertMaps() -- cgit v1.1