aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/OptionalModules/Scripting/Minimodule/Heightmap.cs
blob: 6fa6ebe83c4174f79b8031f33efac0581ed3747a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
using OpenSim.Region.Framework.Scenes;

namespace OpenSim.Region.OptionalModules.Scripting.Minimodule
{
    public class Heightmap : IHeightmap
    {
        private Scene m_scene;

        public Heightmap(Scene scene)
        {
            m_scene = scene;
        }

        public int Height
        {
            get { return m_scene.Heightmap.Height; }
        }

        public int Width
        {
            get { return m_scene.Heightmap.Width; }
        }

        public double Get(int x, int y)
        {
            return m_scene.Heightmap[x, y];
        }

        public void Set(int x, int y, double val)
        {
            m_scene.Heightmap[x, y] = val;
        }
    }
}