aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/PhysicsModules/POS/POSScene.cs
diff options
context:
space:
mode:
authorDiva Canto2015-08-31 13:02:51 -0700
committerDiva Canto2015-08-31 13:02:51 -0700
commit134d4300f0b6e9b0df0326cfe0b5df9f41f42865 (patch)
tree86420f55292ec2f566c10b30cdb52a54e6c0f14c /OpenSim/Region/PhysicsModules/POS/POSScene.cs
parentFixed a namespace dependency. Also started preparing prebuild.xml for making ... (diff)
downloadopensim-SC-134d4300f0b6e9b0df0326cfe0b5df9f41f42865.zip
opensim-SC-134d4300f0b6e9b0df0326cfe0b5df9f41f42865.tar.gz
opensim-SC-134d4300f0b6e9b0df0326cfe0b5df9f41f42865.tar.bz2
opensim-SC-134d4300f0b6e9b0df0326cfe0b5df9f41f42865.tar.xz
All physics plugins are now region modules. Compiles but doesn't run.
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/PhysicsModules/POS/POSScene.cs56
1 files changed, 51 insertions, 5 deletions
diff --git a/OpenSim/Region/PhysicsModules/POS/POSScene.cs b/OpenSim/Region/PhysicsModules/POS/POSScene.cs
index 603502f..915fa8c 100644
--- a/OpenSim/Region/PhysicsModules/POS/POSScene.cs
+++ b/OpenSim/Region/PhysicsModules/POS/POSScene.cs
@@ -29,11 +29,15 @@ using System;
29using System.Collections.Generic; 29using System.Collections.Generic;
30using Nini.Config; 30using Nini.Config;
31using OpenMetaverse; 31using OpenMetaverse;
32using Mono.Addins;
32using OpenSim.Framework; 33using OpenSim.Framework;
33using OpenSim.Region.PhysicsModules.SharedBase; 34using OpenSim.Region.PhysicsModules.SharedBase;
35using OpenSim.Region.Framework.Scenes;
36using OpenSim.Region.Framework.Interfaces;
34 37
35namespace OpenSim.Region.PhysicsModule.POS 38namespace OpenSim.Region.PhysicsModule.POS
36{ 39{
40 [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "POSPhysicsScene")]
37 public class POSScene : PhysicsScene 41 public class POSScene : PhysicsScene
38 { 42 {
39 private List<POSCharacter> _characters = new List<POSCharacter>(); 43 private List<POSCharacter> _characters = new List<POSCharacter>();
@@ -41,19 +45,61 @@ namespace OpenSim.Region.PhysicsModule.POS
41 private float[] _heightMap; 45 private float[] _heightMap;
42 private const float gravity = -9.8f; 46 private const float gravity = -9.8f;
43 47
48 private bool m_Enabled = false;
44 //protected internal string sceneIdentifier; 49 //protected internal string sceneIdentifier;
45 50
46 public POSScene(string engineType, String _sceneIdentifier) 51 #region INonSharedRegionModule
52 public string Name
47 { 53 {
48 EngineType = engineType; 54 get { return "POS"; }
49 Name = EngineType + "/" + _sceneIdentifier;
50 //sceneIdentifier = _sceneIdentifier;
51 } 55 }
52 56
53 public override void Initialise(IMesher meshmerizer, IConfigSource config) 57 public Type ReplaceableInterface
54 { 58 {
59 get { return null; }
55 } 60 }
56 61
62 public void Initialise(IConfigSource source)
63 {
64 // TODO: Move this out of Startup
65 IConfig config = source.Configs["Startup"];
66 if (config != null)
67 {
68 string physics = config.GetString("physics", string.Empty);
69 if (physics == Name)
70 m_Enabled = true;
71 }
72
73 }
74
75 public void Close()
76 {
77 }
78
79 public void AddRegion(Scene scene)
80 {
81 if (!m_Enabled)
82 return;
83
84 EngineType = Name;
85 PhysicsSceneName = EngineType + "/" + scene.RegionInfo.RegionName;
86
87 scene.RegisterModuleInterface<PhysicsScene>(this);
88 }
89
90 public void RemoveRegion(Scene scene)
91 {
92 if (!m_Enabled)
93 return;
94 }
95
96 public void RegionLoaded(Scene scene)
97 {
98 if (!m_Enabled)
99 return;
100 }
101 #endregion
102
57 public override void Dispose() 103 public override void Dispose()
58 { 104 {
59 } 105 }