diff options
Diffstat (limited to 'OpenSim/Region/OptionalModules/Scripting/Minimodule/Heightmap.cs')
-rw-r--r-- | OpenSim/Region/OptionalModules/Scripting/Minimodule/Heightmap.cs | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/OpenSim/Region/OptionalModules/Scripting/Minimodule/Heightmap.cs b/OpenSim/Region/OptionalModules/Scripting/Minimodule/Heightmap.cs new file mode 100644 index 0000000..c75c6e7 --- /dev/null +++ b/OpenSim/Region/OptionalModules/Scripting/Minimodule/Heightmap.cs | |||
@@ -0,0 +1,34 @@ | |||
1 | using OpenSim.Region.Framework.Scenes; | ||
2 | |||
3 | namespace OpenSim.Region.OptionalModules.Scripting.Minimodule | ||
4 | { | ||
5 | public class Heightmap : IHeightmap | ||
6 | { | ||
7 | private Scene m_scene; | ||
8 | |||
9 | public Heightmap(Scene scene) | ||
10 | { | ||
11 | m_scene = scene; | ||
12 | } | ||
13 | |||
14 | public int Height | ||
15 | { | ||
16 | get { return m_scene.Heightmap.Height; } | ||
17 | } | ||
18 | |||
19 | public int Width | ||
20 | { | ||
21 | get { return m_scene.Heightmap.Width; } | ||
22 | } | ||
23 | |||
24 | public double Get(int x, int y) | ||
25 | { | ||
26 | return m_scene.Heightmap[x, y]; | ||
27 | } | ||
28 | |||
29 | public void Set(int x, int y, double val) | ||
30 | { | ||
31 | m_scene.Heightmap[x, y] = val; | ||
32 | } | ||
33 | } | ||
34 | } | ||