2 using System.Reflection;
7 using OpenSim.Framework;
8 using OpenSim.Region.Framework.Scenes;
9 using OpenSim.Region.Framework.Interfaces;
11 namespace OpenSim.
Region.PhysicsModule.ubOde
13 [Extension(Path =
"/OpenSim/RegionModules", NodeName =
"RegionModule", Id =
"ubODEPhysicsScene")]
16 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
18 private bool m_Enabled =
false;
19 private IConfigSource m_config;
21 private bool OSOdeLib;
23 #region INonSharedRegionModule
27 get {
return "ubODE"; }
30 public Type ReplaceableInterface
37 IConfig config = source.Configs[
"Startup"];
40 string physics = config.GetString(
"physics", string.Empty);
59 Util.LoadArchSpecificWindowsDll(
"ode.dll");
65 string ode_config = d.GetConfiguration();
66 if (ode_config != null && ode_config !=
"")
68 m_log.InfoFormat(
"[ubODE] ode library configuration: {0}", ode_config);
70 if (ode_config.Contains(
"ODE_OPENSIM"))
76 m_scene =
new ODEScene(scene, m_config, Name, OSOdeLib);
81 if (!m_Enabled || m_scene == null)
90 if (!m_Enabled || m_scene == null)
93 m_scene.RegionLoaded();
void Close()
This is the inverse to Initialise. After a Close(), this instance won't be usable anymore...
void RemoveRegion(Scene scene)
This is called whenever a Scene is removed. For shared modules, this can happen several times...
void AddRegion(Scene scene)
This is called whenever a Scene is added. For shared modules, this can happen several times...
void RegionLoaded(Scene scene)
This will be called once for every scene loaded. In a shared module this will be multiple times in on...
void Initialise(IConfigSource source)
This is called to initialize the region module. For shared modules, this is called exactly once...