diff options
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/PhysicsModules/Ode/OdeScene.cs | 4 | ||||
-rw-r--r-- | OpenSim/Region/PhysicsModules/UbitMeshing/HelperTypes.cs (renamed from OpenSim/Region/Physics/UbitMeshing/HelperTypes.cs) | 0 | ||||
-rw-r--r-- | OpenSim/Region/PhysicsModules/UbitMeshing/Mesh.cs (renamed from OpenSim/Region/Physics/UbitMeshing/Mesh.cs) | 0 | ||||
-rw-r--r-- | OpenSim/Region/PhysicsModules/UbitMeshing/Meshmerizer.cs (renamed from OpenSim/Region/Physics/UbitMeshing/Meshmerizer.cs) | 0 | ||||
-rw-r--r-- | OpenSim/Region/PhysicsModules/UbitMeshing/PrimMesher.cs (renamed from OpenSim/Region/Physics/UbitMeshing/PrimMesher.cs) | 0 | ||||
-rw-r--r-- | OpenSim/Region/PhysicsModules/UbitMeshing/SculptMap.cs (renamed from OpenSim/Region/Physics/UbitMeshing/SculptMap.cs) | 0 | ||||
-rw-r--r-- | OpenSim/Region/PhysicsModules/UbitMeshing/SculptMesh.cs (renamed from OpenSim/Region/Physics/UbitMeshing/SculptMesh.cs) | 0 | ||||
-rw-r--r-- | OpenSim/Region/PhysicsModules/UbitOdePlugin/AssemblyInfo.cs (renamed from OpenSim/Region/Physics/UbitOdePlugin/AssemblyInfo.cs) | 0 | ||||
-rw-r--r-- | OpenSim/Region/PhysicsModules/UbitOdePlugin/ODECharacter.cs (renamed from OpenSim/Region/Physics/UbitOdePlugin/ODECharacter.cs) | 4 | ||||
-rw-r--r-- | OpenSim/Region/PhysicsModules/UbitOdePlugin/ODEDynamics.cs (renamed from OpenSim/Region/Physics/UbitOdePlugin/ODEDynamics.cs) | 4 | ||||
-rw-r--r-- | OpenSim/Region/PhysicsModules/UbitOdePlugin/ODEMeshWorker.cs (renamed from OpenSim/Region/Physics/UbitOdePlugin/ODEMeshWorker.cs) | 6 | ||||
-rw-r--r-- | OpenSim/Region/PhysicsModules/UbitOdePlugin/ODEPrim.cs (renamed from OpenSim/Region/Physics/UbitOdePlugin/ODEPrim.cs) | 4 | ||||
-rw-r--r-- | OpenSim/Region/PhysicsModules/UbitOdePlugin/ODERayCastRequestManager.cs (renamed from OpenSim/Region/Physics/UbitOdePlugin/ODERayCastRequestManager.cs) | 6 | ||||
-rw-r--r-- | OpenSim/Region/PhysicsModules/UbitOdePlugin/ODESitAvatar.cs (renamed from OpenSim/Region/Physics/UbitOdePlugin/ODESitAvatar.cs) | 6 | ||||
-rw-r--r-- | OpenSim/Region/PhysicsModules/UbitOdePlugin/OdeApi.cs (renamed from OpenSim/Region/Physics/UbitOdePlugin/OdeApi.cs) | 0 | ||||
-rw-r--r-- | OpenSim/Region/PhysicsModules/UbitOdePlugin/OdeScene.cs (renamed from OpenSim/Region/Physics/UbitOdePlugin/OdeScene.cs) | 93 |
16 files changed, 94 insertions, 33 deletions
diff --git a/OpenSim/Region/PhysicsModules/Ode/OdeScene.cs b/OpenSim/Region/PhysicsModules/Ode/OdeScene.cs index 26210d6..b00a5ab 100644 --- a/OpenSim/Region/PhysicsModules/Ode/OdeScene.cs +++ b/OpenSim/Region/PhysicsModules/Ode/OdeScene.cs | |||
@@ -671,7 +671,7 @@ namespace OpenSim.Region.PhysicsModule.ODE | |||
671 | } | 671 | } |
672 | #endif | 672 | #endif |
673 | 673 | ||
674 | public override void Initialise(IMesher meshmerizer, IConfigSource config, Vector3 regionExtent) | 674 | public void Initialise(IMesher meshmerizer, IConfigSource config, Vector3 regionExtent) |
675 | { | 675 | { |
676 | WorldExtents.X = regionExtent.X; | 676 | WorldExtents.X = regionExtent.X; |
677 | m_regionWidth = (uint)regionExtent.X; | 677 | m_regionWidth = (uint)regionExtent.X; |
@@ -682,7 +682,7 @@ namespace OpenSim.Region.PhysicsModule.ODE | |||
682 | } | 682 | } |
683 | 683 | ||
684 | // Initialize the mesh plugin | 684 | // Initialize the mesh plugin |
685 | public override void Initialise(IMesher meshmerizer, IConfigSource config) | 685 | public void Initialise(IMesher meshmerizer, IConfigSource config) |
686 | { | 686 | { |
687 | InitializeExtraStats(); | 687 | InitializeExtraStats(); |
688 | 688 | ||
diff --git a/OpenSim/Region/Physics/UbitMeshing/HelperTypes.cs b/OpenSim/Region/PhysicsModules/UbitMeshing/HelperTypes.cs index 5dc1e78..5dc1e78 100644 --- a/OpenSim/Region/Physics/UbitMeshing/HelperTypes.cs +++ b/OpenSim/Region/PhysicsModules/UbitMeshing/HelperTypes.cs | |||
diff --git a/OpenSim/Region/Physics/UbitMeshing/Mesh.cs b/OpenSim/Region/PhysicsModules/UbitMeshing/Mesh.cs index 0418893..0418893 100644 --- a/OpenSim/Region/Physics/UbitMeshing/Mesh.cs +++ b/OpenSim/Region/PhysicsModules/UbitMeshing/Mesh.cs | |||
diff --git a/OpenSim/Region/Physics/UbitMeshing/Meshmerizer.cs b/OpenSim/Region/PhysicsModules/UbitMeshing/Meshmerizer.cs index c131c6f..c131c6f 100644 --- a/OpenSim/Region/Physics/UbitMeshing/Meshmerizer.cs +++ b/OpenSim/Region/PhysicsModules/UbitMeshing/Meshmerizer.cs | |||
diff --git a/OpenSim/Region/Physics/UbitMeshing/PrimMesher.cs b/OpenSim/Region/PhysicsModules/UbitMeshing/PrimMesher.cs index 8eb136b..8eb136b 100644 --- a/OpenSim/Region/Physics/UbitMeshing/PrimMesher.cs +++ b/OpenSim/Region/PhysicsModules/UbitMeshing/PrimMesher.cs | |||
diff --git a/OpenSim/Region/Physics/UbitMeshing/SculptMap.cs b/OpenSim/Region/PhysicsModules/UbitMeshing/SculptMap.cs index 1c75db6..1c75db6 100644 --- a/OpenSim/Region/Physics/UbitMeshing/SculptMap.cs +++ b/OpenSim/Region/PhysicsModules/UbitMeshing/SculptMap.cs | |||
diff --git a/OpenSim/Region/Physics/UbitMeshing/SculptMesh.cs b/OpenSim/Region/PhysicsModules/UbitMeshing/SculptMesh.cs index bc1375b..bc1375b 100644 --- a/OpenSim/Region/Physics/UbitMeshing/SculptMesh.cs +++ b/OpenSim/Region/PhysicsModules/UbitMeshing/SculptMesh.cs | |||
diff --git a/OpenSim/Region/Physics/UbitOdePlugin/AssemblyInfo.cs b/OpenSim/Region/PhysicsModules/UbitOdePlugin/AssemblyInfo.cs index d46341b..d46341b 100644 --- a/OpenSim/Region/Physics/UbitOdePlugin/AssemblyInfo.cs +++ b/OpenSim/Region/PhysicsModules/UbitOdePlugin/AssemblyInfo.cs | |||
diff --git a/OpenSim/Region/Physics/UbitOdePlugin/ODECharacter.cs b/OpenSim/Region/PhysicsModules/UbitOdePlugin/ODECharacter.cs index 0e2cbd2..ba38136 100644 --- a/OpenSim/Region/Physics/UbitOdePlugin/ODECharacter.cs +++ b/OpenSim/Region/PhysicsModules/UbitOdePlugin/ODECharacter.cs | |||
@@ -34,10 +34,10 @@ using System.Reflection; | |||
34 | using OpenMetaverse; | 34 | using OpenMetaverse; |
35 | using OdeAPI; | 35 | using OdeAPI; |
36 | using OpenSim.Framework; | 36 | using OpenSim.Framework; |
37 | using OpenSim.Region.Physics.Manager; | 37 | using OpenSim.Region.PhysicsModules.SharedBase; |
38 | using log4net; | 38 | using log4net; |
39 | 39 | ||
40 | namespace OpenSim.Region.Physics.OdePlugin | 40 | namespace OpenSim.Region.PhysicsModules.OdePlugin |
41 | { | 41 | { |
42 | /// <summary> | 42 | /// <summary> |
43 | /// Various properties that ODE uses for AMotors but isn't exposed in ODE.NET so we must define them ourselves. | 43 | /// Various properties that ODE uses for AMotors but isn't exposed in ODE.NET so we must define them ourselves. |
diff --git a/OpenSim/Region/Physics/UbitOdePlugin/ODEDynamics.cs b/OpenSim/Region/PhysicsModules/UbitOdePlugin/ODEDynamics.cs index 3c952ae..36bb1e9 100644 --- a/OpenSim/Region/Physics/UbitOdePlugin/ODEDynamics.cs +++ b/OpenSim/Region/PhysicsModules/UbitOdePlugin/ODEDynamics.cs | |||
@@ -48,9 +48,9 @@ using log4net; | |||
48 | using OpenMetaverse; | 48 | using OpenMetaverse; |
49 | using OdeAPI; | 49 | using OdeAPI; |
50 | using OpenSim.Framework; | 50 | using OpenSim.Framework; |
51 | using OpenSim.Region.Physics.Manager; | 51 | using OpenSim.Region.PhysicsModules.SharedBase; |
52 | 52 | ||
53 | namespace OpenSim.Region.Physics.OdePlugin | 53 | namespace OpenSim.Region.PhysicsModules.OdePlugin |
54 | { | 54 | { |
55 | public class ODEDynamics | 55 | public class ODEDynamics |
56 | { | 56 | { |
diff --git a/OpenSim/Region/Physics/UbitOdePlugin/ODEMeshWorker.cs b/OpenSim/Region/PhysicsModules/UbitOdePlugin/ODEMeshWorker.cs index a6bdaa0..918c9db 100644 --- a/OpenSim/Region/Physics/UbitOdePlugin/ODEMeshWorker.cs +++ b/OpenSim/Region/PhysicsModules/UbitOdePlugin/ODEMeshWorker.cs | |||
@@ -10,13 +10,13 @@ using System.Reflection; | |||
10 | using System.Runtime.InteropServices; | 10 | using System.Runtime.InteropServices; |
11 | using System.Text; | 11 | using System.Text; |
12 | using OpenSim.Framework; | 12 | using OpenSim.Framework; |
13 | using OpenSim.Region.Physics.Manager; | 13 | using OpenSim.Region.PhysicsModules.SharedBase; |
14 | using OdeAPI; | 14 | using OdeAPI; |
15 | using log4net; | 15 | using log4net; |
16 | using Nini.Config; | 16 | using Nini.Config; |
17 | using OpenMetaverse; | 17 | using OpenMetaverse; |
18 | 18 | ||
19 | namespace OpenSim.Region.Physics.OdePlugin | 19 | namespace OpenSim.Region.PhysicsModules.OdePlugin |
20 | { | 20 | { |
21 | public enum MeshState : byte | 21 | public enum MeshState : byte |
22 | { | 22 | { |
@@ -930,4 +930,4 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
930 | repData.actor.Name); | 930 | repData.actor.Name); |
931 | } | 931 | } |
932 | } | 932 | } |
933 | } \ No newline at end of file | 933 | } |
diff --git a/OpenSim/Region/Physics/UbitOdePlugin/ODEPrim.cs b/OpenSim/Region/PhysicsModules/UbitOdePlugin/ODEPrim.cs index 8bcdd89..b52a242 100644 --- a/OpenSim/Region/Physics/UbitOdePlugin/ODEPrim.cs +++ b/OpenSim/Region/PhysicsModules/UbitOdePlugin/ODEPrim.cs | |||
@@ -55,9 +55,9 @@ using log4net; | |||
55 | using OpenMetaverse; | 55 | using OpenMetaverse; |
56 | using OdeAPI; | 56 | using OdeAPI; |
57 | using OpenSim.Framework; | 57 | using OpenSim.Framework; |
58 | using OpenSim.Region.Physics.Manager; | 58 | using OpenSim.Region.PhysicsModules.SharedBase; |
59 | 59 | ||
60 | namespace OpenSim.Region.Physics.OdePlugin | 60 | namespace OpenSim.Region.PhysicsModules.OdePlugin |
61 | { | 61 | { |
62 | public class OdePrim : PhysicsActor | 62 | public class OdePrim : PhysicsActor |
63 | { | 63 | { |
diff --git a/OpenSim/Region/Physics/UbitOdePlugin/ODERayCastRequestManager.cs b/OpenSim/Region/PhysicsModules/UbitOdePlugin/ODERayCastRequestManager.cs index 73ababa..3ad9a47 100644 --- a/OpenSim/Region/Physics/UbitOdePlugin/ODERayCastRequestManager.cs +++ b/OpenSim/Region/PhysicsModules/UbitOdePlugin/ODERayCastRequestManager.cs | |||
@@ -31,12 +31,12 @@ using System.Reflection; | |||
31 | using System.Runtime.InteropServices; | 31 | using System.Runtime.InteropServices; |
32 | using System.Text; | 32 | using System.Text; |
33 | using OpenSim.Framework; | 33 | using OpenSim.Framework; |
34 | using OpenSim.Region.Physics.Manager; | 34 | using OpenSim.Region.PhysicsModules.SharedBase; |
35 | using OdeAPI; | 35 | using OdeAPI; |
36 | using log4net; | 36 | using log4net; |
37 | using OpenMetaverse; | 37 | using OpenMetaverse; |
38 | 38 | ||
39 | namespace OpenSim.Region.Physics.OdePlugin | 39 | namespace OpenSim.Region.PhysicsModules.OdePlugin |
40 | { | 40 | { |
41 | /// <summary> | 41 | /// <summary> |
42 | /// Processes raycast requests as ODE is in a state to be able to do them. | 42 | /// Processes raycast requests as ODE is in a state to be able to do them. |
@@ -680,4 +680,4 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
680 | public RayFilterFlags filter; | 680 | public RayFilterFlags filter; |
681 | public Quaternion orientation; | 681 | public Quaternion orientation; |
682 | } | 682 | } |
683 | } \ No newline at end of file | 683 | } |
diff --git a/OpenSim/Region/Physics/UbitOdePlugin/ODESitAvatar.cs b/OpenSim/Region/PhysicsModules/UbitOdePlugin/ODESitAvatar.cs index 672212f..d934d3e 100644 --- a/OpenSim/Region/Physics/UbitOdePlugin/ODESitAvatar.cs +++ b/OpenSim/Region/PhysicsModules/UbitOdePlugin/ODESitAvatar.cs | |||
@@ -31,12 +31,12 @@ using System.Reflection; | |||
31 | using System.Runtime.InteropServices; | 31 | using System.Runtime.InteropServices; |
32 | using System.Text; | 32 | using System.Text; |
33 | using OpenSim.Framework; | 33 | using OpenSim.Framework; |
34 | using OpenSim.Region.Physics.Manager; | 34 | using OpenSim.Region.PhysicsModules.SharedBase; |
35 | using OdeAPI; | 35 | using OdeAPI; |
36 | using log4net; | 36 | using log4net; |
37 | using OpenMetaverse; | 37 | using OpenMetaverse; |
38 | 38 | ||
39 | namespace OpenSim.Region.Physics.OdePlugin | 39 | namespace OpenSim.Region.PhysicsModules.OdePlugin |
40 | { | 40 | { |
41 | /// <summary> | 41 | /// <summary> |
42 | /// </summary> | 42 | /// </summary> |
@@ -353,4 +353,4 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
353 | return; | 353 | return; |
354 | } | 354 | } |
355 | } | 355 | } |
356 | } \ No newline at end of file | 356 | } |
diff --git a/OpenSim/Region/Physics/UbitOdePlugin/OdeApi.cs b/OpenSim/Region/PhysicsModules/UbitOdePlugin/OdeApi.cs index 10d7d50..10d7d50 100644 --- a/OpenSim/Region/Physics/UbitOdePlugin/OdeApi.cs +++ b/OpenSim/Region/PhysicsModules/UbitOdePlugin/OdeApi.cs | |||
diff --git a/OpenSim/Region/Physics/UbitOdePlugin/OdeScene.cs b/OpenSim/Region/PhysicsModules/UbitOdePlugin/OdeScene.cs index e8c219c..9373d2b 100644 --- a/OpenSim/Region/Physics/UbitOdePlugin/OdeScene.cs +++ b/OpenSim/Region/PhysicsModules/UbitOdePlugin/OdeScene.cs | |||
@@ -39,10 +39,11 @@ using log4net; | |||
39 | using Nini.Config; | 39 | using Nini.Config; |
40 | using OdeAPI; | 40 | using OdeAPI; |
41 | using OpenSim.Framework; | 41 | using OpenSim.Framework; |
42 | using OpenSim.Region.Physics.Manager; | 42 | using OpenSim.Region.Framework.Interfaces; |
43 | using OpenSim.Region.PhysicsModules.SharedBase; | ||
43 | using OpenMetaverse; | 44 | using OpenMetaverse; |
44 | 45 | ||
45 | namespace OpenSim.Region.Physics.OdePlugin | 46 | namespace OpenSim.Region.PhysicsModules.OdePlugin |
46 | { | 47 | { |
47 | // colision flags of things others can colide with | 48 | // colision flags of things others can colide with |
48 | // rays, sensors, probes removed since can't be colided with | 49 | // rays, sensors, probes removed since can't be colided with |
@@ -164,9 +165,9 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
164 | 165 | ||
165 | 166 | ||
166 | 167 | ||
167 | public class OdeScene : PhysicsScene | 168 | public class OdeScene : PhysicsScene, INonSharedRegionModule |
168 | { | 169 | { |
169 | private readonly ILog m_log; | 170 | private readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType.ToString() + "." + sceneIdentifier); |
170 | // private Dictionary<string, sCollisionData> m_storedCollisions = new Dictionary<string, sCollisionData>(); | 171 | // private Dictionary<string, sCollisionData> m_storedCollisions = new Dictionary<string, sCollisionData>(); |
171 | 172 | ||
172 | public bool OdeUbitLib = false; | 173 | public bool OdeUbitLib = false; |
@@ -324,18 +325,85 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
324 | } | 325 | } |
325 | } | 326 | } |
326 | */ | 327 | */ |
328 | #region INonSharedRegionModule | ||
329 | public string Name | ||
330 | { | ||
331 | get { return "UbitODE"; } | ||
332 | } | ||
333 | |||
334 | public Type ReplaceableInterface | ||
335 | { | ||
336 | get { return null; } | ||
337 | } | ||
338 | |||
339 | public void Initialise(IConfigSource source) | ||
340 | { | ||
341 | // TODO: Move this out of Startup | ||
342 | IConfig config = source.Configs["Startup"]; | ||
343 | if (config != null) | ||
344 | { | ||
345 | string physics = config.GetString("physics", string.Empty); | ||
346 | if (physics == Name) | ||
347 | { | ||
348 | m_Enabled = true; | ||
349 | m_Config = source; | ||
350 | } | ||
351 | } | ||
352 | |||
353 | } | ||
354 | |||
355 | public void Close() | ||
356 | { | ||
357 | } | ||
358 | |||
359 | public void AddRegion(Scene scene) | ||
360 | { | ||
361 | if (!m_Enabled) | ||
362 | return; | ||
363 | |||
364 | EngineType = Name; | ||
365 | RegionName = scene.RegionInfo.RegionName; | ||
366 | PhysicsSceneName = EngineType + "/" + RegionName; | ||
367 | |||
368 | scene.RegisterModuleInterface<PhysicsScene>(this); | ||
369 | Vector3 extent = new Vector3(scene.RegionInfo.RegionSizeX, scene.RegionInfo.RegionSizeY, scene.RegionInfo.RegionSizeZ); | ||
370 | RawInitialization(); | ||
371 | Initialise(m_Config, extent); | ||
372 | |||
373 | base.Initialise(scene.PhysicsRequestAsset, | ||
374 | (scene.Heightmap != null ? scene.Heightmap.GetFloatsSerialised() : new float[scene.RegionInfo.RegionSizeX * scene.RegionInfo.RegionSizeY]), | ||
375 | (float)scene.RegionInfo.RegionSettings.WaterHeight); | ||
376 | |||
377 | } | ||
378 | |||
379 | public void RemoveRegion(Scene scene) | ||
380 | { | ||
381 | if (!m_Enabled) | ||
382 | return; | ||
383 | } | ||
384 | |||
385 | public void RegionLoaded(Scene scene) | ||
386 | { | ||
387 | if (!m_Enabled) | ||
388 | return; | ||
389 | |||
390 | mesher = scene.RequestModuleInterface<IMesher>(); | ||
391 | if (mesher == null) | ||
392 | m_log.WarnFormat("{0} No mesher. Things will not work well.", LogHeader); | ||
393 | |||
394 | scene.PhysicsEnabled = true; | ||
395 | } | ||
396 | #endregion | ||
397 | |||
327 | /// <summary> | 398 | /// <summary> |
328 | /// Initiailizes the scene | 399 | /// Initiailizes the scene |
329 | /// Sets many properties that ODE requires to be stable | 400 | /// Sets many properties that ODE requires to be stable |
330 | /// These settings need to be tweaked 'exactly' right or weird stuff happens. | 401 | /// These settings need to be tweaked 'exactly' right or weird stuff happens. |
331 | /// </summary> | 402 | /// </summary> |
332 | public OdeScene(string sceneIdentifier) | 403 | private void RawInitialization() |
333 | { | 404 | { |
334 | m_log | ||
335 | = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType.ToString() + "." + sceneIdentifier); | ||
336 | 405 | ||
337 | // checkThread(); | 406 | // checkThread(); |
338 | Name = sceneIdentifier; | ||
339 | 407 | ||
340 | OdeLock = new Object(); | 408 | OdeLock = new Object(); |
341 | SimulationLock = new Object(); | 409 | SimulationLock = new Object(); |
@@ -415,7 +483,7 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
415 | } | 483 | } |
416 | } | 484 | } |
417 | 485 | ||
418 | public override void Initialise(IMesher meshmerizer, IConfigSource config, Vector3 regionExtent) | 486 | public void Initialise(IConfigSource config, Vector3 regionExtent) |
419 | { | 487 | { |
420 | WorldExtents.X = regionExtent.X; | 488 | WorldExtents.X = regionExtent.X; |
421 | m_regionWidth = (uint)regionExtent.X; | 489 | m_regionWidth = (uint)regionExtent.X; |
@@ -423,14 +491,7 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
423 | m_regionHeight = (uint)regionExtent.Y; | 491 | m_regionHeight = (uint)regionExtent.Y; |
424 | 492 | ||
425 | m_suportCombine = false; | 493 | m_suportCombine = false; |
426 | Initialise(meshmerizer, config); | ||
427 | } | ||
428 | |||
429 | |||
430 | public override void Initialise(IMesher meshmerizer, IConfigSource config) | ||
431 | { | ||
432 | // checkThread(); | 494 | // checkThread(); |
433 | mesher = meshmerizer; | ||
434 | m_config = config; | 495 | m_config = config; |
435 | 496 | ||
436 | string ode_config = d.GetConfiguration(); | 497 | string ode_config = d.GetConfiguration(); |