aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/OptionalModules/Scripting/Minimodule/World.cs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/OptionalModules/Scripting/Minimodule/World.cs39
1 files changed, 39 insertions, 0 deletions
diff --git a/OpenSim/Region/OptionalModules/Scripting/Minimodule/World.cs b/OpenSim/Region/OptionalModules/Scripting/Minimodule/World.cs
new file mode 100644
index 0000000..6c7f854
--- /dev/null
+++ b/OpenSim/Region/OptionalModules/Scripting/Minimodule/World.cs
@@ -0,0 +1,39 @@
1using System.Collections.Generic;
2using OpenSim.Region.Framework.Scenes;
3
4namespace OpenSim.Region.OptionalModules.Scripting.Minimodule
5{
6 public class World : IWorld
7 {
8 private readonly Scene m_internalScene;
9 private readonly Heightmap m_heights;
10
11 public World(Scene internalScene)
12 {
13 m_internalScene = internalScene;
14 m_heights = new Heightmap(m_internalScene);
15 }
16
17 public IObject[] Objects
18 {
19 get
20 {
21 List<EntityBase> ents = m_internalScene.Entities.GetAllByType<SceneObjectGroup>();
22 IObject[] rets = new IObject[ents.Count];
23
24 for (int i = 0; i < ents.Count; i++)
25 {
26 EntityBase ent = ents[i];
27 rets[i] = new SOPObject(m_internalScene, ent.LocalId);
28 }
29
30 return rets;
31 }
32 }
33
34 public IHeightmap Terrain
35 {
36 get { return m_heights; }
37 }
38 }
39}