From 5648eb7bd1f2345aad1530d90964278fe352faea Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Sun, 30 Aug 2015 15:52:26 -0700 Subject: [PATCH 01/32] Moved instantiation of SceneCommunicationService object to inside the scene constructor. This was a left over from the original monolithic design of scene communications. The less the instantiators of scenes know about the scene's internals, the better. --- OpenSim/Region/Application/OpenSimBase.cs | 4 +--- OpenSim/Region/Framework/Scenes/Scene.cs | 3 +-- OpenSim/Tests/Common/Helpers/SceneHelpers.cs | 4 +--- OpenSim/Tests/Common/Mock/TestScene.cs | 4 ++-- 4 files changed, 5 insertions(+), 10 deletions(-) diff --git a/OpenSim/Region/Application/OpenSimBase.cs b/OpenSim/Region/Application/OpenSimBase.cs index 3be411ab08..62a52d6188 100644 --- a/OpenSim/Region/Application/OpenSimBase.cs +++ b/OpenSim/Region/Application/OpenSimBase.cs @@ -752,10 +752,8 @@ namespace OpenSim Vector3 regionExtent = new Vector3(regionInfo.RegionSizeX, regionInfo.RegionSizeY, regionInfo.RegionSizeZ); PhysicsScene physicsScene = GetPhysicsScene(regionInfo.RegionName, regionExtent); - SceneCommunicationService sceneGridService = new SceneCommunicationService(); - return new Scene( - regionInfo, circuitManager, physicsScene, sceneGridService, + regionInfo, circuitManager, physicsScene, simDataService, estateDataService, Config, m_version); } diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index fe99ae5dd6..04e26640f7 100755 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs @@ -851,7 +851,6 @@ namespace OpenSim.Region.Framework.Scenes #region Constructors public Scene(RegionInfo regInfo, AgentCircuitManager authen, PhysicsScene physicsScene, - SceneCommunicationService sceneGridService, ISimulationDataService simDataService, IEstateDataService estateDataService, IConfigSource config, string simulatorVersion) : this(regInfo, physicsScene) @@ -865,7 +864,7 @@ namespace OpenSim.Region.Framework.Scenes m_lastAllocatedLocalId = (uint)(random.NextDouble() * (double)(uint.MaxValue / 2)) + (uint)(uint.MaxValue / 4); m_authenticateHandler = authen; - m_sceneGridService = sceneGridService; + m_sceneGridService = new SceneCommunicationService(); m_SimulationDataService = simDataService; m_EstateDataService = estateDataService; diff --git a/OpenSim/Tests/Common/Helpers/SceneHelpers.cs b/OpenSim/Tests/Common/Helpers/SceneHelpers.cs index 1fb1c5c961..4f685b61cd 100644 --- a/OpenSim/Tests/Common/Helpers/SceneHelpers.cs +++ b/OpenSim/Tests/Common/Helpers/SceneHelpers.cs @@ -148,8 +148,6 @@ namespace OpenSim.Tests.Common regInfo.RegionSizeX = sizeX; regInfo.RegionSizeY = sizeY; - SceneCommunicationService scs = new SceneCommunicationService(); - PhysicsPluginManager physicsPluginManager = new PhysicsPluginManager(); physicsPluginManager.LoadPluginsFromAssembly("Physics/OpenSim.Region.Physics.BasicPhysicsPlugin.dll"); Vector3 regionExtent = new Vector3( regInfo.RegionSizeX, regInfo.RegionSizeY, regInfo.RegionSizeZ); @@ -158,7 +156,7 @@ namespace OpenSim.Tests.Common "basicphysics", "ZeroMesher", new IniConfigSource(), "test", regionExtent); TestScene testScene = new TestScene( - regInfo, m_acm, physicsScene, scs, SimDataService, m_estateDataService, configSource, null); + regInfo, m_acm, physicsScene, SimDataService, m_estateDataService, configSource, null); INonSharedRegionModule godsModule = new GodsModule(); godsModule.Initialise(new IniConfigSource()); diff --git a/OpenSim/Tests/Common/Mock/TestScene.cs b/OpenSim/Tests/Common/Mock/TestScene.cs index 45acf91f38..bd36097111 100644 --- a/OpenSim/Tests/Common/Mock/TestScene.cs +++ b/OpenSim/Tests/Common/Mock/TestScene.cs @@ -42,9 +42,9 @@ namespace OpenSim.Tests.Common { public TestScene( RegionInfo regInfo, AgentCircuitManager authen, PhysicsScene physicsScene, - SceneCommunicationService sceneGridService, ISimulationDataService simDataService, IEstateDataService estateDataService, + ISimulationDataService simDataService, IEstateDataService estateDataService, IConfigSource config, string simulatorVersion) - : base(regInfo, authen, physicsScene, sceneGridService, simDataService, estateDataService, + : base(regInfo, authen, physicsScene, simDataService, estateDataService, config, simulatorVersion) { } From 1d6b33bc2da3b312cff1d1802a73aacdf72b0385 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Sun, 30 Aug 2015 20:06:53 -0700 Subject: [PATCH 02/32] Major renaming of Physics dlls / folders. No functional changes, just renames. --- .../BasicPhysics}/AssemblyInfo.cs | 0 .../BasicPhysics}/BasicPhysicsActor.cs | 0 .../BasicPhysics}/BasicPhysicsPlugin.cs | 0 .../BasicPhysics}/BasicPhysicsPrim.cs | 0 .../BasicPhysics}/BasicPhysicsScene.cs | 0 .../BulletS}/BSAPIUnman.cs | 0 .../BulletS}/BSAPIXNA.cs | 0 .../BulletS}/BSActorAvatarMove.cs | 0 .../BulletS}/BSActorHover.cs | 0 .../BulletS}/BSActorLockAxis.cs | 0 .../BulletS}/BSActorMoveToTarget.cs | 0 .../BulletS}/BSActorSetForce.cs | 0 .../BulletS}/BSActorSetTorque.cs | 0 .../BulletS}/BSActors.cs | 0 .../BulletS}/BSApiTemplate.cs | 0 .../BulletS}/BSCharacter.cs | 0 .../BulletS}/BSConstraint.cs | 0 .../BulletS}/BSConstraint6Dof.cs | 0 .../BulletS}/BSConstraintCollection.cs | 0 .../BulletS}/BSConstraintConeTwist.cs | 0 .../BulletS}/BSConstraintHinge.cs | 0 .../BulletS}/BSConstraintSlider.cs | 0 .../BulletS}/BSConstraintSpring.cs | 0 .../BulletS}/BSDynamics.cs | 0 .../BulletS}/BSLinkset.cs | 0 .../BulletS}/BSLinksetCompound.cs | 0 .../BulletS}/BSLinksetConstraints.cs | 0 .../BulletS}/BSMaterials.cs | 0 .../BulletS}/BSMotors.cs | 0 .../BulletS}/BSParam.cs | 0 .../BulletS}/BSPhysObject.cs | 0 .../BulletS}/BSPlugin.cs | 0 .../BulletS}/BSPrim.cs | 0 .../BulletS}/BSPrimDisplaced.cs | 0 .../BulletS}/BSPrimLinkable.cs | 0 .../BulletS}/BSScene.cs | 0 .../BulletS}/BSShapeCollection.cs | 0 .../BulletS}/BSShapes.cs | 0 .../BulletS}/BSTerrainHeightmap.cs | 0 .../BulletS}/BSTerrainManager.cs | 0 .../BulletS}/BSTerrainMesh.cs | 0 .../BulletS}/BulletSimData.cs | 0 .../BulletS}/BulletSimTODO.txt | 0 .../BulletS}/Properties/AssemblyInfo.cs | 0 .../BulletS}/Tests/BasicVehicles.cs | 0 .../BulletS}/Tests/BulletSimTests.cs | 0 .../BulletS}/Tests/BulletSimTestsUtil.cs | 0 .../BulletS}/Tests/HullCreation.cs | 0 .../ConvexDecompositionDotNet/CTri.cs | 0 .../ConvexDecompositionDotNet/Concavity.cs | 0 .../ConvexBuilder.cs | 0 .../ConvexDecomposition.cs | 0 .../ConvexDecompositionDotNet/ConvexResult.cs | 0 .../ConvexDecompositionDotNet/HullClasses.cs | 0 .../ConvexDecompositionDotNet/HullTriangle.cs | 0 .../ConvexDecompositionDotNet/HullUtils.cs | 0 .../ConvexDecompositionDotNet/LICENSE.txt | 0 .../ConvexDecompositionDotNet/Plane.cs | 0 .../ConvexDecompositionDotNet/PlaneTri.cs | 0 .../Properties/AssemblyInfo.cs | 0 .../ConvexDecompositionDotNet/Quaternion.cs | 0 .../ConvexDecompositionDotNet/README.txt | 0 .../ConvexDecompositionDotNet/SplitPlane.cs | 0 .../ConvexDecompositionDotNet/VertexLookup.cs | 0 .../ConvexDecompositionDotNet/float2.cs | 0 .../ConvexDecompositionDotNet/float3.cs | 0 .../ConvexDecompositionDotNet/float3x3.cs | 0 .../ConvexDecompositionDotNet/float4.cs | 0 .../ConvexDecompositionDotNet/float4x4.cs | 0 .../ConvexDecompositionDotNet/int3.cs | 0 .../ConvexDecompositionDotNet/int4.cs | 0 .../Meshing/HelperTypes.cs | 0 .../Meshing/Mesh.cs | 0 .../Meshing/Meshmerizer.cs | 0 .../Meshing/PrimMesher.cs | 0 .../Meshing/Properties/AssemblyInfo.cs | 0 .../Meshing/SculptMap.cs | 0 .../Meshing/SculptMesh.cs | 0 .../Ode}/AssemblyInfo.cs | 0 .../Ode}/ODECharacter.cs | 0 .../Ode}/ODEDynamics.c_comments | 0 .../Ode}/ODEDynamics.cs | 0 .../Ode}/ODEPrim.cs | 0 .../Ode}/ODERayCastRequestManager.cs | 0 .../Ode}/OdePhysicsJoint.cs | 0 .../Ode}/OdePlugin.cs | 0 .../Ode}/OdeScene.cs | 0 .../Ode}/Tests/ODETestClass.cs | 0 .../Ode}/drawstuff.cs | 0 .../POS}/AssemblyInfo.cs | 0 .../POS}/POSCharacter.cs | 0 .../POS}/POSPlugin.cs | 0 .../POS}/POSPrim.cs | 0 .../POS}/POSScene.cs | 0 .../SharedBase}/AssemblyInfo.cs | 0 .../SharedBase}/CollisionLocker.cs | 0 .../SharedBase}/IMesher.cs | 0 .../SharedBase}/IPhysicsParameters.cs | 0 .../SharedBase}/NullPhysicsScene.cs | 0 .../SharedBase}/PhysicsActor.cs | 0 .../SharedBase}/PhysicsJoint.cs | 0 .../SharedBase}/PhysicsPluginManager.cs | 0 .../SharedBase}/PhysicsScene.cs | 0 .../SharedBase}/PhysicsSensor.cs | 0 .../SharedBase}/PhysicsVector.cs | 0 .../SharedBase}/VehicleConstants.cs | 0 .../SharedBase}/ZeroMesher.cs | 0 prebuild.xml | 68 +++++++++---------- 108 files changed, 34 insertions(+), 34 deletions(-) rename OpenSim/Region/{Physics/BasicPhysicsPlugin => PhysicsModules/BasicPhysics}/AssemblyInfo.cs (100%) rename OpenSim/Region/{Physics/BasicPhysicsPlugin => PhysicsModules/BasicPhysics}/BasicPhysicsActor.cs (100%) rename OpenSim/Region/{Physics/BasicPhysicsPlugin => PhysicsModules/BasicPhysics}/BasicPhysicsPlugin.cs (100%) rename OpenSim/Region/{Physics/BasicPhysicsPlugin => PhysicsModules/BasicPhysics}/BasicPhysicsPrim.cs (100%) rename OpenSim/Region/{Physics/BasicPhysicsPlugin => PhysicsModules/BasicPhysics}/BasicPhysicsScene.cs (100%) rename OpenSim/Region/{Physics/BulletSPlugin => PhysicsModules/BulletS}/BSAPIUnman.cs (100%) rename OpenSim/Region/{Physics/BulletSPlugin => PhysicsModules/BulletS}/BSAPIXNA.cs (100%) rename OpenSim/Region/{Physics/BulletSPlugin => PhysicsModules/BulletS}/BSActorAvatarMove.cs (100%) rename OpenSim/Region/{Physics/BulletSPlugin => PhysicsModules/BulletS}/BSActorHover.cs (100%) rename OpenSim/Region/{Physics/BulletSPlugin => PhysicsModules/BulletS}/BSActorLockAxis.cs (100%) rename OpenSim/Region/{Physics/BulletSPlugin => PhysicsModules/BulletS}/BSActorMoveToTarget.cs (100%) rename OpenSim/Region/{Physics/BulletSPlugin => PhysicsModules/BulletS}/BSActorSetForce.cs (100%) rename OpenSim/Region/{Physics/BulletSPlugin => PhysicsModules/BulletS}/BSActorSetTorque.cs (100%) rename OpenSim/Region/{Physics/BulletSPlugin => PhysicsModules/BulletS}/BSActors.cs (100%) rename OpenSim/Region/{Physics/BulletSPlugin => PhysicsModules/BulletS}/BSApiTemplate.cs (100%) rename OpenSim/Region/{Physics/BulletSPlugin => PhysicsModules/BulletS}/BSCharacter.cs (100%) rename OpenSim/Region/{Physics/BulletSPlugin => PhysicsModules/BulletS}/BSConstraint.cs (100%) rename OpenSim/Region/{Physics/BulletSPlugin => PhysicsModules/BulletS}/BSConstraint6Dof.cs (100%) rename OpenSim/Region/{Physics/BulletSPlugin => PhysicsModules/BulletS}/BSConstraintCollection.cs (100%) rename OpenSim/Region/{Physics/BulletSPlugin => PhysicsModules/BulletS}/BSConstraintConeTwist.cs (100%) rename OpenSim/Region/{Physics/BulletSPlugin => PhysicsModules/BulletS}/BSConstraintHinge.cs (100%) rename OpenSim/Region/{Physics/BulletSPlugin => PhysicsModules/BulletS}/BSConstraintSlider.cs (100%) rename OpenSim/Region/{Physics/BulletSPlugin => PhysicsModules/BulletS}/BSConstraintSpring.cs (100%) rename OpenSim/Region/{Physics/BulletSPlugin => PhysicsModules/BulletS}/BSDynamics.cs (100%) rename OpenSim/Region/{Physics/BulletSPlugin => PhysicsModules/BulletS}/BSLinkset.cs (100%) rename OpenSim/Region/{Physics/BulletSPlugin => PhysicsModules/BulletS}/BSLinksetCompound.cs (100%) rename OpenSim/Region/{Physics/BulletSPlugin => PhysicsModules/BulletS}/BSLinksetConstraints.cs (100%) rename OpenSim/Region/{Physics/BulletSPlugin => PhysicsModules/BulletS}/BSMaterials.cs (100%) rename OpenSim/Region/{Physics/BulletSPlugin => PhysicsModules/BulletS}/BSMotors.cs (100%) rename OpenSim/Region/{Physics/BulletSPlugin => PhysicsModules/BulletS}/BSParam.cs (100%) rename OpenSim/Region/{Physics/BulletSPlugin => PhysicsModules/BulletS}/BSPhysObject.cs (100%) rename OpenSim/Region/{Physics/BulletSPlugin => PhysicsModules/BulletS}/BSPlugin.cs (100%) rename OpenSim/Region/{Physics/BulletSPlugin => PhysicsModules/BulletS}/BSPrim.cs (100%) rename OpenSim/Region/{Physics/BulletSPlugin => PhysicsModules/BulletS}/BSPrimDisplaced.cs (100%) rename OpenSim/Region/{Physics/BulletSPlugin => PhysicsModules/BulletS}/BSPrimLinkable.cs (100%) rename OpenSim/Region/{Physics/BulletSPlugin => PhysicsModules/BulletS}/BSScene.cs (100%) rename OpenSim/Region/{Physics/BulletSPlugin => PhysicsModules/BulletS}/BSShapeCollection.cs (100%) rename OpenSim/Region/{Physics/BulletSPlugin => PhysicsModules/BulletS}/BSShapes.cs (100%) rename OpenSim/Region/{Physics/BulletSPlugin => PhysicsModules/BulletS}/BSTerrainHeightmap.cs (100%) rename OpenSim/Region/{Physics/BulletSPlugin => PhysicsModules/BulletS}/BSTerrainManager.cs (100%) rename OpenSim/Region/{Physics/BulletSPlugin => PhysicsModules/BulletS}/BSTerrainMesh.cs (100%) rename OpenSim/Region/{Physics/BulletSPlugin => PhysicsModules/BulletS}/BulletSimData.cs (100%) rename OpenSim/Region/{Physics/BulletSPlugin => PhysicsModules/BulletS}/BulletSimTODO.txt (100%) rename OpenSim/Region/{Physics/BulletSPlugin => PhysicsModules/BulletS}/Properties/AssemblyInfo.cs (100%) rename OpenSim/Region/{Physics/BulletSPlugin => PhysicsModules/BulletS}/Tests/BasicVehicles.cs (100%) rename OpenSim/Region/{Physics/BulletSPlugin => PhysicsModules/BulletS}/Tests/BulletSimTests.cs (100%) rename OpenSim/Region/{Physics/BulletSPlugin => PhysicsModules/BulletS}/Tests/BulletSimTestsUtil.cs (100%) rename OpenSim/Region/{Physics/BulletSPlugin => PhysicsModules/BulletS}/Tests/HullCreation.cs (100%) rename OpenSim/Region/{Physics => PhysicsModules}/ConvexDecompositionDotNet/CTri.cs (100%) rename OpenSim/Region/{Physics => PhysicsModules}/ConvexDecompositionDotNet/Concavity.cs (100%) rename OpenSim/Region/{Physics => PhysicsModules}/ConvexDecompositionDotNet/ConvexBuilder.cs (100%) rename OpenSim/Region/{Physics => PhysicsModules}/ConvexDecompositionDotNet/ConvexDecomposition.cs (100%) rename OpenSim/Region/{Physics => PhysicsModules}/ConvexDecompositionDotNet/ConvexResult.cs (100%) rename OpenSim/Region/{Physics => PhysicsModules}/ConvexDecompositionDotNet/HullClasses.cs (100%) rename OpenSim/Region/{Physics => PhysicsModules}/ConvexDecompositionDotNet/HullTriangle.cs (100%) rename OpenSim/Region/{Physics => PhysicsModules}/ConvexDecompositionDotNet/HullUtils.cs (100%) rename OpenSim/Region/{Physics => PhysicsModules}/ConvexDecompositionDotNet/LICENSE.txt (100%) rename OpenSim/Region/{Physics => PhysicsModules}/ConvexDecompositionDotNet/Plane.cs (100%) rename OpenSim/Region/{Physics => PhysicsModules}/ConvexDecompositionDotNet/PlaneTri.cs (100%) rename OpenSim/Region/{Physics => PhysicsModules}/ConvexDecompositionDotNet/Properties/AssemblyInfo.cs (100%) rename OpenSim/Region/{Physics => PhysicsModules}/ConvexDecompositionDotNet/Quaternion.cs (100%) rename OpenSim/Region/{Physics => PhysicsModules}/ConvexDecompositionDotNet/README.txt (100%) rename OpenSim/Region/{Physics => PhysicsModules}/ConvexDecompositionDotNet/SplitPlane.cs (100%) rename OpenSim/Region/{Physics => PhysicsModules}/ConvexDecompositionDotNet/VertexLookup.cs (100%) rename OpenSim/Region/{Physics => PhysicsModules}/ConvexDecompositionDotNet/float2.cs (100%) rename OpenSim/Region/{Physics => PhysicsModules}/ConvexDecompositionDotNet/float3.cs (100%) rename OpenSim/Region/{Physics => PhysicsModules}/ConvexDecompositionDotNet/float3x3.cs (100%) rename OpenSim/Region/{Physics => PhysicsModules}/ConvexDecompositionDotNet/float4.cs (100%) rename OpenSim/Region/{Physics => PhysicsModules}/ConvexDecompositionDotNet/float4x4.cs (100%) rename OpenSim/Region/{Physics => PhysicsModules}/ConvexDecompositionDotNet/int3.cs (100%) rename OpenSim/Region/{Physics => PhysicsModules}/ConvexDecompositionDotNet/int4.cs (100%) rename OpenSim/Region/{Physics => PhysicsModules}/Meshing/HelperTypes.cs (100%) rename OpenSim/Region/{Physics => PhysicsModules}/Meshing/Mesh.cs (100%) rename OpenSim/Region/{Physics => PhysicsModules}/Meshing/Meshmerizer.cs (100%) rename OpenSim/Region/{Physics => PhysicsModules}/Meshing/PrimMesher.cs (100%) rename OpenSim/Region/{Physics => PhysicsModules}/Meshing/Properties/AssemblyInfo.cs (100%) rename OpenSim/Region/{Physics => PhysicsModules}/Meshing/SculptMap.cs (100%) rename OpenSim/Region/{Physics => PhysicsModules}/Meshing/SculptMesh.cs (100%) rename OpenSim/Region/{Physics/OdePlugin => PhysicsModules/Ode}/AssemblyInfo.cs (100%) rename OpenSim/Region/{Physics/OdePlugin => PhysicsModules/Ode}/ODECharacter.cs (100%) rename OpenSim/Region/{Physics/OdePlugin => PhysicsModules/Ode}/ODEDynamics.c_comments (100%) rename OpenSim/Region/{Physics/OdePlugin => PhysicsModules/Ode}/ODEDynamics.cs (100%) rename OpenSim/Region/{Physics/OdePlugin => PhysicsModules/Ode}/ODEPrim.cs (100%) rename OpenSim/Region/{Physics/OdePlugin => PhysicsModules/Ode}/ODERayCastRequestManager.cs (100%) rename OpenSim/Region/{Physics/OdePlugin => PhysicsModules/Ode}/OdePhysicsJoint.cs (100%) rename OpenSim/Region/{Physics/OdePlugin => PhysicsModules/Ode}/OdePlugin.cs (100%) rename OpenSim/Region/{Physics/OdePlugin => PhysicsModules/Ode}/OdeScene.cs (100%) rename OpenSim/Region/{Physics/OdePlugin => PhysicsModules/Ode}/Tests/ODETestClass.cs (100%) rename OpenSim/Region/{Physics/OdePlugin => PhysicsModules/Ode}/drawstuff.cs (100%) rename OpenSim/Region/{Physics/POSPlugin => PhysicsModules/POS}/AssemblyInfo.cs (100%) rename OpenSim/Region/{Physics/POSPlugin => PhysicsModules/POS}/POSCharacter.cs (100%) rename OpenSim/Region/{Physics/POSPlugin => PhysicsModules/POS}/POSPlugin.cs (100%) rename OpenSim/Region/{Physics/POSPlugin => PhysicsModules/POS}/POSPrim.cs (100%) rename OpenSim/Region/{Physics/POSPlugin => PhysicsModules/POS}/POSScene.cs (100%) rename OpenSim/Region/{Physics/Manager => PhysicsModules/SharedBase}/AssemblyInfo.cs (100%) rename OpenSim/Region/{Physics/Manager => PhysicsModules/SharedBase}/CollisionLocker.cs (100%) rename OpenSim/Region/{Physics/Manager => PhysicsModules/SharedBase}/IMesher.cs (100%) rename OpenSim/Region/{Physics/Manager => PhysicsModules/SharedBase}/IPhysicsParameters.cs (100%) rename OpenSim/Region/{Physics/Manager => PhysicsModules/SharedBase}/NullPhysicsScene.cs (100%) rename OpenSim/Region/{Physics/Manager => PhysicsModules/SharedBase}/PhysicsActor.cs (100%) rename OpenSim/Region/{Physics/Manager => PhysicsModules/SharedBase}/PhysicsJoint.cs (100%) rename OpenSim/Region/{Physics/Manager => PhysicsModules/SharedBase}/PhysicsPluginManager.cs (100%) rename OpenSim/Region/{Physics/Manager => PhysicsModules/SharedBase}/PhysicsScene.cs (100%) rename OpenSim/Region/{Physics/Manager => PhysicsModules/SharedBase}/PhysicsSensor.cs (100%) rename OpenSim/Region/{Physics/Manager => PhysicsModules/SharedBase}/PhysicsVector.cs (100%) rename OpenSim/Region/{Physics/Manager => PhysicsModules/SharedBase}/VehicleConstants.cs (100%) rename OpenSim/Region/{Physics/Manager => PhysicsModules/SharedBase}/ZeroMesher.cs (100%) diff --git a/OpenSim/Region/Physics/BasicPhysicsPlugin/AssemblyInfo.cs b/OpenSim/Region/PhysicsModules/BasicPhysics/AssemblyInfo.cs similarity index 100% rename from OpenSim/Region/Physics/BasicPhysicsPlugin/AssemblyInfo.cs rename to OpenSim/Region/PhysicsModules/BasicPhysics/AssemblyInfo.cs diff --git a/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsActor.cs b/OpenSim/Region/PhysicsModules/BasicPhysics/BasicPhysicsActor.cs similarity index 100% rename from OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsActor.cs rename to OpenSim/Region/PhysicsModules/BasicPhysics/BasicPhysicsActor.cs diff --git a/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs b/OpenSim/Region/PhysicsModules/BasicPhysics/BasicPhysicsPlugin.cs similarity index 100% rename from OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs rename to OpenSim/Region/PhysicsModules/BasicPhysics/BasicPhysicsPlugin.cs diff --git a/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPrim.cs b/OpenSim/Region/PhysicsModules/BasicPhysics/BasicPhysicsPrim.cs similarity index 100% rename from OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPrim.cs rename to OpenSim/Region/PhysicsModules/BasicPhysics/BasicPhysicsPrim.cs diff --git a/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsScene.cs b/OpenSim/Region/PhysicsModules/BasicPhysics/BasicPhysicsScene.cs similarity index 100% rename from OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsScene.cs rename to OpenSim/Region/PhysicsModules/BasicPhysics/BasicPhysicsScene.cs diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSAPIUnman.cs b/OpenSim/Region/PhysicsModules/BulletS/BSAPIUnman.cs similarity index 100% rename from OpenSim/Region/Physics/BulletSPlugin/BSAPIUnman.cs rename to OpenSim/Region/PhysicsModules/BulletS/BSAPIUnman.cs diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSAPIXNA.cs b/OpenSim/Region/PhysicsModules/BulletS/BSAPIXNA.cs similarity index 100% rename from OpenSim/Region/Physics/BulletSPlugin/BSAPIXNA.cs rename to OpenSim/Region/PhysicsModules/BulletS/BSAPIXNA.cs diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSActorAvatarMove.cs b/OpenSim/Region/PhysicsModules/BulletS/BSActorAvatarMove.cs similarity index 100% rename from OpenSim/Region/Physics/BulletSPlugin/BSActorAvatarMove.cs rename to OpenSim/Region/PhysicsModules/BulletS/BSActorAvatarMove.cs diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSActorHover.cs b/OpenSim/Region/PhysicsModules/BulletS/BSActorHover.cs similarity index 100% rename from OpenSim/Region/Physics/BulletSPlugin/BSActorHover.cs rename to OpenSim/Region/PhysicsModules/BulletS/BSActorHover.cs diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSActorLockAxis.cs b/OpenSim/Region/PhysicsModules/BulletS/BSActorLockAxis.cs similarity index 100% rename from OpenSim/Region/Physics/BulletSPlugin/BSActorLockAxis.cs rename to OpenSim/Region/PhysicsModules/BulletS/BSActorLockAxis.cs diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSActorMoveToTarget.cs b/OpenSim/Region/PhysicsModules/BulletS/BSActorMoveToTarget.cs similarity index 100% rename from OpenSim/Region/Physics/BulletSPlugin/BSActorMoveToTarget.cs rename to OpenSim/Region/PhysicsModules/BulletS/BSActorMoveToTarget.cs diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSActorSetForce.cs b/OpenSim/Region/PhysicsModules/BulletS/BSActorSetForce.cs similarity index 100% rename from OpenSim/Region/Physics/BulletSPlugin/BSActorSetForce.cs rename to OpenSim/Region/PhysicsModules/BulletS/BSActorSetForce.cs diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSActorSetTorque.cs b/OpenSim/Region/PhysicsModules/BulletS/BSActorSetTorque.cs similarity index 100% rename from OpenSim/Region/Physics/BulletSPlugin/BSActorSetTorque.cs rename to OpenSim/Region/PhysicsModules/BulletS/BSActorSetTorque.cs diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSActors.cs b/OpenSim/Region/PhysicsModules/BulletS/BSActors.cs similarity index 100% rename from OpenSim/Region/Physics/BulletSPlugin/BSActors.cs rename to OpenSim/Region/PhysicsModules/BulletS/BSActors.cs diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSApiTemplate.cs b/OpenSim/Region/PhysicsModules/BulletS/BSApiTemplate.cs similarity index 100% rename from OpenSim/Region/Physics/BulletSPlugin/BSApiTemplate.cs rename to OpenSim/Region/PhysicsModules/BulletS/BSApiTemplate.cs diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSCharacter.cs b/OpenSim/Region/PhysicsModules/BulletS/BSCharacter.cs similarity index 100% rename from OpenSim/Region/Physics/BulletSPlugin/BSCharacter.cs rename to OpenSim/Region/PhysicsModules/BulletS/BSCharacter.cs diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSConstraint.cs b/OpenSim/Region/PhysicsModules/BulletS/BSConstraint.cs similarity index 100% rename from OpenSim/Region/Physics/BulletSPlugin/BSConstraint.cs rename to OpenSim/Region/PhysicsModules/BulletS/BSConstraint.cs diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSConstraint6Dof.cs b/OpenSim/Region/PhysicsModules/BulletS/BSConstraint6Dof.cs similarity index 100% rename from OpenSim/Region/Physics/BulletSPlugin/BSConstraint6Dof.cs rename to OpenSim/Region/PhysicsModules/BulletS/BSConstraint6Dof.cs diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSConstraintCollection.cs b/OpenSim/Region/PhysicsModules/BulletS/BSConstraintCollection.cs similarity index 100% rename from OpenSim/Region/Physics/BulletSPlugin/BSConstraintCollection.cs rename to OpenSim/Region/PhysicsModules/BulletS/BSConstraintCollection.cs diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSConstraintConeTwist.cs b/OpenSim/Region/PhysicsModules/BulletS/BSConstraintConeTwist.cs similarity index 100% rename from OpenSim/Region/Physics/BulletSPlugin/BSConstraintConeTwist.cs rename to OpenSim/Region/PhysicsModules/BulletS/BSConstraintConeTwist.cs diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSConstraintHinge.cs b/OpenSim/Region/PhysicsModules/BulletS/BSConstraintHinge.cs similarity index 100% rename from OpenSim/Region/Physics/BulletSPlugin/BSConstraintHinge.cs rename to OpenSim/Region/PhysicsModules/BulletS/BSConstraintHinge.cs diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSConstraintSlider.cs b/OpenSim/Region/PhysicsModules/BulletS/BSConstraintSlider.cs similarity index 100% rename from OpenSim/Region/Physics/BulletSPlugin/BSConstraintSlider.cs rename to OpenSim/Region/PhysicsModules/BulletS/BSConstraintSlider.cs diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSConstraintSpring.cs b/OpenSim/Region/PhysicsModules/BulletS/BSConstraintSpring.cs similarity index 100% rename from OpenSim/Region/Physics/BulletSPlugin/BSConstraintSpring.cs rename to OpenSim/Region/PhysicsModules/BulletS/BSConstraintSpring.cs diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSDynamics.cs b/OpenSim/Region/PhysicsModules/BulletS/BSDynamics.cs similarity index 100% rename from OpenSim/Region/Physics/BulletSPlugin/BSDynamics.cs rename to OpenSim/Region/PhysicsModules/BulletS/BSDynamics.cs diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSLinkset.cs b/OpenSim/Region/PhysicsModules/BulletS/BSLinkset.cs similarity index 100% rename from OpenSim/Region/Physics/BulletSPlugin/BSLinkset.cs rename to OpenSim/Region/PhysicsModules/BulletS/BSLinkset.cs diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSLinksetCompound.cs b/OpenSim/Region/PhysicsModules/BulletS/BSLinksetCompound.cs similarity index 100% rename from OpenSim/Region/Physics/BulletSPlugin/BSLinksetCompound.cs rename to OpenSim/Region/PhysicsModules/BulletS/BSLinksetCompound.cs diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSLinksetConstraints.cs b/OpenSim/Region/PhysicsModules/BulletS/BSLinksetConstraints.cs similarity index 100% rename from OpenSim/Region/Physics/BulletSPlugin/BSLinksetConstraints.cs rename to OpenSim/Region/PhysicsModules/BulletS/BSLinksetConstraints.cs diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSMaterials.cs b/OpenSim/Region/PhysicsModules/BulletS/BSMaterials.cs similarity index 100% rename from OpenSim/Region/Physics/BulletSPlugin/BSMaterials.cs rename to OpenSim/Region/PhysicsModules/BulletS/BSMaterials.cs diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSMotors.cs b/OpenSim/Region/PhysicsModules/BulletS/BSMotors.cs similarity index 100% rename from OpenSim/Region/Physics/BulletSPlugin/BSMotors.cs rename to OpenSim/Region/PhysicsModules/BulletS/BSMotors.cs diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSParam.cs b/OpenSim/Region/PhysicsModules/BulletS/BSParam.cs similarity index 100% rename from OpenSim/Region/Physics/BulletSPlugin/BSParam.cs rename to OpenSim/Region/PhysicsModules/BulletS/BSParam.cs diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSPhysObject.cs b/OpenSim/Region/PhysicsModules/BulletS/BSPhysObject.cs similarity index 100% rename from OpenSim/Region/Physics/BulletSPlugin/BSPhysObject.cs rename to OpenSim/Region/PhysicsModules/BulletS/BSPhysObject.cs diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSPlugin.cs b/OpenSim/Region/PhysicsModules/BulletS/BSPlugin.cs similarity index 100% rename from OpenSim/Region/Physics/BulletSPlugin/BSPlugin.cs rename to OpenSim/Region/PhysicsModules/BulletS/BSPlugin.cs diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSPrim.cs b/OpenSim/Region/PhysicsModules/BulletS/BSPrim.cs similarity index 100% rename from OpenSim/Region/Physics/BulletSPlugin/BSPrim.cs rename to OpenSim/Region/PhysicsModules/BulletS/BSPrim.cs diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSPrimDisplaced.cs b/OpenSim/Region/PhysicsModules/BulletS/BSPrimDisplaced.cs similarity index 100% rename from OpenSim/Region/Physics/BulletSPlugin/BSPrimDisplaced.cs rename to OpenSim/Region/PhysicsModules/BulletS/BSPrimDisplaced.cs diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSPrimLinkable.cs b/OpenSim/Region/PhysicsModules/BulletS/BSPrimLinkable.cs similarity index 100% rename from OpenSim/Region/Physics/BulletSPlugin/BSPrimLinkable.cs rename to OpenSim/Region/PhysicsModules/BulletS/BSPrimLinkable.cs diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSScene.cs b/OpenSim/Region/PhysicsModules/BulletS/BSScene.cs similarity index 100% rename from OpenSim/Region/Physics/BulletSPlugin/BSScene.cs rename to OpenSim/Region/PhysicsModules/BulletS/BSScene.cs diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSShapeCollection.cs b/OpenSim/Region/PhysicsModules/BulletS/BSShapeCollection.cs similarity index 100% rename from OpenSim/Region/Physics/BulletSPlugin/BSShapeCollection.cs rename to OpenSim/Region/PhysicsModules/BulletS/BSShapeCollection.cs diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSShapes.cs b/OpenSim/Region/PhysicsModules/BulletS/BSShapes.cs similarity index 100% rename from OpenSim/Region/Physics/BulletSPlugin/BSShapes.cs rename to OpenSim/Region/PhysicsModules/BulletS/BSShapes.cs diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSTerrainHeightmap.cs b/OpenSim/Region/PhysicsModules/BulletS/BSTerrainHeightmap.cs similarity index 100% rename from OpenSim/Region/Physics/BulletSPlugin/BSTerrainHeightmap.cs rename to OpenSim/Region/PhysicsModules/BulletS/BSTerrainHeightmap.cs diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSTerrainManager.cs b/OpenSim/Region/PhysicsModules/BulletS/BSTerrainManager.cs similarity index 100% rename from OpenSim/Region/Physics/BulletSPlugin/BSTerrainManager.cs rename to OpenSim/Region/PhysicsModules/BulletS/BSTerrainManager.cs diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSTerrainMesh.cs b/OpenSim/Region/PhysicsModules/BulletS/BSTerrainMesh.cs similarity index 100% rename from OpenSim/Region/Physics/BulletSPlugin/BSTerrainMesh.cs rename to OpenSim/Region/PhysicsModules/BulletS/BSTerrainMesh.cs diff --git a/OpenSim/Region/Physics/BulletSPlugin/BulletSimData.cs b/OpenSim/Region/PhysicsModules/BulletS/BulletSimData.cs similarity index 100% rename from OpenSim/Region/Physics/BulletSPlugin/BulletSimData.cs rename to OpenSim/Region/PhysicsModules/BulletS/BulletSimData.cs diff --git a/OpenSim/Region/Physics/BulletSPlugin/BulletSimTODO.txt b/OpenSim/Region/PhysicsModules/BulletS/BulletSimTODO.txt similarity index 100% rename from OpenSim/Region/Physics/BulletSPlugin/BulletSimTODO.txt rename to OpenSim/Region/PhysicsModules/BulletS/BulletSimTODO.txt diff --git a/OpenSim/Region/Physics/BulletSPlugin/Properties/AssemblyInfo.cs b/OpenSim/Region/PhysicsModules/BulletS/Properties/AssemblyInfo.cs similarity index 100% rename from OpenSim/Region/Physics/BulletSPlugin/Properties/AssemblyInfo.cs rename to OpenSim/Region/PhysicsModules/BulletS/Properties/AssemblyInfo.cs diff --git a/OpenSim/Region/Physics/BulletSPlugin/Tests/BasicVehicles.cs b/OpenSim/Region/PhysicsModules/BulletS/Tests/BasicVehicles.cs similarity index 100% rename from OpenSim/Region/Physics/BulletSPlugin/Tests/BasicVehicles.cs rename to OpenSim/Region/PhysicsModules/BulletS/Tests/BasicVehicles.cs diff --git a/OpenSim/Region/Physics/BulletSPlugin/Tests/BulletSimTests.cs b/OpenSim/Region/PhysicsModules/BulletS/Tests/BulletSimTests.cs similarity index 100% rename from OpenSim/Region/Physics/BulletSPlugin/Tests/BulletSimTests.cs rename to OpenSim/Region/PhysicsModules/BulletS/Tests/BulletSimTests.cs diff --git a/OpenSim/Region/Physics/BulletSPlugin/Tests/BulletSimTestsUtil.cs b/OpenSim/Region/PhysicsModules/BulletS/Tests/BulletSimTestsUtil.cs similarity index 100% rename from OpenSim/Region/Physics/BulletSPlugin/Tests/BulletSimTestsUtil.cs rename to OpenSim/Region/PhysicsModules/BulletS/Tests/BulletSimTestsUtil.cs diff --git a/OpenSim/Region/Physics/BulletSPlugin/Tests/HullCreation.cs b/OpenSim/Region/PhysicsModules/BulletS/Tests/HullCreation.cs similarity index 100% rename from OpenSim/Region/Physics/BulletSPlugin/Tests/HullCreation.cs rename to OpenSim/Region/PhysicsModules/BulletS/Tests/HullCreation.cs diff --git a/OpenSim/Region/Physics/ConvexDecompositionDotNet/CTri.cs b/OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/CTri.cs similarity index 100% rename from OpenSim/Region/Physics/ConvexDecompositionDotNet/CTri.cs rename to OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/CTri.cs diff --git a/OpenSim/Region/Physics/ConvexDecompositionDotNet/Concavity.cs b/OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/Concavity.cs similarity index 100% rename from OpenSim/Region/Physics/ConvexDecompositionDotNet/Concavity.cs rename to OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/Concavity.cs diff --git a/OpenSim/Region/Physics/ConvexDecompositionDotNet/ConvexBuilder.cs b/OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/ConvexBuilder.cs similarity index 100% rename from OpenSim/Region/Physics/ConvexDecompositionDotNet/ConvexBuilder.cs rename to OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/ConvexBuilder.cs diff --git a/OpenSim/Region/Physics/ConvexDecompositionDotNet/ConvexDecomposition.cs b/OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/ConvexDecomposition.cs similarity index 100% rename from OpenSim/Region/Physics/ConvexDecompositionDotNet/ConvexDecomposition.cs rename to OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/ConvexDecomposition.cs diff --git a/OpenSim/Region/Physics/ConvexDecompositionDotNet/ConvexResult.cs b/OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/ConvexResult.cs similarity index 100% rename from OpenSim/Region/Physics/ConvexDecompositionDotNet/ConvexResult.cs rename to OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/ConvexResult.cs diff --git a/OpenSim/Region/Physics/ConvexDecompositionDotNet/HullClasses.cs b/OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/HullClasses.cs similarity index 100% rename from OpenSim/Region/Physics/ConvexDecompositionDotNet/HullClasses.cs rename to OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/HullClasses.cs diff --git a/OpenSim/Region/Physics/ConvexDecompositionDotNet/HullTriangle.cs b/OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/HullTriangle.cs similarity index 100% rename from OpenSim/Region/Physics/ConvexDecompositionDotNet/HullTriangle.cs rename to OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/HullTriangle.cs diff --git a/OpenSim/Region/Physics/ConvexDecompositionDotNet/HullUtils.cs b/OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/HullUtils.cs similarity index 100% rename from OpenSim/Region/Physics/ConvexDecompositionDotNet/HullUtils.cs rename to OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/HullUtils.cs diff --git a/OpenSim/Region/Physics/ConvexDecompositionDotNet/LICENSE.txt b/OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/LICENSE.txt similarity index 100% rename from OpenSim/Region/Physics/ConvexDecompositionDotNet/LICENSE.txt rename to OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/LICENSE.txt diff --git a/OpenSim/Region/Physics/ConvexDecompositionDotNet/Plane.cs b/OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/Plane.cs similarity index 100% rename from OpenSim/Region/Physics/ConvexDecompositionDotNet/Plane.cs rename to OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/Plane.cs diff --git a/OpenSim/Region/Physics/ConvexDecompositionDotNet/PlaneTri.cs b/OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/PlaneTri.cs similarity index 100% rename from OpenSim/Region/Physics/ConvexDecompositionDotNet/PlaneTri.cs rename to OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/PlaneTri.cs diff --git a/OpenSim/Region/Physics/ConvexDecompositionDotNet/Properties/AssemblyInfo.cs b/OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/Properties/AssemblyInfo.cs similarity index 100% rename from OpenSim/Region/Physics/ConvexDecompositionDotNet/Properties/AssemblyInfo.cs rename to OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/Properties/AssemblyInfo.cs diff --git a/OpenSim/Region/Physics/ConvexDecompositionDotNet/Quaternion.cs b/OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/Quaternion.cs similarity index 100% rename from OpenSim/Region/Physics/ConvexDecompositionDotNet/Quaternion.cs rename to OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/Quaternion.cs diff --git a/OpenSim/Region/Physics/ConvexDecompositionDotNet/README.txt b/OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/README.txt similarity index 100% rename from OpenSim/Region/Physics/ConvexDecompositionDotNet/README.txt rename to OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/README.txt diff --git a/OpenSim/Region/Physics/ConvexDecompositionDotNet/SplitPlane.cs b/OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/SplitPlane.cs similarity index 100% rename from OpenSim/Region/Physics/ConvexDecompositionDotNet/SplitPlane.cs rename to OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/SplitPlane.cs diff --git a/OpenSim/Region/Physics/ConvexDecompositionDotNet/VertexLookup.cs b/OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/VertexLookup.cs similarity index 100% rename from OpenSim/Region/Physics/ConvexDecompositionDotNet/VertexLookup.cs rename to OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/VertexLookup.cs diff --git a/OpenSim/Region/Physics/ConvexDecompositionDotNet/float2.cs b/OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/float2.cs similarity index 100% rename from OpenSim/Region/Physics/ConvexDecompositionDotNet/float2.cs rename to OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/float2.cs diff --git a/OpenSim/Region/Physics/ConvexDecompositionDotNet/float3.cs b/OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/float3.cs similarity index 100% rename from OpenSim/Region/Physics/ConvexDecompositionDotNet/float3.cs rename to OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/float3.cs diff --git a/OpenSim/Region/Physics/ConvexDecompositionDotNet/float3x3.cs b/OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/float3x3.cs similarity index 100% rename from OpenSim/Region/Physics/ConvexDecompositionDotNet/float3x3.cs rename to OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/float3x3.cs diff --git a/OpenSim/Region/Physics/ConvexDecompositionDotNet/float4.cs b/OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/float4.cs similarity index 100% rename from OpenSim/Region/Physics/ConvexDecompositionDotNet/float4.cs rename to OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/float4.cs diff --git a/OpenSim/Region/Physics/ConvexDecompositionDotNet/float4x4.cs b/OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/float4x4.cs similarity index 100% rename from OpenSim/Region/Physics/ConvexDecompositionDotNet/float4x4.cs rename to OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/float4x4.cs diff --git a/OpenSim/Region/Physics/ConvexDecompositionDotNet/int3.cs b/OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/int3.cs similarity index 100% rename from OpenSim/Region/Physics/ConvexDecompositionDotNet/int3.cs rename to OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/int3.cs diff --git a/OpenSim/Region/Physics/ConvexDecompositionDotNet/int4.cs b/OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/int4.cs similarity index 100% rename from OpenSim/Region/Physics/ConvexDecompositionDotNet/int4.cs rename to OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/int4.cs diff --git a/OpenSim/Region/Physics/Meshing/HelperTypes.cs b/OpenSim/Region/PhysicsModules/Meshing/HelperTypes.cs similarity index 100% rename from OpenSim/Region/Physics/Meshing/HelperTypes.cs rename to OpenSim/Region/PhysicsModules/Meshing/HelperTypes.cs diff --git a/OpenSim/Region/Physics/Meshing/Mesh.cs b/OpenSim/Region/PhysicsModules/Meshing/Mesh.cs similarity index 100% rename from OpenSim/Region/Physics/Meshing/Mesh.cs rename to OpenSim/Region/PhysicsModules/Meshing/Mesh.cs diff --git a/OpenSim/Region/Physics/Meshing/Meshmerizer.cs b/OpenSim/Region/PhysicsModules/Meshing/Meshmerizer.cs similarity index 100% rename from OpenSim/Region/Physics/Meshing/Meshmerizer.cs rename to OpenSim/Region/PhysicsModules/Meshing/Meshmerizer.cs diff --git a/OpenSim/Region/Physics/Meshing/PrimMesher.cs b/OpenSim/Region/PhysicsModules/Meshing/PrimMesher.cs similarity index 100% rename from OpenSim/Region/Physics/Meshing/PrimMesher.cs rename to OpenSim/Region/PhysicsModules/Meshing/PrimMesher.cs diff --git a/OpenSim/Region/Physics/Meshing/Properties/AssemblyInfo.cs b/OpenSim/Region/PhysicsModules/Meshing/Properties/AssemblyInfo.cs similarity index 100% rename from OpenSim/Region/Physics/Meshing/Properties/AssemblyInfo.cs rename to OpenSim/Region/PhysicsModules/Meshing/Properties/AssemblyInfo.cs diff --git a/OpenSim/Region/Physics/Meshing/SculptMap.cs b/OpenSim/Region/PhysicsModules/Meshing/SculptMap.cs similarity index 100% rename from OpenSim/Region/Physics/Meshing/SculptMap.cs rename to OpenSim/Region/PhysicsModules/Meshing/SculptMap.cs diff --git a/OpenSim/Region/Physics/Meshing/SculptMesh.cs b/OpenSim/Region/PhysicsModules/Meshing/SculptMesh.cs similarity index 100% rename from OpenSim/Region/Physics/Meshing/SculptMesh.cs rename to OpenSim/Region/PhysicsModules/Meshing/SculptMesh.cs diff --git a/OpenSim/Region/Physics/OdePlugin/AssemblyInfo.cs b/OpenSim/Region/PhysicsModules/Ode/AssemblyInfo.cs similarity index 100% rename from OpenSim/Region/Physics/OdePlugin/AssemblyInfo.cs rename to OpenSim/Region/PhysicsModules/Ode/AssemblyInfo.cs diff --git a/OpenSim/Region/Physics/OdePlugin/ODECharacter.cs b/OpenSim/Region/PhysicsModules/Ode/ODECharacter.cs similarity index 100% rename from OpenSim/Region/Physics/OdePlugin/ODECharacter.cs rename to OpenSim/Region/PhysicsModules/Ode/ODECharacter.cs diff --git a/OpenSim/Region/Physics/OdePlugin/ODEDynamics.c_comments b/OpenSim/Region/PhysicsModules/Ode/ODEDynamics.c_comments similarity index 100% rename from OpenSim/Region/Physics/OdePlugin/ODEDynamics.c_comments rename to OpenSim/Region/PhysicsModules/Ode/ODEDynamics.c_comments diff --git a/OpenSim/Region/Physics/OdePlugin/ODEDynamics.cs b/OpenSim/Region/PhysicsModules/Ode/ODEDynamics.cs similarity index 100% rename from OpenSim/Region/Physics/OdePlugin/ODEDynamics.cs rename to OpenSim/Region/PhysicsModules/Ode/ODEDynamics.cs diff --git a/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs b/OpenSim/Region/PhysicsModules/Ode/ODEPrim.cs similarity index 100% rename from OpenSim/Region/Physics/OdePlugin/ODEPrim.cs rename to OpenSim/Region/PhysicsModules/Ode/ODEPrim.cs diff --git a/OpenSim/Region/Physics/OdePlugin/ODERayCastRequestManager.cs b/OpenSim/Region/PhysicsModules/Ode/ODERayCastRequestManager.cs similarity index 100% rename from OpenSim/Region/Physics/OdePlugin/ODERayCastRequestManager.cs rename to OpenSim/Region/PhysicsModules/Ode/ODERayCastRequestManager.cs diff --git a/OpenSim/Region/Physics/OdePlugin/OdePhysicsJoint.cs b/OpenSim/Region/PhysicsModules/Ode/OdePhysicsJoint.cs similarity index 100% rename from OpenSim/Region/Physics/OdePlugin/OdePhysicsJoint.cs rename to OpenSim/Region/PhysicsModules/Ode/OdePhysicsJoint.cs diff --git a/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs b/OpenSim/Region/PhysicsModules/Ode/OdePlugin.cs similarity index 100% rename from OpenSim/Region/Physics/OdePlugin/OdePlugin.cs rename to OpenSim/Region/PhysicsModules/Ode/OdePlugin.cs diff --git a/OpenSim/Region/Physics/OdePlugin/OdeScene.cs b/OpenSim/Region/PhysicsModules/Ode/OdeScene.cs similarity index 100% rename from OpenSim/Region/Physics/OdePlugin/OdeScene.cs rename to OpenSim/Region/PhysicsModules/Ode/OdeScene.cs diff --git a/OpenSim/Region/Physics/OdePlugin/Tests/ODETestClass.cs b/OpenSim/Region/PhysicsModules/Ode/Tests/ODETestClass.cs similarity index 100% rename from OpenSim/Region/Physics/OdePlugin/Tests/ODETestClass.cs rename to OpenSim/Region/PhysicsModules/Ode/Tests/ODETestClass.cs diff --git a/OpenSim/Region/Physics/OdePlugin/drawstuff.cs b/OpenSim/Region/PhysicsModules/Ode/drawstuff.cs similarity index 100% rename from OpenSim/Region/Physics/OdePlugin/drawstuff.cs rename to OpenSim/Region/PhysicsModules/Ode/drawstuff.cs diff --git a/OpenSim/Region/Physics/POSPlugin/AssemblyInfo.cs b/OpenSim/Region/PhysicsModules/POS/AssemblyInfo.cs similarity index 100% rename from OpenSim/Region/Physics/POSPlugin/AssemblyInfo.cs rename to OpenSim/Region/PhysicsModules/POS/AssemblyInfo.cs diff --git a/OpenSim/Region/Physics/POSPlugin/POSCharacter.cs b/OpenSim/Region/PhysicsModules/POS/POSCharacter.cs similarity index 100% rename from OpenSim/Region/Physics/POSPlugin/POSCharacter.cs rename to OpenSim/Region/PhysicsModules/POS/POSCharacter.cs diff --git a/OpenSim/Region/Physics/POSPlugin/POSPlugin.cs b/OpenSim/Region/PhysicsModules/POS/POSPlugin.cs similarity index 100% rename from OpenSim/Region/Physics/POSPlugin/POSPlugin.cs rename to OpenSim/Region/PhysicsModules/POS/POSPlugin.cs diff --git a/OpenSim/Region/Physics/POSPlugin/POSPrim.cs b/OpenSim/Region/PhysicsModules/POS/POSPrim.cs similarity index 100% rename from OpenSim/Region/Physics/POSPlugin/POSPrim.cs rename to OpenSim/Region/PhysicsModules/POS/POSPrim.cs diff --git a/OpenSim/Region/Physics/POSPlugin/POSScene.cs b/OpenSim/Region/PhysicsModules/POS/POSScene.cs similarity index 100% rename from OpenSim/Region/Physics/POSPlugin/POSScene.cs rename to OpenSim/Region/PhysicsModules/POS/POSScene.cs diff --git a/OpenSim/Region/Physics/Manager/AssemblyInfo.cs b/OpenSim/Region/PhysicsModules/SharedBase/AssemblyInfo.cs similarity index 100% rename from OpenSim/Region/Physics/Manager/AssemblyInfo.cs rename to OpenSim/Region/PhysicsModules/SharedBase/AssemblyInfo.cs diff --git a/OpenSim/Region/Physics/Manager/CollisionLocker.cs b/OpenSim/Region/PhysicsModules/SharedBase/CollisionLocker.cs similarity index 100% rename from OpenSim/Region/Physics/Manager/CollisionLocker.cs rename to OpenSim/Region/PhysicsModules/SharedBase/CollisionLocker.cs diff --git a/OpenSim/Region/Physics/Manager/IMesher.cs b/OpenSim/Region/PhysicsModules/SharedBase/IMesher.cs similarity index 100% rename from OpenSim/Region/Physics/Manager/IMesher.cs rename to OpenSim/Region/PhysicsModules/SharedBase/IMesher.cs diff --git a/OpenSim/Region/Physics/Manager/IPhysicsParameters.cs b/OpenSim/Region/PhysicsModules/SharedBase/IPhysicsParameters.cs similarity index 100% rename from OpenSim/Region/Physics/Manager/IPhysicsParameters.cs rename to OpenSim/Region/PhysicsModules/SharedBase/IPhysicsParameters.cs diff --git a/OpenSim/Region/Physics/Manager/NullPhysicsScene.cs b/OpenSim/Region/PhysicsModules/SharedBase/NullPhysicsScene.cs similarity index 100% rename from OpenSim/Region/Physics/Manager/NullPhysicsScene.cs rename to OpenSim/Region/PhysicsModules/SharedBase/NullPhysicsScene.cs diff --git a/OpenSim/Region/Physics/Manager/PhysicsActor.cs b/OpenSim/Region/PhysicsModules/SharedBase/PhysicsActor.cs similarity index 100% rename from OpenSim/Region/Physics/Manager/PhysicsActor.cs rename to OpenSim/Region/PhysicsModules/SharedBase/PhysicsActor.cs diff --git a/OpenSim/Region/Physics/Manager/PhysicsJoint.cs b/OpenSim/Region/PhysicsModules/SharedBase/PhysicsJoint.cs similarity index 100% rename from OpenSim/Region/Physics/Manager/PhysicsJoint.cs rename to OpenSim/Region/PhysicsModules/SharedBase/PhysicsJoint.cs diff --git a/OpenSim/Region/Physics/Manager/PhysicsPluginManager.cs b/OpenSim/Region/PhysicsModules/SharedBase/PhysicsPluginManager.cs similarity index 100% rename from OpenSim/Region/Physics/Manager/PhysicsPluginManager.cs rename to OpenSim/Region/PhysicsModules/SharedBase/PhysicsPluginManager.cs diff --git a/OpenSim/Region/Physics/Manager/PhysicsScene.cs b/OpenSim/Region/PhysicsModules/SharedBase/PhysicsScene.cs similarity index 100% rename from OpenSim/Region/Physics/Manager/PhysicsScene.cs rename to OpenSim/Region/PhysicsModules/SharedBase/PhysicsScene.cs diff --git a/OpenSim/Region/Physics/Manager/PhysicsSensor.cs b/OpenSim/Region/PhysicsModules/SharedBase/PhysicsSensor.cs similarity index 100% rename from OpenSim/Region/Physics/Manager/PhysicsSensor.cs rename to OpenSim/Region/PhysicsModules/SharedBase/PhysicsSensor.cs diff --git a/OpenSim/Region/Physics/Manager/PhysicsVector.cs b/OpenSim/Region/PhysicsModules/SharedBase/PhysicsVector.cs similarity index 100% rename from OpenSim/Region/Physics/Manager/PhysicsVector.cs rename to OpenSim/Region/PhysicsModules/SharedBase/PhysicsVector.cs diff --git a/OpenSim/Region/Physics/Manager/VehicleConstants.cs b/OpenSim/Region/PhysicsModules/SharedBase/VehicleConstants.cs similarity index 100% rename from OpenSim/Region/Physics/Manager/VehicleConstants.cs rename to OpenSim/Region/PhysicsModules/SharedBase/VehicleConstants.cs diff --git a/OpenSim/Region/Physics/Manager/ZeroMesher.cs b/OpenSim/Region/PhysicsModules/SharedBase/ZeroMesher.cs similarity index 100% rename from OpenSim/Region/Physics/Manager/ZeroMesher.cs rename to OpenSim/Region/PhysicsModules/SharedBase/ZeroMesher.cs diff --git a/prebuild.xml b/prebuild.xml index b5ebed1958..f1ab322929 100644 --- a/prebuild.xml +++ b/prebuild.xml @@ -410,7 +410,7 @@ - + ../../../../bin/ @@ -438,7 +438,7 @@ - + ../../../../bin/Physics/ @@ -455,13 +455,13 @@ - + - + ../../../../bin/Physics/ @@ -478,13 +478,13 @@ - + - + ../../../../bin/Physics/ @@ -503,7 +503,7 @@ - + @@ -514,7 +514,7 @@ - + ../../../../bin/Physics/ @@ -536,7 +536,7 @@ - + @@ -653,7 +653,7 @@ - + @@ -1507,7 +1507,7 @@ - + @@ -1594,7 +1594,7 @@ - + @@ -1648,7 +1648,7 @@ - + @@ -1700,7 +1700,7 @@ - + @@ -1749,7 +1749,7 @@ - + @@ -1801,7 +1801,7 @@ - + ../../../../bin/ @@ -1826,7 +1826,7 @@ - + ../../../../bin/Physics/ @@ -1852,9 +1852,9 @@ - - - + + + @@ -1897,7 +1897,7 @@ - + @@ -2270,7 +2270,7 @@ - + @@ -2464,7 +2464,7 @@ - + @@ -2729,7 +2729,7 @@ - + @@ -3056,7 +3056,7 @@ - + @@ -3136,7 +3136,7 @@ - + @@ -3204,7 +3204,7 @@ - + @@ -3369,7 +3369,7 @@ TODO: this is kind of lame, we basically build a duplicate assembly but with tests added in, just because we can't resolve cross-bin-dir-refs. --> - + ../../../../../bin/ @@ -3388,8 +3388,8 @@ - - + + @@ -3400,7 +3400,7 @@ - + ../../../../../bin/ @@ -3424,9 +3424,9 @@ - - - + + + From 2c0cad6dd3014e9ad363090f5f7872c43daffcbd Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Sun, 30 Aug 2015 20:29:31 -0700 Subject: [PATCH 03/32] Renamed the namespaces too --- OpenSim/Region/Application/OpenSimBase.cs | 2 +- .../ClientStack/RegionApplicationBase.cs | 2 +- .../EntityTransfer/EntityTransferModule.cs | 2 +- .../EntityTransferStateMachine.cs | 2 +- .../CoreModules/World/Land/DwellModule.cs | 2 +- .../World/Land/LandManagementModule.cs | 2 +- .../World/Warp3DMap/Warp3DImageModule.cs | 2 +- .../Scenes/Animation/ScenePresenceAnimator.cs | 2 +- .../Region/Framework/Scenes/EventManager.cs | 24 +++++++++---------- .../Region/Framework/Scenes/KeyframeMotion.cs | 2 +- .../Region/Framework/Scenes/Prioritizer.cs | 2 +- OpenSim/Region/Framework/Scenes/Scene.cs | 2 +- OpenSim/Region/Framework/Scenes/SceneGraph.cs | 2 +- .../Framework/Scenes/SceneObjectGroup.cs | 2 +- .../Framework/Scenes/SceneObjectPart.cs | 2 +- .../Region/Framework/Scenes/ScenePresence.cs | 2 +- .../Scenes/Serialization/SceneXmlLoader.cs | 2 +- .../Tests/ScenePresenceAnimationTests.cs | 2 +- .../PhysicsParameters/PhysicsParameters.cs | 2 +- .../ExtendedPhysics/ExtendedPhysics.cs | 2 +- .../Scripting/Minimodule/SOPObject.cs | 2 +- .../PhysicsModules/BulletS/BSAPIUnman.cs | 2 +- .../Region/PhysicsModules/BulletS/BSAPIXNA.cs | 2 +- .../BulletS/BSActorAvatarMove.cs | 4 ++-- .../PhysicsModules/BulletS/BSActorHover.cs | 4 ++-- .../PhysicsModules/BulletS/BSActorLockAxis.cs | 2 +- .../BulletS/BSActorMoveToTarget.cs | 4 ++-- .../PhysicsModules/BulletS/BSActorSetForce.cs | 4 ++-- .../BulletS/BSActorSetTorque.cs | 4 ++-- .../Region/PhysicsModules/BulletS/BSActors.cs | 2 +- .../PhysicsModules/BulletS/BSApiTemplate.cs | 2 +- .../PhysicsModules/BulletS/BSCharacter.cs | 4 ++-- .../PhysicsModules/BulletS/BSConstraint.cs | 2 +- .../BulletS/BSConstraint6Dof.cs | 2 +- .../BulletS/BSConstraintCollection.cs | 2 +- .../BulletS/BSConstraintConeTwist.cs | 2 +- .../BulletS/BSConstraintHinge.cs | 2 +- .../BulletS/BSConstraintSlider.cs | 2 +- .../BulletS/BSConstraintSpring.cs | 2 +- .../PhysicsModules/BulletS/BSDynamics.cs | 4 ++-- .../PhysicsModules/BulletS/BSLinkset.cs | 2 +- .../BulletS/BSLinksetCompound.cs | 2 +- .../BulletS/BSLinksetConstraints.cs | 2 +- .../PhysicsModules/BulletS/BSMaterials.cs | 2 +- .../Region/PhysicsModules/BulletS/BSMotors.cs | 2 +- .../Region/PhysicsModules/BulletS/BSParam.cs | 4 ++-- .../PhysicsModules/BulletS/BSPhysObject.cs | 4 ++-- .../Region/PhysicsModules/BulletS/BSPlugin.cs | 4 ++-- .../Region/PhysicsModules/BulletS/BSPrim.cs | 6 ++--- .../PhysicsModules/BulletS/BSPrimDisplaced.cs | 4 ++-- .../PhysicsModules/BulletS/BSPrimLinkable.cs | 4 ++-- .../Region/PhysicsModules/BulletS/BSScene.cs | 4 ++-- .../BulletS/BSShapeCollection.cs | 6 ++--- .../Region/PhysicsModules/BulletS/BSShapes.cs | 8 +++---- .../BulletS/BSTerrainHeightmap.cs | 4 ++-- .../BulletS/BSTerrainManager.cs | 4 ++-- .../PhysicsModules/BulletS/BSTerrainMesh.cs | 4 ++-- .../PhysicsModules/BulletS/BulletSimData.cs | 2 +- .../BulletS/Tests/BasicVehicles.cs | 6 ++--- .../BulletS/Tests/BulletSimTests.cs | 2 +- .../BulletS/Tests/BulletSimTestsUtil.cs | 6 ++--- .../BulletS/Tests/HullCreation.cs | 6 ++--- .../ConvexDecompositionDotNet/CTri.cs | 2 +- .../ConvexDecompositionDotNet/Concavity.cs | 2 +- .../ConvexBuilder.cs | 2 +- .../ConvexDecomposition.cs | 2 +- .../ConvexDecompositionDotNet/ConvexResult.cs | 2 +- .../ConvexDecompositionDotNet/HullClasses.cs | 2 +- .../ConvexDecompositionDotNet/HullTriangle.cs | 2 +- .../ConvexDecompositionDotNet/HullUtils.cs | 2 +- .../ConvexDecompositionDotNet/Plane.cs | 2 +- .../ConvexDecompositionDotNet/PlaneTri.cs | 2 +- .../ConvexDecompositionDotNet/Quaternion.cs | 2 +- .../ConvexDecompositionDotNet/SplitPlane.cs | 2 +- .../ConvexDecompositionDotNet/VertexLookup.cs | 2 +- .../ConvexDecompositionDotNet/float2.cs | 2 +- .../ConvexDecompositionDotNet/float3.cs | 2 +- .../ConvexDecompositionDotNet/float3x3.cs | 2 +- .../ConvexDecompositionDotNet/float4.cs | 2 +- .../ConvexDecompositionDotNet/float4x4.cs | 2 +- .../ConvexDecompositionDotNet/int3.cs | 2 +- .../ConvexDecompositionDotNet/int4.cs | 2 +- .../PhysicsModules/Meshing/HelperTypes.cs | 4 ++-- OpenSim/Region/PhysicsModules/Meshing/Mesh.cs | 4 ++-- .../PhysicsModules/Meshing/Meshmerizer.cs | 4 ++-- .../Region/PhysicsModules/Ode/ODECharacter.cs | 4 ++-- .../Region/PhysicsModules/Ode/ODEDynamics.cs | 4 ++-- OpenSim/Region/PhysicsModules/Ode/ODEPrim.cs | 4 ++-- .../Ode/ODERayCastRequestManager.cs | 4 ++-- .../PhysicsModules/Ode/OdePhysicsJoint.cs | 6 ++--- .../Region/PhysicsModules/Ode/OdePlugin.cs | 4 ++-- OpenSim/Region/PhysicsModules/Ode/OdeScene.cs | 4 ++-- .../PhysicsModules/Ode/Tests/ODETestClass.cs | 8 +++---- .../Region/PhysicsModules/POS/POSCharacter.cs | 4 ++-- .../Region/PhysicsModules/POS/POSPlugin.cs | 4 ++-- OpenSim/Region/PhysicsModules/POS/POSPrim.cs | 4 ++-- OpenSim/Region/PhysicsModules/POS/POSScene.cs | 4 ++-- .../SharedBase/CollisionLocker.cs | 2 +- .../PhysicsModules/SharedBase/IMesher.cs | 2 +- .../SharedBase/IPhysicsParameters.cs | 2 +- .../SharedBase/NullPhysicsScene.cs | 2 +- .../PhysicsModules/SharedBase/PhysicsActor.cs | 2 +- .../PhysicsModules/SharedBase/PhysicsJoint.cs | 2 +- .../SharedBase/PhysicsPluginManager.cs | 2 +- .../PhysicsModules/SharedBase/PhysicsScene.cs | 2 +- .../SharedBase/PhysicsSensor.cs | 2 +- .../SharedBase/PhysicsVector.cs | 2 +- .../SharedBase/VehicleConstants.cs | 2 +- .../PhysicsModules/SharedBase/ZeroMesher.cs | 2 +- .../RegionCombinerModule.cs | 2 +- .../Shared/Api/Implementation/LSL_Api.cs | 2 +- OpenSim/Tests/Common/Helpers/SceneHelpers.cs | 2 +- OpenSim/Tests/Common/Mock/TestScene.cs | 2 +- 113 files changed, 171 insertions(+), 171 deletions(-) diff --git a/OpenSim/Region/Application/OpenSimBase.cs b/OpenSim/Region/Application/OpenSimBase.cs index 62a52d6188..f26355629e 100644 --- a/OpenSim/Region/Application/OpenSimBase.cs +++ b/OpenSim/Region/Application/OpenSimBase.cs @@ -46,7 +46,7 @@ using OpenSim.Region.CoreModules.ServiceConnectorsOut.UserAccounts; using OpenSim.Region.Framework; using OpenSim.Region.Framework.Interfaces; using OpenSim.Region.Framework.Scenes; -using OpenSim.Region.Physics.Manager; +using OpenSim.Region.PhysicsModule.SharedBase; using OpenSim.Server.Base; using OpenSim.Services.Base; using OpenSim.Services.Interfaces; diff --git a/OpenSim/Region/ClientStack/RegionApplicationBase.cs b/OpenSim/Region/ClientStack/RegionApplicationBase.cs index c497b1c7db..b08bf4d616 100644 --- a/OpenSim/Region/ClientStack/RegionApplicationBase.cs +++ b/OpenSim/Region/ClientStack/RegionApplicationBase.cs @@ -38,7 +38,7 @@ using OpenSim.Framework.Servers.HttpServer; using OpenSim.Region.Framework; using OpenSim.Region.Framework.Interfaces; using OpenSim.Region.Framework.Scenes; -using OpenSim.Region.Physics.Manager; +using OpenSim.Region.PhysicsModule.SharedBase; using OpenSim.Services.Interfaces; namespace OpenSim.Region.ClientStack diff --git a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs index 4be19f0d74..371b4f2925 100644 --- a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs +++ b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs @@ -36,7 +36,7 @@ using OpenSim.Framework.Client; using OpenSim.Framework.Monitoring; using OpenSim.Region.Framework.Interfaces; using OpenSim.Region.Framework.Scenes; -using OpenSim.Region.Physics.Manager; +using OpenSim.Region.PhysicsModule.SharedBase; using OpenSim.Services.Interfaces; using GridRegion = OpenSim.Services.Interfaces.GridRegion; diff --git a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferStateMachine.cs b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferStateMachine.cs index 6a04acf905..0f57aeeed4 100644 --- a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferStateMachine.cs +++ b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferStateMachine.cs @@ -38,7 +38,7 @@ using OpenSim.Framework.Capabilities; using OpenSim.Framework.Client; using OpenSim.Region.Framework.Interfaces; using OpenSim.Region.Framework.Scenes; -using OpenSim.Region.Physics.Manager; +using OpenSim.Region.PhysicsModule.SharedBase; using OpenSim.Services.Interfaces; using GridRegion = OpenSim.Services.Interfaces.GridRegion; diff --git a/OpenSim/Region/CoreModules/World/Land/DwellModule.cs b/OpenSim/Region/CoreModules/World/Land/DwellModule.cs index d17c517289..bfa032045a 100644 --- a/OpenSim/Region/CoreModules/World/Land/DwellModule.cs +++ b/OpenSim/Region/CoreModules/World/Land/DwellModule.cs @@ -45,7 +45,7 @@ using OpenSim.Framework.Servers.HttpServer; using OpenSim.Region.CoreModules.Framework.InterfaceCommander; using OpenSim.Region.Framework.Interfaces; using OpenSim.Region.Framework.Scenes; -using OpenSim.Region.Physics.Manager; +using OpenSim.Region.PhysicsModule.SharedBase; using OpenSim.Services.Interfaces; using Caps = OpenSim.Framework.Capabilities.Caps; using GridRegion = OpenSim.Services.Interfaces.GridRegion; diff --git a/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs b/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs index 25e14547c8..f467e2ab27 100644 --- a/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs +++ b/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs @@ -44,7 +44,7 @@ using OpenSim.Framework.Servers; using OpenSim.Framework.Servers.HttpServer; using OpenSim.Region.Framework.Interfaces; using OpenSim.Region.Framework.Scenes; -using OpenSim.Region.Physics.Manager; +using OpenSim.Region.PhysicsModule.SharedBase; using OpenSim.Services.Interfaces; using Caps = OpenSim.Framework.Capabilities.Caps; using GridRegion = OpenSim.Services.Interfaces.GridRegion; diff --git a/OpenSim/Region/CoreModules/World/Warp3DMap/Warp3DImageModule.cs b/OpenSim/Region/CoreModules/World/Warp3DMap/Warp3DImageModule.cs index dd919512cb..a97075572b 100644 --- a/OpenSim/Region/CoreModules/World/Warp3DMap/Warp3DImageModule.cs +++ b/OpenSim/Region/CoreModules/World/Warp3DMap/Warp3DImageModule.cs @@ -41,7 +41,7 @@ using Mono.Addins; using OpenSim.Framework; using OpenSim.Region.Framework.Interfaces; using OpenSim.Region.Framework.Scenes; -using OpenSim.Region.Physics.Manager; +using OpenSim.Region.PhysicsModule.SharedBase; using OpenSim.Services.Interfaces; using OpenMetaverse; diff --git a/OpenSim/Region/Framework/Scenes/Animation/ScenePresenceAnimator.cs b/OpenSim/Region/Framework/Scenes/Animation/ScenePresenceAnimator.cs index 5beee7371d..b6f2d3dd35 100644 --- a/OpenSim/Region/Framework/Scenes/Animation/ScenePresenceAnimator.cs +++ b/OpenSim/Region/Framework/Scenes/Animation/ScenePresenceAnimator.cs @@ -35,7 +35,7 @@ using OpenMetaverse; using OpenSim.Framework; using OpenSim.Region.Framework.Interfaces; using OpenSim.Region.Framework.Scenes; -using OpenSim.Region.Physics.Manager; +using OpenSim.Region.PhysicsModule.SharedBase; namespace OpenSim.Region.Framework.Scenes.Animation { diff --git a/OpenSim/Region/Framework/Scenes/EventManager.cs b/OpenSim/Region/Framework/Scenes/EventManager.cs index d325240596..97b9482550 100644 --- a/OpenSim/Region/Framework/Scenes/EventManager.cs +++ b/OpenSim/Region/Framework/Scenes/EventManager.cs @@ -632,8 +632,8 @@ namespace OpenSim.Region.Framework.Scenes /// Triggered by /// in /// via - /// via - /// via + /// via + /// via /// public event ScriptColliding OnScriptColliderStart; @@ -646,8 +646,8 @@ namespace OpenSim.Region.Framework.Scenes /// Triggered by /// in /// via - /// via - /// via + /// via + /// via /// public event ScriptColliding OnScriptColliding; @@ -659,8 +659,8 @@ namespace OpenSim.Region.Framework.Scenes /// Triggered by /// in /// via - /// via - /// via + /// via + /// via /// public event ScriptColliding OnScriptCollidingEnd; @@ -672,8 +672,8 @@ namespace OpenSim.Region.Framework.Scenes /// Triggered by /// in /// via - /// via - /// via + /// via + /// via /// public event ScriptColliding OnScriptLandColliderStart; @@ -685,8 +685,8 @@ namespace OpenSim.Region.Framework.Scenes /// Triggered by /// in /// via - /// via - /// via + /// via + /// via /// public event ScriptColliding OnScriptLandColliding; @@ -698,8 +698,8 @@ namespace OpenSim.Region.Framework.Scenes /// Triggered by /// in /// via - /// via - /// via + /// via + /// via /// public event ScriptColliding OnScriptLandColliderEnd; diff --git a/OpenSim/Region/Framework/Scenes/KeyframeMotion.cs b/OpenSim/Region/Framework/Scenes/KeyframeMotion.cs index 646403ff18..103386c822 100644 --- a/OpenSim/Region/Framework/Scenes/KeyframeMotion.cs +++ b/OpenSim/Region/Framework/Scenes/KeyframeMotion.cs @@ -36,7 +36,7 @@ using System.Threading; using OpenMetaverse; using OpenSim.Framework; using OpenSim.Region.Framework.Interfaces; -using OpenSim.Region.Physics.Manager; +using OpenSim.Region.PhysicsModule.SharedBase; using OpenSim.Region.Framework.Scenes.Serialization; using System.Runtime.Serialization.Formatters.Binary; using System.Runtime.Serialization; diff --git a/OpenSim/Region/Framework/Scenes/Prioritizer.cs b/OpenSim/Region/Framework/Scenes/Prioritizer.cs index 1b10e3cb85..2ca24651b6 100644 --- a/OpenSim/Region/Framework/Scenes/Prioritizer.cs +++ b/OpenSim/Region/Framework/Scenes/Prioritizer.cs @@ -31,7 +31,7 @@ using log4net; using Nini.Config; using OpenSim.Framework; using OpenMetaverse; -using OpenSim.Region.Physics.Manager; +using OpenSim.Region.PhysicsModule.SharedBase; /* * Steps to add a new prioritization policy: diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index 04e26640f7..86a57721fc 100755 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs @@ -47,7 +47,7 @@ using OpenSim.Framework.Console; using OpenSim.Region.Framework.Interfaces; using OpenSim.Region.Framework.Scenes.Scripting; using OpenSim.Region.Framework.Scenes.Serialization; -using OpenSim.Region.Physics.Manager; +using OpenSim.Region.PhysicsModule.SharedBase; using Timer = System.Timers.Timer; using TPFlags = OpenSim.Framework.Constants.TeleportFlags; using GridRegion = OpenSim.Services.Interfaces.GridRegion; diff --git a/OpenSim/Region/Framework/Scenes/SceneGraph.cs b/OpenSim/Region/Framework/Scenes/SceneGraph.cs index c2e9b61ea8..96488104bc 100755 --- a/OpenSim/Region/Framework/Scenes/SceneGraph.cs +++ b/OpenSim/Region/Framework/Scenes/SceneGraph.cs @@ -34,7 +34,7 @@ using OpenMetaverse.Packets; using log4net; using OpenSim.Framework; using OpenSim.Region.Framework.Scenes.Types; -using OpenSim.Region.Physics.Manager; +using OpenSim.Region.PhysicsModule.SharedBase; using OpenSim.Region.Framework.Interfaces; namespace OpenSim.Region.Framework.Scenes diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs index 866a43c1a9..3be6ad2a6a 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs @@ -38,7 +38,7 @@ using OpenMetaverse; using OpenMetaverse.Packets; using OpenSim.Framework; using OpenSim.Region.Framework.Interfaces; -using OpenSim.Region.Physics.Manager; +using OpenSim.Region.PhysicsModule.SharedBase; using OpenSim.Region.Framework.Scenes.Serialization; using PermissionMask = OpenSim.Framework.PermissionMask; diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs index f6e8c7feaf..dae8c547b6 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs @@ -42,7 +42,7 @@ using OpenSim.Framework; using OpenSim.Region.Framework.Interfaces; using OpenSim.Region.Framework.Scenes.Scripting; using OpenSim.Region.Framework.Scenes.Serialization; -using OpenSim.Region.Physics.Manager; +using OpenSim.Region.PhysicsModule.SharedBase; using PermissionMask = OpenSim.Framework.PermissionMask; namespace OpenSim.Region.Framework.Scenes diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index 2f19b50ea5..d8c6c9446a 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs @@ -41,7 +41,7 @@ using OpenSim.Framework.Monitoring; using OpenSim.Region.Framework.Interfaces; using OpenSim.Region.Framework.Scenes.Animation; using OpenSim.Region.Framework.Scenes.Types; -using OpenSim.Region.Physics.Manager; +using OpenSim.Region.PhysicsModule.SharedBase; using GridRegion = OpenSim.Services.Interfaces.GridRegion; using OpenSim.Services.Interfaces; using TeleportFlags = OpenSim.Framework.Constants.TeleportFlags; diff --git a/OpenSim/Region/Framework/Scenes/Serialization/SceneXmlLoader.cs b/OpenSim/Region/Framework/Scenes/Serialization/SceneXmlLoader.cs index a3485d29e6..53815f0f20 100644 --- a/OpenSim/Region/Framework/Scenes/Serialization/SceneXmlLoader.cs +++ b/OpenSim/Region/Framework/Scenes/Serialization/SceneXmlLoader.cs @@ -34,7 +34,7 @@ using OpenMetaverse; using log4net; using OpenSim.Framework; using OpenSim.Region.Framework.Scenes; -using OpenSim.Region.Physics.Manager; +using OpenSim.Region.PhysicsModule.SharedBase; namespace OpenSim.Region.Framework.Scenes.Serialization { diff --git a/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceAnimationTests.cs b/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceAnimationTests.cs index 42cfa1b4c4..5f87f4a659 100644 --- a/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceAnimationTests.cs +++ b/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceAnimationTests.cs @@ -41,7 +41,7 @@ using OpenSim.Region.Framework.Interfaces; using OpenSim.Region.CoreModules.Framework.EntityTransfer; using OpenSim.Region.CoreModules.World.Serialiser; using OpenSim.Region.CoreModules.ServiceConnectorsOut.Simulation; -using OpenSim.Region.Physics.Manager; +using OpenSim.Region.PhysicsModule.SharedBase; using OpenSim.Tests.Common; namespace OpenSim.Region.Framework.Scenes.Tests diff --git a/OpenSim/Region/OptionalModules/PhysicsParameters/PhysicsParameters.cs b/OpenSim/Region/OptionalModules/PhysicsParameters/PhysicsParameters.cs index 3083a337ff..1c039cb0e9 100755 --- a/OpenSim/Region/OptionalModules/PhysicsParameters/PhysicsParameters.cs +++ b/OpenSim/Region/OptionalModules/PhysicsParameters/PhysicsParameters.cs @@ -36,7 +36,7 @@ using OpenSim.Framework.Console; using OpenSim.Region.CoreModules.Framework.InterfaceCommander; using OpenSim.Region.Framework.Interfaces; using OpenSim.Region.Framework.Scenes; -using OpenSim.Region.Physics.Manager; +using OpenSim.Region.PhysicsModule.SharedBase; namespace OpenSim.Region.OptionalModules.PhysicsParameters { diff --git a/OpenSim/Region/OptionalModules/Scripting/ExtendedPhysics/ExtendedPhysics.cs b/OpenSim/Region/OptionalModules/Scripting/ExtendedPhysics/ExtendedPhysics.cs index ff4afbf90e..c5753b9264 100755 --- a/OpenSim/Region/OptionalModules/Scripting/ExtendedPhysics/ExtendedPhysics.cs +++ b/OpenSim/Region/OptionalModules/Scripting/ExtendedPhysics/ExtendedPhysics.cs @@ -36,7 +36,7 @@ using OpenSim.Region.CoreModules; using OpenSim.Region.Framework; using OpenSim.Region.Framework.Interfaces; using OpenSim.Region.Framework.Scenes; -using OpenSim.Region.Physics.Manager; +using OpenSim.Region.PhysicsModule.SharedBase; using Mono.Addins; using Nini.Config; diff --git a/OpenSim/Region/OptionalModules/Scripting/Minimodule/SOPObject.cs b/OpenSim/Region/OptionalModules/Scripting/Minimodule/SOPObject.cs index 5ed1514ad4..7922db6559 100644 --- a/OpenSim/Region/OptionalModules/Scripting/Minimodule/SOPObject.cs +++ b/OpenSim/Region/OptionalModules/Scripting/Minimodule/SOPObject.cs @@ -34,7 +34,7 @@ using OpenSim.Framework; using OpenSim.Region.Framework.Interfaces; using OpenSim.Region.Framework.Scenes; using OpenSim.Region.OptionalModules.Scripting.Minimodule.Object; -using OpenSim.Region.Physics.Manager; +using OpenSim.Region.PhysicsModule.SharedBase; using PrimType=OpenSim.Region.OptionalModules.Scripting.Minimodule.Object.PrimType; using SculptType=OpenSim.Region.OptionalModules.Scripting.Minimodule.Object.SculptType; diff --git a/OpenSim/Region/PhysicsModules/BulletS/BSAPIUnman.cs b/OpenSim/Region/PhysicsModules/BulletS/BSAPIUnman.cs index 3bd81d4fd0..c4a923c39c 100755 --- a/OpenSim/Region/PhysicsModules/BulletS/BSAPIUnman.cs +++ b/OpenSim/Region/PhysicsModules/BulletS/BSAPIUnman.cs @@ -35,7 +35,7 @@ using OpenSim.Framework; using OpenMetaverse; -namespace OpenSim.Region.Physics.BulletSPlugin +namespace OpenSim.Region.PhysicsModule.BulletS { public sealed class BSAPIUnman : BSAPITemplate { diff --git a/OpenSim/Region/PhysicsModules/BulletS/BSAPIXNA.cs b/OpenSim/Region/PhysicsModules/BulletS/BSAPIXNA.cs index 741f8dbf1d..887311d723 100755 --- a/OpenSim/Region/PhysicsModules/BulletS/BSAPIXNA.cs +++ b/OpenSim/Region/PhysicsModules/BulletS/BSAPIXNA.cs @@ -40,7 +40,7 @@ using BulletXNA.BulletCollision; using BulletXNA.BulletDynamics; using BulletXNA.BulletCollision.CollisionDispatch; -namespace OpenSim.Region.Physics.BulletSPlugin +namespace OpenSim.Region.PhysicsModule.BulletS { public sealed class BSAPIXNA : BSAPITemplate { diff --git a/OpenSim/Region/PhysicsModules/BulletS/BSActorAvatarMove.cs b/OpenSim/Region/PhysicsModules/BulletS/BSActorAvatarMove.cs index bde4557800..f1a06cc8ae 100755 --- a/OpenSim/Region/PhysicsModules/BulletS/BSActorAvatarMove.cs +++ b/OpenSim/Region/PhysicsModules/BulletS/BSActorAvatarMove.cs @@ -31,11 +31,11 @@ using System.Linq; using System.Text; using OpenSim.Framework; -using OpenSim.Region.Physics.Manager; +using OpenSim.Region.PhysicsModule.SharedBase; using OMV = OpenMetaverse; -namespace OpenSim.Region.Physics.BulletSPlugin +namespace OpenSim.Region.PhysicsModule.BulletS { public class BSActorAvatarMove : BSActor { diff --git a/OpenSim/Region/PhysicsModules/BulletS/BSActorHover.cs b/OpenSim/Region/PhysicsModules/BulletS/BSActorHover.cs index e54c27b266..7fbe920c33 100755 --- a/OpenSim/Region/PhysicsModules/BulletS/BSActorHover.cs +++ b/OpenSim/Region/PhysicsModules/BulletS/BSActorHover.cs @@ -30,11 +30,11 @@ using System.Collections.Generic; using System.Linq; using System.Text; -using OpenSim.Region.Physics.Manager; +using OpenSim.Region.PhysicsModule.SharedBase; using OMV = OpenMetaverse; -namespace OpenSim.Region.Physics.BulletSPlugin +namespace OpenSim.Region.PhysicsModule.BulletS { public class BSActorHover : BSActor { diff --git a/OpenSim/Region/PhysicsModules/BulletS/BSActorLockAxis.cs b/OpenSim/Region/PhysicsModules/BulletS/BSActorLockAxis.cs index 3b3c161763..78c1b6aacb 100755 --- a/OpenSim/Region/PhysicsModules/BulletS/BSActorLockAxis.cs +++ b/OpenSim/Region/PhysicsModules/BulletS/BSActorLockAxis.cs @@ -32,7 +32,7 @@ using System.Text; using OMV = OpenMetaverse; -namespace OpenSim.Region.Physics.BulletSPlugin +namespace OpenSim.Region.PhysicsModule.BulletS { public class BSActorLockAxis : BSActor { diff --git a/OpenSim/Region/PhysicsModules/BulletS/BSActorMoveToTarget.cs b/OpenSim/Region/PhysicsModules/BulletS/BSActorMoveToTarget.cs index 114500632a..6a886b022a 100755 --- a/OpenSim/Region/PhysicsModules/BulletS/BSActorMoveToTarget.cs +++ b/OpenSim/Region/PhysicsModules/BulletS/BSActorMoveToTarget.cs @@ -30,11 +30,11 @@ using System.Collections.Generic; using System.Linq; using System.Text; -using OpenSim.Region.Physics.Manager; +using OpenSim.Region.PhysicsModule.SharedBase; using OMV = OpenMetaverse; -namespace OpenSim.Region.Physics.BulletSPlugin +namespace OpenSim.Region.PhysicsModule.BulletS { public class BSActorMoveToTarget : BSActor { diff --git a/OpenSim/Region/PhysicsModules/BulletS/BSActorSetForce.cs b/OpenSim/Region/PhysicsModules/BulletS/BSActorSetForce.cs index 4e81363024..e81452abfb 100755 --- a/OpenSim/Region/PhysicsModules/BulletS/BSActorSetForce.cs +++ b/OpenSim/Region/PhysicsModules/BulletS/BSActorSetForce.cs @@ -30,11 +30,11 @@ using System.Collections.Generic; using System.Linq; using System.Text; -using OpenSim.Region.Physics.Manager; +using OpenSim.Region.PhysicsModule.SharedBase; using OMV = OpenMetaverse; -namespace OpenSim.Region.Physics.BulletSPlugin +namespace OpenSim.Region.PhysicsModule.BulletS { public class BSActorSetForce : BSActor { diff --git a/OpenSim/Region/PhysicsModules/BulletS/BSActorSetTorque.cs b/OpenSim/Region/PhysicsModules/BulletS/BSActorSetTorque.cs index 79e1d38612..7eeb533aaa 100755 --- a/OpenSim/Region/PhysicsModules/BulletS/BSActorSetTorque.cs +++ b/OpenSim/Region/PhysicsModules/BulletS/BSActorSetTorque.cs @@ -30,11 +30,11 @@ using System.Collections.Generic; using System.Linq; using System.Text; -using OpenSim.Region.Physics.Manager; +using OpenSim.Region.PhysicsModule.SharedBase; using OMV = OpenMetaverse; -namespace OpenSim.Region.Physics.BulletSPlugin +namespace OpenSim.Region.PhysicsModule.BulletS { public class BSActorSetTorque : BSActor { diff --git a/OpenSim/Region/PhysicsModules/BulletS/BSActors.cs b/OpenSim/Region/PhysicsModules/BulletS/BSActors.cs index 7f45e2cc4e..851347b493 100755 --- a/OpenSim/Region/PhysicsModules/BulletS/BSActors.cs +++ b/OpenSim/Region/PhysicsModules/BulletS/BSActors.cs @@ -28,7 +28,7 @@ using System; using System.Collections.Generic; using System.Text; -namespace OpenSim.Region.Physics.BulletSPlugin +namespace OpenSim.Region.PhysicsModule.BulletS { public class BSActorCollection { diff --git a/OpenSim/Region/PhysicsModules/BulletS/BSApiTemplate.cs b/OpenSim/Region/PhysicsModules/BulletS/BSApiTemplate.cs index 8491c0f548..7756b10a8c 100644 --- a/OpenSim/Region/PhysicsModules/BulletS/BSApiTemplate.cs +++ b/OpenSim/Region/PhysicsModules/BulletS/BSApiTemplate.cs @@ -31,7 +31,7 @@ using System.Security; using System.Text; using OpenMetaverse; -namespace OpenSim.Region.Physics.BulletSPlugin { +namespace OpenSim.Region.PhysicsModule.BulletS { // Constraint type values as defined by Bullet public enum ConstraintType : int diff --git a/OpenSim/Region/PhysicsModules/BulletS/BSCharacter.cs b/OpenSim/Region/PhysicsModules/BulletS/BSCharacter.cs index 9c3f160300..d6b85517c9 100644 --- a/OpenSim/Region/PhysicsModules/BulletS/BSCharacter.cs +++ b/OpenSim/Region/PhysicsModules/BulletS/BSCharacter.cs @@ -30,9 +30,9 @@ using System.Reflection; using log4net; using OMV = OpenMetaverse; using OpenSim.Framework; -using OpenSim.Region.Physics.Manager; +using OpenSim.Region.PhysicsModule.SharedBase; -namespace OpenSim.Region.Physics.BulletSPlugin +namespace OpenSim.Region.PhysicsModule.BulletS { public sealed class BSCharacter : BSPhysObject { diff --git a/OpenSim/Region/PhysicsModules/BulletS/BSConstraint.cs b/OpenSim/Region/PhysicsModules/BulletS/BSConstraint.cs index b47e9a85f6..e42e868853 100755 --- a/OpenSim/Region/PhysicsModules/BulletS/BSConstraint.cs +++ b/OpenSim/Region/PhysicsModules/BulletS/BSConstraint.cs @@ -29,7 +29,7 @@ using System.Collections.Generic; using System.Text; using OpenMetaverse; -namespace OpenSim.Region.Physics.BulletSPlugin +namespace OpenSim.Region.PhysicsModule.BulletS { public abstract class BSConstraint : IDisposable diff --git a/OpenSim/Region/PhysicsModules/BulletS/BSConstraint6Dof.cs b/OpenSim/Region/PhysicsModules/BulletS/BSConstraint6Dof.cs index 7fcb75c178..4bcde2bb27 100755 --- a/OpenSim/Region/PhysicsModules/BulletS/BSConstraint6Dof.cs +++ b/OpenSim/Region/PhysicsModules/BulletS/BSConstraint6Dof.cs @@ -29,7 +29,7 @@ using System.Collections.Generic; using System.Text; using OpenMetaverse; -namespace OpenSim.Region.Physics.BulletSPlugin +namespace OpenSim.Region.PhysicsModule.BulletS { public class BSConstraint6Dof : BSConstraint diff --git a/OpenSim/Region/PhysicsModules/BulletS/BSConstraintCollection.cs b/OpenSim/Region/PhysicsModules/BulletS/BSConstraintCollection.cs index 5c8d94e07e..5746ac1746 100755 --- a/OpenSim/Region/PhysicsModules/BulletS/BSConstraintCollection.cs +++ b/OpenSim/Region/PhysicsModules/BulletS/BSConstraintCollection.cs @@ -30,7 +30,7 @@ using System.Text; using log4net; using OpenMetaverse; -namespace OpenSim.Region.Physics.BulletSPlugin +namespace OpenSim.Region.PhysicsModule.BulletS { public sealed class BSConstraintCollection : IDisposable diff --git a/OpenSim/Region/PhysicsModules/BulletS/BSConstraintConeTwist.cs b/OpenSim/Region/PhysicsModules/BulletS/BSConstraintConeTwist.cs index 7a76a9a8e9..e7566a83dd 100755 --- a/OpenSim/Region/PhysicsModules/BulletS/BSConstraintConeTwist.cs +++ b/OpenSim/Region/PhysicsModules/BulletS/BSConstraintConeTwist.cs @@ -29,7 +29,7 @@ using System.Collections.Generic; using System.Text; using OpenMetaverse; -namespace OpenSim.Region.Physics.BulletSPlugin +namespace OpenSim.Region.PhysicsModule.BulletS { public sealed class BSConstraintConeTwist : BSConstraint diff --git a/OpenSim/Region/PhysicsModules/BulletS/BSConstraintHinge.cs b/OpenSim/Region/PhysicsModules/BulletS/BSConstraintHinge.cs index ed89f630e1..d20538d58d 100755 --- a/OpenSim/Region/PhysicsModules/BulletS/BSConstraintHinge.cs +++ b/OpenSim/Region/PhysicsModules/BulletS/BSConstraintHinge.cs @@ -29,7 +29,7 @@ using System.Collections.Generic; using System.Text; using OpenMetaverse; -namespace OpenSim.Region.Physics.BulletSPlugin +namespace OpenSim.Region.PhysicsModule.BulletS { public sealed class BSConstraintHinge : BSConstraint diff --git a/OpenSim/Region/PhysicsModules/BulletS/BSConstraintSlider.cs b/OpenSim/Region/PhysicsModules/BulletS/BSConstraintSlider.cs index 37cfa07ae8..83d42af912 100755 --- a/OpenSim/Region/PhysicsModules/BulletS/BSConstraintSlider.cs +++ b/OpenSim/Region/PhysicsModules/BulletS/BSConstraintSlider.cs @@ -29,7 +29,7 @@ using System.Collections.Generic; using System.Text; using OpenMetaverse; -namespace OpenSim.Region.Physics.BulletSPlugin +namespace OpenSim.Region.PhysicsModule.BulletS { public sealed class BSConstraintSlider : BSConstraint diff --git a/OpenSim/Region/PhysicsModules/BulletS/BSConstraintSpring.cs b/OpenSim/Region/PhysicsModules/BulletS/BSConstraintSpring.cs index 8e7ddff102..563a1b1ef5 100755 --- a/OpenSim/Region/PhysicsModules/BulletS/BSConstraintSpring.cs +++ b/OpenSim/Region/PhysicsModules/BulletS/BSConstraintSpring.cs @@ -29,7 +29,7 @@ using System.Collections.Generic; using System.Text; using OpenMetaverse; -namespace OpenSim.Region.Physics.BulletSPlugin +namespace OpenSim.Region.PhysicsModule.BulletS { public sealed class BSConstraintSpring : BSConstraint6Dof diff --git a/OpenSim/Region/PhysicsModules/BulletS/BSDynamics.cs b/OpenSim/Region/PhysicsModules/BulletS/BSDynamics.cs index c6d6331825..fcf0dd53c3 100644 --- a/OpenSim/Region/PhysicsModules/BulletS/BSDynamics.cs +++ b/OpenSim/Region/PhysicsModules/BulletS/BSDynamics.cs @@ -36,9 +36,9 @@ using System.Reflection; using System.Runtime.InteropServices; using OpenMetaverse; using OpenSim.Framework; -using OpenSim.Region.Physics.Manager; +using OpenSim.Region.PhysicsModule.SharedBase; -namespace OpenSim.Region.Physics.BulletSPlugin +namespace OpenSim.Region.PhysicsModule.BulletS { public sealed class BSDynamics : BSActor { diff --git a/OpenSim/Region/PhysicsModules/BulletS/BSLinkset.cs b/OpenSim/Region/PhysicsModules/BulletS/BSLinkset.cs index 87eba33860..83122398e2 100755 --- a/OpenSim/Region/PhysicsModules/BulletS/BSLinkset.cs +++ b/OpenSim/Region/PhysicsModules/BulletS/BSLinkset.cs @@ -30,7 +30,7 @@ using System.Text; using OMV = OpenMetaverse; -namespace OpenSim.Region.Physics.BulletSPlugin +namespace OpenSim.Region.PhysicsModule.BulletS { public abstract class BSLinkset diff --git a/OpenSim/Region/PhysicsModules/BulletS/BSLinksetCompound.cs b/OpenSim/Region/PhysicsModules/BulletS/BSLinksetCompound.cs index cae9efad58..953ddee0dd 100755 --- a/OpenSim/Region/PhysicsModules/BulletS/BSLinksetCompound.cs +++ b/OpenSim/Region/PhysicsModules/BulletS/BSLinksetCompound.cs @@ -32,7 +32,7 @@ using OpenSim.Framework; using OMV = OpenMetaverse; -namespace OpenSim.Region.Physics.BulletSPlugin +namespace OpenSim.Region.PhysicsModule.BulletS { public sealed class BSLinksetCompound : BSLinkset diff --git a/OpenSim/Region/PhysicsModules/BulletS/BSLinksetConstraints.cs b/OpenSim/Region/PhysicsModules/BulletS/BSLinksetConstraints.cs index 4384cdc36e..d7be470d81 100755 --- a/OpenSim/Region/PhysicsModules/BulletS/BSLinksetConstraints.cs +++ b/OpenSim/Region/PhysicsModules/BulletS/BSLinksetConstraints.cs @@ -32,7 +32,7 @@ using OpenSim.Region.OptionalModules.Scripting; using OMV = OpenMetaverse; -namespace OpenSim.Region.Physics.BulletSPlugin +namespace OpenSim.Region.PhysicsModule.BulletS { public sealed class BSLinksetConstraints : BSLinkset { diff --git a/OpenSim/Region/PhysicsModules/BulletS/BSMaterials.cs b/OpenSim/Region/PhysicsModules/BulletS/BSMaterials.cs index ee77d6e3f8..0e44d03770 100755 --- a/OpenSim/Region/PhysicsModules/BulletS/BSMaterials.cs +++ b/OpenSim/Region/PhysicsModules/BulletS/BSMaterials.cs @@ -30,7 +30,7 @@ using System.Text; using System.Reflection; using Nini.Config; -namespace OpenSim.Region.Physics.BulletSPlugin +namespace OpenSim.Region.PhysicsModule.BulletS { public struct MaterialAttributes diff --git a/OpenSim/Region/PhysicsModules/BulletS/BSMotors.cs b/OpenSim/Region/PhysicsModules/BulletS/BSMotors.cs index 7693195763..2faf2d4c0c 100755 --- a/OpenSim/Region/PhysicsModules/BulletS/BSMotors.cs +++ b/OpenSim/Region/PhysicsModules/BulletS/BSMotors.cs @@ -31,7 +31,7 @@ using System.Text; using OpenMetaverse; using OpenSim.Framework; -namespace OpenSim.Region.Physics.BulletSPlugin +namespace OpenSim.Region.PhysicsModule.BulletS { public abstract class BSMotor { diff --git a/OpenSim/Region/PhysicsModules/BulletS/BSParam.cs b/OpenSim/Region/PhysicsModules/BulletS/BSParam.cs index 6d46fe690a..10bbfb308e 100755 --- a/OpenSim/Region/PhysicsModules/BulletS/BSParam.cs +++ b/OpenSim/Region/PhysicsModules/BulletS/BSParam.cs @@ -29,12 +29,12 @@ using System.Collections.Generic; using System.Reflection; using System.Text; -using OpenSim.Region.Physics.Manager; +using OpenSim.Region.PhysicsModule.SharedBase; using OpenMetaverse; using Nini.Config; -namespace OpenSim.Region.Physics.BulletSPlugin +namespace OpenSim.Region.PhysicsModule.BulletS { public static class BSParam { diff --git a/OpenSim/Region/PhysicsModules/BulletS/BSPhysObject.cs b/OpenSim/Region/PhysicsModules/BulletS/BSPhysObject.cs index 90da7a676c..4d69f6111f 100755 --- a/OpenSim/Region/PhysicsModules/BulletS/BSPhysObject.cs +++ b/OpenSim/Region/PhysicsModules/BulletS/BSPhysObject.cs @@ -30,9 +30,9 @@ using System.Text; using OMV = OpenMetaverse; using OpenSim.Framework; -using OpenSim.Region.Physics.Manager; +using OpenSim.Region.PhysicsModule.SharedBase; -namespace OpenSim.Region.Physics.BulletSPlugin +namespace OpenSim.Region.PhysicsModule.BulletS { /* * Class to wrap all objects. diff --git a/OpenSim/Region/PhysicsModules/BulletS/BSPlugin.cs b/OpenSim/Region/PhysicsModules/BulletS/BSPlugin.cs index 944285414d..e28cd928ba 100644 --- a/OpenSim/Region/PhysicsModules/BulletS/BSPlugin.cs +++ b/OpenSim/Region/PhysicsModules/BulletS/BSPlugin.cs @@ -27,10 +27,10 @@ using System; using System.Collections.Generic; using OpenSim.Framework; -using OpenSim.Region.Physics.Manager; +using OpenSim.Region.PhysicsModule.SharedBase; using OpenMetaverse; -namespace OpenSim.Region.Physics.BulletSPlugin +namespace OpenSim.Region.PhysicsModule.BulletS { /// /// Entry for a port of Bullet (http://bulletphysics.org/) to OpenSim. diff --git a/OpenSim/Region/PhysicsModules/BulletS/BSPrim.cs b/OpenSim/Region/PhysicsModules/BulletS/BSPrim.cs index a00991f978..ab6aa5d565 100644 --- a/OpenSim/Region/PhysicsModules/BulletS/BSPrim.cs +++ b/OpenSim/Region/PhysicsModules/BulletS/BSPrim.cs @@ -32,11 +32,11 @@ using System.Xml; using log4net; using OMV = OpenMetaverse; using OpenSim.Framework; -using OpenSim.Region.Physics.Manager; -using OpenSim.Region.Physics.ConvexDecompositionDotNet; +using OpenSim.Region.PhysicsModule.SharedBase; +using OpenSim.Region.PhysicsModule.ConvexDecompositionDotNet; using OpenSim.Region.OptionalModules.Scripting; // for ExtendedPhysics -namespace OpenSim.Region.Physics.BulletSPlugin +namespace OpenSim.Region.PhysicsModule.BulletS { [Serializable] diff --git a/OpenSim/Region/PhysicsModules/BulletS/BSPrimDisplaced.cs b/OpenSim/Region/PhysicsModules/BulletS/BSPrimDisplaced.cs index 2eb144049f..6b234afa0f 100755 --- a/OpenSim/Region/PhysicsModules/BulletS/BSPrimDisplaced.cs +++ b/OpenSim/Region/PhysicsModules/BulletS/BSPrimDisplaced.cs @@ -31,11 +31,11 @@ using System.Reflection; using System.Runtime.InteropServices; using OpenMetaverse; using OpenSim.Framework; -using OpenSim.Region.Physics.Manager; +using OpenSim.Region.PhysicsModule.SharedBase; using OMV = OpenMetaverse; -namespace OpenSim.Region.Physics.BulletSPlugin +namespace OpenSim.Region.PhysicsModule.BulletS { public class BSPrimDisplaced : BSPrim { diff --git a/OpenSim/Region/PhysicsModules/BulletS/BSPrimLinkable.cs b/OpenSim/Region/PhysicsModules/BulletS/BSPrimLinkable.cs index 430d645566..91550cb39c 100755 --- a/OpenSim/Region/PhysicsModules/BulletS/BSPrimLinkable.cs +++ b/OpenSim/Region/PhysicsModules/BulletS/BSPrimLinkable.cs @@ -34,7 +34,7 @@ using OpenSim.Region.OptionalModules.Scripting; using OMV = OpenMetaverse; -namespace OpenSim.Region.Physics.BulletSPlugin +namespace OpenSim.Region.PhysicsModule.BulletS { public class BSPrimLinkable : BSPrimDisplaced { @@ -72,7 +72,7 @@ public class BSPrimLinkable : BSPrimDisplaced base.Destroy(); } - public override void link(Manager.PhysicsActor obj) + public override void link(SharedBase.PhysicsActor obj) { BSPrimLinkable parent = obj as BSPrimLinkable; if (parent != null) diff --git a/OpenSim/Region/PhysicsModules/BulletS/BSScene.cs b/OpenSim/Region/PhysicsModules/BulletS/BSScene.cs index 8a19944013..18a4a58370 100644 --- a/OpenSim/Region/PhysicsModules/BulletS/BSScene.cs +++ b/OpenSim/Region/PhysicsModules/BulletS/BSScene.cs @@ -36,12 +36,12 @@ using OpenSim.Framework.Monitoring; using OpenSim.Region.Framework; using OpenSim.Region.CoreModules; using Logging = OpenSim.Region.CoreModules.Framework.Statistics.Logging; -using OpenSim.Region.Physics.Manager; +using OpenSim.Region.PhysicsModule.SharedBase; using Nini.Config; using log4net; using OpenMetaverse; -namespace OpenSim.Region.Physics.BulletSPlugin +namespace OpenSim.Region.PhysicsModule.BulletS { public sealed class BSScene : PhysicsScene, IPhysicsParameters { diff --git a/OpenSim/Region/PhysicsModules/BulletS/BSShapeCollection.cs b/OpenSim/Region/PhysicsModules/BulletS/BSShapeCollection.cs index d1de844e96..8dba3e4458 100755 --- a/OpenSim/Region/PhysicsModules/BulletS/BSShapeCollection.cs +++ b/OpenSim/Region/PhysicsModules/BulletS/BSShapeCollection.cs @@ -29,10 +29,10 @@ using System.Collections.Generic; using System.Text; using OMV = OpenMetaverse; using OpenSim.Framework; -using OpenSim.Region.Physics.Manager; -using OpenSim.Region.Physics.ConvexDecompositionDotNet; +using OpenSim.Region.PhysicsModule.SharedBase; +using OpenSim.Region.PhysicsModule.ConvexDecompositionDotNet; -namespace OpenSim.Region.Physics.BulletSPlugin +namespace OpenSim.Region.PhysicsModule.BulletS { public sealed class BSShapeCollection : IDisposable { diff --git a/OpenSim/Region/PhysicsModules/BulletS/BSShapes.cs b/OpenSim/Region/PhysicsModules/BulletS/BSShapes.cs index 86d86cb0ee..d8189e0ceb 100755 --- a/OpenSim/Region/PhysicsModules/BulletS/BSShapes.cs +++ b/OpenSim/Region/PhysicsModules/BulletS/BSShapes.cs @@ -30,13 +30,13 @@ using System.Collections.Generic; using System.Text; using OpenSim.Framework; -using OpenSim.Region.Physics.Manager; -using OpenSim.Region.Physics.Meshing; -using OpenSim.Region.Physics.ConvexDecompositionDotNet; +using OpenSim.Region.PhysicsModule.SharedBase; +using OpenSim.Region.PhysicsModule.Meshing; +using OpenSim.Region.PhysicsModule.ConvexDecompositionDotNet; using OMV = OpenMetaverse; -namespace OpenSim.Region.Physics.BulletSPlugin +namespace OpenSim.Region.PhysicsModule.BulletS { // Information class that holds stats for the shape. Which values mean // something depends on the type of shape. diff --git a/OpenSim/Region/PhysicsModules/BulletS/BSTerrainHeightmap.cs b/OpenSim/Region/PhysicsModules/BulletS/BSTerrainHeightmap.cs index d70b2fbfaf..7704d1fc53 100755 --- a/OpenSim/Region/PhysicsModules/BulletS/BSTerrainHeightmap.cs +++ b/OpenSim/Region/PhysicsModules/BulletS/BSTerrainHeightmap.cs @@ -31,14 +31,14 @@ using System.Text; using OpenSim.Framework; using OpenSim.Region.Framework; using OpenSim.Region.CoreModules; -using OpenSim.Region.Physics.Manager; +using OpenSim.Region.PhysicsModule.SharedBase; using Nini.Config; using log4net; using OpenMetaverse; -namespace OpenSim.Region.Physics.BulletSPlugin +namespace OpenSim.Region.PhysicsModule.BulletS { public sealed class BSTerrainHeightmap : BSTerrainPhys { diff --git a/OpenSim/Region/PhysicsModules/BulletS/BSTerrainManager.cs b/OpenSim/Region/PhysicsModules/BulletS/BSTerrainManager.cs index 50f917a485..6e686cec20 100755 --- a/OpenSim/Region/PhysicsModules/BulletS/BSTerrainManager.cs +++ b/OpenSim/Region/PhysicsModules/BulletS/BSTerrainManager.cs @@ -31,14 +31,14 @@ using System.Text; using OpenSim.Framework; using OpenSim.Region.Framework; using OpenSim.Region.CoreModules; -using OpenSim.Region.Physics.Manager; +using OpenSim.Region.PhysicsModule.SharedBase; using Nini.Config; using log4net; using OpenMetaverse; -namespace OpenSim.Region.Physics.BulletSPlugin +namespace OpenSim.Region.PhysicsModule.BulletS { // The physical implementation of the terrain is wrapped in this class. diff --git a/OpenSim/Region/PhysicsModules/BulletS/BSTerrainMesh.cs b/OpenSim/Region/PhysicsModules/BulletS/BSTerrainMesh.cs index e4ca098b2d..4c3e33a50a 100755 --- a/OpenSim/Region/PhysicsModules/BulletS/BSTerrainMesh.cs +++ b/OpenSim/Region/PhysicsModules/BulletS/BSTerrainMesh.cs @@ -31,14 +31,14 @@ using System.Text; using OpenSim.Framework; using OpenSim.Region.Framework; using OpenSim.Region.CoreModules; -using OpenSim.Region.Physics.Manager; +using OpenSim.Region.PhysicsModule.SharedBase; using Nini.Config; using log4net; using OpenMetaverse; -namespace OpenSim.Region.Physics.BulletSPlugin +namespace OpenSim.Region.PhysicsModule.BulletS { public sealed class BSTerrainMesh : BSTerrainPhys { diff --git a/OpenSim/Region/PhysicsModules/BulletS/BulletSimData.cs b/OpenSim/Region/PhysicsModules/BulletS/BulletSimData.cs index 59324611d6..3329395274 100755 --- a/OpenSim/Region/PhysicsModules/BulletS/BulletSimData.cs +++ b/OpenSim/Region/PhysicsModules/BulletS/BulletSimData.cs @@ -29,7 +29,7 @@ using System.Collections.Generic; using System.Text; using OMV = OpenMetaverse; -namespace OpenSim.Region.Physics.BulletSPlugin +namespace OpenSim.Region.PhysicsModule.BulletS { // Classes to allow some type checking for the API // These hold pointers to allocated objects in the unmanaged space. diff --git a/OpenSim/Region/PhysicsModules/BulletS/Tests/BasicVehicles.cs b/OpenSim/Region/PhysicsModules/BulletS/Tests/BasicVehicles.cs index 48e74eb9d4..160ebb51fe 100755 --- a/OpenSim/Region/PhysicsModules/BulletS/Tests/BasicVehicles.cs +++ b/OpenSim/Region/PhysicsModules/BulletS/Tests/BasicVehicles.cs @@ -34,13 +34,13 @@ using NUnit.Framework; using log4net; using OpenSim.Framework; -using OpenSim.Region.Physics.BulletSPlugin; -using OpenSim.Region.Physics.Manager; +using OpenSim.Region.PhysicsModule.BulletS; +using OpenSim.Region.PhysicsModule.SharedBase; using OpenSim.Tests.Common; using OpenMetaverse; -namespace OpenSim.Region.Physics.BulletSPlugin.Tests +namespace OpenSim.Region.PhysicsModule.BulletS.Tests { [TestFixture] public class BasicVehicles : OpenSimTestCase diff --git a/OpenSim/Region/PhysicsModules/BulletS/Tests/BulletSimTests.cs b/OpenSim/Region/PhysicsModules/BulletS/Tests/BulletSimTests.cs index 35cbc1d3d1..0be1f4ce6b 100755 --- a/OpenSim/Region/PhysicsModules/BulletS/Tests/BulletSimTests.cs +++ b/OpenSim/Region/PhysicsModules/BulletS/Tests/BulletSimTests.cs @@ -35,7 +35,7 @@ using log4net; using OpenSim.Tests.Common; -namespace OpenSim.Region.Physics.BulletSPlugin.Tests +namespace OpenSim.Region.PhysicsModule.BulletS.Tests { [TestFixture] public class BulletSimTests : OpenSimTestCase diff --git a/OpenSim/Region/PhysicsModules/BulletS/Tests/BulletSimTestsUtil.cs b/OpenSim/Region/PhysicsModules/BulletS/Tests/BulletSimTestsUtil.cs index 775bca213c..173e20d314 100755 --- a/OpenSim/Region/PhysicsModules/BulletS/Tests/BulletSimTestsUtil.cs +++ b/OpenSim/Region/PhysicsModules/BulletS/Tests/BulletSimTestsUtil.cs @@ -33,12 +33,12 @@ using System.Text; using Nini.Config; using OpenSim.Framework; -using OpenSim.Region.Physics.Manager; -using OpenSim.Region.Physics.Meshing; +using OpenSim.Region.PhysicsModule.SharedBase; +using OpenSim.Region.PhysicsModule.Meshing; using OpenMetaverse; -namespace OpenSim.Region.Physics.BulletSPlugin.Tests +namespace OpenSim.Region.PhysicsModule.BulletS.Tests { // Utility functions for building up and tearing down the sample physics environments public static class BulletSimTestsUtil diff --git a/OpenSim/Region/PhysicsModules/BulletS/Tests/HullCreation.cs b/OpenSim/Region/PhysicsModules/BulletS/Tests/HullCreation.cs index 5a5de110b4..69078f2ebf 100644 --- a/OpenSim/Region/PhysicsModules/BulletS/Tests/HullCreation.cs +++ b/OpenSim/Region/PhysicsModules/BulletS/Tests/HullCreation.cs @@ -34,13 +34,13 @@ using NUnit.Framework; using log4net; using OpenSim.Framework; -using OpenSim.Region.Physics.BulletSPlugin; -using OpenSim.Region.Physics.Manager; +using OpenSim.Region.PhysicsModule.BulletS; +using OpenSim.Region.PhysicsModule.SharedBase; using OpenSim.Tests.Common; using OpenMetaverse; -namespace OpenSim.Region.Physics.BulletSPlugin.Tests +namespace OpenSim.Region.PhysicsModule.BulletS.Tests { [TestFixture] public class HullCreation : OpenSimTestCase diff --git a/OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/CTri.cs b/OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/CTri.cs index 4d84c44704..7ad689e7a1 100644 --- a/OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/CTri.cs +++ b/OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/CTri.cs @@ -28,7 +28,7 @@ using System; using System.Collections.Generic; -namespace OpenSim.Region.Physics.ConvexDecompositionDotNet +namespace OpenSim.Region.PhysicsModule.ConvexDecompositionDotNet { public class Wpoint { diff --git a/OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/Concavity.cs b/OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/Concavity.cs index cc6383a9c6..4140d250d1 100644 --- a/OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/Concavity.cs +++ b/OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/Concavity.cs @@ -29,7 +29,7 @@ using System; using System.Collections.Generic; using System.Text; -namespace OpenSim.Region.Physics.ConvexDecompositionDotNet +namespace OpenSim.Region.PhysicsModule.ConvexDecompositionDotNet { public static class Concavity { diff --git a/OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/ConvexBuilder.cs b/OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/ConvexBuilder.cs index dfaede1176..70c3a2bf6c 100644 --- a/OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/ConvexBuilder.cs +++ b/OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/ConvexBuilder.cs @@ -29,7 +29,7 @@ using System; using System.Collections.Generic; using System.Diagnostics; -namespace OpenSim.Region.Physics.ConvexDecompositionDotNet +namespace OpenSim.Region.PhysicsModule.ConvexDecompositionDotNet { public class DecompDesc { diff --git a/OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/ConvexDecomposition.cs b/OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/ConvexDecomposition.cs index 2e2bb70c7a..5046bce62e 100644 --- a/OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/ConvexDecomposition.cs +++ b/OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/ConvexDecomposition.cs @@ -29,7 +29,7 @@ using System; using System.Collections.Generic; using System.Diagnostics; -namespace OpenSim.Region.Physics.ConvexDecompositionDotNet +namespace OpenSim.Region.PhysicsModule.ConvexDecompositionDotNet { public delegate void ConvexDecompositionCallback(ConvexResult result); diff --git a/OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/ConvexResult.cs b/OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/ConvexResult.cs index 87758b5971..44e3e50940 100644 --- a/OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/ConvexResult.cs +++ b/OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/ConvexResult.cs @@ -28,7 +28,7 @@ using System; using System.Collections.Generic; -namespace OpenSim.Region.Physics.ConvexDecompositionDotNet +namespace OpenSim.Region.PhysicsModule.ConvexDecompositionDotNet { public class ConvexResult { diff --git a/OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/HullClasses.cs b/OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/HullClasses.cs index d81df262ae..8a0164e7b8 100644 --- a/OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/HullClasses.cs +++ b/OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/HullClasses.cs @@ -28,7 +28,7 @@ using System; using System.Collections.Generic; -namespace OpenSim.Region.Physics.ConvexDecompositionDotNet +namespace OpenSim.Region.PhysicsModule.ConvexDecompositionDotNet { public class HullResult { diff --git a/OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/HullTriangle.cs b/OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/HullTriangle.cs index 1119a75e91..d3f0052e36 100644 --- a/OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/HullTriangle.cs +++ b/OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/HullTriangle.cs @@ -29,7 +29,7 @@ using System; using System.Collections.Generic; using System.Diagnostics; -namespace OpenSim.Region.Physics.ConvexDecompositionDotNet +namespace OpenSim.Region.PhysicsModule.ConvexDecompositionDotNet { public class HullTriangle : int3 { diff --git a/OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/HullUtils.cs b/OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/HullUtils.cs index c9ccfe2c61..390325465d 100644 --- a/OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/HullUtils.cs +++ b/OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/HullUtils.cs @@ -29,7 +29,7 @@ using System; using System.Collections.Generic; using System.Diagnostics; -namespace OpenSim.Region.Physics.ConvexDecompositionDotNet +namespace OpenSim.Region.PhysicsModule.ConvexDecompositionDotNet { public static class HullUtils { diff --git a/OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/Plane.cs b/OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/Plane.cs index d099676208..da9ae0cb8a 100644 --- a/OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/Plane.cs +++ b/OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/Plane.cs @@ -27,7 +27,7 @@ using System; -namespace OpenSim.Region.Physics.ConvexDecompositionDotNet +namespace OpenSim.Region.PhysicsModule.ConvexDecompositionDotNet { public class Plane { diff --git a/OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/PlaneTri.cs b/OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/PlaneTri.cs index 31f0182520..42f7a229d6 100644 --- a/OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/PlaneTri.cs +++ b/OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/PlaneTri.cs @@ -29,7 +29,7 @@ using System; using System.Collections.Generic; using System.Diagnostics; -namespace OpenSim.Region.Physics.ConvexDecompositionDotNet +namespace OpenSim.Region.PhysicsModule.ConvexDecompositionDotNet { public enum PlaneTriResult : int { diff --git a/OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/Quaternion.cs b/OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/Quaternion.cs index 0ba8f17a9c..045f62075c 100644 --- a/OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/Quaternion.cs +++ b/OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/Quaternion.cs @@ -27,7 +27,7 @@ using System; -namespace OpenSim.Region.Physics.ConvexDecompositionDotNet +namespace OpenSim.Region.PhysicsModule.ConvexDecompositionDotNet { public class Quaternion : float4 { diff --git a/OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/SplitPlane.cs b/OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/SplitPlane.cs index 9f06a9a23f..9f56bc5f48 100644 --- a/OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/SplitPlane.cs +++ b/OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/SplitPlane.cs @@ -28,7 +28,7 @@ using System; using System.Collections.Generic; -namespace OpenSim.Region.Physics.ConvexDecompositionDotNet +namespace OpenSim.Region.PhysicsModule.ConvexDecompositionDotNet { public class Rect3d { diff --git a/OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/VertexLookup.cs b/OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/VertexLookup.cs index 6f17c9f711..bfe11e5824 100644 --- a/OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/VertexLookup.cs +++ b/OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/VertexLookup.cs @@ -28,7 +28,7 @@ using System; using System.Collections.Generic; -namespace OpenSim.Region.Physics.ConvexDecompositionDotNet +namespace OpenSim.Region.PhysicsModule.ConvexDecompositionDotNet { public class VertexPool { diff --git a/OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/float2.cs b/OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/float2.cs index ce88fc826e..e7358c1599 100644 --- a/OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/float2.cs +++ b/OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/float2.cs @@ -27,7 +27,7 @@ using System; -namespace OpenSim.Region.Physics.ConvexDecompositionDotNet +namespace OpenSim.Region.PhysicsModule.ConvexDecompositionDotNet { public class float2 { diff --git a/OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/float3.cs b/OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/float3.cs index 4389114848..fde9b32224 100644 --- a/OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/float3.cs +++ b/OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/float3.cs @@ -27,7 +27,7 @@ using System; -namespace OpenSim.Region.Physics.ConvexDecompositionDotNet +namespace OpenSim.Region.PhysicsModule.ConvexDecompositionDotNet { public class float3 : IEquatable { diff --git a/OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/float3x3.cs b/OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/float3x3.cs index 76cf06347a..c420fde85f 100644 --- a/OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/float3x3.cs +++ b/OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/float3x3.cs @@ -29,7 +29,7 @@ using System; using System.Collections.Generic; using System.Diagnostics; -namespace OpenSim.Region.Physics.ConvexDecompositionDotNet +namespace OpenSim.Region.PhysicsModule.ConvexDecompositionDotNet { public class float3x3 { diff --git a/OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/float4.cs b/OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/float4.cs index fa6087679f..b2b6fd3949 100644 --- a/OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/float4.cs +++ b/OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/float4.cs @@ -27,7 +27,7 @@ using System; -namespace OpenSim.Region.Physics.ConvexDecompositionDotNet +namespace OpenSim.Region.PhysicsModule.ConvexDecompositionDotNet { public class float4 { diff --git a/OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/float4x4.cs b/OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/float4x4.cs index 7d1592f00c..087eba75dd 100644 --- a/OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/float4x4.cs +++ b/OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/float4x4.cs @@ -30,7 +30,7 @@ using System.Collections.Generic; using System.Linq; using System.Text; -namespace OpenSim.Region.Physics.ConvexDecompositionDotNet +namespace OpenSim.Region.PhysicsModule.ConvexDecompositionDotNet { public class float4x4 { diff --git a/OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/int3.cs b/OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/int3.cs index 9c5760d7e9..90624eb0f6 100644 --- a/OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/int3.cs +++ b/OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/int3.cs @@ -27,7 +27,7 @@ using System; -namespace OpenSim.Region.Physics.ConvexDecompositionDotNet +namespace OpenSim.Region.PhysicsModule.ConvexDecompositionDotNet { public class int3 { diff --git a/OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/int4.cs b/OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/int4.cs index c2b32e5a4d..e9320c082e 100644 --- a/OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/int4.cs +++ b/OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/int4.cs @@ -27,7 +27,7 @@ using System; -namespace OpenSim.Region.Physics.ConvexDecompositionDotNet +namespace OpenSim.Region.PhysicsModule.ConvexDecompositionDotNet { public class int4 { diff --git a/OpenSim/Region/PhysicsModules/Meshing/HelperTypes.cs b/OpenSim/Region/PhysicsModules/Meshing/HelperTypes.cs index 8cd8dcf6ff..2f857ee661 100644 --- a/OpenSim/Region/PhysicsModules/Meshing/HelperTypes.cs +++ b/OpenSim/Region/PhysicsModules/Meshing/HelperTypes.cs @@ -30,8 +30,8 @@ using System.Collections.Generic; using System.Diagnostics; using System.Globalization; using OpenMetaverse; -using OpenSim.Region.Physics.Manager; -using OpenSim.Region.Physics.Meshing; +using OpenSim.Region.PhysicsModule.SharedBase; +using OpenSim.Region.PhysicsModule.Meshing; public class Vertex : IComparable { diff --git a/OpenSim/Region/PhysicsModules/Meshing/Mesh.cs b/OpenSim/Region/PhysicsModules/Meshing/Mesh.cs index bd8e3063aa..1a8574e59a 100644 --- a/OpenSim/Region/PhysicsModules/Meshing/Mesh.cs +++ b/OpenSim/Region/PhysicsModules/Meshing/Mesh.cs @@ -29,11 +29,11 @@ using System; using System.Collections.Generic; using System.IO; using System.Runtime.InteropServices; -using OpenSim.Region.Physics.Manager; +using OpenSim.Region.PhysicsModule.SharedBase; using PrimMesher; using OpenMetaverse; -namespace OpenSim.Region.Physics.Meshing +namespace OpenSim.Region.PhysicsModule.Meshing { public class Mesh : IMesh { diff --git a/OpenSim/Region/PhysicsModules/Meshing/Meshmerizer.cs b/OpenSim/Region/PhysicsModules/Meshing/Meshmerizer.cs index 42231b5ec1..c885665589 100644 --- a/OpenSim/Region/PhysicsModules/Meshing/Meshmerizer.cs +++ b/OpenSim/Region/PhysicsModules/Meshing/Meshmerizer.cs @@ -29,7 +29,7 @@ using System; using System.Collections.Generic; using OpenSim.Framework; -using OpenSim.Region.Physics.Manager; +using OpenSim.Region.PhysicsModule.SharedBase; using OpenMetaverse; using OpenMetaverse.StructuredData; using System.Drawing; @@ -41,7 +41,7 @@ using Nini.Config; using System.Reflection; using System.IO; -namespace OpenSim.Region.Physics.Meshing +namespace OpenSim.Region.PhysicsModule.Meshing { public class MeshmerizerPlugin : IMeshingPlugin { diff --git a/OpenSim/Region/PhysicsModules/Ode/ODECharacter.cs b/OpenSim/Region/PhysicsModules/Ode/ODECharacter.cs index 05eaf2aa68..048ca447ed 100644 --- a/OpenSim/Region/PhysicsModules/Ode/ODECharacter.cs +++ b/OpenSim/Region/PhysicsModules/Ode/ODECharacter.cs @@ -31,10 +31,10 @@ using System.Reflection; using OpenMetaverse; using Ode.NET; using OpenSim.Framework; -using OpenSim.Region.Physics.Manager; +using OpenSim.Region.PhysicsModule.SharedBase; using log4net; -namespace OpenSim.Region.Physics.OdePlugin +namespace OpenSim.Region.PhysicsModule.ODE { /// /// 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/PhysicsModules/Ode/ODEDynamics.cs b/OpenSim/Region/PhysicsModules/Ode/ODEDynamics.cs index 2342bfa141..0b0c8a984c 100644 --- a/OpenSim/Region/PhysicsModules/Ode/ODEDynamics.cs +++ b/OpenSim/Region/PhysicsModules/Ode/ODEDynamics.cs @@ -46,9 +46,9 @@ using log4net; using OpenMetaverse; using Ode.NET; using OpenSim.Framework; -using OpenSim.Region.Physics.Manager; +using OpenSim.Region.PhysicsModule.SharedBase; -namespace OpenSim.Region.Physics.OdePlugin +namespace OpenSim.Region.PhysicsModule.ODE { public class ODEDynamics { diff --git a/OpenSim/Region/PhysicsModules/Ode/ODEPrim.cs b/OpenSim/Region/PhysicsModules/Ode/ODEPrim.cs index f934b8a32a..d8849e7fc4 100644 --- a/OpenSim/Region/PhysicsModules/Ode/ODEPrim.cs +++ b/OpenSim/Region/PhysicsModules/Ode/ODEPrim.cs @@ -50,9 +50,9 @@ using log4net; using OpenMetaverse; using Ode.NET; using OpenSim.Framework; -using OpenSim.Region.Physics.Manager; +using OpenSim.Region.PhysicsModule.SharedBase; -namespace OpenSim.Region.Physics.OdePlugin +namespace OpenSim.Region.PhysicsModule.ODE { /// /// 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/PhysicsModules/Ode/ODERayCastRequestManager.cs b/OpenSim/Region/PhysicsModules/Ode/ODERayCastRequestManager.cs index 8d7d3b3ae9..2bcdcd4eb8 100644 --- a/OpenSim/Region/PhysicsModules/Ode/ODERayCastRequestManager.cs +++ b/OpenSim/Region/PhysicsModules/Ode/ODERayCastRequestManager.cs @@ -31,11 +31,11 @@ using System.Reflection; using System.Runtime.InteropServices; using System.Text; using OpenMetaverse; -using OpenSim.Region.Physics.Manager; +using OpenSim.Region.PhysicsModule.SharedBase; using Ode.NET; using log4net; -namespace OpenSim.Region.Physics.OdePlugin +namespace OpenSim.Region.PhysicsModule.ODE { /// /// Processes raycast requests as ODE is in a state to be able to do them. diff --git a/OpenSim/Region/PhysicsModules/Ode/OdePhysicsJoint.cs b/OpenSim/Region/PhysicsModules/Ode/OdePhysicsJoint.cs index b4a3c48650..5180583662 100644 --- a/OpenSim/Region/PhysicsModules/Ode/OdePhysicsJoint.cs +++ b/OpenSim/Region/PhysicsModules/Ode/OdePhysicsJoint.cs @@ -29,10 +29,10 @@ using System; using OpenMetaverse; using Ode.NET; using OpenSim.Framework; -using OpenSim.Region.Physics.Manager; -using OpenSim.Region.Physics.OdePlugin; +using OpenSim.Region.PhysicsModule.SharedBase; +using OpenSim.Region.PhysicsModule.ODE; -namespace OpenSim.Region.Physics.OdePlugin +namespace OpenSim.Region.PhysicsModule.ODE { class OdePhysicsJoint : PhysicsJoint { diff --git a/OpenSim/Region/PhysicsModules/Ode/OdePlugin.cs b/OpenSim/Region/PhysicsModules/Ode/OdePlugin.cs index 7e652fc022..c3e01dd01c 100644 --- a/OpenSim/Region/PhysicsModules/Ode/OdePlugin.cs +++ b/OpenSim/Region/PhysicsModules/Ode/OdePlugin.cs @@ -36,10 +36,10 @@ using log4net; using Nini.Config; using Ode.NET; using OpenSim.Framework; -using OpenSim.Region.Physics.Manager; +using OpenSim.Region.PhysicsModule.SharedBase; using OpenMetaverse; -namespace OpenSim.Region.Physics.OdePlugin +namespace OpenSim.Region.PhysicsModule.ODE { /// /// ODE plugin diff --git a/OpenSim/Region/PhysicsModules/Ode/OdeScene.cs b/OpenSim/Region/PhysicsModules/Ode/OdeScene.cs index 59535574d1..e30036b399 100644 --- a/OpenSim/Region/PhysicsModules/Ode/OdeScene.cs +++ b/OpenSim/Region/PhysicsModules/Ode/OdeScene.cs @@ -44,9 +44,9 @@ using OpenMetaverse; using Drawstuff.NET; #endif using OpenSim.Framework; -using OpenSim.Region.Physics.Manager; +using OpenSim.Region.PhysicsModule.SharedBase; -namespace OpenSim.Region.Physics.OdePlugin +namespace OpenSim.Region.PhysicsModule.ODE { public enum StatusIndicators : int { diff --git a/OpenSim/Region/PhysicsModules/Ode/Tests/ODETestClass.cs b/OpenSim/Region/PhysicsModules/Ode/Tests/ODETestClass.cs index 16404c69e4..09147b0299 100644 --- a/OpenSim/Region/PhysicsModules/Ode/Tests/ODETestClass.cs +++ b/OpenSim/Region/PhysicsModules/Ode/Tests/ODETestClass.cs @@ -30,20 +30,20 @@ using Nini.Config; using NUnit.Framework; using OpenMetaverse; using OpenSim.Framework; -using OpenSim.Region.Physics.Manager; -using OpenSim.Region.Physics.OdePlugin; +using OpenSim.Region.PhysicsModule.SharedBase; +using OpenSim.Region.PhysicsModule.ODE; using OpenSim.Tests.Common; using log4net; using System.Reflection; -namespace OpenSim.Region.Physics.OdePlugin.Tests +namespace OpenSim.Region.PhysicsModule.ODE.Tests { [TestFixture] public class ODETestClass : OpenSimTestCase { private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); - private OpenSim.Region.Physics.OdePlugin.OdePlugin cbt; + private OpenSim.Region.PhysicsModule.ODE.OdePlugin cbt; private PhysicsScene ps; private IMeshingPlugin imp; diff --git a/OpenSim/Region/PhysicsModules/POS/POSCharacter.cs b/OpenSim/Region/PhysicsModules/POS/POSCharacter.cs index 40ab984dc8..1dccbe714b 100644 --- a/OpenSim/Region/PhysicsModules/POS/POSCharacter.cs +++ b/OpenSim/Region/PhysicsModules/POS/POSCharacter.cs @@ -30,9 +30,9 @@ using System.Collections.Generic; using Nini.Config; using OpenMetaverse; using OpenSim.Framework; -using OpenSim.Region.Physics.Manager; +using OpenSim.Region.PhysicsModule.SharedBase; -namespace OpenSim.Region.Physics.POSPlugin +namespace OpenSim.Region.PhysicsModule.POS { public class POSCharacter : PhysicsActor { diff --git a/OpenSim/Region/PhysicsModules/POS/POSPlugin.cs b/OpenSim/Region/PhysicsModules/POS/POSPlugin.cs index ed086dd7ef..4bf58c1932 100644 --- a/OpenSim/Region/PhysicsModules/POS/POSPlugin.cs +++ b/OpenSim/Region/PhysicsModules/POS/POSPlugin.cs @@ -29,9 +29,9 @@ using System; using System.Collections.Generic; using Nini.Config; using OpenSim.Framework; -using OpenSim.Region.Physics.Manager; +using OpenSim.Region.PhysicsModule.SharedBase; -namespace OpenSim.Region.Physics.POSPlugin +namespace OpenSim.Region.PhysicsModule.POS { /// /// for now will be a very POS physics engine diff --git a/OpenSim/Region/PhysicsModules/POS/POSPrim.cs b/OpenSim/Region/PhysicsModules/POS/POSPrim.cs index 7c1e91597d..88a950223e 100644 --- a/OpenSim/Region/PhysicsModules/POS/POSPrim.cs +++ b/OpenSim/Region/PhysicsModules/POS/POSPrim.cs @@ -30,9 +30,9 @@ using System.Collections.Generic; using Nini.Config; using OpenMetaverse; using OpenSim.Framework; -using OpenSim.Region.Physics.Manager; +using OpenSim.Region.PhysicsModule.SharedBase; -namespace OpenSim.Region.Physics.POSPlugin +namespace OpenSim.Region.PhysicsModule.POS { public class POSPrim : PhysicsActor { diff --git a/OpenSim/Region/PhysicsModules/POS/POSScene.cs b/OpenSim/Region/PhysicsModules/POS/POSScene.cs index 080c6abcf5..8c3d5f51c2 100644 --- a/OpenSim/Region/PhysicsModules/POS/POSScene.cs +++ b/OpenSim/Region/PhysicsModules/POS/POSScene.cs @@ -30,9 +30,9 @@ using System.Collections.Generic; using Nini.Config; using OpenMetaverse; using OpenSim.Framework; -using OpenSim.Region.Physics.Manager; +using OpenSim.Region.PhysicsModule.SharedBase; -namespace OpenSim.Region.Physics.POSPlugin +namespace OpenSim.Region.PhysicsModule.POS { public class POSScene : PhysicsScene { diff --git a/OpenSim/Region/PhysicsModules/SharedBase/CollisionLocker.cs b/OpenSim/Region/PhysicsModules/SharedBase/CollisionLocker.cs index cace4e44cf..687c4ca66a 100644 --- a/OpenSim/Region/PhysicsModules/SharedBase/CollisionLocker.cs +++ b/OpenSim/Region/PhysicsModules/SharedBase/CollisionLocker.cs @@ -28,7 +28,7 @@ using System; using System.Collections.Generic; -namespace OpenSim.Region.Physics.Manager +namespace OpenSim.Region.PhysicsModule.SharedBase { public class CollisionLocker { diff --git a/OpenSim/Region/PhysicsModules/SharedBase/IMesher.cs b/OpenSim/Region/PhysicsModules/SharedBase/IMesher.cs index 2e7bb5d7a0..e6cb76e3c2 100644 --- a/OpenSim/Region/PhysicsModules/SharedBase/IMesher.cs +++ b/OpenSim/Region/PhysicsModules/SharedBase/IMesher.cs @@ -30,7 +30,7 @@ using System.Collections.Generic; using OpenSim.Framework; using OpenMetaverse; -namespace OpenSim.Region.Physics.Manager +namespace OpenSim.Region.PhysicsModule.SharedBase { public interface IMesher { diff --git a/OpenSim/Region/PhysicsModules/SharedBase/IPhysicsParameters.cs b/OpenSim/Region/PhysicsModules/SharedBase/IPhysicsParameters.cs index 31a397c7d4..da0054a3c1 100755 --- a/OpenSim/Region/PhysicsModules/SharedBase/IPhysicsParameters.cs +++ b/OpenSim/Region/PhysicsModules/SharedBase/IPhysicsParameters.cs @@ -30,7 +30,7 @@ using System.Collections.Generic; using OpenSim.Framework; using OpenMetaverse; -namespace OpenSim.Region.Physics.Manager +namespace OpenSim.Region.PhysicsModule.SharedBase { public struct PhysParameterEntry { diff --git a/OpenSim/Region/PhysicsModules/SharedBase/NullPhysicsScene.cs b/OpenSim/Region/PhysicsModules/SharedBase/NullPhysicsScene.cs index b52f1f62f7..d5fc9c6c30 100644 --- a/OpenSim/Region/PhysicsModules/SharedBase/NullPhysicsScene.cs +++ b/OpenSim/Region/PhysicsModules/SharedBase/NullPhysicsScene.cs @@ -32,7 +32,7 @@ using Nini.Config; using OpenSim.Framework; using OpenMetaverse; -namespace OpenSim.Region.Physics.Manager +namespace OpenSim.Region.PhysicsModule.SharedBase { class NullPhysicsScene : PhysicsScene { diff --git a/OpenSim/Region/PhysicsModules/SharedBase/PhysicsActor.cs b/OpenSim/Region/PhysicsModules/SharedBase/PhysicsActor.cs index 6bc6e23f8d..bfa6254abb 100644 --- a/OpenSim/Region/PhysicsModules/SharedBase/PhysicsActor.cs +++ b/OpenSim/Region/PhysicsModules/SharedBase/PhysicsActor.cs @@ -32,7 +32,7 @@ using System.Reflection; using OpenSim.Framework; using OpenMetaverse; -namespace OpenSim.Region.Physics.Manager +namespace OpenSim.Region.PhysicsModule.SharedBase { public delegate void PositionUpdate(Vector3 position); public delegate void VelocityUpdate(Vector3 velocity); diff --git a/OpenSim/Region/PhysicsModules/SharedBase/PhysicsJoint.cs b/OpenSim/Region/PhysicsModules/SharedBase/PhysicsJoint.cs index b685d04d19..8fc2638070 100644 --- a/OpenSim/Region/PhysicsModules/SharedBase/PhysicsJoint.cs +++ b/OpenSim/Region/PhysicsModules/SharedBase/PhysicsJoint.cs @@ -30,7 +30,7 @@ using System.Collections.Generic; using OpenSim.Framework; using OpenMetaverse; -namespace OpenSim.Region.Physics.Manager +namespace OpenSim.Region.PhysicsModule.SharedBase { public enum PhysicsJointType : int { diff --git a/OpenSim/Region/PhysicsModules/SharedBase/PhysicsPluginManager.cs b/OpenSim/Region/PhysicsModules/SharedBase/PhysicsPluginManager.cs index d8279b753a..d08b6ebd29 100644 --- a/OpenSim/Region/PhysicsModules/SharedBase/PhysicsPluginManager.cs +++ b/OpenSim/Region/PhysicsModules/SharedBase/PhysicsPluginManager.cs @@ -34,7 +34,7 @@ using log4net; using OpenSim.Framework; using OpenMetaverse; -namespace OpenSim.Region.Physics.Manager +namespace OpenSim.Region.PhysicsModule.SharedBase { /// /// Description of MyClass. diff --git a/OpenSim/Region/PhysicsModules/SharedBase/PhysicsScene.cs b/OpenSim/Region/PhysicsModules/SharedBase/PhysicsScene.cs index 9cdedbf4c9..be0d6f5b24 100644 --- a/OpenSim/Region/PhysicsModules/SharedBase/PhysicsScene.cs +++ b/OpenSim/Region/PhysicsModules/SharedBase/PhysicsScene.cs @@ -35,7 +35,7 @@ using Nini.Config; using OpenSim.Framework; using OpenMetaverse; -namespace OpenSim.Region.Physics.Manager +namespace OpenSim.Region.PhysicsModule.SharedBase { public delegate void physicsCrash(); diff --git a/OpenSim/Region/PhysicsModules/SharedBase/PhysicsSensor.cs b/OpenSim/Region/PhysicsModules/SharedBase/PhysicsSensor.cs index f480d7170a..f0bdd10d76 100644 --- a/OpenSim/Region/PhysicsModules/SharedBase/PhysicsSensor.cs +++ b/OpenSim/Region/PhysicsModules/SharedBase/PhysicsSensor.cs @@ -29,7 +29,7 @@ using System; using System.Timers; using OpenMetaverse; -namespace OpenSim.Region.Physics.Manager +namespace OpenSim.Region.PhysicsModule.SharedBase { [Flags] public enum SenseType : uint diff --git a/OpenSim/Region/PhysicsModules/SharedBase/PhysicsVector.cs b/OpenSim/Region/PhysicsModules/SharedBase/PhysicsVector.cs index f60a63638a..fba861b346 100644 --- a/OpenSim/Region/PhysicsModules/SharedBase/PhysicsVector.cs +++ b/OpenSim/Region/PhysicsModules/SharedBase/PhysicsVector.cs @@ -27,7 +27,7 @@ using System; -namespace OpenSim.Region.Physics.Manager +namespace OpenSim.Region.PhysicsModule.SharedBase { /*public class PhysicsVector { diff --git a/OpenSim/Region/PhysicsModules/SharedBase/VehicleConstants.cs b/OpenSim/Region/PhysicsModules/SharedBase/VehicleConstants.cs index f0775c1a8e..879e62a431 100644 --- a/OpenSim/Region/PhysicsModules/SharedBase/VehicleConstants.cs +++ b/OpenSim/Region/PhysicsModules/SharedBase/VehicleConstants.cs @@ -27,7 +27,7 @@ using System; -namespace OpenSim.Region.Physics.Manager +namespace OpenSim.Region.PhysicsModule.SharedBase { public enum Vehicle : int { diff --git a/OpenSim/Region/PhysicsModules/SharedBase/ZeroMesher.cs b/OpenSim/Region/PhysicsModules/SharedBase/ZeroMesher.cs index 270d2eca0c..c938252424 100644 --- a/OpenSim/Region/PhysicsModules/SharedBase/ZeroMesher.cs +++ b/OpenSim/Region/PhysicsModules/SharedBase/ZeroMesher.cs @@ -41,7 +41,7 @@ using Nini.Config; * it's always availabe and thus the default in case of configuration errors */ -namespace OpenSim.Region.Physics.Manager +namespace OpenSim.Region.PhysicsModule.SharedBase { public class ZeroMesherPlugin : IMeshingPlugin { diff --git a/OpenSim/Region/RegionCombinerModule/RegionCombinerModule.cs b/OpenSim/Region/RegionCombinerModule/RegionCombinerModule.cs index 0fe3ab01c8..695d72aeb4 100644 --- a/OpenSim/Region/RegionCombinerModule/RegionCombinerModule.cs +++ b/OpenSim/Region/RegionCombinerModule/RegionCombinerModule.cs @@ -36,7 +36,7 @@ using OpenSim.Framework.Client; using OpenSim.Region.Framework.Interfaces; using OpenSim.Region.Framework.Scenes; using OpenSim.Framework.Console; -using OpenSim.Region.Physics.Manager; +using OpenSim.Region.PhysicsModule.SharedBase; using Mono.Addins; namespace OpenSim.Region.RegionCombinerModule diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index 7719f070d4..5d50a639b7 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs @@ -51,7 +51,7 @@ using OpenSim.Region.Framework.Interfaces; using OpenSim.Region.Framework.Scenes; using OpenSim.Region.Framework.Scenes.Animation; using OpenSim.Region.Framework.Scenes.Scripting; -using OpenSim.Region.Physics.Manager; +using OpenSim.Region.PhysicsModule.SharedBase; using OpenSim.Region.ScriptEngine.Shared; using OpenSim.Region.ScriptEngine.Shared.Api.Plugins; using OpenSim.Region.ScriptEngine.Shared.ScriptBase; diff --git a/OpenSim/Tests/Common/Helpers/SceneHelpers.cs b/OpenSim/Tests/Common/Helpers/SceneHelpers.cs index 4f685b61cd..7ee4c94c3f 100644 --- a/OpenSim/Tests/Common/Helpers/SceneHelpers.cs +++ b/OpenSim/Tests/Common/Helpers/SceneHelpers.cs @@ -36,7 +36,7 @@ using OpenSim.Framework.Communications; using OpenSim.Framework.Console; using OpenSim.Framework.Servers; using OpenSim.Framework.Servers.HttpServer; -using OpenSim.Region.Physics.Manager; +using OpenSim.Region.PhysicsModule.SharedBase; using OpenSim.Region.Framework; using OpenSim.Region.Framework.Interfaces; using OpenSim.Region.Framework.Scenes; diff --git a/OpenSim/Tests/Common/Mock/TestScene.cs b/OpenSim/Tests/Common/Mock/TestScene.cs index bd36097111..8a9e279729 100644 --- a/OpenSim/Tests/Common/Mock/TestScene.cs +++ b/OpenSim/Tests/Common/Mock/TestScene.cs @@ -33,7 +33,7 @@ using OpenSim.Framework.Servers; using OpenSim.Region.Framework; using OpenSim.Region.Framework.Interfaces; using OpenSim.Region.Framework.Scenes; -using OpenSim.Region.Physics.Manager; +using OpenSim.Region.PhysicsModule.SharedBase; using OpenSim.Services.Interfaces; namespace OpenSim.Tests.Common From ce2c67876e0ebf4f84420696f660dc77d96dea6b Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Sun, 30 Aug 2015 21:05:36 -0700 Subject: [PATCH 04/32] More namespace and dll name changes. Still no functional changes. --- OpenSim/Region/Application/OpenSimBase.cs | 2 +- .../ClientStack/RegionApplicationBase.cs | 2 +- .../EntityTransfer/EntityTransferModule.cs | 2 +- .../EntityTransferStateMachine.cs | 2 +- .../CoreModules/World/Land/DwellModule.cs | 2 +- .../World/Land/LandManagementModule.cs | 2 +- .../World/Warp3DMap/Warp3DImageModule.cs | 2 +- .../Scenes/Animation/ScenePresenceAnimator.cs | 2 +- .../Region/Framework/Scenes/KeyframeMotion.cs | 2 +- .../Region/Framework/Scenes/Prioritizer.cs | 2 +- OpenSim/Region/Framework/Scenes/Scene.cs | 2 +- OpenSim/Region/Framework/Scenes/SceneGraph.cs | 2 +- .../Framework/Scenes/SceneObjectGroup.cs | 2 +- .../Framework/Scenes/SceneObjectPart.cs | 2 +- .../Region/Framework/Scenes/ScenePresence.cs | 2 +- .../Scenes/Serialization/SceneXmlLoader.cs | 2 +- .../Tests/ScenePresenceAnimationTests.cs | 2 +- .../PhysicsParameters/PhysicsParameters.cs | 2 +- .../ExtendedPhysics/ExtendedPhysics.cs | 2 +- .../Scripting/Minimodule/SOPObject.cs | 2 +- .../BasicPhysics/BasicPhysicsActor.cs | 4 +- .../BasicPhysics/BasicPhysicsPlugin.cs | 4 +- .../BasicPhysics/BasicPhysicsPrim.cs | 4 +- .../BasicPhysics/BasicPhysicsScene.cs | 4 +- .../BulletS/BSActorAvatarMove.cs | 2 +- .../PhysicsModules/BulletS/BSActorHover.cs | 2 +- .../BulletS/BSActorMoveToTarget.cs | 2 +- .../PhysicsModules/BulletS/BSActorSetForce.cs | 2 +- .../BulletS/BSActorSetTorque.cs | 2 +- .../PhysicsModules/BulletS/BSCharacter.cs | 2 +- .../PhysicsModules/BulletS/BSDynamics.cs | 2 +- .../Region/PhysicsModules/BulletS/BSParam.cs | 2 +- .../PhysicsModules/BulletS/BSPhysObject.cs | 2 +- .../Region/PhysicsModules/BulletS/BSPlugin.cs | 2 +- .../Region/PhysicsModules/BulletS/BSPrim.cs | 2 +- .../PhysicsModules/BulletS/BSPrimDisplaced.cs | 2 +- .../PhysicsModules/BulletS/BSPrimLinkable.cs | 2 +- .../Region/PhysicsModules/BulletS/BSScene.cs | 2 +- .../BulletS/BSShapeCollection.cs | 2 +- .../Region/PhysicsModules/BulletS/BSShapes.cs | 2 +- .../BulletS/BSTerrainHeightmap.cs | 2 +- .../BulletS/BSTerrainManager.cs | 2 +- .../PhysicsModules/BulletS/BSTerrainMesh.cs | 2 +- .../BulletS/Tests/BasicVehicles.cs | 2 +- .../BulletS/Tests/BulletSimTestsUtil.cs | 2 +- .../BulletS/Tests/HullCreation.cs | 2 +- .../PhysicsModules/Meshing/HelperTypes.cs | 2 +- OpenSim/Region/PhysicsModules/Meshing/Mesh.cs | 2 +- .../PhysicsModules/Meshing/Meshmerizer.cs | 2 +- .../Region/PhysicsModules/Ode/ODECharacter.cs | 2 +- .../Region/PhysicsModules/Ode/ODEDynamics.cs | 2 +- OpenSim/Region/PhysicsModules/Ode/ODEPrim.cs | 2 +- .../Ode/ODERayCastRequestManager.cs | 2 +- .../PhysicsModules/Ode/OdePhysicsJoint.cs | 2 +- .../Region/PhysicsModules/Ode/OdePlugin.cs | 2 +- OpenSim/Region/PhysicsModules/Ode/OdeScene.cs | 2 +- .../PhysicsModules/Ode/Tests/ODETestClass.cs | 2 +- .../Region/PhysicsModules/POS/POSCharacter.cs | 2 +- .../Region/PhysicsModules/POS/POSPlugin.cs | 2 +- OpenSim/Region/PhysicsModules/POS/POSPrim.cs | 2 +- OpenSim/Region/PhysicsModules/POS/POSScene.cs | 2 +- .../SharedBase/CollisionLocker.cs | 2 +- .../PhysicsModules/SharedBase/IMesher.cs | 2 +- .../SharedBase/IPhysicsParameters.cs | 2 +- .../SharedBase/NullPhysicsScene.cs | 2 +- .../PhysicsModules/SharedBase/PhysicsActor.cs | 2 +- .../PhysicsModules/SharedBase/PhysicsJoint.cs | 2 +- .../SharedBase/PhysicsPluginManager.cs | 6 +-- .../PhysicsModules/SharedBase/PhysicsScene.cs | 2 +- .../SharedBase/PhysicsSensor.cs | 2 +- .../SharedBase/PhysicsVector.cs | 2 +- .../SharedBase/VehicleConstants.cs | 2 +- .../PhysicsModules/SharedBase/ZeroMesher.cs | 2 +- .../RegionCombinerModule.cs | 2 +- .../Shared/Api/Implementation/LSL_Api.cs | 2 +- OpenSim/Tests/Common/Helpers/SceneHelpers.cs | 4 +- OpenSim/Tests/Common/Mock/TestScene.cs | 2 +- prebuild.xml | 44 +++++++++---------- 78 files changed, 106 insertions(+), 106 deletions(-) diff --git a/OpenSim/Region/Application/OpenSimBase.cs b/OpenSim/Region/Application/OpenSimBase.cs index f26355629e..68fba972d9 100644 --- a/OpenSim/Region/Application/OpenSimBase.cs +++ b/OpenSim/Region/Application/OpenSimBase.cs @@ -46,7 +46,7 @@ using OpenSim.Region.CoreModules.ServiceConnectorsOut.UserAccounts; using OpenSim.Region.Framework; using OpenSim.Region.Framework.Interfaces; using OpenSim.Region.Framework.Scenes; -using OpenSim.Region.PhysicsModule.SharedBase; +using OpenSim.Region.PhysicsModules.SharedBase; using OpenSim.Server.Base; using OpenSim.Services.Base; using OpenSim.Services.Interfaces; diff --git a/OpenSim/Region/ClientStack/RegionApplicationBase.cs b/OpenSim/Region/ClientStack/RegionApplicationBase.cs index b08bf4d616..374e34d8e4 100644 --- a/OpenSim/Region/ClientStack/RegionApplicationBase.cs +++ b/OpenSim/Region/ClientStack/RegionApplicationBase.cs @@ -38,7 +38,7 @@ using OpenSim.Framework.Servers.HttpServer; using OpenSim.Region.Framework; using OpenSim.Region.Framework.Interfaces; using OpenSim.Region.Framework.Scenes; -using OpenSim.Region.PhysicsModule.SharedBase; +using OpenSim.Region.PhysicsModules.SharedBase; using OpenSim.Services.Interfaces; namespace OpenSim.Region.ClientStack diff --git a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs index 371b4f2925..f3acff2d1c 100644 --- a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs +++ b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs @@ -36,7 +36,7 @@ using OpenSim.Framework.Client; using OpenSim.Framework.Monitoring; using OpenSim.Region.Framework.Interfaces; using OpenSim.Region.Framework.Scenes; -using OpenSim.Region.PhysicsModule.SharedBase; +using OpenSim.Region.PhysicsModules.SharedBase; using OpenSim.Services.Interfaces; using GridRegion = OpenSim.Services.Interfaces.GridRegion; diff --git a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferStateMachine.cs b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferStateMachine.cs index 0f57aeeed4..a3109e0459 100644 --- a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferStateMachine.cs +++ b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferStateMachine.cs @@ -38,7 +38,7 @@ using OpenSim.Framework.Capabilities; using OpenSim.Framework.Client; using OpenSim.Region.Framework.Interfaces; using OpenSim.Region.Framework.Scenes; -using OpenSim.Region.PhysicsModule.SharedBase; +using OpenSim.Region.PhysicsModules.SharedBase; using OpenSim.Services.Interfaces; using GridRegion = OpenSim.Services.Interfaces.GridRegion; diff --git a/OpenSim/Region/CoreModules/World/Land/DwellModule.cs b/OpenSim/Region/CoreModules/World/Land/DwellModule.cs index bfa032045a..70c6028176 100644 --- a/OpenSim/Region/CoreModules/World/Land/DwellModule.cs +++ b/OpenSim/Region/CoreModules/World/Land/DwellModule.cs @@ -45,7 +45,7 @@ using OpenSim.Framework.Servers.HttpServer; using OpenSim.Region.CoreModules.Framework.InterfaceCommander; using OpenSim.Region.Framework.Interfaces; using OpenSim.Region.Framework.Scenes; -using OpenSim.Region.PhysicsModule.SharedBase; +using OpenSim.Region.PhysicsModules.SharedBase; using OpenSim.Services.Interfaces; using Caps = OpenSim.Framework.Capabilities.Caps; using GridRegion = OpenSim.Services.Interfaces.GridRegion; diff --git a/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs b/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs index f467e2ab27..92f6c1b8ef 100644 --- a/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs +++ b/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs @@ -44,7 +44,7 @@ using OpenSim.Framework.Servers; using OpenSim.Framework.Servers.HttpServer; using OpenSim.Region.Framework.Interfaces; using OpenSim.Region.Framework.Scenes; -using OpenSim.Region.PhysicsModule.SharedBase; +using OpenSim.Region.PhysicsModules.SharedBase; using OpenSim.Services.Interfaces; using Caps = OpenSim.Framework.Capabilities.Caps; using GridRegion = OpenSim.Services.Interfaces.GridRegion; diff --git a/OpenSim/Region/CoreModules/World/Warp3DMap/Warp3DImageModule.cs b/OpenSim/Region/CoreModules/World/Warp3DMap/Warp3DImageModule.cs index a97075572b..5f2534b146 100644 --- a/OpenSim/Region/CoreModules/World/Warp3DMap/Warp3DImageModule.cs +++ b/OpenSim/Region/CoreModules/World/Warp3DMap/Warp3DImageModule.cs @@ -41,7 +41,7 @@ using Mono.Addins; using OpenSim.Framework; using OpenSim.Region.Framework.Interfaces; using OpenSim.Region.Framework.Scenes; -using OpenSim.Region.PhysicsModule.SharedBase; +using OpenSim.Region.PhysicsModules.SharedBase; using OpenSim.Services.Interfaces; using OpenMetaverse; diff --git a/OpenSim/Region/Framework/Scenes/Animation/ScenePresenceAnimator.cs b/OpenSim/Region/Framework/Scenes/Animation/ScenePresenceAnimator.cs index b6f2d3dd35..6d51029e84 100644 --- a/OpenSim/Region/Framework/Scenes/Animation/ScenePresenceAnimator.cs +++ b/OpenSim/Region/Framework/Scenes/Animation/ScenePresenceAnimator.cs @@ -35,7 +35,7 @@ using OpenMetaverse; using OpenSim.Framework; using OpenSim.Region.Framework.Interfaces; using OpenSim.Region.Framework.Scenes; -using OpenSim.Region.PhysicsModule.SharedBase; +using OpenSim.Region.PhysicsModules.SharedBase; namespace OpenSim.Region.Framework.Scenes.Animation { diff --git a/OpenSim/Region/Framework/Scenes/KeyframeMotion.cs b/OpenSim/Region/Framework/Scenes/KeyframeMotion.cs index 103386c822..bbf3b51613 100644 --- a/OpenSim/Region/Framework/Scenes/KeyframeMotion.cs +++ b/OpenSim/Region/Framework/Scenes/KeyframeMotion.cs @@ -36,7 +36,7 @@ using System.Threading; using OpenMetaverse; using OpenSim.Framework; using OpenSim.Region.Framework.Interfaces; -using OpenSim.Region.PhysicsModule.SharedBase; +using OpenSim.Region.PhysicsModules.SharedBase; using OpenSim.Region.Framework.Scenes.Serialization; using System.Runtime.Serialization.Formatters.Binary; using System.Runtime.Serialization; diff --git a/OpenSim/Region/Framework/Scenes/Prioritizer.cs b/OpenSim/Region/Framework/Scenes/Prioritizer.cs index 2ca24651b6..ae85560634 100644 --- a/OpenSim/Region/Framework/Scenes/Prioritizer.cs +++ b/OpenSim/Region/Framework/Scenes/Prioritizer.cs @@ -31,7 +31,7 @@ using log4net; using Nini.Config; using OpenSim.Framework; using OpenMetaverse; -using OpenSim.Region.PhysicsModule.SharedBase; +using OpenSim.Region.PhysicsModules.SharedBase; /* * Steps to add a new prioritization policy: diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index 86a57721fc..09a0a6b501 100755 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs @@ -47,7 +47,7 @@ using OpenSim.Framework.Console; using OpenSim.Region.Framework.Interfaces; using OpenSim.Region.Framework.Scenes.Scripting; using OpenSim.Region.Framework.Scenes.Serialization; -using OpenSim.Region.PhysicsModule.SharedBase; +using OpenSim.Region.PhysicsModules.SharedBase; using Timer = System.Timers.Timer; using TPFlags = OpenSim.Framework.Constants.TeleportFlags; using GridRegion = OpenSim.Services.Interfaces.GridRegion; diff --git a/OpenSim/Region/Framework/Scenes/SceneGraph.cs b/OpenSim/Region/Framework/Scenes/SceneGraph.cs index 96488104bc..eea0fff1fa 100755 --- a/OpenSim/Region/Framework/Scenes/SceneGraph.cs +++ b/OpenSim/Region/Framework/Scenes/SceneGraph.cs @@ -34,7 +34,7 @@ using OpenMetaverse.Packets; using log4net; using OpenSim.Framework; using OpenSim.Region.Framework.Scenes.Types; -using OpenSim.Region.PhysicsModule.SharedBase; +using OpenSim.Region.PhysicsModules.SharedBase; using OpenSim.Region.Framework.Interfaces; namespace OpenSim.Region.Framework.Scenes diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs index 3be6ad2a6a..1c4b77a124 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs @@ -38,7 +38,7 @@ using OpenMetaverse; using OpenMetaverse.Packets; using OpenSim.Framework; using OpenSim.Region.Framework.Interfaces; -using OpenSim.Region.PhysicsModule.SharedBase; +using OpenSim.Region.PhysicsModules.SharedBase; using OpenSim.Region.Framework.Scenes.Serialization; using PermissionMask = OpenSim.Framework.PermissionMask; diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs index dae8c547b6..25aa83f983 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs @@ -42,7 +42,7 @@ using OpenSim.Framework; using OpenSim.Region.Framework.Interfaces; using OpenSim.Region.Framework.Scenes.Scripting; using OpenSim.Region.Framework.Scenes.Serialization; -using OpenSim.Region.PhysicsModule.SharedBase; +using OpenSim.Region.PhysicsModules.SharedBase; using PermissionMask = OpenSim.Framework.PermissionMask; namespace OpenSim.Region.Framework.Scenes diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index d8c6c9446a..1fddd91dfb 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs @@ -41,7 +41,7 @@ using OpenSim.Framework.Monitoring; using OpenSim.Region.Framework.Interfaces; using OpenSim.Region.Framework.Scenes.Animation; using OpenSim.Region.Framework.Scenes.Types; -using OpenSim.Region.PhysicsModule.SharedBase; +using OpenSim.Region.PhysicsModules.SharedBase; using GridRegion = OpenSim.Services.Interfaces.GridRegion; using OpenSim.Services.Interfaces; using TeleportFlags = OpenSim.Framework.Constants.TeleportFlags; diff --git a/OpenSim/Region/Framework/Scenes/Serialization/SceneXmlLoader.cs b/OpenSim/Region/Framework/Scenes/Serialization/SceneXmlLoader.cs index 53815f0f20..3c03130bd2 100644 --- a/OpenSim/Region/Framework/Scenes/Serialization/SceneXmlLoader.cs +++ b/OpenSim/Region/Framework/Scenes/Serialization/SceneXmlLoader.cs @@ -34,7 +34,7 @@ using OpenMetaverse; using log4net; using OpenSim.Framework; using OpenSim.Region.Framework.Scenes; -using OpenSim.Region.PhysicsModule.SharedBase; +using OpenSim.Region.PhysicsModules.SharedBase; namespace OpenSim.Region.Framework.Scenes.Serialization { diff --git a/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceAnimationTests.cs b/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceAnimationTests.cs index 5f87f4a659..700ca8c77a 100644 --- a/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceAnimationTests.cs +++ b/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceAnimationTests.cs @@ -41,7 +41,7 @@ using OpenSim.Region.Framework.Interfaces; using OpenSim.Region.CoreModules.Framework.EntityTransfer; using OpenSim.Region.CoreModules.World.Serialiser; using OpenSim.Region.CoreModules.ServiceConnectorsOut.Simulation; -using OpenSim.Region.PhysicsModule.SharedBase; +using OpenSim.Region.PhysicsModules.SharedBase; using OpenSim.Tests.Common; namespace OpenSim.Region.Framework.Scenes.Tests diff --git a/OpenSim/Region/OptionalModules/PhysicsParameters/PhysicsParameters.cs b/OpenSim/Region/OptionalModules/PhysicsParameters/PhysicsParameters.cs index 1c039cb0e9..1d9179cbf8 100755 --- a/OpenSim/Region/OptionalModules/PhysicsParameters/PhysicsParameters.cs +++ b/OpenSim/Region/OptionalModules/PhysicsParameters/PhysicsParameters.cs @@ -36,7 +36,7 @@ using OpenSim.Framework.Console; using OpenSim.Region.CoreModules.Framework.InterfaceCommander; using OpenSim.Region.Framework.Interfaces; using OpenSim.Region.Framework.Scenes; -using OpenSim.Region.PhysicsModule.SharedBase; +using OpenSim.Region.PhysicsModules.SharedBase; namespace OpenSim.Region.OptionalModules.PhysicsParameters { diff --git a/OpenSim/Region/OptionalModules/Scripting/ExtendedPhysics/ExtendedPhysics.cs b/OpenSim/Region/OptionalModules/Scripting/ExtendedPhysics/ExtendedPhysics.cs index c5753b9264..ab363e5ec2 100755 --- a/OpenSim/Region/OptionalModules/Scripting/ExtendedPhysics/ExtendedPhysics.cs +++ b/OpenSim/Region/OptionalModules/Scripting/ExtendedPhysics/ExtendedPhysics.cs @@ -36,7 +36,7 @@ using OpenSim.Region.CoreModules; using OpenSim.Region.Framework; using OpenSim.Region.Framework.Interfaces; using OpenSim.Region.Framework.Scenes; -using OpenSim.Region.PhysicsModule.SharedBase; +using OpenSim.Region.PhysicsModules.SharedBase; using Mono.Addins; using Nini.Config; diff --git a/OpenSim/Region/OptionalModules/Scripting/Minimodule/SOPObject.cs b/OpenSim/Region/OptionalModules/Scripting/Minimodule/SOPObject.cs index 7922db6559..47b9c090a8 100644 --- a/OpenSim/Region/OptionalModules/Scripting/Minimodule/SOPObject.cs +++ b/OpenSim/Region/OptionalModules/Scripting/Minimodule/SOPObject.cs @@ -34,7 +34,7 @@ using OpenSim.Framework; using OpenSim.Region.Framework.Interfaces; using OpenSim.Region.Framework.Scenes; using OpenSim.Region.OptionalModules.Scripting.Minimodule.Object; -using OpenSim.Region.PhysicsModule.SharedBase; +using OpenSim.Region.PhysicsModules.SharedBase; using PrimType=OpenSim.Region.OptionalModules.Scripting.Minimodule.Object.PrimType; using SculptType=OpenSim.Region.OptionalModules.Scripting.Minimodule.Object.SculptType; diff --git a/OpenSim/Region/PhysicsModules/BasicPhysics/BasicPhysicsActor.cs b/OpenSim/Region/PhysicsModules/BasicPhysics/BasicPhysicsActor.cs index 43fba7b994..e7b30bac68 100644 --- a/OpenSim/Region/PhysicsModules/BasicPhysics/BasicPhysicsActor.cs +++ b/OpenSim/Region/PhysicsModules/BasicPhysics/BasicPhysicsActor.cs @@ -30,9 +30,9 @@ using System.Collections.Generic; using Nini.Config; using OpenMetaverse; using OpenSim.Framework; -using OpenSim.Region.Physics.Manager; +using OpenSim.Region.PhysicsModules.SharedBase; -namespace OpenSim.Region.Physics.BasicPhysicsPlugin +namespace OpenSim.Region.PhysicsModule.BasicPhysics { public class BasicActor : PhysicsActor { diff --git a/OpenSim/Region/PhysicsModules/BasicPhysics/BasicPhysicsPlugin.cs b/OpenSim/Region/PhysicsModules/BasicPhysics/BasicPhysicsPlugin.cs index 373c7e0015..e78c1914fa 100644 --- a/OpenSim/Region/PhysicsModules/BasicPhysics/BasicPhysicsPlugin.cs +++ b/OpenSim/Region/PhysicsModules/BasicPhysics/BasicPhysicsPlugin.cs @@ -29,9 +29,9 @@ using System; using System.Collections.Generic; using Nini.Config; using OpenSim.Framework; -using OpenSim.Region.Physics.Manager; +using OpenSim.Region.PhysicsModules.SharedBase; -namespace OpenSim.Region.Physics.BasicPhysicsPlugin +namespace OpenSim.Region.PhysicsModule.BasicPhysics { /// /// Effectively a physics plugin that simulates no physics at all. diff --git a/OpenSim/Region/PhysicsModules/BasicPhysics/BasicPhysicsPrim.cs b/OpenSim/Region/PhysicsModules/BasicPhysics/BasicPhysicsPrim.cs index dfe4c19d88..5383f1b090 100644 --- a/OpenSim/Region/PhysicsModules/BasicPhysics/BasicPhysicsPrim.cs +++ b/OpenSim/Region/PhysicsModules/BasicPhysics/BasicPhysicsPrim.cs @@ -30,9 +30,9 @@ using System.Collections.Generic; using Nini.Config; using OpenMetaverse; using OpenSim.Framework; -using OpenSim.Region.Physics.Manager; +using OpenSim.Region.PhysicsModules.SharedBase; -namespace OpenSim.Region.Physics.BasicPhysicsPlugin +namespace OpenSim.Region.PhysicsModule.BasicPhysics { public class BasicPhysicsPrim : PhysicsActor { diff --git a/OpenSim/Region/PhysicsModules/BasicPhysics/BasicPhysicsScene.cs b/OpenSim/Region/PhysicsModules/BasicPhysics/BasicPhysicsScene.cs index 06a205e521..8b9e65afb1 100644 --- a/OpenSim/Region/PhysicsModules/BasicPhysics/BasicPhysicsScene.cs +++ b/OpenSim/Region/PhysicsModules/BasicPhysics/BasicPhysicsScene.cs @@ -30,9 +30,9 @@ using System.Collections.Generic; using Nini.Config; using OpenMetaverse; using OpenSim.Framework; -using OpenSim.Region.Physics.Manager; +using OpenSim.Region.PhysicsModules.SharedBase; -namespace OpenSim.Region.Physics.BasicPhysicsPlugin +namespace OpenSim.Region.PhysicsModule.BasicPhysics { /// /// This is an incomplete extremely basic physics implementation diff --git a/OpenSim/Region/PhysicsModules/BulletS/BSActorAvatarMove.cs b/OpenSim/Region/PhysicsModules/BulletS/BSActorAvatarMove.cs index f1a06cc8ae..0191893781 100755 --- a/OpenSim/Region/PhysicsModules/BulletS/BSActorAvatarMove.cs +++ b/OpenSim/Region/PhysicsModules/BulletS/BSActorAvatarMove.cs @@ -31,7 +31,7 @@ using System.Linq; using System.Text; using OpenSim.Framework; -using OpenSim.Region.PhysicsModule.SharedBase; +using OpenSim.Region.PhysicsModules.SharedBase; using OMV = OpenMetaverse; diff --git a/OpenSim/Region/PhysicsModules/BulletS/BSActorHover.cs b/OpenSim/Region/PhysicsModules/BulletS/BSActorHover.cs index 7fbe920c33..7ff171ed08 100755 --- a/OpenSim/Region/PhysicsModules/BulletS/BSActorHover.cs +++ b/OpenSim/Region/PhysicsModules/BulletS/BSActorHover.cs @@ -30,7 +30,7 @@ using System.Collections.Generic; using System.Linq; using System.Text; -using OpenSim.Region.PhysicsModule.SharedBase; +using OpenSim.Region.PhysicsModules.SharedBase; using OMV = OpenMetaverse; diff --git a/OpenSim/Region/PhysicsModules/BulletS/BSActorMoveToTarget.cs b/OpenSim/Region/PhysicsModules/BulletS/BSActorMoveToTarget.cs index 6a886b022a..3db8f2cf25 100755 --- a/OpenSim/Region/PhysicsModules/BulletS/BSActorMoveToTarget.cs +++ b/OpenSim/Region/PhysicsModules/BulletS/BSActorMoveToTarget.cs @@ -30,7 +30,7 @@ using System.Collections.Generic; using System.Linq; using System.Text; -using OpenSim.Region.PhysicsModule.SharedBase; +using OpenSim.Region.PhysicsModules.SharedBase; using OMV = OpenMetaverse; diff --git a/OpenSim/Region/PhysicsModules/BulletS/BSActorSetForce.cs b/OpenSim/Region/PhysicsModules/BulletS/BSActorSetForce.cs index e81452abfb..ecb4b7ff55 100755 --- a/OpenSim/Region/PhysicsModules/BulletS/BSActorSetForce.cs +++ b/OpenSim/Region/PhysicsModules/BulletS/BSActorSetForce.cs @@ -30,7 +30,7 @@ using System.Collections.Generic; using System.Linq; using System.Text; -using OpenSim.Region.PhysicsModule.SharedBase; +using OpenSim.Region.PhysicsModules.SharedBase; using OMV = OpenMetaverse; diff --git a/OpenSim/Region/PhysicsModules/BulletS/BSActorSetTorque.cs b/OpenSim/Region/PhysicsModules/BulletS/BSActorSetTorque.cs index 7eeb533aaa..a1cf4db95b 100755 --- a/OpenSim/Region/PhysicsModules/BulletS/BSActorSetTorque.cs +++ b/OpenSim/Region/PhysicsModules/BulletS/BSActorSetTorque.cs @@ -30,7 +30,7 @@ using System.Collections.Generic; using System.Linq; using System.Text; -using OpenSim.Region.PhysicsModule.SharedBase; +using OpenSim.Region.PhysicsModules.SharedBase; using OMV = OpenMetaverse; diff --git a/OpenSim/Region/PhysicsModules/BulletS/BSCharacter.cs b/OpenSim/Region/PhysicsModules/BulletS/BSCharacter.cs index d6b85517c9..83fc3a6d9b 100644 --- a/OpenSim/Region/PhysicsModules/BulletS/BSCharacter.cs +++ b/OpenSim/Region/PhysicsModules/BulletS/BSCharacter.cs @@ -30,7 +30,7 @@ using System.Reflection; using log4net; using OMV = OpenMetaverse; using OpenSim.Framework; -using OpenSim.Region.PhysicsModule.SharedBase; +using OpenSim.Region.PhysicsModules.SharedBase; namespace OpenSim.Region.PhysicsModule.BulletS { diff --git a/OpenSim/Region/PhysicsModules/BulletS/BSDynamics.cs b/OpenSim/Region/PhysicsModules/BulletS/BSDynamics.cs index fcf0dd53c3..0fc55776a4 100644 --- a/OpenSim/Region/PhysicsModules/BulletS/BSDynamics.cs +++ b/OpenSim/Region/PhysicsModules/BulletS/BSDynamics.cs @@ -36,7 +36,7 @@ using System.Reflection; using System.Runtime.InteropServices; using OpenMetaverse; using OpenSim.Framework; -using OpenSim.Region.PhysicsModule.SharedBase; +using OpenSim.Region.PhysicsModules.SharedBase; namespace OpenSim.Region.PhysicsModule.BulletS { diff --git a/OpenSim/Region/PhysicsModules/BulletS/BSParam.cs b/OpenSim/Region/PhysicsModules/BulletS/BSParam.cs index 10bbfb308e..c2960086bf 100755 --- a/OpenSim/Region/PhysicsModules/BulletS/BSParam.cs +++ b/OpenSim/Region/PhysicsModules/BulletS/BSParam.cs @@ -29,7 +29,7 @@ using System.Collections.Generic; using System.Reflection; using System.Text; -using OpenSim.Region.PhysicsModule.SharedBase; +using OpenSim.Region.PhysicsModules.SharedBase; using OpenMetaverse; using Nini.Config; diff --git a/OpenSim/Region/PhysicsModules/BulletS/BSPhysObject.cs b/OpenSim/Region/PhysicsModules/BulletS/BSPhysObject.cs index 4d69f6111f..da3fc18aa8 100755 --- a/OpenSim/Region/PhysicsModules/BulletS/BSPhysObject.cs +++ b/OpenSim/Region/PhysicsModules/BulletS/BSPhysObject.cs @@ -30,7 +30,7 @@ using System.Text; using OMV = OpenMetaverse; using OpenSim.Framework; -using OpenSim.Region.PhysicsModule.SharedBase; +using OpenSim.Region.PhysicsModules.SharedBase; namespace OpenSim.Region.PhysicsModule.BulletS { diff --git a/OpenSim/Region/PhysicsModules/BulletS/BSPlugin.cs b/OpenSim/Region/PhysicsModules/BulletS/BSPlugin.cs index e28cd928ba..f7954d8999 100644 --- a/OpenSim/Region/PhysicsModules/BulletS/BSPlugin.cs +++ b/OpenSim/Region/PhysicsModules/BulletS/BSPlugin.cs @@ -27,7 +27,7 @@ using System; using System.Collections.Generic; using OpenSim.Framework; -using OpenSim.Region.PhysicsModule.SharedBase; +using OpenSim.Region.PhysicsModules.SharedBase; using OpenMetaverse; namespace OpenSim.Region.PhysicsModule.BulletS diff --git a/OpenSim/Region/PhysicsModules/BulletS/BSPrim.cs b/OpenSim/Region/PhysicsModules/BulletS/BSPrim.cs index ab6aa5d565..3e744281be 100644 --- a/OpenSim/Region/PhysicsModules/BulletS/BSPrim.cs +++ b/OpenSim/Region/PhysicsModules/BulletS/BSPrim.cs @@ -32,7 +32,7 @@ using System.Xml; using log4net; using OMV = OpenMetaverse; using OpenSim.Framework; -using OpenSim.Region.PhysicsModule.SharedBase; +using OpenSim.Region.PhysicsModules.SharedBase; using OpenSim.Region.PhysicsModule.ConvexDecompositionDotNet; using OpenSim.Region.OptionalModules.Scripting; // for ExtendedPhysics diff --git a/OpenSim/Region/PhysicsModules/BulletS/BSPrimDisplaced.cs b/OpenSim/Region/PhysicsModules/BulletS/BSPrimDisplaced.cs index 6b234afa0f..d8ed56b4a4 100755 --- a/OpenSim/Region/PhysicsModules/BulletS/BSPrimDisplaced.cs +++ b/OpenSim/Region/PhysicsModules/BulletS/BSPrimDisplaced.cs @@ -31,7 +31,7 @@ using System.Reflection; using System.Runtime.InteropServices; using OpenMetaverse; using OpenSim.Framework; -using OpenSim.Region.PhysicsModule.SharedBase; +using OpenSim.Region.PhysicsModules.SharedBase; using OMV = OpenMetaverse; diff --git a/OpenSim/Region/PhysicsModules/BulletS/BSPrimLinkable.cs b/OpenSim/Region/PhysicsModules/BulletS/BSPrimLinkable.cs index 91550cb39c..8f494cca05 100755 --- a/OpenSim/Region/PhysicsModules/BulletS/BSPrimLinkable.cs +++ b/OpenSim/Region/PhysicsModules/BulletS/BSPrimLinkable.cs @@ -72,7 +72,7 @@ public class BSPrimLinkable : BSPrimDisplaced base.Destroy(); } - public override void link(SharedBase.PhysicsActor obj) + public override void link(OpenSim.Region.PhysicsModules.SharedBase.PhysicsActor obj) { BSPrimLinkable parent = obj as BSPrimLinkable; if (parent != null) diff --git a/OpenSim/Region/PhysicsModules/BulletS/BSScene.cs b/OpenSim/Region/PhysicsModules/BulletS/BSScene.cs index 18a4a58370..80f98ef653 100644 --- a/OpenSim/Region/PhysicsModules/BulletS/BSScene.cs +++ b/OpenSim/Region/PhysicsModules/BulletS/BSScene.cs @@ -36,7 +36,7 @@ using OpenSim.Framework.Monitoring; using OpenSim.Region.Framework; using OpenSim.Region.CoreModules; using Logging = OpenSim.Region.CoreModules.Framework.Statistics.Logging; -using OpenSim.Region.PhysicsModule.SharedBase; +using OpenSim.Region.PhysicsModules.SharedBase; using Nini.Config; using log4net; using OpenMetaverse; diff --git a/OpenSim/Region/PhysicsModules/BulletS/BSShapeCollection.cs b/OpenSim/Region/PhysicsModules/BulletS/BSShapeCollection.cs index 8dba3e4458..b1002733fa 100755 --- a/OpenSim/Region/PhysicsModules/BulletS/BSShapeCollection.cs +++ b/OpenSim/Region/PhysicsModules/BulletS/BSShapeCollection.cs @@ -29,7 +29,7 @@ using System.Collections.Generic; using System.Text; using OMV = OpenMetaverse; using OpenSim.Framework; -using OpenSim.Region.PhysicsModule.SharedBase; +using OpenSim.Region.PhysicsModules.SharedBase; using OpenSim.Region.PhysicsModule.ConvexDecompositionDotNet; namespace OpenSim.Region.PhysicsModule.BulletS diff --git a/OpenSim/Region/PhysicsModules/BulletS/BSShapes.cs b/OpenSim/Region/PhysicsModules/BulletS/BSShapes.cs index d8189e0ceb..7357962e2f 100755 --- a/OpenSim/Region/PhysicsModules/BulletS/BSShapes.cs +++ b/OpenSim/Region/PhysicsModules/BulletS/BSShapes.cs @@ -30,7 +30,7 @@ using System.Collections.Generic; using System.Text; using OpenSim.Framework; -using OpenSim.Region.PhysicsModule.SharedBase; +using OpenSim.Region.PhysicsModules.SharedBase; using OpenSim.Region.PhysicsModule.Meshing; using OpenSim.Region.PhysicsModule.ConvexDecompositionDotNet; diff --git a/OpenSim/Region/PhysicsModules/BulletS/BSTerrainHeightmap.cs b/OpenSim/Region/PhysicsModules/BulletS/BSTerrainHeightmap.cs index 7704d1fc53..e5607961e8 100755 --- a/OpenSim/Region/PhysicsModules/BulletS/BSTerrainHeightmap.cs +++ b/OpenSim/Region/PhysicsModules/BulletS/BSTerrainHeightmap.cs @@ -31,7 +31,7 @@ using System.Text; using OpenSim.Framework; using OpenSim.Region.Framework; using OpenSim.Region.CoreModules; -using OpenSim.Region.PhysicsModule.SharedBase; +using OpenSim.Region.PhysicsModules.SharedBase; using Nini.Config; using log4net; diff --git a/OpenSim/Region/PhysicsModules/BulletS/BSTerrainManager.cs b/OpenSim/Region/PhysicsModules/BulletS/BSTerrainManager.cs index 6e686cec20..bd84fceac0 100755 --- a/OpenSim/Region/PhysicsModules/BulletS/BSTerrainManager.cs +++ b/OpenSim/Region/PhysicsModules/BulletS/BSTerrainManager.cs @@ -31,7 +31,7 @@ using System.Text; using OpenSim.Framework; using OpenSim.Region.Framework; using OpenSim.Region.CoreModules; -using OpenSim.Region.PhysicsModule.SharedBase; +using OpenSim.Region.PhysicsModules.SharedBase; using Nini.Config; using log4net; diff --git a/OpenSim/Region/PhysicsModules/BulletS/BSTerrainMesh.cs b/OpenSim/Region/PhysicsModules/BulletS/BSTerrainMesh.cs index 4c3e33a50a..ae96491237 100755 --- a/OpenSim/Region/PhysicsModules/BulletS/BSTerrainMesh.cs +++ b/OpenSim/Region/PhysicsModules/BulletS/BSTerrainMesh.cs @@ -31,7 +31,7 @@ using System.Text; using OpenSim.Framework; using OpenSim.Region.Framework; using OpenSim.Region.CoreModules; -using OpenSim.Region.PhysicsModule.SharedBase; +using OpenSim.Region.PhysicsModules.SharedBase; using Nini.Config; using log4net; diff --git a/OpenSim/Region/PhysicsModules/BulletS/Tests/BasicVehicles.cs b/OpenSim/Region/PhysicsModules/BulletS/Tests/BasicVehicles.cs index 160ebb51fe..35eba29373 100755 --- a/OpenSim/Region/PhysicsModules/BulletS/Tests/BasicVehicles.cs +++ b/OpenSim/Region/PhysicsModules/BulletS/Tests/BasicVehicles.cs @@ -35,7 +35,7 @@ using log4net; using OpenSim.Framework; using OpenSim.Region.PhysicsModule.BulletS; -using OpenSim.Region.PhysicsModule.SharedBase; +using OpenSim.Region.PhysicsModules.SharedBase; using OpenSim.Tests.Common; using OpenMetaverse; diff --git a/OpenSim/Region/PhysicsModules/BulletS/Tests/BulletSimTestsUtil.cs b/OpenSim/Region/PhysicsModules/BulletS/Tests/BulletSimTestsUtil.cs index 173e20d314..8915e6f2d4 100755 --- a/OpenSim/Region/PhysicsModules/BulletS/Tests/BulletSimTestsUtil.cs +++ b/OpenSim/Region/PhysicsModules/BulletS/Tests/BulletSimTestsUtil.cs @@ -33,7 +33,7 @@ using System.Text; using Nini.Config; using OpenSim.Framework; -using OpenSim.Region.PhysicsModule.SharedBase; +using OpenSim.Region.PhysicsModules.SharedBase; using OpenSim.Region.PhysicsModule.Meshing; using OpenMetaverse; diff --git a/OpenSim/Region/PhysicsModules/BulletS/Tests/HullCreation.cs b/OpenSim/Region/PhysicsModules/BulletS/Tests/HullCreation.cs index 69078f2ebf..c0cf19ab2b 100644 --- a/OpenSim/Region/PhysicsModules/BulletS/Tests/HullCreation.cs +++ b/OpenSim/Region/PhysicsModules/BulletS/Tests/HullCreation.cs @@ -35,7 +35,7 @@ using log4net; using OpenSim.Framework; using OpenSim.Region.PhysicsModule.BulletS; -using OpenSim.Region.PhysicsModule.SharedBase; +using OpenSim.Region.PhysicsModules.SharedBase; using OpenSim.Tests.Common; using OpenMetaverse; diff --git a/OpenSim/Region/PhysicsModules/Meshing/HelperTypes.cs b/OpenSim/Region/PhysicsModules/Meshing/HelperTypes.cs index 2f857ee661..a0e3b7f107 100644 --- a/OpenSim/Region/PhysicsModules/Meshing/HelperTypes.cs +++ b/OpenSim/Region/PhysicsModules/Meshing/HelperTypes.cs @@ -30,7 +30,7 @@ using System.Collections.Generic; using System.Diagnostics; using System.Globalization; using OpenMetaverse; -using OpenSim.Region.PhysicsModule.SharedBase; +using OpenSim.Region.PhysicsModules.SharedBase; using OpenSim.Region.PhysicsModule.Meshing; public class Vertex : IComparable diff --git a/OpenSim/Region/PhysicsModules/Meshing/Mesh.cs b/OpenSim/Region/PhysicsModules/Meshing/Mesh.cs index 1a8574e59a..2ccb976bb2 100644 --- a/OpenSim/Region/PhysicsModules/Meshing/Mesh.cs +++ b/OpenSim/Region/PhysicsModules/Meshing/Mesh.cs @@ -29,7 +29,7 @@ using System; using System.Collections.Generic; using System.IO; using System.Runtime.InteropServices; -using OpenSim.Region.PhysicsModule.SharedBase; +using OpenSim.Region.PhysicsModules.SharedBase; using PrimMesher; using OpenMetaverse; diff --git a/OpenSim/Region/PhysicsModules/Meshing/Meshmerizer.cs b/OpenSim/Region/PhysicsModules/Meshing/Meshmerizer.cs index c885665589..77fdebf225 100644 --- a/OpenSim/Region/PhysicsModules/Meshing/Meshmerizer.cs +++ b/OpenSim/Region/PhysicsModules/Meshing/Meshmerizer.cs @@ -29,7 +29,7 @@ using System; using System.Collections.Generic; using OpenSim.Framework; -using OpenSim.Region.PhysicsModule.SharedBase; +using OpenSim.Region.PhysicsModules.SharedBase; using OpenMetaverse; using OpenMetaverse.StructuredData; using System.Drawing; diff --git a/OpenSim/Region/PhysicsModules/Ode/ODECharacter.cs b/OpenSim/Region/PhysicsModules/Ode/ODECharacter.cs index 048ca447ed..44f403979d 100644 --- a/OpenSim/Region/PhysicsModules/Ode/ODECharacter.cs +++ b/OpenSim/Region/PhysicsModules/Ode/ODECharacter.cs @@ -31,7 +31,7 @@ using System.Reflection; using OpenMetaverse; using Ode.NET; using OpenSim.Framework; -using OpenSim.Region.PhysicsModule.SharedBase; +using OpenSim.Region.PhysicsModules.SharedBase; using log4net; namespace OpenSim.Region.PhysicsModule.ODE diff --git a/OpenSim/Region/PhysicsModules/Ode/ODEDynamics.cs b/OpenSim/Region/PhysicsModules/Ode/ODEDynamics.cs index 0b0c8a984c..8f8e2bde5d 100644 --- a/OpenSim/Region/PhysicsModules/Ode/ODEDynamics.cs +++ b/OpenSim/Region/PhysicsModules/Ode/ODEDynamics.cs @@ -46,7 +46,7 @@ using log4net; using OpenMetaverse; using Ode.NET; using OpenSim.Framework; -using OpenSim.Region.PhysicsModule.SharedBase; +using OpenSim.Region.PhysicsModules.SharedBase; namespace OpenSim.Region.PhysicsModule.ODE { diff --git a/OpenSim/Region/PhysicsModules/Ode/ODEPrim.cs b/OpenSim/Region/PhysicsModules/Ode/ODEPrim.cs index d8849e7fc4..91a4302ae8 100644 --- a/OpenSim/Region/PhysicsModules/Ode/ODEPrim.cs +++ b/OpenSim/Region/PhysicsModules/Ode/ODEPrim.cs @@ -50,7 +50,7 @@ using log4net; using OpenMetaverse; using Ode.NET; using OpenSim.Framework; -using OpenSim.Region.PhysicsModule.SharedBase; +using OpenSim.Region.PhysicsModules.SharedBase; namespace OpenSim.Region.PhysicsModule.ODE { diff --git a/OpenSim/Region/PhysicsModules/Ode/ODERayCastRequestManager.cs b/OpenSim/Region/PhysicsModules/Ode/ODERayCastRequestManager.cs index 2bcdcd4eb8..21bfea3eff 100644 --- a/OpenSim/Region/PhysicsModules/Ode/ODERayCastRequestManager.cs +++ b/OpenSim/Region/PhysicsModules/Ode/ODERayCastRequestManager.cs @@ -31,7 +31,7 @@ using System.Reflection; using System.Runtime.InteropServices; using System.Text; using OpenMetaverse; -using OpenSim.Region.PhysicsModule.SharedBase; +using OpenSim.Region.PhysicsModules.SharedBase; using Ode.NET; using log4net; diff --git a/OpenSim/Region/PhysicsModules/Ode/OdePhysicsJoint.cs b/OpenSim/Region/PhysicsModules/Ode/OdePhysicsJoint.cs index 5180583662..2eb7ba634e 100644 --- a/OpenSim/Region/PhysicsModules/Ode/OdePhysicsJoint.cs +++ b/OpenSim/Region/PhysicsModules/Ode/OdePhysicsJoint.cs @@ -29,7 +29,7 @@ using System; using OpenMetaverse; using Ode.NET; using OpenSim.Framework; -using OpenSim.Region.PhysicsModule.SharedBase; +using OpenSim.Region.PhysicsModules.SharedBase; using OpenSim.Region.PhysicsModule.ODE; namespace OpenSim.Region.PhysicsModule.ODE diff --git a/OpenSim/Region/PhysicsModules/Ode/OdePlugin.cs b/OpenSim/Region/PhysicsModules/Ode/OdePlugin.cs index c3e01dd01c..1d9d0e5f15 100644 --- a/OpenSim/Region/PhysicsModules/Ode/OdePlugin.cs +++ b/OpenSim/Region/PhysicsModules/Ode/OdePlugin.cs @@ -36,7 +36,7 @@ using log4net; using Nini.Config; using Ode.NET; using OpenSim.Framework; -using OpenSim.Region.PhysicsModule.SharedBase; +using OpenSim.Region.PhysicsModules.SharedBase; using OpenMetaverse; namespace OpenSim.Region.PhysicsModule.ODE diff --git a/OpenSim/Region/PhysicsModules/Ode/OdeScene.cs b/OpenSim/Region/PhysicsModules/Ode/OdeScene.cs index e30036b399..d7163e2aa2 100644 --- a/OpenSim/Region/PhysicsModules/Ode/OdeScene.cs +++ b/OpenSim/Region/PhysicsModules/Ode/OdeScene.cs @@ -44,7 +44,7 @@ using OpenMetaverse; using Drawstuff.NET; #endif using OpenSim.Framework; -using OpenSim.Region.PhysicsModule.SharedBase; +using OpenSim.Region.PhysicsModules.SharedBase; namespace OpenSim.Region.PhysicsModule.ODE { diff --git a/OpenSim/Region/PhysicsModules/Ode/Tests/ODETestClass.cs b/OpenSim/Region/PhysicsModules/Ode/Tests/ODETestClass.cs index 09147b0299..181665627c 100644 --- a/OpenSim/Region/PhysicsModules/Ode/Tests/ODETestClass.cs +++ b/OpenSim/Region/PhysicsModules/Ode/Tests/ODETestClass.cs @@ -30,7 +30,7 @@ using Nini.Config; using NUnit.Framework; using OpenMetaverse; using OpenSim.Framework; -using OpenSim.Region.PhysicsModule.SharedBase; +using OpenSim.Region.PhysicsModules.SharedBase; using OpenSim.Region.PhysicsModule.ODE; using OpenSim.Tests.Common; using log4net; diff --git a/OpenSim/Region/PhysicsModules/POS/POSCharacter.cs b/OpenSim/Region/PhysicsModules/POS/POSCharacter.cs index 1dccbe714b..32469d9d4d 100644 --- a/OpenSim/Region/PhysicsModules/POS/POSCharacter.cs +++ b/OpenSim/Region/PhysicsModules/POS/POSCharacter.cs @@ -30,7 +30,7 @@ using System.Collections.Generic; using Nini.Config; using OpenMetaverse; using OpenSim.Framework; -using OpenSim.Region.PhysicsModule.SharedBase; +using OpenSim.Region.PhysicsModules.SharedBase; namespace OpenSim.Region.PhysicsModule.POS { diff --git a/OpenSim/Region/PhysicsModules/POS/POSPlugin.cs b/OpenSim/Region/PhysicsModules/POS/POSPlugin.cs index 4bf58c1932..3fe1a0af04 100644 --- a/OpenSim/Region/PhysicsModules/POS/POSPlugin.cs +++ b/OpenSim/Region/PhysicsModules/POS/POSPlugin.cs @@ -29,7 +29,7 @@ using System; using System.Collections.Generic; using Nini.Config; using OpenSim.Framework; -using OpenSim.Region.PhysicsModule.SharedBase; +using OpenSim.Region.PhysicsModules.SharedBase; namespace OpenSim.Region.PhysicsModule.POS { diff --git a/OpenSim/Region/PhysicsModules/POS/POSPrim.cs b/OpenSim/Region/PhysicsModules/POS/POSPrim.cs index 88a950223e..8aae716403 100644 --- a/OpenSim/Region/PhysicsModules/POS/POSPrim.cs +++ b/OpenSim/Region/PhysicsModules/POS/POSPrim.cs @@ -30,7 +30,7 @@ using System.Collections.Generic; using Nini.Config; using OpenMetaverse; using OpenSim.Framework; -using OpenSim.Region.PhysicsModule.SharedBase; +using OpenSim.Region.PhysicsModules.SharedBase; namespace OpenSim.Region.PhysicsModule.POS { diff --git a/OpenSim/Region/PhysicsModules/POS/POSScene.cs b/OpenSim/Region/PhysicsModules/POS/POSScene.cs index 8c3d5f51c2..603502f496 100644 --- a/OpenSim/Region/PhysicsModules/POS/POSScene.cs +++ b/OpenSim/Region/PhysicsModules/POS/POSScene.cs @@ -30,7 +30,7 @@ using System.Collections.Generic; using Nini.Config; using OpenMetaverse; using OpenSim.Framework; -using OpenSim.Region.PhysicsModule.SharedBase; +using OpenSim.Region.PhysicsModules.SharedBase; namespace OpenSim.Region.PhysicsModule.POS { diff --git a/OpenSim/Region/PhysicsModules/SharedBase/CollisionLocker.cs b/OpenSim/Region/PhysicsModules/SharedBase/CollisionLocker.cs index 687c4ca66a..6e658b53e2 100644 --- a/OpenSim/Region/PhysicsModules/SharedBase/CollisionLocker.cs +++ b/OpenSim/Region/PhysicsModules/SharedBase/CollisionLocker.cs @@ -28,7 +28,7 @@ using System; using System.Collections.Generic; -namespace OpenSim.Region.PhysicsModule.SharedBase +namespace OpenSim.Region.PhysicsModules.SharedBase { public class CollisionLocker { diff --git a/OpenSim/Region/PhysicsModules/SharedBase/IMesher.cs b/OpenSim/Region/PhysicsModules/SharedBase/IMesher.cs index e6cb76e3c2..5c7530713c 100644 --- a/OpenSim/Region/PhysicsModules/SharedBase/IMesher.cs +++ b/OpenSim/Region/PhysicsModules/SharedBase/IMesher.cs @@ -30,7 +30,7 @@ using System.Collections.Generic; using OpenSim.Framework; using OpenMetaverse; -namespace OpenSim.Region.PhysicsModule.SharedBase +namespace OpenSim.Region.PhysicsModules.SharedBase { public interface IMesher { diff --git a/OpenSim/Region/PhysicsModules/SharedBase/IPhysicsParameters.cs b/OpenSim/Region/PhysicsModules/SharedBase/IPhysicsParameters.cs index da0054a3c1..fb0c9e21db 100755 --- a/OpenSim/Region/PhysicsModules/SharedBase/IPhysicsParameters.cs +++ b/OpenSim/Region/PhysicsModules/SharedBase/IPhysicsParameters.cs @@ -30,7 +30,7 @@ using System.Collections.Generic; using OpenSim.Framework; using OpenMetaverse; -namespace OpenSim.Region.PhysicsModule.SharedBase +namespace OpenSim.Region.PhysicsModules.SharedBase { public struct PhysParameterEntry { diff --git a/OpenSim/Region/PhysicsModules/SharedBase/NullPhysicsScene.cs b/OpenSim/Region/PhysicsModules/SharedBase/NullPhysicsScene.cs index d5fc9c6c30..da896a3527 100644 --- a/OpenSim/Region/PhysicsModules/SharedBase/NullPhysicsScene.cs +++ b/OpenSim/Region/PhysicsModules/SharedBase/NullPhysicsScene.cs @@ -32,7 +32,7 @@ using Nini.Config; using OpenSim.Framework; using OpenMetaverse; -namespace OpenSim.Region.PhysicsModule.SharedBase +namespace OpenSim.Region.PhysicsModules.SharedBase { class NullPhysicsScene : PhysicsScene { diff --git a/OpenSim/Region/PhysicsModules/SharedBase/PhysicsActor.cs b/OpenSim/Region/PhysicsModules/SharedBase/PhysicsActor.cs index bfa6254abb..c04ff585e6 100644 --- a/OpenSim/Region/PhysicsModules/SharedBase/PhysicsActor.cs +++ b/OpenSim/Region/PhysicsModules/SharedBase/PhysicsActor.cs @@ -32,7 +32,7 @@ using System.Reflection; using OpenSim.Framework; using OpenMetaverse; -namespace OpenSim.Region.PhysicsModule.SharedBase +namespace OpenSim.Region.PhysicsModules.SharedBase { public delegate void PositionUpdate(Vector3 position); public delegate void VelocityUpdate(Vector3 velocity); diff --git a/OpenSim/Region/PhysicsModules/SharedBase/PhysicsJoint.cs b/OpenSim/Region/PhysicsModules/SharedBase/PhysicsJoint.cs index 8fc2638070..ce2bf05b96 100644 --- a/OpenSim/Region/PhysicsModules/SharedBase/PhysicsJoint.cs +++ b/OpenSim/Region/PhysicsModules/SharedBase/PhysicsJoint.cs @@ -30,7 +30,7 @@ using System.Collections.Generic; using OpenSim.Framework; using OpenMetaverse; -namespace OpenSim.Region.PhysicsModule.SharedBase +namespace OpenSim.Region.PhysicsModules.SharedBase { public enum PhysicsJointType : int { diff --git a/OpenSim/Region/PhysicsModules/SharedBase/PhysicsPluginManager.cs b/OpenSim/Region/PhysicsModules/SharedBase/PhysicsPluginManager.cs index d08b6ebd29..f7992d5f73 100644 --- a/OpenSim/Region/PhysicsModules/SharedBase/PhysicsPluginManager.cs +++ b/OpenSim/Region/PhysicsModules/SharedBase/PhysicsPluginManager.cs @@ -34,7 +34,7 @@ using log4net; using OpenSim.Framework; using OpenMetaverse; -namespace OpenSim.Region.PhysicsModule.SharedBase +namespace OpenSim.Region.PhysicsModules.SharedBase { /// /// Description of MyClass. @@ -129,8 +129,8 @@ namespace OpenSim.Region.PhysicsModule.SharedBase public void LoadPluginsFromAssembly(string assemblyPath) { // TODO / NOTE - // The assembly named 'OpenSim.Region.Physics.BasicPhysicsPlugin' was loaded from - // 'file:///C:/OpenSim/trunk2/bin/Physics/OpenSim.Region.Physics.BasicPhysicsPlugin.dll' + // The assembly named 'OpenSim.Region.PhysicsModule.BasicPhysics' was loaded from + // 'file:///C:/OpenSim/trunk2/bin/Physics/OpenSim.Region.PhysicsModule.BasicPhysics.dll' // using the LoadFrom context. The use of this context can result in unexpected behavior // for serialization, casting and dependency resolution. In almost all cases, it is recommended // that the LoadFrom context be avoided. This can be done by installing assemblies in the diff --git a/OpenSim/Region/PhysicsModules/SharedBase/PhysicsScene.cs b/OpenSim/Region/PhysicsModules/SharedBase/PhysicsScene.cs index be0d6f5b24..0394494d8b 100644 --- a/OpenSim/Region/PhysicsModules/SharedBase/PhysicsScene.cs +++ b/OpenSim/Region/PhysicsModules/SharedBase/PhysicsScene.cs @@ -35,7 +35,7 @@ using Nini.Config; using OpenSim.Framework; using OpenMetaverse; -namespace OpenSim.Region.PhysicsModule.SharedBase +namespace OpenSim.Region.PhysicsModules.SharedBase { public delegate void physicsCrash(); diff --git a/OpenSim/Region/PhysicsModules/SharedBase/PhysicsSensor.cs b/OpenSim/Region/PhysicsModules/SharedBase/PhysicsSensor.cs index f0bdd10d76..da9c96c469 100644 --- a/OpenSim/Region/PhysicsModules/SharedBase/PhysicsSensor.cs +++ b/OpenSim/Region/PhysicsModules/SharedBase/PhysicsSensor.cs @@ -29,7 +29,7 @@ using System; using System.Timers; using OpenMetaverse; -namespace OpenSim.Region.PhysicsModule.SharedBase +namespace OpenSim.Region.PhysicsModules.SharedBase { [Flags] public enum SenseType : uint diff --git a/OpenSim/Region/PhysicsModules/SharedBase/PhysicsVector.cs b/OpenSim/Region/PhysicsModules/SharedBase/PhysicsVector.cs index fba861b346..76a82fa291 100644 --- a/OpenSim/Region/PhysicsModules/SharedBase/PhysicsVector.cs +++ b/OpenSim/Region/PhysicsModules/SharedBase/PhysicsVector.cs @@ -27,7 +27,7 @@ using System; -namespace OpenSim.Region.PhysicsModule.SharedBase +namespace OpenSim.Region.PhysicsModules.SharedBase { /*public class PhysicsVector { diff --git a/OpenSim/Region/PhysicsModules/SharedBase/VehicleConstants.cs b/OpenSim/Region/PhysicsModules/SharedBase/VehicleConstants.cs index 879e62a431..63a8cb8f3c 100644 --- a/OpenSim/Region/PhysicsModules/SharedBase/VehicleConstants.cs +++ b/OpenSim/Region/PhysicsModules/SharedBase/VehicleConstants.cs @@ -27,7 +27,7 @@ using System; -namespace OpenSim.Region.PhysicsModule.SharedBase +namespace OpenSim.Region.PhysicsModules.SharedBase { public enum Vehicle : int { diff --git a/OpenSim/Region/PhysicsModules/SharedBase/ZeroMesher.cs b/OpenSim/Region/PhysicsModules/SharedBase/ZeroMesher.cs index c938252424..fe8796289c 100644 --- a/OpenSim/Region/PhysicsModules/SharedBase/ZeroMesher.cs +++ b/OpenSim/Region/PhysicsModules/SharedBase/ZeroMesher.cs @@ -41,7 +41,7 @@ using Nini.Config; * it's always availabe and thus the default in case of configuration errors */ -namespace OpenSim.Region.PhysicsModule.SharedBase +namespace OpenSim.Region.PhysicsModules.SharedBase { public class ZeroMesherPlugin : IMeshingPlugin { diff --git a/OpenSim/Region/RegionCombinerModule/RegionCombinerModule.cs b/OpenSim/Region/RegionCombinerModule/RegionCombinerModule.cs index 695d72aeb4..98b0ae1d10 100644 --- a/OpenSim/Region/RegionCombinerModule/RegionCombinerModule.cs +++ b/OpenSim/Region/RegionCombinerModule/RegionCombinerModule.cs @@ -36,7 +36,7 @@ using OpenSim.Framework.Client; using OpenSim.Region.Framework.Interfaces; using OpenSim.Region.Framework.Scenes; using OpenSim.Framework.Console; -using OpenSim.Region.PhysicsModule.SharedBase; +using OpenSim.Region.PhysicsModules.SharedBase; using Mono.Addins; namespace OpenSim.Region.RegionCombinerModule diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index 5d50a639b7..4eda4438c2 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs @@ -51,7 +51,7 @@ using OpenSim.Region.Framework.Interfaces; using OpenSim.Region.Framework.Scenes; using OpenSim.Region.Framework.Scenes.Animation; using OpenSim.Region.Framework.Scenes.Scripting; -using OpenSim.Region.PhysicsModule.SharedBase; +using OpenSim.Region.PhysicsModules.SharedBase; using OpenSim.Region.ScriptEngine.Shared; using OpenSim.Region.ScriptEngine.Shared.Api.Plugins; using OpenSim.Region.ScriptEngine.Shared.ScriptBase; diff --git a/OpenSim/Tests/Common/Helpers/SceneHelpers.cs b/OpenSim/Tests/Common/Helpers/SceneHelpers.cs index 7ee4c94c3f..a26e844cd1 100644 --- a/OpenSim/Tests/Common/Helpers/SceneHelpers.cs +++ b/OpenSim/Tests/Common/Helpers/SceneHelpers.cs @@ -36,7 +36,7 @@ using OpenSim.Framework.Communications; using OpenSim.Framework.Console; using OpenSim.Framework.Servers; using OpenSim.Framework.Servers.HttpServer; -using OpenSim.Region.PhysicsModule.SharedBase; +using OpenSim.Region.PhysicsModules.SharedBase; using OpenSim.Region.Framework; using OpenSim.Region.Framework.Interfaces; using OpenSim.Region.Framework.Scenes; @@ -149,7 +149,7 @@ namespace OpenSim.Tests.Common regInfo.RegionSizeY = sizeY; PhysicsPluginManager physicsPluginManager = new PhysicsPluginManager(); - physicsPluginManager.LoadPluginsFromAssembly("Physics/OpenSim.Region.Physics.BasicPhysicsPlugin.dll"); + physicsPluginManager.LoadPluginsFromAssembly("Physics/OpenSim.Region.PhysicsModule.BasicPhysics.dll"); Vector3 regionExtent = new Vector3( regInfo.RegionSizeX, regInfo.RegionSizeY, regInfo.RegionSizeZ); PhysicsScene physicsScene = physicsPluginManager.GetPhysicsScene( diff --git a/OpenSim/Tests/Common/Mock/TestScene.cs b/OpenSim/Tests/Common/Mock/TestScene.cs index 8a9e279729..08cfff2805 100644 --- a/OpenSim/Tests/Common/Mock/TestScene.cs +++ b/OpenSim/Tests/Common/Mock/TestScene.cs @@ -33,7 +33,7 @@ using OpenSim.Framework.Servers; using OpenSim.Region.Framework; using OpenSim.Region.Framework.Interfaces; using OpenSim.Region.Framework.Scenes; -using OpenSim.Region.PhysicsModule.SharedBase; +using OpenSim.Region.PhysicsModules.SharedBase; using OpenSim.Services.Interfaces; namespace OpenSim.Tests.Common diff --git a/prebuild.xml b/prebuild.xml index f1ab322929..92d5caf4ab 100644 --- a/prebuild.xml +++ b/prebuild.xml @@ -410,7 +410,7 @@ - + ../../../../bin/ @@ -438,7 +438,7 @@ - + ../../../../bin/Physics/ @@ -455,7 +455,7 @@ - + @@ -478,7 +478,7 @@ - + @@ -503,7 +503,7 @@ - + @@ -536,7 +536,7 @@ - + @@ -653,7 +653,7 @@ - + @@ -1507,7 +1507,7 @@ - + @@ -1594,7 +1594,7 @@ - + @@ -1648,7 +1648,7 @@ - + @@ -1700,7 +1700,7 @@ - + @@ -1749,7 +1749,7 @@ - + @@ -1852,7 +1852,7 @@ - + @@ -1897,7 +1897,7 @@ - + @@ -2270,7 +2270,7 @@ - + @@ -2464,7 +2464,7 @@ - + @@ -2729,7 +2729,7 @@ - + @@ -3056,7 +3056,7 @@ - + @@ -3136,7 +3136,7 @@ - + @@ -3204,7 +3204,7 @@ - + @@ -3388,7 +3388,7 @@ - + @@ -3425,7 +3425,7 @@ - + From 3741edd1c791e87a38805a62530755cbf0c55cab Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Mon, 31 Aug 2015 09:21:05 -0700 Subject: [PATCH 05/32] Refactored Meshing modules: - Moved ZeroMesher from OpenSim.Region.PhysicsModules.SharedBase to OpenSim.Region.PhysicsModules.Meshing - Created subfolder for all Meshmerizer files, also in the same Meshing dll - Made them both region modules, with ZeroMesher being the default one This compiles but doesn't run yet. --- .../Meshing/{ => Meshmerizer}/HelperTypes.cs | 2 +- .../Meshing/{ => Meshmerizer}/Mesh.cs | 2 +- .../Meshing/{ => Meshmerizer}/Meshmerizer.cs | 115 ++++++++++++------ .../Meshing/{ => Meshmerizer}/PrimMesher.cs | 0 .../Meshing/{ => Meshmerizer}/SculptMap.cs | 0 .../Meshing/{ => Meshmerizer}/SculptMesh.cs | 0 .../Meshing/Properties/AssemblyInfo.cs | 5 +- .../{SharedBase => Meshing}/ZeroMesher.cs | 71 +++++++++-- .../PhysicsModules/Ode/Tests/ODETestClass.cs | 2 - .../SharedBase/PhysicsPluginManager.cs | 7 -- prebuild.xml | 4 +- 11 files changed, 146 insertions(+), 62 deletions(-) rename OpenSim/Region/PhysicsModules/Meshing/{ => Meshmerizer}/HelperTypes.cs (99%) rename OpenSim/Region/PhysicsModules/Meshing/{ => Meshmerizer}/Mesh.cs (99%) rename OpenSim/Region/PhysicsModules/Meshing/{ => Meshmerizer}/Meshmerizer.cs (94%) rename OpenSim/Region/PhysicsModules/Meshing/{ => Meshmerizer}/PrimMesher.cs (100%) rename OpenSim/Region/PhysicsModules/Meshing/{ => Meshmerizer}/SculptMap.cs (100%) rename OpenSim/Region/PhysicsModules/Meshing/{ => Meshmerizer}/SculptMesh.cs (100%) rename OpenSim/Region/PhysicsModules/{SharedBase => Meshing}/ZeroMesher.cs (64%) diff --git a/OpenSim/Region/PhysicsModules/Meshing/HelperTypes.cs b/OpenSim/Region/PhysicsModules/Meshing/Meshmerizer/HelperTypes.cs similarity index 99% rename from OpenSim/Region/PhysicsModules/Meshing/HelperTypes.cs rename to OpenSim/Region/PhysicsModules/Meshing/Meshmerizer/HelperTypes.cs index a0e3b7f107..34a925d746 100644 --- a/OpenSim/Region/PhysicsModules/Meshing/HelperTypes.cs +++ b/OpenSim/Region/PhysicsModules/Meshing/Meshmerizer/HelperTypes.cs @@ -31,7 +31,7 @@ using System.Diagnostics; using System.Globalization; using OpenMetaverse; using OpenSim.Region.PhysicsModules.SharedBase; -using OpenSim.Region.PhysicsModule.Meshing; +using OpenSim.Region.PhysicsModules.Meshing; public class Vertex : IComparable { diff --git a/OpenSim/Region/PhysicsModules/Meshing/Mesh.cs b/OpenSim/Region/PhysicsModules/Meshing/Meshmerizer/Mesh.cs similarity index 99% rename from OpenSim/Region/PhysicsModules/Meshing/Mesh.cs rename to OpenSim/Region/PhysicsModules/Meshing/Meshmerizer/Mesh.cs index 2ccb976bb2..bf397eee1e 100644 --- a/OpenSim/Region/PhysicsModules/Meshing/Mesh.cs +++ b/OpenSim/Region/PhysicsModules/Meshing/Meshmerizer/Mesh.cs @@ -33,7 +33,7 @@ using OpenSim.Region.PhysicsModules.SharedBase; using PrimMesher; using OpenMetaverse; -namespace OpenSim.Region.PhysicsModule.Meshing +namespace OpenSim.Region.PhysicsModules.Meshing { public class Mesh : IMesh { diff --git a/OpenSim/Region/PhysicsModules/Meshing/Meshmerizer.cs b/OpenSim/Region/PhysicsModules/Meshing/Meshmerizer/Meshmerizer.cs similarity index 94% rename from OpenSim/Region/PhysicsModules/Meshing/Meshmerizer.cs rename to OpenSim/Region/PhysicsModules/Meshing/Meshmerizer/Meshmerizer.cs index 77fdebf225..4d25bf3916 100644 --- a/OpenSim/Region/PhysicsModules/Meshing/Meshmerizer.cs +++ b/OpenSim/Region/PhysicsModules/Meshing/Meshmerizer/Meshmerizer.cs @@ -28,7 +28,11 @@ using System; using System.Collections.Generic; +using System.Reflection; +using System.IO; using OpenSim.Framework; +using OpenSim.Region.Framework.Scenes; +using OpenSim.Region.Framework.Interfaces; using OpenSim.Region.PhysicsModules.SharedBase; using OpenMetaverse; using OpenMetaverse.StructuredData; @@ -38,29 +42,12 @@ using System.IO.Compression; using PrimMesher; using log4net; using Nini.Config; -using System.Reflection; -using System.IO; +using Mono.Addins; -namespace OpenSim.Region.PhysicsModule.Meshing +namespace OpenSim.Region.PhysicsModules.Meshing { - public class MeshmerizerPlugin : IMeshingPlugin - { - public MeshmerizerPlugin() - { - } - - public string GetName() - { - return "Meshmerizer"; - } - - public IMesher GetMesher(IConfigSource config) - { - return new Meshmerizer(config); - } - } - - public class Meshmerizer : IMesher + [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "Meshmerizer")] + public class Meshmerizer : IMesher, INonSharedRegionModule { private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); private static string LogHeader = "[MESH]"; @@ -72,6 +59,8 @@ namespace OpenSim.Region.PhysicsModule.Meshing #else private const string baseDir = null; //"rawFiles"; #endif + private bool m_Enabled = false; + // If 'true', lots of DEBUG logging of asset parsing details private bool debugDetail = false; @@ -87,30 +76,79 @@ namespace OpenSim.Region.PhysicsModule.Meshing // Mesh cache. Static so it can be shared across instances of this class private static Dictionary m_uniqueMeshes = new Dictionary(); - public Meshmerizer(IConfigSource config) + #region INonSharedRegionModule + public string Name { - IConfig start_config = config.Configs["Startup"]; - IConfig mesh_config = config.Configs["Mesh"]; + get { return "Meshmerizer"; } + } - decodedSculptMapPath = start_config.GetString("DecodedSculptMapPath","j2kDecodeCache"); - cacheSculptMaps = start_config.GetBoolean("CacheSculptMaps", cacheSculptMaps); - if (mesh_config != null) - { - useMeshiesPhysicsMesh = mesh_config.GetBoolean("UseMeshiesPhysicsMesh", useMeshiesPhysicsMesh); - debugDetail = mesh_config.GetBoolean("LogMeshDetails", debugDetail); - } + public Type ReplaceableInterface + { + get { return null; } + } - try + public void Initialise(IConfigSource source) + { + IConfig config = source.Configs["Startup"]; + if (config != null) { - if (!Directory.Exists(decodedSculptMapPath)) - Directory.CreateDirectory(decodedSculptMapPath); - } - catch (Exception e) - { - m_log.WarnFormat("[SCULPT]: Unable to create {0} directory: ", decodedSculptMapPath, e.Message); + string mesher = config.GetString("meshing", string.Empty); + if (mesher == Name) + { + m_Enabled = true; + + IConfig mesh_config = source.Configs["Mesh"]; + + decodedSculptMapPath = config.GetString("DecodedSculptMapPath", "j2kDecodeCache"); + cacheSculptMaps = config.GetBoolean("CacheSculptMaps", cacheSculptMaps); + if (mesh_config != null) + { + useMeshiesPhysicsMesh = mesh_config.GetBoolean("UseMeshiesPhysicsMesh", useMeshiesPhysicsMesh); + debugDetail = mesh_config.GetBoolean("LogMeshDetails", debugDetail); + } + + try + { + if (!Directory.Exists(decodedSculptMapPath)) + Directory.CreateDirectory(decodedSculptMapPath); + } + catch (Exception e) + { + m_log.WarnFormat("[SCULPT]: Unable to create {0} directory: ", decodedSculptMapPath, e.Message); + } + + } } } + public void Close() + { + } + + public void AddRegion(Scene scene) + { + if (!m_Enabled) + return; + + scene.RegisterModuleInterface(this); + } + + public void RemoveRegion(Scene scene) + { + if (!m_Enabled) + return; + + scene.UnregisterModuleInterface(this); + } + + public void RegionLoaded(Scene scene) + { + if (!m_Enabled) + return; + } + #endregion + + /// /// creates a simple box mesh of the specified size. This mesh is of very low vertex count and may /// be useful as a backup proxy when level of detail is not needed or when more complex meshes fail @@ -967,5 +1005,6 @@ namespace OpenSim.Region.PhysicsModule.Meshing return mesh; } + } } diff --git a/OpenSim/Region/PhysicsModules/Meshing/PrimMesher.cs b/OpenSim/Region/PhysicsModules/Meshing/Meshmerizer/PrimMesher.cs similarity index 100% rename from OpenSim/Region/PhysicsModules/Meshing/PrimMesher.cs rename to OpenSim/Region/PhysicsModules/Meshing/Meshmerizer/PrimMesher.cs diff --git a/OpenSim/Region/PhysicsModules/Meshing/SculptMap.cs b/OpenSim/Region/PhysicsModules/Meshing/Meshmerizer/SculptMap.cs similarity index 100% rename from OpenSim/Region/PhysicsModules/Meshing/SculptMap.cs rename to OpenSim/Region/PhysicsModules/Meshing/Meshmerizer/SculptMap.cs diff --git a/OpenSim/Region/PhysicsModules/Meshing/SculptMesh.cs b/OpenSim/Region/PhysicsModules/Meshing/Meshmerizer/SculptMesh.cs similarity index 100% rename from OpenSim/Region/PhysicsModules/Meshing/SculptMesh.cs rename to OpenSim/Region/PhysicsModules/Meshing/Meshmerizer/SculptMesh.cs diff --git a/OpenSim/Region/PhysicsModules/Meshing/Properties/AssemblyInfo.cs b/OpenSim/Region/PhysicsModules/Meshing/Properties/AssemblyInfo.cs index ec968c0b65..d6ac8b2260 100644 --- a/OpenSim/Region/PhysicsModules/Meshing/Properties/AssemblyInfo.cs +++ b/OpenSim/Region/PhysicsModules/Meshing/Properties/AssemblyInfo.cs @@ -1,11 +1,12 @@ using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; +using Mono.Addins; // General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information // associated with an assembly. -[assembly: AssemblyTitle("OpenSim.Region.Physics.Meshing")] +[assembly: AssemblyTitle("OpenSim.Region.PhysicsModules.Meshing")] [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("http://opensimulator.org")] @@ -31,3 +32,5 @@ using System.Runtime.InteropServices; // [assembly: AssemblyVersion("0.8.2.*")] +[assembly: Addin("OpenSim.Region.PhysicsModules.Meshing", OpenSim.VersionInfo.VersionNumber)] +[assembly: AddinDependency("OpenSim.Region.Framework", OpenSim.VersionInfo.VersionNumber)] diff --git a/OpenSim/Region/PhysicsModules/SharedBase/ZeroMesher.cs b/OpenSim/Region/PhysicsModules/Meshing/ZeroMesher.cs similarity index 64% rename from OpenSim/Region/PhysicsModules/SharedBase/ZeroMesher.cs rename to OpenSim/Region/PhysicsModules/Meshing/ZeroMesher.cs index fe8796289c..0a3b3a4e80 100644 --- a/OpenSim/Region/PhysicsModules/SharedBase/ZeroMesher.cs +++ b/OpenSim/Region/PhysicsModules/Meshing/ZeroMesher.cs @@ -26,9 +26,15 @@ */ using System; +using System.Reflection; using OpenSim.Framework; +using OpenSim.Region.Framework.Scenes; +using OpenSim.Region.Framework.Interfaces; +using OpenSim.Region.PhysicsModules.SharedBase; using OpenMetaverse; using Nini.Config; +using Mono.Addins; +using log4net; /* * This is the zero mesher. @@ -41,27 +47,67 @@ using Nini.Config; * it's always availabe and thus the default in case of configuration errors */ -namespace OpenSim.Region.PhysicsModules.SharedBase +namespace OpenSim.Region.PhysicsModules.Meshing { - public class ZeroMesherPlugin : IMeshingPlugin + + [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "ZeroMesher")] + public class ZeroMesher : IMesher, INonSharedRegionModule { - public ZeroMesherPlugin() + private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); + private bool m_Enabled = false; + + #region INonSharedRegionModule + public string Name + { + get { return "ZeroMesher"; } + } + + public Type ReplaceableInterface + { + get { return null; } + } + + public void Initialise(IConfigSource source) + { + // TODO: Move this out of Startup + IConfig config = source.Configs["Startup"]; + if (config != null) + { + // This is the default Mesher + string mesher = config.GetString("meshing", Name); + if (mesher == Name) + m_Enabled = true; + } + } + + public void Close() { } - public string GetName() + public void AddRegion(Scene scene) { - return "ZeroMesher"; + if (!m_Enabled) + return; + + scene.RegisterModuleInterface(this); } - public IMesher GetMesher(IConfigSource config) + public void RemoveRegion(Scene scene) { - return new ZeroMesher(); - } - } + if (!m_Enabled) + return; - public class ZeroMesher : IMesher - { + scene.UnregisterModuleInterface(this); + } + + public void RegionLoaded(Scene scene) + { + if (!m_Enabled) + return; + } + #endregion + + #region IMesher public IMesh CreateMesh(String primName, PrimitiveBaseShape primShape, Vector3 size, float lod) { return CreateMesh(primName, primShape, size, lod, false, false); @@ -79,5 +125,8 @@ namespace OpenSim.Region.PhysicsModules.SharedBase return null; } + #endregion + + } } diff --git a/OpenSim/Region/PhysicsModules/Ode/Tests/ODETestClass.cs b/OpenSim/Region/PhysicsModules/Ode/Tests/ODETestClass.cs index 181665627c..bbf64d5a8d 100644 --- a/OpenSim/Region/PhysicsModules/Ode/Tests/ODETestClass.cs +++ b/OpenSim/Region/PhysicsModules/Ode/Tests/ODETestClass.cs @@ -56,8 +56,6 @@ namespace OpenSim.Region.PhysicsModule.ODE.Tests // Loading ODEPlugin cbt = new OdePlugin(); - // Loading Zero Mesher - imp = new ZeroMesherPlugin(); // Getting Physics Scene ps = cbt.GetScene("test"); // Initializing Physics Scene. diff --git a/OpenSim/Region/PhysicsModules/SharedBase/PhysicsPluginManager.cs b/OpenSim/Region/PhysicsModules/SharedBase/PhysicsPluginManager.cs index f7992d5f73..6316463ed5 100644 --- a/OpenSim/Region/PhysicsModules/SharedBase/PhysicsPluginManager.cs +++ b/OpenSim/Region/PhysicsModules/SharedBase/PhysicsPluginManager.cs @@ -51,13 +51,6 @@ namespace OpenSim.Region.PhysicsModules.SharedBase /// public PhysicsPluginManager() { - // Load "plugins", that are hard coded and not existing in form of an external lib, and hence always - // available - IMeshingPlugin plugHard; - plugHard = new ZeroMesherPlugin(); - _MeshPlugins.Add(plugHard.GetName(), plugHard); - - m_log.Info("[PHYSICS]: Added meshing engine: " + plugHard.GetName()); } /// diff --git a/prebuild.xml b/prebuild.xml index 92d5caf4ab..e08ff29a83 100644 --- a/prebuild.xml +++ b/prebuild.xml @@ -514,7 +514,7 @@ - + ../../../../bin/Physics/ @@ -537,7 +537,9 @@ + + From 49ab478d286b873e9ff1b4f6748b920abcc0f1b1 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Mon, 31 Aug 2015 09:41:00 -0700 Subject: [PATCH 06/32] Fixed a namespace dependency. Also started preparing prebuild.xml for making physics region modules. --- .../Region/PhysicsModules/BulletS/BSShapes.cs | 2 +- .../BulletS/Tests/BulletSimTestsUtil.cs | 2 +- prebuild.xml | 284 +++++++++--------- 3 files changed, 148 insertions(+), 140 deletions(-) diff --git a/OpenSim/Region/PhysicsModules/BulletS/BSShapes.cs b/OpenSim/Region/PhysicsModules/BulletS/BSShapes.cs index 7357962e2f..1c55b51b20 100755 --- a/OpenSim/Region/PhysicsModules/BulletS/BSShapes.cs +++ b/OpenSim/Region/PhysicsModules/BulletS/BSShapes.cs @@ -31,7 +31,7 @@ using System.Text; using OpenSim.Framework; using OpenSim.Region.PhysicsModules.SharedBase; -using OpenSim.Region.PhysicsModule.Meshing; +using OpenSim.Region.PhysicsModules.Meshing; using OpenSim.Region.PhysicsModule.ConvexDecompositionDotNet; using OMV = OpenMetaverse; diff --git a/OpenSim/Region/PhysicsModules/BulletS/Tests/BulletSimTestsUtil.cs b/OpenSim/Region/PhysicsModules/BulletS/Tests/BulletSimTestsUtil.cs index 8915e6f2d4..34c057170a 100755 --- a/OpenSim/Region/PhysicsModules/BulletS/Tests/BulletSimTestsUtil.cs +++ b/OpenSim/Region/PhysicsModules/BulletS/Tests/BulletSimTestsUtil.cs @@ -34,7 +34,7 @@ using Nini.Config; using OpenSim.Framework; using OpenSim.Region.PhysicsModules.SharedBase; -using OpenSim.Region.PhysicsModule.Meshing; +using OpenSim.Region.PhysicsModules.Meshing; using OpenMetaverse; diff --git a/prebuild.xml b/prebuild.xml index e08ff29a83..77b1657f45 100644 --- a/prebuild.xml +++ b/prebuild.xml @@ -410,142 +410,6 @@ - - - - ../../../../bin/ - - - - - ../../../../bin/ - - - - ../../../../bin/ - - - - - - - - - - - - - - - - - - - ../../../../bin/Physics/ - - - - - ../../../../bin/Physics/ - - - - ../../../../bin/ - - - - - - - - - - - - - - ../../../../bin/Physics/ - - - - - ../../../../bin/Physics/ - - - - ../../../../bin/ - - - - - - - - - - - - - - ../../../../bin/Physics/ - - - - - ../../../../bin/Physics/ - - - - ../../../../bin/ - - - - - - - - - - - - - - - - - - - - - ../../../../bin/Physics/ - - - - - ../../../../bin/Physics/ - - - - ../../../../bin/ - - - - - - - - - - - - - - - - - - - @@ -1828,6 +1692,148 @@ + + + + ../../../../bin/ + + + + + ../../../../bin/ + + + + ../../../../bin/ + + + + + + + + + + + + + + + + + + ../../../../bin/Physics/ + + + + + ../../../../bin/Physics/ + + + + ../../../../bin/ + + + + + + + + + + + + + + + + + + + + + + + + ../../../../bin/Physics/ + + + + + ../../../../bin/Physics/ + + + + ../../../../bin/ + + + + + + + + + + + + + + + + ../../../../bin/Physics/ + + + + + ../../../../bin/Physics/ + + + + ../../../../bin/ + + + + + + + + + + + + + + + + ../../../../bin/Physics/ + + + + + ../../../../bin/Physics/ + + + + ../../../../bin/ + + + + + + + + + + + + + + + + + + + @@ -1855,8 +1861,10 @@ - + + + @@ -3426,7 +3434,7 @@ - + From 134d4300f0b6e9b0df0326cfe0b5df9f41f42865 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Mon, 31 Aug 2015 13:02:51 -0700 Subject: [PATCH 07/32] All physics plugins are now region modules. Compiles but doesn't run. --- .../Logging => Framework}/LogWriter.cs | 2 +- .../BasicPhysics/AssemblyInfo.cs | 8 +- .../BasicPhysics/BasicPhysicsPlugin.cs | 42 +- .../BasicPhysics/BasicPhysicsScene.cs | 63 +- .../Region/PhysicsModules/BulletS/BSPlugin.cs | 54 +- .../Region/PhysicsModules/BulletS/BSScene.cs | 2329 +++++++++-------- .../Region/PhysicsModules/BulletS/BSShapes.cs | 4 +- .../BulletS/BSTerrainHeightmap.cs | 1 - .../BulletS/BSTerrainManager.cs | 1 - .../PhysicsModules/BulletS/BSTerrainMesh.cs | 1 - .../BulletS/Properties/AssemblyInfo.cs | 3 + .../Region/PhysicsModules/Ode/AssemblyInfo.cs | 4 + .../Region/PhysicsModules/Ode/ODECharacter.cs | 2 +- OpenSim/Region/PhysicsModules/Ode/ODEPrim.cs | 2 +- .../Region/PhysicsModules/Ode/OdePlugin.cs | 70 +- OpenSim/Region/PhysicsModules/Ode/OdeScene.cs | 111 +- .../PhysicsModules/Ode/Tests/ODETestClass.cs | 8 +- .../Region/PhysicsModules/POS/AssemblyInfo.cs | 4 + .../Region/PhysicsModules/POS/POSPlugin.cs | 42 +- OpenSim/Region/PhysicsModules/POS/POSScene.cs | 56 +- .../SharedBase/NullPhysicsScene.cs | 5 - .../SharedBase/PhysicsPluginManager.cs | 2 +- .../PhysicsModules/SharedBase/PhysicsScene.cs | 13 +- prebuild.xml | 4 +- 24 files changed, 1518 insertions(+), 1313 deletions(-) rename OpenSim/{Region/CoreModules/Framework/Statistics/Logging => Framework}/LogWriter.cs (99%) diff --git a/OpenSim/Region/CoreModules/Framework/Statistics/Logging/LogWriter.cs b/OpenSim/Framework/LogWriter.cs similarity index 99% rename from OpenSim/Region/CoreModules/Framework/Statistics/Logging/LogWriter.cs rename to OpenSim/Framework/LogWriter.cs index a176958669..2e0bf4a354 100755 --- a/OpenSim/Region/CoreModules/Framework/Statistics/Logging/LogWriter.cs +++ b/OpenSim/Framework/LogWriter.cs @@ -30,7 +30,7 @@ using System.IO; using System.Text; using log4net; -namespace OpenSim.Region.CoreModules.Framework.Statistics.Logging +namespace OpenSim.Framework { /// /// Class for writing a high performance, high volume log file. diff --git a/OpenSim/Region/PhysicsModules/BasicPhysics/AssemblyInfo.cs b/OpenSim/Region/PhysicsModules/BasicPhysics/AssemblyInfo.cs index 7d054ddac2..1765ae0867 100644 --- a/OpenSim/Region/PhysicsModules/BasicPhysics/AssemblyInfo.cs +++ b/OpenSim/Region/PhysicsModules/BasicPhysics/AssemblyInfo.cs @@ -27,6 +27,7 @@ using System.Reflection; using System.Runtime.InteropServices; +using Mono.Addins; // Information about this assembly is defined by the following // attributes. @@ -34,11 +35,11 @@ using System.Runtime.InteropServices; // change them to the information which is associated with the assembly // you compile. -[assembly : AssemblyTitle("BasicPhysicsPlugin")] +[assembly : AssemblyTitle("BasicPhysicsModule")] [assembly : AssemblyDescription("")] [assembly : AssemblyConfiguration("")] [assembly : AssemblyCompany("http://opensimulator.org")] -[assembly : AssemblyProduct("BasicPhysicsPlugin")] +[assembly : AssemblyProduct("BasicPhysicsModule")] [assembly : AssemblyCopyright("Copyright (c) OpenSimulator.org Developers")] [assembly : AssemblyTrademark("")] [assembly : AssemblyCulture("")] @@ -56,3 +57,6 @@ using System.Runtime.InteropServices; // numbers with the '*' character (the default): [assembly : AssemblyVersion("0.8.2.*")] + +[assembly: Addin("OpenSim.Region.PhysicsModule.BasicPhysics", OpenSim.VersionInfo.VersionNumber)] +[assembly: AddinDependency("OpenSim.Region.Framework", OpenSim.VersionInfo.VersionNumber)] diff --git a/OpenSim/Region/PhysicsModules/BasicPhysics/BasicPhysicsPlugin.cs b/OpenSim/Region/PhysicsModules/BasicPhysics/BasicPhysicsPlugin.cs index e78c1914fa..db02eb6c7f 100644 --- a/OpenSim/Region/PhysicsModules/BasicPhysics/BasicPhysicsPlugin.cs +++ b/OpenSim/Region/PhysicsModules/BasicPhysics/BasicPhysicsPlugin.cs @@ -36,29 +36,29 @@ namespace OpenSim.Region.PhysicsModule.BasicPhysics /// /// Effectively a physics plugin that simulates no physics at all. /// - public class BasicPhysicsPlugin : IPhysicsPlugin - { - public BasicPhysicsPlugin() - { - } + //public class BasicPhysicsPlugin : IPhysicsPlugin + //{ + // public BasicPhysicsPlugin() + // { + // } - public bool Init() - { - return true; - } + // public bool Init() + // { + // return true; + // } - public PhysicsScene GetScene(string sceneIdentifier) - { - return new BasicScene(GetName(), sceneIdentifier); - } + // public PhysicsScene GetScene(string sceneIdentifier) + // { + // return new BasicScene(GetName(), sceneIdentifier); + // } - public string GetName() - { - return ("basicphysics"); - } + // public string GetName() + // { + // return ("basicphysics"); + // } - public void Dispose() - { - } - } + // public void Dispose() + // { + // } + //} } diff --git a/OpenSim/Region/PhysicsModules/BasicPhysics/BasicPhysicsScene.cs b/OpenSim/Region/PhysicsModules/BasicPhysics/BasicPhysicsScene.cs index 8b9e65afb1..5ec0f858b5 100644 --- a/OpenSim/Region/PhysicsModules/BasicPhysics/BasicPhysicsScene.cs +++ b/OpenSim/Region/PhysicsModules/BasicPhysics/BasicPhysicsScene.cs @@ -28,9 +28,12 @@ using System; using System.Collections.Generic; using Nini.Config; +using Mono.Addins; using OpenMetaverse; using OpenSim.Framework; using OpenSim.Region.PhysicsModules.SharedBase; +using OpenSim.Region.Framework.Scenes; +using OpenSim.Region.Framework.Interfaces; namespace OpenSim.Region.PhysicsModule.BasicPhysics { @@ -41,32 +44,71 @@ namespace OpenSim.Region.PhysicsModule.BasicPhysics /// Not useful for anything at the moment apart from some regression testing in other components where some form /// of physics plugin is needed. /// - public class BasicScene : PhysicsScene + [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "BasicPhysicsScene")] + public class BasicScene : PhysicsScene, INonSharedRegionModule { private List _actors = new List(); private List _prims = new List(); private float[] _heightMap; private Vector3 m_regionExtent; + private bool m_Enabled = false; + //protected internal string sceneIdentifier; - - public BasicScene(string engineType, string _sceneIdentifier) + #region INonSharedRegionModule + public string Name { - EngineType = engineType; - Name = EngineType + "/" + _sceneIdentifier; - //sceneIdentifier = _sceneIdentifier; + get { return "basicphysics"; } } - public override void Initialise(IMesher meshmerizer, IConfigSource config) + public Type ReplaceableInterface { - throw new Exception("Should not be called."); + get { return null; } } - public override void Initialise(IMesher meshmerizer, IConfigSource config, Vector3 regionExtent) + public void Initialise(IConfigSource source) { - m_regionExtent = regionExtent; + // TODO: Move this out of Startup + IConfig config = source.Configs["Startup"]; + if (config != null) + { + string physics = config.GetString("physics", string.Empty); + if (physics == Name) + m_Enabled = true; + } + } + public void Close() + { + } + + public void AddRegion(Scene scene) + { + if (!m_Enabled) + return; + + EngineType = Name; + PhysicsSceneName = EngineType + "/" + scene.RegionInfo.RegionName; + + scene.RegisterModuleInterface(this); + m_regionExtent = new Vector3(scene.RegionInfo.RegionSizeX, scene.RegionInfo.RegionSizeY, scene.RegionInfo.RegionSizeZ); + + } + + public void RemoveRegion(Scene scene) + { + if (!m_Enabled) + return; + } + + public void RegionLoaded(Scene scene) + { + if (!m_Enabled) + return; + } + #endregion + public override void Dispose() {} public override PhysicsActor AddPrimShape(string primName, PrimitiveBaseShape pbs, Vector3 position, @@ -206,5 +248,6 @@ namespace OpenSim.Region.PhysicsModule.BasicPhysics Dictionary returncolliders = new Dictionary(); return returncolliders; } + } } diff --git a/OpenSim/Region/PhysicsModules/BulletS/BSPlugin.cs b/OpenSim/Region/PhysicsModules/BulletS/BSPlugin.cs index f7954d8999..7fc51f78cb 100644 --- a/OpenSim/Region/PhysicsModules/BulletS/BSPlugin.cs +++ b/OpenSim/Region/PhysicsModules/BulletS/BSPlugin.cs @@ -40,37 +40,37 @@ namespace OpenSim.Region.PhysicsModule.BulletS /// The unmanaged library is compiled and linked statically with Bullet /// to create BulletSim.dll and libBulletSim.so (for both 32 and 64 bit). /// -public class BSPlugin : IPhysicsPlugin -{ - //private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); +//public class BSPlugin : IPhysicsPlugin +//{ +// //private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - private BSScene _mScene; +// private BSScene _mScene; - public BSPlugin() - { - } +// public BSPlugin() +// { +// } - public bool Init() - { - return true; - } +// public bool Init() +// { +// return true; +// } - public PhysicsScene GetScene(String sceneIdentifier) - { - if (_mScene == null) - { - _mScene = new BSScene(GetName(), sceneIdentifier); - } - return (_mScene); - } +// public PhysicsScene GetScene(String sceneIdentifier) +// { +// if (_mScene == null) +// { +// _mScene = new BSScene(GetName(), sceneIdentifier); +// } +// return (_mScene); +// } - public string GetName() - { - return ("BulletSim"); - } +// public string GetName() +// { +// return ("BulletSim"); +// } - public void Dispose() - { - } -} +// public void Dispose() +// { +// } +//} } diff --git a/OpenSim/Region/PhysicsModules/BulletS/BSScene.cs b/OpenSim/Region/PhysicsModules/BulletS/BSScene.cs index 80f98ef653..26af343887 100644 --- a/OpenSim/Region/PhysicsModules/BulletS/BSScene.cs +++ b/OpenSim/Region/PhysicsModules/BulletS/BSScene.cs @@ -33,1249 +33,1294 @@ using System.Text; using System.Threading; using OpenSim.Framework; using OpenSim.Framework.Monitoring; -using OpenSim.Region.Framework; -using OpenSim.Region.CoreModules; -using Logging = OpenSim.Region.CoreModules.Framework.Statistics.Logging; +using OpenSim.Region.Framework.Scenes; +using OpenSim.Region.Framework.Interfaces; using OpenSim.Region.PhysicsModules.SharedBase; using Nini.Config; using log4net; using OpenMetaverse; +using Mono.Addins; namespace OpenSim.Region.PhysicsModule.BulletS { -public sealed class BSScene : PhysicsScene, IPhysicsParameters -{ - internal static readonly ILog m_log = LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - internal static readonly string LogHeader = "[BULLETS SCENE]"; - - // The name of the region we're working for. - public string RegionName { get; private set; } - - public string BulletSimVersion = "?"; - - // The handle to the underlying managed or unmanaged version of Bullet being used. - public string BulletEngineName { get; private set; } - public BSAPITemplate PE; - - // If the physics engine is running on a separate thread - public Thread m_physicsThread; - - public Dictionary PhysObjects; - public BSShapeCollection Shapes; - - // Keeping track of the objects with collisions so we can report begin and end of a collision - public HashSet ObjectsWithCollisions = new HashSet(); - public HashSet ObjectsWithNoMoreCollisions = new HashSet(); - - // All the collision processing is protected with this lock object - public Object CollisionLock = new Object(); - - // Properties are updated here - public Object UpdateLock = new Object(); - public HashSet ObjectsWithUpdates = new HashSet(); - - // Keep track of all the avatars so we can send them a collision event - // every tick so OpenSim will update its animation. - private HashSet AvatarsInScene = new HashSet(); - private Object AvatarsInSceneLock = new Object(); - - // let my minuions use my logger - public ILog Logger { get { return m_log; } } - - public IMesher mesher; - public uint WorldID { get; private set; } - public BulletWorld World { get; private set; } - - // All the constraints that have been allocated in this instance. - public BSConstraintCollection Constraints { get; private set; } - - // Simulation parameters - //internal float m_physicsStepTime; // if running independently, the interval simulated by default - - internal int m_maxSubSteps; - internal float m_fixedTimeStep; - - internal float m_simulatedTime; // the time simulated previously. Used for physics framerate calc. - - internal long m_simulationStep = 0; // The current simulation step. - public long SimulationStep { get { return m_simulationStep; } } - // A number to use for SimulationStep that is probably not any step value - // Used by the collision code (which remembers the step when a collision happens) to remember not any simulation step. - public static long NotASimulationStep = -1234; - - internal float LastTimeStep { get; private set; } // The simulation time from the last invocation of Simulate() - - internal float NominalFrameRate { get; set; } // Parameterized ideal frame rate that simulation is scaled to - - // Physical objects can register for prestep or poststep events - public delegate void PreStepAction(float timeStep); - public delegate void PostStepAction(float timeStep); - public event PreStepAction BeforeStep; - public event PostStepAction AfterStep; - - // A value of the time 'now' so all the collision and update routines do not have to get their own - // Set to 'now' just before all the prims and actors are called for collisions and updates - public int SimulationNowTime { get; private set; } - - // True if initialized and ready to do simulation steps - private bool m_initialized = false; - - // Flag which is true when processing taints. - // Not guaranteed to be correct all the time (don't depend on this) but good for debugging. - public bool InTaintTime { get; private set; } - - // Pinned memory used to pass step information between managed and unmanaged - internal int m_maxCollisionsPerFrame; - internal CollisionDesc[] m_collisionArray; - - internal int m_maxUpdatesPerFrame; - internal EntityProperties[] m_updateArray; - - /// - /// Used to control physics simulation timing if Bullet is running on its own thread. - /// - private ManualResetEvent m_updateWaitEvent; - - public const uint TERRAIN_ID = 0; // OpenSim senses terrain with a localID of zero - public const uint GROUNDPLANE_ID = 1; - public const uint CHILDTERRAIN_ID = 2; // Terrain allocated based on our mega-prim childre start here - - public float SimpleWaterLevel { get; set; } - public BSTerrainManager TerrainManager { get; private set; } - - public ConfigurationParameters Params + [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "BulletSPhysicsScene")] + public sealed class BSScene : PhysicsScene, IPhysicsParameters, INonSharedRegionModule { - get { return UnmanagedParams[0]; } - } - public Vector3 DefaultGravity - { - get { return new Vector3(0f, 0f, Params.gravity); } - } - // Just the Z value of the gravity - public float DefaultGravityZ - { - get { return Params.gravity; } - } + internal static readonly ILog m_log = LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); + internal static readonly string LogHeader = "[BULLETS SCENE]"; - // When functions in the unmanaged code must be called, it is only - // done at a known time just before the simulation step. The taint - // system saves all these function calls and executes them in - // order before the simulation. - public delegate void TaintCallback(); - private struct TaintCallbackEntry - { - public String originator; - public String ident; - public TaintCallback callback; - public TaintCallbackEntry(string pIdent, TaintCallback pCallBack) + private bool m_Enabled = false; + private IConfigSource m_Config; + + // The name of the region we're working for. + public string RegionName { get; private set; } + + public string BulletSimVersion = "?"; + + // The handle to the underlying managed or unmanaged version of Bullet being used. + public string BulletEngineName { get; private set; } + public BSAPITemplate PE; + + // If the physics engine is running on a separate thread + public Thread m_physicsThread; + + public Dictionary PhysObjects; + public BSShapeCollection Shapes; + + // Keeping track of the objects with collisions so we can report begin and end of a collision + public HashSet ObjectsWithCollisions = new HashSet(); + public HashSet ObjectsWithNoMoreCollisions = new HashSet(); + + // All the collision processing is protected with this lock object + public Object CollisionLock = new Object(); + + // Properties are updated here + public Object UpdateLock = new Object(); + public HashSet ObjectsWithUpdates = new HashSet(); + + // Keep track of all the avatars so we can send them a collision event + // every tick so OpenSim will update its animation. + private HashSet AvatarsInScene = new HashSet(); + private Object AvatarsInSceneLock = new Object(); + + // let my minuions use my logger + public ILog Logger { get { return m_log; } } + + public IMesher mesher; + public uint WorldID { get; private set; } + public BulletWorld World { get; private set; } + + // All the constraints that have been allocated in this instance. + public BSConstraintCollection Constraints { get; private set; } + + // Simulation parameters + //internal float m_physicsStepTime; // if running independently, the interval simulated by default + + internal int m_maxSubSteps; + internal float m_fixedTimeStep; + + internal float m_simulatedTime; // the time simulated previously. Used for physics framerate calc. + + internal long m_simulationStep = 0; // The current simulation step. + public long SimulationStep { get { return m_simulationStep; } } + // A number to use for SimulationStep that is probably not any step value + // Used by the collision code (which remembers the step when a collision happens) to remember not any simulation step. + public static long NotASimulationStep = -1234; + + internal float LastTimeStep { get; private set; } // The simulation time from the last invocation of Simulate() + + internal float NominalFrameRate { get; set; } // Parameterized ideal frame rate that simulation is scaled to + + // Physical objects can register for prestep or poststep events + public delegate void PreStepAction(float timeStep); + public delegate void PostStepAction(float timeStep); + public event PreStepAction BeforeStep; + public event PostStepAction AfterStep; + + // A value of the time 'now' so all the collision and update routines do not have to get their own + // Set to 'now' just before all the prims and actors are called for collisions and updates + public int SimulationNowTime { get; private set; } + + // True if initialized and ready to do simulation steps + private bool m_initialized = false; + + // Flag which is true when processing taints. + // Not guaranteed to be correct all the time (don't depend on this) but good for debugging. + public bool InTaintTime { get; private set; } + + // Pinned memory used to pass step information between managed and unmanaged + internal int m_maxCollisionsPerFrame; + internal CollisionDesc[] m_collisionArray; + + internal int m_maxUpdatesPerFrame; + internal EntityProperties[] m_updateArray; + + /// + /// Used to control physics simulation timing if Bullet is running on its own thread. + /// + private ManualResetEvent m_updateWaitEvent; + + public const uint TERRAIN_ID = 0; // OpenSim senses terrain with a localID of zero + public const uint GROUNDPLANE_ID = 1; + public const uint CHILDTERRAIN_ID = 2; // Terrain allocated based on our mega-prim childre start here + + public float SimpleWaterLevel { get; set; } + public BSTerrainManager TerrainManager { get; private set; } + + public ConfigurationParameters Params { - originator = BSScene.DetailLogZero; - ident = pIdent; - callback = pCallBack; + get { return UnmanagedParams[0]; } } - public TaintCallbackEntry(string pOrigin, string pIdent, TaintCallback pCallBack) + public Vector3 DefaultGravity { - originator = pOrigin; - ident = pIdent; - callback = pCallBack; + get { return new Vector3(0f, 0f, Params.gravity); } } - } - private Object _taintLock = new Object(); // lock for using the next object - private List _taintOperations; - private Dictionary _postTaintOperations; - private List _postStepOperations; - - // A pointer to an instance if this structure is passed to the C++ code - // Used to pass basic configuration values to the unmanaged code. - internal ConfigurationParameters[] UnmanagedParams; - - // Sometimes you just have to log everything. - public Logging.LogWriter PhysicsLogging; - private bool m_physicsLoggingEnabled; - private string m_physicsLoggingDir; - private string m_physicsLoggingPrefix; - private int m_physicsLoggingFileMinutes; - private bool m_physicsLoggingDoFlush; - private bool m_physicsPhysicalDumpEnabled; - public int PhysicsMetricDumpFrames { get; set; } - // 'true' of the vehicle code is to log lots of details - public bool VehicleLoggingEnabled { get; private set; } - public bool VehiclePhysicalLoggingEnabled { get; private set; } - - #region Construction and Initialization - public BSScene(string engineType, string identifier) - { - m_initialized = false; - - // The name of the region we're working for is passed to us. Keep for identification. - RegionName = identifier; - - // Set identifying variables in the PhysicsScene interface. - EngineType = engineType; - Name = EngineType + "/" + RegionName; - } - - // Old version of initialization that assumes legacy sized regions (256x256) - public override void Initialise(IMesher meshmerizer, IConfigSource config) - { - m_log.ErrorFormat("{0} WARNING WARNING WARNING! BulletSim initialized without region extent specification. Terrain will be messed up."); - Vector3 regionExtent = new Vector3( Constants.RegionSize, Constants.RegionSize, Constants.RegionSize); - Initialise(meshmerizer, config, regionExtent); - - } - - public override void Initialise(IMesher meshmerizer, IConfigSource config, Vector3 regionExtent) - { - mesher = meshmerizer; - _taintOperations = new List(); - _postTaintOperations = new Dictionary(); - _postStepOperations = new List(); - PhysObjects = new Dictionary(); - Shapes = new BSShapeCollection(this); - - m_simulatedTime = 0f; - LastTimeStep = 0.1f; - - // Allocate pinned memory to pass parameters. - UnmanagedParams = new ConfigurationParameters[1]; - - // Set default values for physics parameters plus any overrides from the ini file - GetInitialParameterValues(config); - - // Force some parameters to values depending on other configurations - // Only use heightmap terrain implementation if terrain larger than legacy size - if ((uint)regionExtent.X > Constants.RegionSize || (uint)regionExtent.Y > Constants.RegionSize) + // Just the Z value of the gravity + public float DefaultGravityZ { - m_log.WarnFormat("{0} Forcing terrain implementation to heightmap for large region", LogHeader); - BSParam.TerrainImplementation = (float)BSTerrainPhys.TerrainImplementation.Heightmap; + get { return Params.gravity; } } - // Get the connection to the physics engine (could be native or one of many DLLs) - PE = SelectUnderlyingBulletEngine(BulletEngineName); - - // Enable very detailed logging. - // By creating an empty logger when not logging, the log message invocation code - // can be left in and every call doesn't have to check for null. - if (m_physicsLoggingEnabled) + // When functions in the unmanaged code must be called, it is only + // done at a known time just before the simulation step. The taint + // system saves all these function calls and executes them in + // order before the simulation. + public delegate void TaintCallback(); + private struct TaintCallbackEntry { - PhysicsLogging = new Logging.LogWriter(m_physicsLoggingDir, m_physicsLoggingPrefix, m_physicsLoggingFileMinutes, m_physicsLoggingDoFlush); - PhysicsLogging.ErrorLogger = m_log; // for DEBUG. Let's the logger output its own error messages. - } - else - { - PhysicsLogging = new Logging.LogWriter(); - } - - // Allocate memory for returning of the updates and collisions from the physics engine - m_collisionArray = new CollisionDesc[m_maxCollisionsPerFrame]; - m_updateArray = new EntityProperties[m_maxUpdatesPerFrame]; - - // The bounding box for the simulated world. The origin is 0,0,0 unless we're - // a child in a mega-region. - // Bullet actually doesn't care about the extents of the simulated - // area. It tracks active objects no matter where they are. - Vector3 worldExtent = regionExtent; - - World = PE.Initialize(worldExtent, Params, m_maxCollisionsPerFrame, ref m_collisionArray, m_maxUpdatesPerFrame, ref m_updateArray); - - Constraints = new BSConstraintCollection(World); - - TerrainManager = new BSTerrainManager(this, worldExtent); - TerrainManager.CreateInitialGroundPlaneAndTerrain(); - - // Put some informational messages into the log file. - m_log.InfoFormat("{0} Linksets implemented with {1}", LogHeader, (BSLinkset.LinksetImplementation)BSParam.LinksetImplementation); - - InTaintTime = false; - m_initialized = true; - - // If the physics engine runs on its own thread, start same. - if (BSParam.UseSeparatePhysicsThread) - { - // The physics simulation should happen independently of the heartbeat loop - m_physicsThread - = WorkManager.StartThread( - BulletSPluginPhysicsThread, - string.Format("{0} ({1})", BulletEngineName, RegionName), - ThreadPriority.Normal, - true, - true); - } - } - - // All default parameter values are set here. There should be no values set in the - // variable definitions. - private void GetInitialParameterValues(IConfigSource config) - { - ConfigurationParameters parms = new ConfigurationParameters(); - UnmanagedParams[0] = parms; - - BSParam.SetParameterDefaultValues(this); - - if (config != null) - { - // If there are specifications in the ini file, use those values - IConfig pConfig = config.Configs["BulletSim"]; - if (pConfig != null) + public String originator; + public String ident; + public TaintCallback callback; + public TaintCallbackEntry(string pIdent, TaintCallback pCallBack) { - BSParam.SetParameterConfigurationValues(this, pConfig); + originator = BSScene.DetailLogZero; + ident = pIdent; + callback = pCallBack; + } + public TaintCallbackEntry(string pOrigin, string pIdent, TaintCallback pCallBack) + { + originator = pOrigin; + ident = pIdent; + callback = pCallBack; + } + } + private Object _taintLock = new Object(); // lock for using the next object + private List _taintOperations; + private Dictionary _postTaintOperations; + private List _postStepOperations; - // There are two Bullet implementations to choose from - BulletEngineName = pConfig.GetString("BulletEngine", "BulletUnmanaged"); + // A pointer to an instance if this structure is passed to the C++ code + // Used to pass basic configuration values to the unmanaged code. + internal ConfigurationParameters[] UnmanagedParams; - // Very detailed logging for physics debugging - // TODO: the boolean values can be moved to the normal parameter processing. - m_physicsLoggingEnabled = pConfig.GetBoolean("PhysicsLoggingEnabled", false); - m_physicsLoggingDir = pConfig.GetString("PhysicsLoggingDir", "."); - m_physicsLoggingPrefix = pConfig.GetString("PhysicsLoggingPrefix", "physics-%REGIONNAME%-"); - m_physicsLoggingFileMinutes = pConfig.GetInt("PhysicsLoggingFileMinutes", 5); - m_physicsLoggingDoFlush = pConfig.GetBoolean("PhysicsLoggingDoFlush", false); - m_physicsPhysicalDumpEnabled = pConfig.GetBoolean("PhysicsPhysicalDumpEnabled", false); - // Very detailed logging for vehicle debugging - VehicleLoggingEnabled = pConfig.GetBoolean("VehicleLoggingEnabled", false); - VehiclePhysicalLoggingEnabled = pConfig.GetBoolean("VehiclePhysicalLoggingEnabled", false); + // Sometimes you just have to log everything. + public LogWriter PhysicsLogging; + private bool m_physicsLoggingEnabled; + private string m_physicsLoggingDir; + private string m_physicsLoggingPrefix; + private int m_physicsLoggingFileMinutes; + private bool m_physicsLoggingDoFlush; + private bool m_physicsPhysicalDumpEnabled; + public int PhysicsMetricDumpFrames { get; set; } + // 'true' of the vehicle code is to log lots of details + public bool VehicleLoggingEnabled { get; private set; } + public bool VehiclePhysicalLoggingEnabled { get; private set; } - // Do any replacements in the parameters - m_physicsLoggingPrefix = m_physicsLoggingPrefix.Replace("%REGIONNAME%", RegionName); + #region INonSharedRegionModule + public string Name + { + get { return "BulletSim"; } + } + + public Type ReplaceableInterface + { + get { return null; } + } + + public void Initialise(IConfigSource source) + { + // TODO: Move this out of Startup + IConfig config = source.Configs["Startup"]; + if (config != null) + { + string physics = config.GetString("physics", string.Empty); + if (physics == Name) + { + m_Enabled = true; + m_Config = source; + } + } + + } + + public void Close() + { + } + + public void AddRegion(Scene scene) + { + if (!m_Enabled) + return; + + EngineType = Name; + RegionName = scene.RegionInfo.RegionName; + PhysicsSceneName = EngineType + "/" + RegionName; + + scene.RegisterModuleInterface(this); + Vector3 extent = new Vector3(scene.RegionInfo.RegionSizeX, scene.RegionInfo.RegionSizeY, scene.RegionInfo.RegionSizeZ); + Initialise(m_Config, extent); + } + + public void RemoveRegion(Scene scene) + { + if (!m_Enabled) + return; + } + + public void RegionLoaded(Scene scene) + { + if (!m_Enabled) + return; + + mesher = scene.RequestModuleInterface(); + if (mesher == null) + m_log.WarnFormat("{0} No mesher. Things will not work well.", LogHeader); + } + #endregion + + #region Initialization + + private void Initialise(IConfigSource config, Vector3 regionExtent) + { + _taintOperations = new List(); + _postTaintOperations = new Dictionary(); + _postStepOperations = new List(); + PhysObjects = new Dictionary(); + Shapes = new BSShapeCollection(this); + + m_simulatedTime = 0f; + LastTimeStep = 0.1f; + + // Allocate pinned memory to pass parameters. + UnmanagedParams = new ConfigurationParameters[1]; + + // Set default values for physics parameters plus any overrides from the ini file + GetInitialParameterValues(config); + + // Force some parameters to values depending on other configurations + // Only use heightmap terrain implementation if terrain larger than legacy size + if ((uint)regionExtent.X > Constants.RegionSize || (uint)regionExtent.Y > Constants.RegionSize) + { + m_log.WarnFormat("{0} Forcing terrain implementation to heightmap for large region", LogHeader); + BSParam.TerrainImplementation = (float)BSTerrainPhys.TerrainImplementation.Heightmap; + } + + // Get the connection to the physics engine (could be native or one of many DLLs) + PE = SelectUnderlyingBulletEngine(BulletEngineName); + + // Enable very detailed logging. + // By creating an empty logger when not logging, the log message invocation code + // can be left in and every call doesn't have to check for null. + if (m_physicsLoggingEnabled) + { + PhysicsLogging = new LogWriter(m_physicsLoggingDir, m_physicsLoggingPrefix, m_physicsLoggingFileMinutes, m_physicsLoggingDoFlush); + PhysicsLogging.ErrorLogger = m_log; // for DEBUG. Let's the logger output its own error messages. } else { - // Nothing in the configuration INI file so assume unmanaged and other defaults. - BulletEngineName = "BulletUnmanaged"; - m_physicsLoggingEnabled = false; - VehicleLoggingEnabled = false; + PhysicsLogging = new LogWriter(); } - // The material characteristics. - BSMaterials.InitializeFromDefaults(Params); - if (pConfig != null) + // Allocate memory for returning of the updates and collisions from the physics engine + m_collisionArray = new CollisionDesc[m_maxCollisionsPerFrame]; + m_updateArray = new EntityProperties[m_maxUpdatesPerFrame]; + + // The bounding box for the simulated world. The origin is 0,0,0 unless we're + // a child in a mega-region. + // Bullet actually doesn't care about the extents of the simulated + // area. It tracks active objects no matter where they are. + Vector3 worldExtent = regionExtent; + + World = PE.Initialize(worldExtent, Params, m_maxCollisionsPerFrame, ref m_collisionArray, m_maxUpdatesPerFrame, ref m_updateArray); + + Constraints = new BSConstraintCollection(World); + + TerrainManager = new BSTerrainManager(this, worldExtent); + TerrainManager.CreateInitialGroundPlaneAndTerrain(); + + // Put some informational messages into the log file. + m_log.InfoFormat("{0} Linksets implemented with {1}", LogHeader, (BSLinkset.LinksetImplementation)BSParam.LinksetImplementation); + + InTaintTime = false; + m_initialized = true; + + // If the physics engine runs on its own thread, start same. + if (BSParam.UseSeparatePhysicsThread) { - // Let the user add new and interesting material property values. - BSMaterials.InitializefromParameters(pConfig); + // The physics simulation should happen independently of the heartbeat loop + m_physicsThread + = WorkManager.StartThread( + BulletSPluginPhysicsThread, + string.Format("{0} ({1})", BulletEngineName, RegionName), + ThreadPriority.Normal, + true, + true); } } - } - // A helper function that handles a true/false parameter and returns the proper float number encoding - float ParamBoolean(IConfig config, string parmName, float deflt) - { - float ret = deflt; - if (config.Contains(parmName)) + // All default parameter values are set here. There should be no values set in the + // variable definitions. + private void GetInitialParameterValues(IConfigSource config) { - ret = ConfigurationParameters.numericFalse; - if (config.GetBoolean(parmName, false)) + ConfigurationParameters parms = new ConfigurationParameters(); + UnmanagedParams[0] = parms; + + BSParam.SetParameterDefaultValues(this); + + if (config != null) { - ret = ConfigurationParameters.numericTrue; - } - } - return ret; - } - - // Select the connection to the actual Bullet implementation. - // The main engine selection is the engineName up to the first hypen. - // So "Bullet-2.80-OpenCL-Intel" specifies the 'bullet' class here and the whole name - // is passed to the engine to do its special selection, etc. - private BSAPITemplate SelectUnderlyingBulletEngine(string engineName) - { - // For the moment, do a simple switch statement. - // Someday do fancyness with looking up the interfaces in the assembly. - BSAPITemplate ret = null; - - string selectionName = engineName.ToLower(); - int hyphenIndex = engineName.IndexOf("-"); - if (hyphenIndex > 0) - selectionName = engineName.ToLower().Substring(0, hyphenIndex - 1); - - switch (selectionName) - { - case "bullet": - case "bulletunmanaged": - ret = new BSAPIUnman(engineName, this); - break; - case "bulletxna": - ret = new BSAPIXNA(engineName, this); - // Disable some features that are not implemented in BulletXNA - m_log.InfoFormat("{0} Disabling some physics features not implemented by BulletXNA", LogHeader); - m_log.InfoFormat("{0} Disabling ShouldUseBulletHACD", LogHeader); - BSParam.ShouldUseBulletHACD = false; - m_log.InfoFormat("{0} Disabling ShouldUseSingleConvexHullForPrims", LogHeader); - BSParam.ShouldUseSingleConvexHullForPrims = false; - m_log.InfoFormat("{0} Disabling ShouldUseGImpactShapeForPrims", LogHeader); - BSParam.ShouldUseGImpactShapeForPrims = false; - m_log.InfoFormat("{0} Setting terrain implimentation to Heightmap", LogHeader); - BSParam.TerrainImplementation = (float)BSTerrainPhys.TerrainImplementation.Heightmap; - break; - } - - if (ret == null) - { - m_log.ErrorFormat("{0} COULD NOT SELECT BULLET ENGINE: '[BulletSim]PhysicsEngine' must be either 'BulletUnmanaged-*' or 'BulletXNA-*'", LogHeader); - } - else - { - m_log.InfoFormat("{0} Selected bullet engine {1} -> {2}/{3}", LogHeader, engineName, ret.BulletEngineName, ret.BulletEngineVersion); - } - - return ret; - } - - public override void Dispose() - { - // m_log.DebugFormat("{0}: Dispose()", LogHeader); - - // make sure no stepping happens while we're deleting stuff - m_initialized = false; - - lock (PhysObjects) - { - foreach (KeyValuePair kvp in PhysObjects) - { - kvp.Value.Destroy(); - } - PhysObjects.Clear(); - } - - // Now that the prims are all cleaned up, there should be no constraints left - if (Constraints != null) - { - Constraints.Dispose(); - Constraints = null; - } - - if (Shapes != null) - { - Shapes.Dispose(); - Shapes = null; - } - - if (TerrainManager != null) - { - TerrainManager.ReleaseGroundPlaneAndTerrain(); - TerrainManager.Dispose(); - TerrainManager = null; - } - - // Anything left in the unmanaged code should be cleaned out - PE.Shutdown(World); - - // Not logging any more - PhysicsLogging.Close(); - } - #endregion // Construction and Initialization - - #region Prim and Avatar addition and removal - - public override PhysicsActor AddAvatar(string avName, Vector3 position, Vector3 velocity, Vector3 size, bool isFlying) - { - m_log.ErrorFormat("{0}: CALL TO AddAvatar in BSScene. NOT IMPLEMENTED", LogHeader); - return null; - } - - public override PhysicsActor AddAvatar(uint localID, string avName, Vector3 position, Vector3 velocity, Vector3 size, bool isFlying) - { - // m_log.DebugFormat("{0}: AddAvatar: {1}", LogHeader, avName); - - if (!m_initialized) return null; - - BSCharacter actor = new BSCharacter(localID, avName, this, position, velocity, size, isFlying); - lock (PhysObjects) - PhysObjects.Add(localID, actor); - - // TODO: Remove kludge someday. - // We must generate a collision for avatars whether they collide or not. - // This is required by OpenSim to update avatar animations, etc. - lock (AvatarsInSceneLock) - AvatarsInScene.Add(actor); - - return actor; - } - - public override void RemoveAvatar(PhysicsActor actor) - { - // m_log.DebugFormat("{0}: RemoveAvatar", LogHeader); - - if (!m_initialized) return; - - BSCharacter bsactor = actor as BSCharacter; - if (bsactor != null) - { - try - { - lock (PhysObjects) - PhysObjects.Remove(bsactor.LocalID); - // Remove kludge someday - lock (AvatarsInSceneLock) - AvatarsInScene.Remove(bsactor); - } - catch (Exception e) - { - m_log.WarnFormat("{0}: Attempt to remove avatar that is not in physics scene: {1}", LogHeader, e); - } - bsactor.Destroy(); - // bsactor.dispose(); - } - else - { - m_log.ErrorFormat("{0}: Requested to remove avatar that is not a BSCharacter. ID={1}, type={2}", - LogHeader, actor.LocalID, actor.GetType().Name); - } - } - - public override void RemovePrim(PhysicsActor prim) - { - if (!m_initialized) return; - - BSPhysObject bsprim = prim as BSPhysObject; - if (bsprim != null) - { - DetailLog("{0},RemovePrim,call", bsprim.LocalID); - // m_log.DebugFormat("{0}: RemovePrim. id={1}/{2}", LogHeader, bsprim.Name, bsprim.LocalID); - try - { - lock (PhysObjects) PhysObjects.Remove(bsprim.LocalID); - } - catch (Exception e) - { - m_log.ErrorFormat("{0}: Attempt to remove prim that is not in physics scene: {1}", LogHeader, e); - } - bsprim.Destroy(); - // bsprim.dispose(); - } - else - { - m_log.ErrorFormat("{0}: Attempt to remove prim that is not a BSPrim type.", LogHeader); - } - } - - public override PhysicsActor AddPrimShape(string primName, PrimitiveBaseShape pbs, Vector3 position, - Vector3 size, Quaternion rotation, bool isPhysical, uint localID) - { - // m_log.DebugFormat("{0}: AddPrimShape2: {1}", LogHeader, primName); - - if (!m_initialized) return null; - - // DetailLog("{0},BSScene.AddPrimShape,call", localID); - - BSPhysObject prim = new BSPrimLinkable(localID, primName, this, position, size, rotation, pbs, isPhysical); - lock (PhysObjects) PhysObjects.Add(localID, prim); - return prim; - } - - // This is a call from the simulator saying that some physical property has been updated. - // The BulletSim driver senses the changing of relevant properties so this taint - // information call is not needed. - public override void AddPhysicsActorTaint(PhysicsActor prim) { } - - #endregion // Prim and Avatar addition and removal - - #region Simulation - - // Call from the simulator to send physics information to the simulator objects. - // This pushes all the collision and property update events into the objects in - // the simulator and, since it is on the heartbeat thread, there is an implicit - // locking of those data structures from other heartbeat events. - // If the physics engine is running on a separate thread, the update information - // will be in the ObjectsWithCollions and ObjectsWithUpdates structures. - public override float Simulate(float timeStep) - { - if (!BSParam.UseSeparatePhysicsThread) - { - DoPhysicsStep(timeStep); - } - return SendUpdatesToSimulator(timeStep); - } - - // Call the physics engine to do one 'timeStep' and collect collisions and updates - // into ObjectsWithCollisions and ObjectsWithUpdates data structures. - private void DoPhysicsStep(float timeStep) - { - // prevent simulation until we've been initialized - if (!m_initialized) return; - - LastTimeStep = timeStep; - - int updatedEntityCount = 0; - int collidersCount = 0; - - int beforeTime = Util.EnvironmentTickCount(); - int simTime = 0; - - int numTaints = _taintOperations.Count; - InTaintTime = true; // Only used for debugging so locking is not necessary. - - // update the prim states while we know the physics engine is not busy - ProcessTaints(); - - // Some of the physical objects requre individual, pre-step calls - // (vehicles and avatar movement, in particular) - TriggerPreStepEvent(timeStep); - - // the prestep actions might have added taints - numTaints += _taintOperations.Count; - ProcessTaints(); - - InTaintTime = false; // Only used for debugging so locking is not necessary. - - // The following causes the unmanaged code to output ALL the values found in ALL the objects in the world. - // Only enable this in a limited test world with few objects. - if (m_physicsPhysicalDumpEnabled) - PE.DumpAllInfo(World); - - // step the physical world one interval - m_simulationStep++; - int numSubSteps = 0; - try - { - numSubSteps = PE.PhysicsStep(World, timeStep, m_maxSubSteps, m_fixedTimeStep, out updatedEntityCount, out collidersCount); - - } - catch (Exception e) - { - m_log.WarnFormat("{0},PhysicsStep Exception: nTaints={1}, substeps={2}, updates={3}, colliders={4}, e={5}", - LogHeader, numTaints, numSubSteps, updatedEntityCount, collidersCount, e); - DetailLog("{0},PhysicsStepException,call, nTaints={1}, substeps={2}, updates={3}, colliders={4}", - DetailLogZero, numTaints, numSubSteps, updatedEntityCount, collidersCount); - updatedEntityCount = 0; - collidersCount = 0; - } - - // Make the physics engine dump useful statistics periodically - if (PhysicsMetricDumpFrames != 0 && ((m_simulationStep % PhysicsMetricDumpFrames) == 0)) - PE.DumpPhysicsStatistics(World); - - // Get a value for 'now' so all the collision and update routines don't have to get their own. - SimulationNowTime = Util.EnvironmentTickCount(); - - // Send collision information to the colliding objects. The objects decide if the collision - // is 'real' (like linksets don't collide with themselves) and the individual objects - // know if the simulator has subscribed to collisions. - lock (CollisionLock) - { - if (collidersCount > 0) - { - lock (PhysObjects) + // If there are specifications in the ini file, use those values + IConfig pConfig = config.Configs["BulletSim"]; + if (pConfig != null) { - for (int ii = 0; ii < collidersCount; ii++) - { - uint cA = m_collisionArray[ii].aID; - uint cB = m_collisionArray[ii].bID; - Vector3 point = m_collisionArray[ii].point; - Vector3 normal = m_collisionArray[ii].normal; - float penetration = m_collisionArray[ii].penetration; - SendCollision(cA, cB, point, normal, penetration); - SendCollision(cB, cA, point, -normal, penetration); - } + BSParam.SetParameterConfigurationValues(this, pConfig); + + // There are two Bullet implementations to choose from + BulletEngineName = pConfig.GetString("BulletEngine", "BulletUnmanaged"); + + // Very detailed logging for physics debugging + // TODO: the boolean values can be moved to the normal parameter processing. + m_physicsLoggingEnabled = pConfig.GetBoolean("PhysicsLoggingEnabled", false); + m_physicsLoggingDir = pConfig.GetString("PhysicsLoggingDir", "."); + m_physicsLoggingPrefix = pConfig.GetString("PhysicsLoggingPrefix", "physics-%REGIONNAME%-"); + m_physicsLoggingFileMinutes = pConfig.GetInt("PhysicsLoggingFileMinutes", 5); + m_physicsLoggingDoFlush = pConfig.GetBoolean("PhysicsLoggingDoFlush", false); + m_physicsPhysicalDumpEnabled = pConfig.GetBoolean("PhysicsPhysicalDumpEnabled", false); + // Very detailed logging for vehicle debugging + VehicleLoggingEnabled = pConfig.GetBoolean("VehicleLoggingEnabled", false); + VehiclePhysicalLoggingEnabled = pConfig.GetBoolean("VehiclePhysicalLoggingEnabled", false); + + // Do any replacements in the parameters + m_physicsLoggingPrefix = m_physicsLoggingPrefix.Replace("%REGIONNAME%", RegionName); + } + else + { + // Nothing in the configuration INI file so assume unmanaged and other defaults. + BulletEngineName = "BulletUnmanaged"; + m_physicsLoggingEnabled = false; + VehicleLoggingEnabled = false; + } + + // The material characteristics. + BSMaterials.InitializeFromDefaults(Params); + if (pConfig != null) + { + // Let the user add new and interesting material property values. + BSMaterials.InitializefromParameters(pConfig); } } } - // If any of the objects had updated properties, tell the managed objects about the update - // and remember that there was a change so it will be passed to the simulator. - lock (UpdateLock) + // A helper function that handles a true/false parameter and returns the proper float number encoding + float ParamBoolean(IConfig config, string parmName, float deflt) { - if (updatedEntityCount > 0) + float ret = deflt; + if (config.Contains(parmName)) { - lock (PhysObjects) + ret = ConfigurationParameters.numericFalse; + if (config.GetBoolean(parmName, false)) { - for (int ii = 0; ii < updatedEntityCount; ii++) + ret = ConfigurationParameters.numericTrue; + } + } + return ret; + } + + // Select the connection to the actual Bullet implementation. + // The main engine selection is the engineName up to the first hypen. + // So "Bullet-2.80-OpenCL-Intel" specifies the 'bullet' class here and the whole name + // is passed to the engine to do its special selection, etc. + private BSAPITemplate SelectUnderlyingBulletEngine(string engineName) + { + // For the moment, do a simple switch statement. + // Someday do fancyness with looking up the interfaces in the assembly. + BSAPITemplate ret = null; + + string selectionName = engineName.ToLower(); + int hyphenIndex = engineName.IndexOf("-"); + if (hyphenIndex > 0) + selectionName = engineName.ToLower().Substring(0, hyphenIndex - 1); + + switch (selectionName) + { + case "bullet": + case "bulletunmanaged": + ret = new BSAPIUnman(engineName, this); + break; + case "bulletxna": + ret = new BSAPIXNA(engineName, this); + // Disable some features that are not implemented in BulletXNA + m_log.InfoFormat("{0} Disabling some physics features not implemented by BulletXNA", LogHeader); + m_log.InfoFormat("{0} Disabling ShouldUseBulletHACD", LogHeader); + BSParam.ShouldUseBulletHACD = false; + m_log.InfoFormat("{0} Disabling ShouldUseSingleConvexHullForPrims", LogHeader); + BSParam.ShouldUseSingleConvexHullForPrims = false; + m_log.InfoFormat("{0} Disabling ShouldUseGImpactShapeForPrims", LogHeader); + BSParam.ShouldUseGImpactShapeForPrims = false; + m_log.InfoFormat("{0} Setting terrain implimentation to Heightmap", LogHeader); + BSParam.TerrainImplementation = (float)BSTerrainPhys.TerrainImplementation.Heightmap; + break; + } + + if (ret == null) + { + m_log.ErrorFormat("{0} COULD NOT SELECT BULLET ENGINE: '[BulletSim]PhysicsEngine' must be either 'BulletUnmanaged-*' or 'BulletXNA-*'", LogHeader); + } + else + { + m_log.InfoFormat("{0} Selected bullet engine {1} -> {2}/{3}", LogHeader, engineName, ret.BulletEngineName, ret.BulletEngineVersion); + } + + return ret; + } + + public override void Dispose() + { + // m_log.DebugFormat("{0}: Dispose()", LogHeader); + + // make sure no stepping happens while we're deleting stuff + m_initialized = false; + + lock (PhysObjects) + { + foreach (KeyValuePair kvp in PhysObjects) + { + kvp.Value.Destroy(); + } + PhysObjects.Clear(); + } + + // Now that the prims are all cleaned up, there should be no constraints left + if (Constraints != null) + { + Constraints.Dispose(); + Constraints = null; + } + + if (Shapes != null) + { + Shapes.Dispose(); + Shapes = null; + } + + if (TerrainManager != null) + { + TerrainManager.ReleaseGroundPlaneAndTerrain(); + TerrainManager.Dispose(); + TerrainManager = null; + } + + // Anything left in the unmanaged code should be cleaned out + PE.Shutdown(World); + + // Not logging any more + PhysicsLogging.Close(); + } + #endregion // Construction and Initialization + + #region Prim and Avatar addition and removal + + public override PhysicsActor AddAvatar(string avName, Vector3 position, Vector3 velocity, Vector3 size, bool isFlying) + { + m_log.ErrorFormat("{0}: CALL TO AddAvatar in BSScene. NOT IMPLEMENTED", LogHeader); + return null; + } + + public override PhysicsActor AddAvatar(uint localID, string avName, Vector3 position, Vector3 velocity, Vector3 size, bool isFlying) + { + // m_log.DebugFormat("{0}: AddAvatar: {1}", LogHeader, avName); + + if (!m_initialized) return null; + + BSCharacter actor = new BSCharacter(localID, avName, this, position, velocity, size, isFlying); + lock (PhysObjects) + PhysObjects.Add(localID, actor); + + // TODO: Remove kludge someday. + // We must generate a collision for avatars whether they collide or not. + // This is required by OpenSim to update avatar animations, etc. + lock (AvatarsInSceneLock) + AvatarsInScene.Add(actor); + + return actor; + } + + public override void RemoveAvatar(PhysicsActor actor) + { + // m_log.DebugFormat("{0}: RemoveAvatar", LogHeader); + + if (!m_initialized) return; + + BSCharacter bsactor = actor as BSCharacter; + if (bsactor != null) + { + try + { + lock (PhysObjects) + PhysObjects.Remove(bsactor.LocalID); + // Remove kludge someday + lock (AvatarsInSceneLock) + AvatarsInScene.Remove(bsactor); + } + catch (Exception e) + { + m_log.WarnFormat("{0}: Attempt to remove avatar that is not in physics scene: {1}", LogHeader, e); + } + bsactor.Destroy(); + // bsactor.dispose(); + } + else + { + m_log.ErrorFormat("{0}: Requested to remove avatar that is not a BSCharacter. ID={1}, type={2}", + LogHeader, actor.LocalID, actor.GetType().Name); + } + } + + public override void RemovePrim(PhysicsActor prim) + { + if (!m_initialized) return; + + BSPhysObject bsprim = prim as BSPhysObject; + if (bsprim != null) + { + DetailLog("{0},RemovePrim,call", bsprim.LocalID); + // m_log.DebugFormat("{0}: RemovePrim. id={1}/{2}", LogHeader, bsprim.Name, bsprim.LocalID); + try + { + lock (PhysObjects) PhysObjects.Remove(bsprim.LocalID); + } + catch (Exception e) + { + m_log.ErrorFormat("{0}: Attempt to remove prim that is not in physics scene: {1}", LogHeader, e); + } + bsprim.Destroy(); + // bsprim.dispose(); + } + else + { + m_log.ErrorFormat("{0}: Attempt to remove prim that is not a BSPrim type.", LogHeader); + } + } + + public override PhysicsActor AddPrimShape(string primName, PrimitiveBaseShape pbs, Vector3 position, + Vector3 size, Quaternion rotation, bool isPhysical, uint localID) + { + // m_log.DebugFormat("{0}: AddPrimShape2: {1}", LogHeader, primName); + + if (!m_initialized) return null; + + // DetailLog("{0},BSScene.AddPrimShape,call", localID); + + BSPhysObject prim = new BSPrimLinkable(localID, primName, this, position, size, rotation, pbs, isPhysical); + lock (PhysObjects) PhysObjects.Add(localID, prim); + return prim; + } + + // This is a call from the simulator saying that some physical property has been updated. + // The BulletSim driver senses the changing of relevant properties so this taint + // information call is not needed. + public override void AddPhysicsActorTaint(PhysicsActor prim) { } + + #endregion // Prim and Avatar addition and removal + + #region Simulation + + // Call from the simulator to send physics information to the simulator objects. + // This pushes all the collision and property update events into the objects in + // the simulator and, since it is on the heartbeat thread, there is an implicit + // locking of those data structures from other heartbeat events. + // If the physics engine is running on a separate thread, the update information + // will be in the ObjectsWithCollions and ObjectsWithUpdates structures. + public override float Simulate(float timeStep) + { + if (!BSParam.UseSeparatePhysicsThread) + { + DoPhysicsStep(timeStep); + } + return SendUpdatesToSimulator(timeStep); + } + + // Call the physics engine to do one 'timeStep' and collect collisions and updates + // into ObjectsWithCollisions and ObjectsWithUpdates data structures. + private void DoPhysicsStep(float timeStep) + { + // prevent simulation until we've been initialized + if (!m_initialized) return; + + LastTimeStep = timeStep; + + int updatedEntityCount = 0; + int collidersCount = 0; + + int beforeTime = Util.EnvironmentTickCount(); + int simTime = 0; + + int numTaints = _taintOperations.Count; + InTaintTime = true; // Only used for debugging so locking is not necessary. + + // update the prim states while we know the physics engine is not busy + ProcessTaints(); + + // Some of the physical objects requre individual, pre-step calls + // (vehicles and avatar movement, in particular) + TriggerPreStepEvent(timeStep); + + // the prestep actions might have added taints + numTaints += _taintOperations.Count; + ProcessTaints(); + + InTaintTime = false; // Only used for debugging so locking is not necessary. + + // The following causes the unmanaged code to output ALL the values found in ALL the objects in the world. + // Only enable this in a limited test world with few objects. + if (m_physicsPhysicalDumpEnabled) + PE.DumpAllInfo(World); + + // step the physical world one interval + m_simulationStep++; + int numSubSteps = 0; + try + { + numSubSteps = PE.PhysicsStep(World, timeStep, m_maxSubSteps, m_fixedTimeStep, out updatedEntityCount, out collidersCount); + + } + catch (Exception e) + { + m_log.WarnFormat("{0},PhysicsStep Exception: nTaints={1}, substeps={2}, updates={3}, colliders={4}, e={5}", + LogHeader, numTaints, numSubSteps, updatedEntityCount, collidersCount, e); + DetailLog("{0},PhysicsStepException,call, nTaints={1}, substeps={2}, updates={3}, colliders={4}", + DetailLogZero, numTaints, numSubSteps, updatedEntityCount, collidersCount); + updatedEntityCount = 0; + collidersCount = 0; + } + + // Make the physics engine dump useful statistics periodically + if (PhysicsMetricDumpFrames != 0 && ((m_simulationStep % PhysicsMetricDumpFrames) == 0)) + PE.DumpPhysicsStatistics(World); + + // Get a value for 'now' so all the collision and update routines don't have to get their own. + SimulationNowTime = Util.EnvironmentTickCount(); + + // Send collision information to the colliding objects. The objects decide if the collision + // is 'real' (like linksets don't collide with themselves) and the individual objects + // know if the simulator has subscribed to collisions. + lock (CollisionLock) + { + if (collidersCount > 0) + { + lock (PhysObjects) { - EntityProperties entprop = m_updateArray[ii]; - BSPhysObject pobj; - if (PhysObjects.TryGetValue(entprop.ID, out pobj)) + for (int ii = 0; ii < collidersCount; ii++) { - if (pobj.IsInitialized) - pobj.UpdateProperties(entprop); + uint cA = m_collisionArray[ii].aID; + uint cB = m_collisionArray[ii].bID; + Vector3 point = m_collisionArray[ii].point; + Vector3 normal = m_collisionArray[ii].normal; + float penetration = m_collisionArray[ii].penetration; + SendCollision(cA, cB, point, normal, penetration); + SendCollision(cB, cA, point, -normal, penetration); } } } } - } - // Some actors want to know when the simulation step is complete. - TriggerPostStepEvent(timeStep); - - simTime = Util.EnvironmentTickCountSubtract(beforeTime); - if (PhysicsLogging.Enabled) - { - DetailLog("{0},DoPhysicsStep,complete,frame={1}, nTaints={2}, simTime={3}, substeps={4}, updates={5}, colliders={6}, objWColl={7}", - DetailLogZero, m_simulationStep, numTaints, simTime, numSubSteps, - updatedEntityCount, collidersCount, ObjectsWithCollisions.Count); - } - - // The following causes the unmanaged code to output ALL the values found in ALL the objects in the world. - // Only enable this in a limited test world with few objects. - if (m_physicsPhysicalDumpEnabled) - PE.DumpAllInfo(World); - - // The physics engine returns the number of milliseconds it simulated this call. - // These are summed and normalized to one second and divided by 1000 to give the reported physics FPS. - // Multiply by a fixed nominal frame rate to give a rate similar to the simulator (usually 55). - m_simulatedTime += (float)numSubSteps * m_fixedTimeStep * 1000f * NominalFrameRate; - } - - // Called by a BSPhysObject to note that it has changed properties and this information - // should be passed up to the simulator at the proper time. - // Note: this is called by the BSPhysObject from invocation via DoPhysicsStep() above so - // this is is under UpdateLock. - public void PostUpdate(BSPhysObject updatee) - { - lock (UpdateLock) - { - ObjectsWithUpdates.Add(updatee); - } - } - - // The simulator thinks it is physics time so return all the collisions and position - // updates that were collected in actual physics simulation. - private float SendUpdatesToSimulator(float timeStep) - { - if (!m_initialized) return 5.0f; - - DetailLog("{0},SendUpdatesToSimulator,collisions={1},updates={2},simedTime={3}", - BSScene.DetailLogZero, ObjectsWithCollisions.Count, ObjectsWithUpdates.Count, m_simulatedTime); - // Push the collisions into the simulator. - lock (CollisionLock) - { - if (ObjectsWithCollisions.Count > 0) + // If any of the objects had updated properties, tell the managed objects about the update + // and remember that there was a change so it will be passed to the simulator. + lock (UpdateLock) { - foreach (BSPhysObject bsp in ObjectsWithCollisions) - if (!bsp.SendCollisions()) + if (updatedEntityCount > 0) + { + lock (PhysObjects) { - // If the object is done colliding, see that it's removed from the colliding list - ObjectsWithNoMoreCollisions.Add(bsp); + for (int ii = 0; ii < updatedEntityCount; ii++) + { + EntityProperties entprop = m_updateArray[ii]; + BSPhysObject pobj; + if (PhysObjects.TryGetValue(entprop.ID, out pobj)) + { + if (pobj.IsInitialized) + pobj.UpdateProperties(entprop); + } + } } + } } - // This is a kludge to get avatar movement updates. - // The simulator expects collisions for avatars even if there are have been no collisions. - // The event updates avatar animations and stuff. - // If you fix avatar animation updates, remove this overhead and let normal collision processing happen. - // Note that we get a copy of the list to search because SendCollision() can take a while. - HashSet tempAvatarsInScene; - lock (AvatarsInSceneLock) - { - tempAvatarsInScene = new HashSet(AvatarsInScene); - } - foreach (BSPhysObject actor in tempAvatarsInScene) - { - if (!ObjectsWithCollisions.Contains(actor)) // don't call avatars twice - actor.SendCollisions(); - } - tempAvatarsInScene = null; + // Some actors want to know when the simulation step is complete. + TriggerPostStepEvent(timeStep); - // Objects that are done colliding are removed from the ObjectsWithCollisions list. - // Not done above because it is inside an iteration of ObjectWithCollisions. - // This complex collision processing is required to create an empty collision - // event call after all real collisions have happened on an object. This allows - // the simulator to generate the 'collision end' event. - if (ObjectsWithNoMoreCollisions.Count > 0) + simTime = Util.EnvironmentTickCountSubtract(beforeTime); + if (PhysicsLogging.Enabled) { - foreach (BSPhysObject po in ObjectsWithNoMoreCollisions) - ObjectsWithCollisions.Remove(po); - ObjectsWithNoMoreCollisions.Clear(); + DetailLog("{0},DoPhysicsStep,complete,frame={1}, nTaints={2}, simTime={3}, substeps={4}, updates={5}, colliders={6}, objWColl={7}", + DetailLogZero, m_simulationStep, numTaints, simTime, numSubSteps, + updatedEntityCount, collidersCount, ObjectsWithCollisions.Count); + } + + // The following causes the unmanaged code to output ALL the values found in ALL the objects in the world. + // Only enable this in a limited test world with few objects. + if (m_physicsPhysicalDumpEnabled) + PE.DumpAllInfo(World); + + // The physics engine returns the number of milliseconds it simulated this call. + // These are summed and normalized to one second and divided by 1000 to give the reported physics FPS. + // Multiply by a fixed nominal frame rate to give a rate similar to the simulator (usually 55). + m_simulatedTime += (float)numSubSteps * m_fixedTimeStep * 1000f * NominalFrameRate; + } + + // Called by a BSPhysObject to note that it has changed properties and this information + // should be passed up to the simulator at the proper time. + // Note: this is called by the BSPhysObject from invocation via DoPhysicsStep() above so + // this is is under UpdateLock. + public void PostUpdate(BSPhysObject updatee) + { + lock (UpdateLock) + { + ObjectsWithUpdates.Add(updatee); } } - // Call the simulator for each object that has physics property updates. - HashSet updatedObjects = null; - lock (UpdateLock) + // The simulator thinks it is physics time so return all the collisions and position + // updates that were collected in actual physics simulation. + private float SendUpdatesToSimulator(float timeStep) { - if (ObjectsWithUpdates.Count > 0) + if (!m_initialized) return 5.0f; + + DetailLog("{0},SendUpdatesToSimulator,collisions={1},updates={2},simedTime={3}", + BSScene.DetailLogZero, ObjectsWithCollisions.Count, ObjectsWithUpdates.Count, m_simulatedTime); + // Push the collisions into the simulator. + lock (CollisionLock) { - updatedObjects = ObjectsWithUpdates; - ObjectsWithUpdates = new HashSet(); + if (ObjectsWithCollisions.Count > 0) + { + foreach (BSPhysObject bsp in ObjectsWithCollisions) + if (!bsp.SendCollisions()) + { + // If the object is done colliding, see that it's removed from the colliding list + ObjectsWithNoMoreCollisions.Add(bsp); + } + } + + // This is a kludge to get avatar movement updates. + // The simulator expects collisions for avatars even if there are have been no collisions. + // The event updates avatar animations and stuff. + // If you fix avatar animation updates, remove this overhead and let normal collision processing happen. + // Note that we get a copy of the list to search because SendCollision() can take a while. + HashSet tempAvatarsInScene; + lock (AvatarsInSceneLock) + { + tempAvatarsInScene = new HashSet(AvatarsInScene); + } + foreach (BSPhysObject actor in tempAvatarsInScene) + { + if (!ObjectsWithCollisions.Contains(actor)) // don't call avatars twice + actor.SendCollisions(); + } + tempAvatarsInScene = null; + + // Objects that are done colliding are removed from the ObjectsWithCollisions list. + // Not done above because it is inside an iteration of ObjectWithCollisions. + // This complex collision processing is required to create an empty collision + // event call after all real collisions have happened on an object. This allows + // the simulator to generate the 'collision end' event. + if (ObjectsWithNoMoreCollisions.Count > 0) + { + foreach (BSPhysObject po in ObjectsWithNoMoreCollisions) + ObjectsWithCollisions.Remove(po); + ObjectsWithNoMoreCollisions.Clear(); + } } - } - if (updatedObjects != null) - { - foreach (BSPhysObject obj in updatedObjects) + + // Call the simulator for each object that has physics property updates. + HashSet updatedObjects = null; + lock (UpdateLock) { - obj.RequestPhysicsterseUpdate(); + if (ObjectsWithUpdates.Count > 0) + { + updatedObjects = ObjectsWithUpdates; + ObjectsWithUpdates = new HashSet(); + } } - updatedObjects.Clear(); + if (updatedObjects != null) + { + foreach (BSPhysObject obj in updatedObjects) + { + obj.RequestPhysicsterseUpdate(); + } + updatedObjects.Clear(); + } + + // Return the framerate simulated to give the above returned results. + // (Race condition here but this is just bookkeeping so rare mistakes do not merit a lock). + float simTime = m_simulatedTime; + m_simulatedTime = 0f; + return simTime; } - // Return the framerate simulated to give the above returned results. - // (Race condition here but this is just bookkeeping so rare mistakes do not merit a lock). - float simTime = m_simulatedTime; - m_simulatedTime = 0f; - return simTime; - } - - // Something has collided - private void SendCollision(uint localID, uint collidingWith, Vector3 collidePoint, Vector3 collideNormal, float penetration) - { - if (localID <= TerrainManager.HighestTerrainID) + // Something has collided + private void SendCollision(uint localID, uint collidingWith, Vector3 collidePoint, Vector3 collideNormal, float penetration) { - return; // don't send collisions to the terrain - } + if (localID <= TerrainManager.HighestTerrainID) + { + return; // don't send collisions to the terrain + } + + BSPhysObject collider; + // NOTE that PhysObjects was locked before the call to SendCollision(). + if (!PhysObjects.TryGetValue(localID, out collider)) + { + // If the object that is colliding cannot be found, just ignore the collision. + DetailLog("{0},BSScene.SendCollision,colliderNotInObjectList,id={1},with={2}", DetailLogZero, localID, collidingWith); + return; + } + + // Note: the terrain is not in the physical object list so 'collidee' can be null when Collide() is called. + BSPhysObject collidee = null; + PhysObjects.TryGetValue(collidingWith, out collidee); + + // DetailLog("{0},BSScene.SendCollision,collide,id={1},with={2}", DetailLogZero, localID, collidingWith); + + if (collider.IsInitialized) + { + if (collider.Collide(collidingWith, collidee, collidePoint, collideNormal, penetration)) + { + // If a collision was 'good', remember to send it to the simulator + lock (CollisionLock) + { + ObjectsWithCollisions.Add(collider); + } + } + } - BSPhysObject collider; - // NOTE that PhysObjects was locked before the call to SendCollision(). - if (!PhysObjects.TryGetValue(localID, out collider)) - { - // If the object that is colliding cannot be found, just ignore the collision. - DetailLog("{0},BSScene.SendCollision,colliderNotInObjectList,id={1},with={2}", DetailLogZero, localID, collidingWith); return; } - // Note: the terrain is not in the physical object list so 'collidee' can be null when Collide() is called. - BSPhysObject collidee = null; - PhysObjects.TryGetValue(collidingWith, out collidee); - - // DetailLog("{0},BSScene.SendCollision,collide,id={1},with={2}", DetailLogZero, localID, collidingWith); - - if (collider.IsInitialized) + public void BulletSPluginPhysicsThread() { - if (collider.Collide(collidingWith, collidee, collidePoint, collideNormal, penetration)) + Thread.CurrentThread.Priority = ThreadPriority.Highest; + m_updateWaitEvent = new ManualResetEvent(false); + + while (m_initialized) { - // If a collision was 'good', remember to send it to the simulator - lock (CollisionLock) + int beginSimulationRealtimeMS = Util.EnvironmentTickCount(); + + if (BSParam.Active) + DoPhysicsStep(BSParam.PhysicsTimeStep); + + int simulationRealtimeMS = Util.EnvironmentTickCountSubtract(beginSimulationRealtimeMS); + int simulationTimeVsRealtimeDifferenceMS = ((int)(BSParam.PhysicsTimeStep*1000f)) - simulationRealtimeMS; + + if (simulationTimeVsRealtimeDifferenceMS > 0) { - ObjectsWithCollisions.Add(collider); + // The simulation of the time interval took less than realtime. + // Do a wait for the rest of realtime. + m_updateWaitEvent.WaitOne(simulationTimeVsRealtimeDifferenceMS); + //Thread.Sleep(simulationTimeVsRealtimeDifferenceMS); } + else + { + // The simulation took longer than realtime. + // Do some scaling of simulation time. + // TODO. + DetailLog("{0},BulletSPluginPhysicsThread,longerThanRealtime={1}", BSScene.DetailLogZero, simulationTimeVsRealtimeDifferenceMS); + } + + Watchdog.UpdateThread(); } + + Watchdog.RemoveThread(); } - return; - } + #endregion // Simulation - public void BulletSPluginPhysicsThread() - { - Thread.CurrentThread.Priority = ThreadPriority.Highest; - m_updateWaitEvent = new ManualResetEvent(false); + public override void GetResults() { } - while (m_initialized) + #region Terrain + + public override void SetTerrain(float[] heightMap) { + TerrainManager.SetTerrain(heightMap); + } + + public override void SetWaterLevel(float baseheight) { - int beginSimulationRealtimeMS = Util.EnvironmentTickCount(); + SimpleWaterLevel = baseheight; + } - if (BSParam.Active) - DoPhysicsStep(BSParam.PhysicsTimeStep); + public override void DeleteTerrain() + { + // m_log.DebugFormat("{0}: DeleteTerrain()", LogHeader); + } - int simulationRealtimeMS = Util.EnvironmentTickCountSubtract(beginSimulationRealtimeMS); - int simulationTimeVsRealtimeDifferenceMS = ((int)(BSParam.PhysicsTimeStep*1000f)) - simulationRealtimeMS; + // Although no one seems to check this, I do support combining. + public override bool SupportsCombining() + { + return TerrainManager.SupportsCombining(); + } + // This call says I am a child to region zero in a mega-region. 'pScene' is that + // of region zero, 'offset' is my offset from regions zero's origin, and + // 'extents' is the largest XY that is handled in my region. + public override void Combine(PhysicsScene pScene, Vector3 offset, Vector3 extents) + { + TerrainManager.Combine(pScene, offset, extents); + } - if (simulationTimeVsRealtimeDifferenceMS > 0) + // Unhook all the combining that I know about. + public override void UnCombine(PhysicsScene pScene) + { + TerrainManager.UnCombine(pScene); + } + + #endregion // Terrain + + public override Dictionary GetTopColliders() + { + Dictionary topColliders; + + lock (PhysObjects) { - // The simulation of the time interval took less than realtime. - // Do a wait for the rest of realtime. - m_updateWaitEvent.WaitOne(simulationTimeVsRealtimeDifferenceMS); - //Thread.Sleep(simulationTimeVsRealtimeDifferenceMS); + foreach (KeyValuePair kvp in PhysObjects) + { + kvp.Value.ComputeCollisionScore(); + } + + List orderedPrims = new List(PhysObjects.Values); + orderedPrims.OrderByDescending(p => p.CollisionScore); + topColliders = orderedPrims.Take(25).ToDictionary(p => p.LocalID, p => p.CollisionScore); } + + return topColliders; + } + + public override bool IsThreaded { get { return false; } } + + #region Extensions + public override object Extension(string pFunct, params object[] pParams) + { + DetailLog("{0} BSScene.Extension,op={1}", DetailLogZero, pFunct); + return base.Extension(pFunct, pParams); + } + #endregion // Extensions + + public static string PrimitiveBaseShapeToString(PrimitiveBaseShape pbs) + { + float pathShearX = pbs.PathShearX < 128 ? (float)pbs.PathShearX * 0.01f : (float)(pbs.PathShearX - 256) * 0.01f; + float pathShearY = pbs.PathShearY < 128 ? (float)pbs.PathShearY * 0.01f : (float)(pbs.PathShearY - 256) * 0.01f; + float pathBegin = (float)pbs.PathBegin * 2.0e-5f; + float pathEnd = 1.0f - (float)pbs.PathEnd * 2.0e-5f; + float pathScaleX = (float)(200 - pbs.PathScaleX) * 0.01f; + float pathScaleY = (float)(200 - pbs.PathScaleY) * 0.01f; + float pathTaperX = pbs.PathTaperX * 0.01f; + float pathTaperY = pbs.PathTaperY * 0.01f; + + float profileBegin = (float)pbs.ProfileBegin * 2.0e-5f; + float profileEnd = 1.0f - (float)pbs.ProfileEnd * 2.0e-5f; + float profileHollow = (float)pbs.ProfileHollow * 2.0e-5f; + if (profileHollow > 0.95f) + profileHollow = 0.95f; + + StringBuilder buff = new StringBuilder(); + buff.Append("shape="); + buff.Append(((ProfileShape)pbs.ProfileShape).ToString()); + buff.Append(","); + buff.Append("hollow="); + buff.Append(((HollowShape)pbs.HollowShape).ToString()); + buff.Append(","); + buff.Append("pathCurve="); + buff.Append(((Extrusion)pbs.PathCurve).ToString()); + buff.Append(","); + buff.Append("profCurve="); + buff.Append(((Extrusion)pbs.ProfileCurve).ToString()); + buff.Append(","); + buff.Append("profHollow="); + buff.Append(profileHollow.ToString()); + buff.Append(","); + buff.Append("pathBegEnd="); + buff.Append(pathBegin.ToString()); + buff.Append("/"); + buff.Append(pathEnd.ToString()); + buff.Append(","); + buff.Append("profileBegEnd="); + buff.Append(profileBegin.ToString()); + buff.Append("/"); + buff.Append(profileEnd.ToString()); + buff.Append(","); + buff.Append("scaleXY="); + buff.Append(pathScaleX.ToString()); + buff.Append("/"); + buff.Append(pathScaleY.ToString()); + buff.Append(","); + buff.Append("shearXY="); + buff.Append(pathShearX.ToString()); + buff.Append("/"); + buff.Append(pathShearY.ToString()); + buff.Append(","); + buff.Append("taperXY="); + buff.Append(pbs.PathTaperX.ToString()); + buff.Append("/"); + buff.Append(pbs.PathTaperY.ToString()); + buff.Append(","); + buff.Append("skew="); + buff.Append(pbs.PathSkew.ToString()); + buff.Append(","); + buff.Append("twist/Beg="); + buff.Append(pbs.PathTwist.ToString()); + buff.Append("/"); + buff.Append(pbs.PathTwistBegin.ToString()); + + return buff.ToString(); + } + + #region Taints + // The simulation execution order is: + // Simulate() + // DoOneTimeTaints + // TriggerPreStepEvent + // DoOneTimeTaints + // Step() + // ProcessAndSendToSimulatorCollisions + // ProcessAndSendToSimulatorPropertyUpdates + // TriggerPostStepEvent + + // Calls to the PhysicsActors can't directly call into the physics engine + // because it might be busy. We delay changes to a known time. + // We rely on C#'s closure to save and restore the context for the delegate. + public void TaintedObject(string pOriginator, string pIdent, TaintCallback pCallback) + { + TaintedObject(false /*inTaintTime*/, pOriginator, pIdent, pCallback); + } + public void TaintedObject(uint pOriginator, String pIdent, TaintCallback pCallback) + { + TaintedObject(false /*inTaintTime*/, m_physicsLoggingEnabled ? pOriginator.ToString() : BSScene.DetailLogZero, pIdent, pCallback); + } + public void TaintedObject(bool inTaintTime, String pIdent, TaintCallback pCallback) + { + TaintedObject(inTaintTime, BSScene.DetailLogZero, pIdent, pCallback); + } + public void TaintedObject(bool inTaintTime, uint pOriginator, String pIdent, TaintCallback pCallback) + { + TaintedObject(inTaintTime, m_physicsLoggingEnabled ? pOriginator.ToString() : BSScene.DetailLogZero, pIdent, pCallback); + } + // Sometimes a potentially tainted operation can be used in and out of taint time. + // This routine executes the command immediately if in taint-time otherwise it is queued. + public void TaintedObject(bool inTaintTime, string pOriginator, string pIdent, TaintCallback pCallback) + { + if (!m_initialized) return; + + if (inTaintTime) + pCallback(); else { - // The simulation took longer than realtime. - // Do some scaling of simulation time. - // TODO. - DetailLog("{0},BulletSPluginPhysicsThread,longerThanRealtime={1}", BSScene.DetailLogZero, simulationTimeVsRealtimeDifferenceMS); - } - - Watchdog.UpdateThread(); - } - - Watchdog.RemoveThread(); - } - - #endregion // Simulation - - public override void GetResults() { } - - #region Terrain - - public override void SetTerrain(float[] heightMap) { - TerrainManager.SetTerrain(heightMap); - } - - public override void SetWaterLevel(float baseheight) - { - SimpleWaterLevel = baseheight; - } - - public override void DeleteTerrain() - { - // m_log.DebugFormat("{0}: DeleteTerrain()", LogHeader); - } - - // Although no one seems to check this, I do support combining. - public override bool SupportsCombining() - { - return TerrainManager.SupportsCombining(); - } - // This call says I am a child to region zero in a mega-region. 'pScene' is that - // of region zero, 'offset' is my offset from regions zero's origin, and - // 'extents' is the largest XY that is handled in my region. - public override void Combine(PhysicsScene pScene, Vector3 offset, Vector3 extents) - { - TerrainManager.Combine(pScene, offset, extents); - } - - // Unhook all the combining that I know about. - public override void UnCombine(PhysicsScene pScene) - { - TerrainManager.UnCombine(pScene); - } - - #endregion // Terrain - - public override Dictionary GetTopColliders() - { - Dictionary topColliders; - - lock (PhysObjects) - { - foreach (KeyValuePair kvp in PhysObjects) - { - kvp.Value.ComputeCollisionScore(); - } - - List orderedPrims = new List(PhysObjects.Values); - orderedPrims.OrderByDescending(p => p.CollisionScore); - topColliders = orderedPrims.Take(25).ToDictionary(p => p.LocalID, p => p.CollisionScore); - } - - return topColliders; - } - - public override bool IsThreaded { get { return false; } } - - #region Extensions - public override object Extension(string pFunct, params object[] pParams) - { - DetailLog("{0} BSScene.Extension,op={1}", DetailLogZero, pFunct); - return base.Extension(pFunct, pParams); - } - #endregion // Extensions - - public static string PrimitiveBaseShapeToString(PrimitiveBaseShape pbs) - { - float pathShearX = pbs.PathShearX < 128 ? (float)pbs.PathShearX * 0.01f : (float)(pbs.PathShearX - 256) * 0.01f; - float pathShearY = pbs.PathShearY < 128 ? (float)pbs.PathShearY * 0.01f : (float)(pbs.PathShearY - 256) * 0.01f; - float pathBegin = (float)pbs.PathBegin * 2.0e-5f; - float pathEnd = 1.0f - (float)pbs.PathEnd * 2.0e-5f; - float pathScaleX = (float)(200 - pbs.PathScaleX) * 0.01f; - float pathScaleY = (float)(200 - pbs.PathScaleY) * 0.01f; - float pathTaperX = pbs.PathTaperX * 0.01f; - float pathTaperY = pbs.PathTaperY * 0.01f; - - float profileBegin = (float)pbs.ProfileBegin * 2.0e-5f; - float profileEnd = 1.0f - (float)pbs.ProfileEnd * 2.0e-5f; - float profileHollow = (float)pbs.ProfileHollow * 2.0e-5f; - if (profileHollow > 0.95f) - profileHollow = 0.95f; - - StringBuilder buff = new StringBuilder(); - buff.Append("shape="); - buff.Append(((ProfileShape)pbs.ProfileShape).ToString()); - buff.Append(","); - buff.Append("hollow="); - buff.Append(((HollowShape)pbs.HollowShape).ToString()); - buff.Append(","); - buff.Append("pathCurve="); - buff.Append(((Extrusion)pbs.PathCurve).ToString()); - buff.Append(","); - buff.Append("profCurve="); - buff.Append(((Extrusion)pbs.ProfileCurve).ToString()); - buff.Append(","); - buff.Append("profHollow="); - buff.Append(profileHollow.ToString()); - buff.Append(","); - buff.Append("pathBegEnd="); - buff.Append(pathBegin.ToString()); - buff.Append("/"); - buff.Append(pathEnd.ToString()); - buff.Append(","); - buff.Append("profileBegEnd="); - buff.Append(profileBegin.ToString()); - buff.Append("/"); - buff.Append(profileEnd.ToString()); - buff.Append(","); - buff.Append("scaleXY="); - buff.Append(pathScaleX.ToString()); - buff.Append("/"); - buff.Append(pathScaleY.ToString()); - buff.Append(","); - buff.Append("shearXY="); - buff.Append(pathShearX.ToString()); - buff.Append("/"); - buff.Append(pathShearY.ToString()); - buff.Append(","); - buff.Append("taperXY="); - buff.Append(pbs.PathTaperX.ToString()); - buff.Append("/"); - buff.Append(pbs.PathTaperY.ToString()); - buff.Append(","); - buff.Append("skew="); - buff.Append(pbs.PathSkew.ToString()); - buff.Append(","); - buff.Append("twist/Beg="); - buff.Append(pbs.PathTwist.ToString()); - buff.Append("/"); - buff.Append(pbs.PathTwistBegin.ToString()); - - return buff.ToString(); - } - - #region Taints - // The simulation execution order is: - // Simulate() - // DoOneTimeTaints - // TriggerPreStepEvent - // DoOneTimeTaints - // Step() - // ProcessAndSendToSimulatorCollisions - // ProcessAndSendToSimulatorPropertyUpdates - // TriggerPostStepEvent - - // Calls to the PhysicsActors can't directly call into the physics engine - // because it might be busy. We delay changes to a known time. - // We rely on C#'s closure to save and restore the context for the delegate. - public void TaintedObject(string pOriginator, string pIdent, TaintCallback pCallback) - { - TaintedObject(false /*inTaintTime*/, pOriginator, pIdent, pCallback); - } - public void TaintedObject(uint pOriginator, String pIdent, TaintCallback pCallback) - { - TaintedObject(false /*inTaintTime*/, m_physicsLoggingEnabled ? pOriginator.ToString() : BSScene.DetailLogZero, pIdent, pCallback); - } - public void TaintedObject(bool inTaintTime, String pIdent, TaintCallback pCallback) - { - TaintedObject(inTaintTime, BSScene.DetailLogZero, pIdent, pCallback); - } - public void TaintedObject(bool inTaintTime, uint pOriginator, String pIdent, TaintCallback pCallback) - { - TaintedObject(inTaintTime, m_physicsLoggingEnabled ? pOriginator.ToString() : BSScene.DetailLogZero, pIdent, pCallback); - } - // Sometimes a potentially tainted operation can be used in and out of taint time. - // This routine executes the command immediately if in taint-time otherwise it is queued. - public void TaintedObject(bool inTaintTime, string pOriginator, string pIdent, TaintCallback pCallback) - { - if (!m_initialized) return; - - if (inTaintTime) - pCallback(); - else - { - lock (_taintLock) - { - _taintOperations.Add(new TaintCallbackEntry(pOriginator, pIdent, pCallback)); - } - } - } - - private void TriggerPreStepEvent(float timeStep) - { - PreStepAction actions = BeforeStep; - if (actions != null) - actions(timeStep); - - } - - private void TriggerPostStepEvent(float timeStep) - { - PostStepAction actions = AfterStep; - if (actions != null) - actions(timeStep); - - } - - // When someone tries to change a property on a BSPrim or BSCharacter, the object queues - // a callback into itself to do the actual property change. That callback is called - // here just before the physics engine is called to step the simulation. - public void ProcessTaints() - { - ProcessRegularTaints(); - ProcessPostTaintTaints(); - } - - private void ProcessRegularTaints() - { - if (m_initialized && _taintOperations.Count > 0) // save allocating new list if there is nothing to process - { - // swizzle a new list into the list location so we can process what's there - List oldList; - lock (_taintLock) - { - oldList = _taintOperations; - _taintOperations = new List(); - } - - foreach (TaintCallbackEntry tcbe in oldList) - { - try + lock (_taintLock) { - DetailLog("{0},BSScene.ProcessTaints,doTaint,id={1}", tcbe.originator, tcbe.ident); // DEBUG DEBUG DEBUG - tcbe.callback(); - } - catch (Exception e) - { - m_log.ErrorFormat("{0}: ProcessTaints: {1}: Exception: {2}", LogHeader, tcbe.ident, e); + _taintOperations.Add(new TaintCallbackEntry(pOriginator, pIdent, pCallback)); } } - oldList.Clear(); - } - } - - // Schedule an update to happen after all the regular taints are processed. - // Note that new requests for the same operation ("ident") for the same object ("ID") - // will replace any previous operation by the same object. - public void PostTaintObject(String ident, uint ID, TaintCallback callback) - { - string IDAsString = ID.ToString(); - string uniqueIdent = ident + "-" + IDAsString; - lock (_taintLock) - { - _postTaintOperations[uniqueIdent] = new TaintCallbackEntry(IDAsString, uniqueIdent, callback); } - return; - } - - // Taints that happen after the normal taint processing but before the simulation step. - private void ProcessPostTaintTaints() - { - if (m_initialized && _postTaintOperations.Count > 0) + private void TriggerPreStepEvent(float timeStep) { - Dictionary oldList; - lock (_taintLock) - { - oldList = _postTaintOperations; - _postTaintOperations = new Dictionary(); - } + PreStepAction actions = BeforeStep; + if (actions != null) + actions(timeStep); - foreach (KeyValuePair kvp in oldList) + } + + private void TriggerPostStepEvent(float timeStep) + { + PostStepAction actions = AfterStep; + if (actions != null) + actions(timeStep); + + } + + // When someone tries to change a property on a BSPrim or BSCharacter, the object queues + // a callback into itself to do the actual property change. That callback is called + // here just before the physics engine is called to step the simulation. + public void ProcessTaints() + { + ProcessRegularTaints(); + ProcessPostTaintTaints(); + } + + private void ProcessRegularTaints() + { + if (m_initialized && _taintOperations.Count > 0) // save allocating new list if there is nothing to process { - try + // swizzle a new list into the list location so we can process what's there + List oldList; + lock (_taintLock) { - DetailLog("{0},BSScene.ProcessPostTaintTaints,doTaint,id={1}", DetailLogZero, kvp.Key); // DEBUG DEBUG DEBUG - kvp.Value.callback(); + oldList = _taintOperations; + _taintOperations = new List(); } - catch (Exception e) + + foreach (TaintCallbackEntry tcbe in oldList) { - m_log.ErrorFormat("{0}: ProcessPostTaintTaints: {1}: Exception: {2}", LogHeader, kvp.Key, e); - } - } - oldList.Clear(); - } - } - - // Only used for debugging. Does not change state of anything so locking is not necessary. - public bool AssertInTaintTime(string whereFrom) - { - if (!InTaintTime) - { - DetailLog("{0},BSScene.AssertInTaintTime,NOT IN TAINT TIME,Region={1},Where={2}", DetailLogZero, RegionName, whereFrom); - m_log.ErrorFormat("{0} NOT IN TAINT TIME!! Region={1}, Where={2}", LogHeader, RegionName, whereFrom); - // Util.PrintCallStack(DetailLog); - } - return InTaintTime; - } - - #endregion // Taints - - #region IPhysicsParameters - // Get the list of parameters this physics engine supports - public PhysParameterEntry[] GetParameterList() - { - BSParam.BuildParameterTable(); - return BSParam.SettableParameters; - } - - // Set parameter on a specific or all instances. - // Return 'false' if not able to set the parameter. - // Setting the value in the m_params block will change the value the physics engine - // will use the next time since it's pinned and shared memory. - // Some of the values require calling into the physics engine to get the new - // value activated ('terrainFriction' for instance). - public bool SetPhysicsParameter(string parm, string val, uint localID) - { - bool ret = false; - - BSParam.ParameterDefnBase theParam; - if (BSParam.TryGetParameter(parm, out theParam)) - { - // Set the value in the C# code - theParam.SetValue(this, val); - - // Optionally set the parameter in the unmanaged code - if (theParam.HasSetOnObject) - { - // update all the localIDs specified - // If the local ID is APPLY_TO_NONE, just change the default value - // If the localID is APPLY_TO_ALL change the default value and apply the new value to all the lIDs - // If the localID is a specific object, apply the parameter change to only that object - List objectIDs = new List(); - switch (localID) - { - case PhysParameterEntry.APPLY_TO_NONE: - // This will cause a call into the physical world if some operation is specified (SetOnObject). - objectIDs.Add(TERRAIN_ID); - TaintedUpdateParameter(parm, objectIDs, val); - break; - case PhysParameterEntry.APPLY_TO_ALL: - lock (PhysObjects) objectIDs = new List(PhysObjects.Keys); - TaintedUpdateParameter(parm, objectIDs, val); - break; - default: - // setting only one localID - objectIDs.Add(localID); - TaintedUpdateParameter(parm, objectIDs, val); - break; - } - } - - ret = true; - } - return ret; - } - - // schedule the actual updating of the paramter to when the phys engine is not busy - private void TaintedUpdateParameter(string parm, List lIDs, string val) - { - string xval = val; - List xlIDs = lIDs; - string xparm = parm; - TaintedObject(DetailLogZero, "BSScene.UpdateParameterSet", delegate() { - BSParam.ParameterDefnBase thisParam; - if (BSParam.TryGetParameter(xparm, out thisParam)) - { - if (thisParam.HasSetOnObject) - { - foreach (uint lID in xlIDs) + try { - BSPhysObject theObject = null; - if (PhysObjects.TryGetValue(lID, out theObject)) - thisParam.SetOnObject(this, theObject); + DetailLog("{0},BSScene.ProcessTaints,doTaint,id={1}", tcbe.originator, tcbe.ident); // DEBUG DEBUG DEBUG + tcbe.callback(); + } + catch (Exception e) + { + m_log.ErrorFormat("{0}: ProcessTaints: {1}: Exception: {2}", LogHeader, tcbe.ident, e); } } + oldList.Clear(); } - }); - } - - // Get parameter. - // Return 'false' if not able to get the parameter. - public bool GetPhysicsParameter(string parm, out string value) - { - string val = String.Empty; - bool ret = false; - BSParam.ParameterDefnBase theParam; - if (BSParam.TryGetParameter(parm, out theParam)) - { - val = theParam.GetValue(this); - ret = true; } - value = val; - return ret; + + // Schedule an update to happen after all the regular taints are processed. + // Note that new requests for the same operation ("ident") for the same object ("ID") + // will replace any previous operation by the same object. + public void PostTaintObject(String ident, uint ID, TaintCallback callback) + { + string IDAsString = ID.ToString(); + string uniqueIdent = ident + "-" + IDAsString; + lock (_taintLock) + { + _postTaintOperations[uniqueIdent] = new TaintCallbackEntry(IDAsString, uniqueIdent, callback); + } + + return; + } + + // Taints that happen after the normal taint processing but before the simulation step. + private void ProcessPostTaintTaints() + { + if (m_initialized && _postTaintOperations.Count > 0) + { + Dictionary oldList; + lock (_taintLock) + { + oldList = _postTaintOperations; + _postTaintOperations = new Dictionary(); + } + + foreach (KeyValuePair kvp in oldList) + { + try + { + DetailLog("{0},BSScene.ProcessPostTaintTaints,doTaint,id={1}", DetailLogZero, kvp.Key); // DEBUG DEBUG DEBUG + kvp.Value.callback(); + } + catch (Exception e) + { + m_log.ErrorFormat("{0}: ProcessPostTaintTaints: {1}: Exception: {2}", LogHeader, kvp.Key, e); + } + } + oldList.Clear(); + } + } + + // Only used for debugging. Does not change state of anything so locking is not necessary. + public bool AssertInTaintTime(string whereFrom) + { + if (!InTaintTime) + { + DetailLog("{0},BSScene.AssertInTaintTime,NOT IN TAINT TIME,Region={1},Where={2}", DetailLogZero, RegionName, whereFrom); + m_log.ErrorFormat("{0} NOT IN TAINT TIME!! Region={1}, Where={2}", LogHeader, RegionName, whereFrom); + // Util.PrintCallStack(DetailLog); + } + return InTaintTime; + } + + #endregion // Taints + + #region IPhysicsParameters + // Get the list of parameters this physics engine supports + public PhysParameterEntry[] GetParameterList() + { + BSParam.BuildParameterTable(); + return BSParam.SettableParameters; + } + + // Set parameter on a specific or all instances. + // Return 'false' if not able to set the parameter. + // Setting the value in the m_params block will change the value the physics engine + // will use the next time since it's pinned and shared memory. + // Some of the values require calling into the physics engine to get the new + // value activated ('terrainFriction' for instance). + public bool SetPhysicsParameter(string parm, string val, uint localID) + { + bool ret = false; + + BSParam.ParameterDefnBase theParam; + if (BSParam.TryGetParameter(parm, out theParam)) + { + // Set the value in the C# code + theParam.SetValue(this, val); + + // Optionally set the parameter in the unmanaged code + if (theParam.HasSetOnObject) + { + // update all the localIDs specified + // If the local ID is APPLY_TO_NONE, just change the default value + // If the localID is APPLY_TO_ALL change the default value and apply the new value to all the lIDs + // If the localID is a specific object, apply the parameter change to only that object + List objectIDs = new List(); + switch (localID) + { + case PhysParameterEntry.APPLY_TO_NONE: + // This will cause a call into the physical world if some operation is specified (SetOnObject). + objectIDs.Add(TERRAIN_ID); + TaintedUpdateParameter(parm, objectIDs, val); + break; + case PhysParameterEntry.APPLY_TO_ALL: + lock (PhysObjects) objectIDs = new List(PhysObjects.Keys); + TaintedUpdateParameter(parm, objectIDs, val); + break; + default: + // setting only one localID + objectIDs.Add(localID); + TaintedUpdateParameter(parm, objectIDs, val); + break; + } + } + + ret = true; + } + return ret; + } + + // schedule the actual updating of the paramter to when the phys engine is not busy + private void TaintedUpdateParameter(string parm, List lIDs, string val) + { + string xval = val; + List xlIDs = lIDs; + string xparm = parm; + TaintedObject(DetailLogZero, "BSScene.UpdateParameterSet", delegate() { + BSParam.ParameterDefnBase thisParam; + if (BSParam.TryGetParameter(xparm, out thisParam)) + { + if (thisParam.HasSetOnObject) + { + foreach (uint lID in xlIDs) + { + BSPhysObject theObject = null; + if (PhysObjects.TryGetValue(lID, out theObject)) + thisParam.SetOnObject(this, theObject); + } + } + } + }); + } + + // Get parameter. + // Return 'false' if not able to get the parameter. + public bool GetPhysicsParameter(string parm, out string value) + { + string val = String.Empty; + bool ret = false; + BSParam.ParameterDefnBase theParam; + if (BSParam.TryGetParameter(parm, out theParam)) + { + val = theParam.GetValue(this); + ret = true; + } + value = val; + return ret; + } + + #endregion IPhysicsParameters + + // Invoke the detailed logger and output something if it's enabled. + public void DetailLog(string msg, params Object[] args) + { + PhysicsLogging.Write(msg, args); + } + // Used to fill in the LocalID when there isn't one. It's the correct number of characters. + public const string DetailLogZero = "0000000000"; + } - - #endregion IPhysicsParameters - - // Invoke the detailed logger and output something if it's enabled. - public void DetailLog(string msg, params Object[] args) - { - PhysicsLogging.Write(msg, args); - } - // Used to fill in the LocalID when there isn't one. It's the correct number of characters. - public const string DetailLogZero = "0000000000"; - -} } diff --git a/OpenSim/Region/PhysicsModules/BulletS/BSShapes.cs b/OpenSim/Region/PhysicsModules/BulletS/BSShapes.cs index 1c55b51b20..086a412248 100755 --- a/OpenSim/Region/PhysicsModules/BulletS/BSShapes.cs +++ b/OpenSim/Region/PhysicsModules/BulletS/BSShapes.cs @@ -299,7 +299,7 @@ public abstract class BSShape { xprim.PrimAssetState = BSPhysObject.PrimAssetCondition.FailedAssetFetch; physicsScene.Logger.ErrorFormat("{0} Physical object requires asset but no asset provider. Name={1}", - LogHeader, physicsScene.Name); + LogHeader, physicsScene.PhysicsSceneName); } } else @@ -336,7 +336,7 @@ public abstract class BSShape if (pScene != null) { buff.Append("/rgn="); - buff.Append(pScene.Name); + buff.Append(pScene.PhysicsSceneName); } return buff.ToString(); } diff --git a/OpenSim/Region/PhysicsModules/BulletS/BSTerrainHeightmap.cs b/OpenSim/Region/PhysicsModules/BulletS/BSTerrainHeightmap.cs index e5607961e8..42fc11bcd5 100755 --- a/OpenSim/Region/PhysicsModules/BulletS/BSTerrainHeightmap.cs +++ b/OpenSim/Region/PhysicsModules/BulletS/BSTerrainHeightmap.cs @@ -30,7 +30,6 @@ using System.Text; using OpenSim.Framework; using OpenSim.Region.Framework; -using OpenSim.Region.CoreModules; using OpenSim.Region.PhysicsModules.SharedBase; using Nini.Config; diff --git a/OpenSim/Region/PhysicsModules/BulletS/BSTerrainManager.cs b/OpenSim/Region/PhysicsModules/BulletS/BSTerrainManager.cs index bd84fceac0..d11baa6cef 100755 --- a/OpenSim/Region/PhysicsModules/BulletS/BSTerrainManager.cs +++ b/OpenSim/Region/PhysicsModules/BulletS/BSTerrainManager.cs @@ -30,7 +30,6 @@ using System.Text; using OpenSim.Framework; using OpenSim.Region.Framework; -using OpenSim.Region.CoreModules; using OpenSim.Region.PhysicsModules.SharedBase; using Nini.Config; diff --git a/OpenSim/Region/PhysicsModules/BulletS/BSTerrainMesh.cs b/OpenSim/Region/PhysicsModules/BulletS/BSTerrainMesh.cs index ae96491237..cd59b656ea 100755 --- a/OpenSim/Region/PhysicsModules/BulletS/BSTerrainMesh.cs +++ b/OpenSim/Region/PhysicsModules/BulletS/BSTerrainMesh.cs @@ -30,7 +30,6 @@ using System.Text; using OpenSim.Framework; using OpenSim.Region.Framework; -using OpenSim.Region.CoreModules; using OpenSim.Region.PhysicsModules.SharedBase; using Nini.Config; diff --git a/OpenSim/Region/PhysicsModules/BulletS/Properties/AssemblyInfo.cs b/OpenSim/Region/PhysicsModules/BulletS/Properties/AssemblyInfo.cs index 4f90eee5da..5a33bdf0f2 100644 --- a/OpenSim/Region/PhysicsModules/BulletS/Properties/AssemblyInfo.cs +++ b/OpenSim/Region/PhysicsModules/BulletS/Properties/AssemblyInfo.cs @@ -1,6 +1,7 @@ using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; +using Mono.Addins; // General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information @@ -31,3 +32,5 @@ using System.Runtime.InteropServices; // [assembly: AssemblyVersion("0.8.2.*")] +[assembly: Addin("OpenSim.Region.PhysicsModule.BulletS", OpenSim.VersionInfo.VersionNumber)] +[assembly: AddinDependency("OpenSim.Region.Framework", OpenSim.VersionInfo.VersionNumber)] diff --git a/OpenSim/Region/PhysicsModules/Ode/AssemblyInfo.cs b/OpenSim/Region/PhysicsModules/Ode/AssemblyInfo.cs index 076da7816c..7869739574 100644 --- a/OpenSim/Region/PhysicsModules/Ode/AssemblyInfo.cs +++ b/OpenSim/Region/PhysicsModules/Ode/AssemblyInfo.cs @@ -27,6 +27,7 @@ using System.Reflection; using System.Runtime.InteropServices; +using Mono.Addins; // Information about this assembly is defined by the following // attributes. @@ -56,3 +57,6 @@ using System.Runtime.InteropServices; // numbers with the '*' character (the default): [assembly : AssemblyVersion("0.8.2.*")] + +[assembly: Addin("OpenSim.Region.PhysicsModule.ODE", OpenSim.VersionInfo.VersionNumber)] +[assembly: AddinDependency("OpenSim.Region.Framework", OpenSim.VersionInfo.VersionNumber)] diff --git a/OpenSim/Region/PhysicsModules/Ode/ODECharacter.cs b/OpenSim/Region/PhysicsModules/Ode/ODECharacter.cs index 44f403979d..b35c2998cc 100644 --- a/OpenSim/Region/PhysicsModules/Ode/ODECharacter.cs +++ b/OpenSim/Region/PhysicsModules/Ode/ODECharacter.cs @@ -511,7 +511,7 @@ namespace OpenSim.Region.PhysicsModule.ODE } else { - m_log.WarnFormat("[ODE CHARACTER]: Got a NaN Size for {0} in {1}", Name, _parent_scene.Name); + m_log.WarnFormat("[ODE CHARACTER]: Got a NaN Size for {0} in {1}", Name, _parent_scene.PhysicsSceneName); } } diff --git a/OpenSim/Region/PhysicsModules/Ode/ODEPrim.cs b/OpenSim/Region/PhysicsModules/Ode/ODEPrim.cs index 91a4302ae8..445fef8132 100644 --- a/OpenSim/Region/PhysicsModules/Ode/ODEPrim.cs +++ b/OpenSim/Region/PhysicsModules/Ode/ODEPrim.cs @@ -3380,7 +3380,7 @@ Console.WriteLine(" JointCreateFixed"); { m_log.WarnFormat( "[ODE PRIM]: Could not get mesh/sculpt asset {0} for {1} at {2} in {3}", - _pbs.SculptTexture, Name, _position, _parent_scene.Name); + _pbs.SculptTexture, Name, _position, _parent_scene.PhysicsSceneName); } } } diff --git a/OpenSim/Region/PhysicsModules/Ode/OdePlugin.cs b/OpenSim/Region/PhysicsModules/Ode/OdePlugin.cs index 1d9d0e5f15..bb2fad9e92 100644 --- a/OpenSim/Region/PhysicsModules/Ode/OdePlugin.cs +++ b/OpenSim/Region/PhysicsModules/Ode/OdePlugin.cs @@ -44,47 +44,47 @@ namespace OpenSim.Region.PhysicsModule.ODE /// /// ODE plugin /// - public class OdePlugin : IPhysicsPlugin - { -// private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); +// public class OdePlugin : IPhysicsPlugin +// { +//// private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - private OdeScene m_scene; +// private OdeScene m_scene; - public bool Init() - { - return true; - } +// public bool Init() +// { +// return true; +// } - public PhysicsScene GetScene(String sceneIdentifier) - { - if (m_scene == null) - { - // We do this so that OpenSimulator on Windows loads the correct native ODE library depending on whether - // it's running as a 32-bit process or a 64-bit one. By invoking LoadLibary here, later DLLImports - // will find it already loaded later on. - // - // This isn't necessary for other platforms (e.g. Mac OSX and Linux) since the DLL used can be - // controlled in Ode.NET.dll.config - if (Util.IsWindows()) - Util.LoadArchSpecificWindowsDll("ode.dll"); +// public PhysicsScene GetScene(String sceneIdentifier) +// { +// if (m_scene == null) +// { +// // We do this so that OpenSimulator on Windows loads the correct native ODE library depending on whether +// // it's running as a 32-bit process or a 64-bit one. By invoking LoadLibary here, later DLLImports +// // will find it already loaded later on. +// // +// // This isn't necessary for other platforms (e.g. Mac OSX and Linux) since the DLL used can be +// // controlled in Ode.NET.dll.config +// if (Util.IsWindows()) +// Util.LoadArchSpecificWindowsDll("ode.dll"); - // Initializing ODE only when a scene is created allows alternative ODE plugins to co-habit (according to - // http://opensimulator.org/mantis/view.php?id=2750). - d.InitODE(); +// // Initializing ODE only when a scene is created allows alternative ODE plugins to co-habit (according to +// // http://opensimulator.org/mantis/view.php?id=2750). +// d.InitODE(); - m_scene = new OdeScene(GetName(), sceneIdentifier); - } +// m_scene = new OdeScene(GetName(), sceneIdentifier); +// } - return m_scene; - } +// return m_scene; +// } - public string GetName() - { - return ("OpenDynamicsEngine"); - } +// public string GetName() +// { +// return ("OpenDynamicsEngine"); +// } - public void Dispose() - { - } - } +// public void Dispose() +// { +// } +// } } \ No newline at end of file diff --git a/OpenSim/Region/PhysicsModules/Ode/OdeScene.cs b/OpenSim/Region/PhysicsModules/Ode/OdeScene.cs index d7163e2aa2..36162006c8 100644 --- a/OpenSim/Region/PhysicsModules/Ode/OdeScene.cs +++ b/OpenSim/Region/PhysicsModules/Ode/OdeScene.cs @@ -38,6 +38,7 @@ using System.Runtime.InteropServices; using System.Threading; using log4net; using Nini.Config; +using Mono.Addins; using Ode.NET; using OpenMetaverse; #if USE_DRAWSTUFF @@ -45,6 +46,9 @@ using Drawstuff.NET; #endif using OpenSim.Framework; using OpenSim.Region.PhysicsModules.SharedBase; +using OpenSim.Region.Framework.Scenes; +using OpenSim.Region.Framework.Interfaces; + namespace OpenSim.Region.PhysicsModule.ODE { @@ -101,9 +105,12 @@ namespace OpenSim.Region.PhysicsModule.ODE Rubber = 6 } + [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "ODEPhysicsScene")] public class OdeScene : PhysicsScene { - private readonly ILog m_log; + private readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType.ToString()); + private bool m_Enabled = false; + // private Dictionary m_storedCollisions = new Dictionary(); /// @@ -288,7 +295,7 @@ namespace OpenSim.Region.PhysicsModule.ODE private int framecount = 0; //private int m_returncollisions = 10; - private readonly IntPtr contactgroup; + private IntPtr contactgroup; internal IntPtr WaterGeom; @@ -520,19 +527,90 @@ namespace OpenSim.Region.PhysicsModule.ODE private ODERayCastRequestManager m_rayCastManager; + + #region INonSharedRegionModule + public string Name + { + get { return "OpenDynamicsEngine"; } + } + + public Type ReplaceableInterface + { + get { return null; } + } + + public void Initialise(IConfigSource source) + { + // TODO: Move this out of Startup + IConfig config = source.Configs["Startup"]; + if (config != null) + { + string physics = config.GetString("physics", string.Empty); + if (physics == Name) + { + m_Enabled = true; + m_config = source; + + // We do this so that OpenSimulator on Windows loads the correct native ODE library depending on whether + // it's running as a 32-bit process or a 64-bit one. By invoking LoadLibary here, later DLLImports + // will find it already loaded later on. + // + // This isn't necessary for other platforms (e.g. Mac OSX and Linux) since the DLL used can be + // controlled in Ode.NET.dll.config + if (Util.IsWindows()) + Util.LoadArchSpecificWindowsDll("ode.dll"); + + // Initializing ODE only when a scene is created allows alternative ODE plugins to co-habit (according to + // http://opensimulator.org/mantis/view.php?id=2750). + d.InitODE(); + + } + } + + } + + public void Close() + { + } + + public void AddRegion(Scene scene) + { + if (!m_Enabled) + return; + + EngineType = Name; + PhysicsSceneName = EngineType + "/" + scene.RegionInfo.RegionName; + + scene.RegisterModuleInterface(this); + Vector3 extent = new Vector3(scene.RegionInfo.RegionSizeX, scene.RegionInfo.RegionSizeY, scene.RegionInfo.RegionSizeZ); + Initialise(); + InitialiseFromConfig(m_config); + } + + public void RemoveRegion(Scene scene) + { + if (!m_Enabled) + return; + } + + public void RegionLoaded(Scene scene) + { + if (!m_Enabled) + return; + + mesher = scene.RequestModuleInterface(); + if (mesher == null) + m_log.WarnFormat("[ODE SCENE]: No mesher in {0}. Things will not work well.", PhysicsSceneName); + } + #endregion + /// /// Initiailizes the scene /// Sets many properties that ODE requires to be stable /// These settings need to be tweaked 'exactly' right or weird stuff happens. /// - /// Name of the scene. Useful in debug messages. - public OdeScene(string engineType, string name) + private void Initialise() { - m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType.ToString() + "." + name); - - Name = name; - EngineType = engineType; - nearCallback = near; triCallback = TriCallback; triArrayCallback = TriArrayCallback; @@ -572,12 +650,11 @@ namespace OpenSim.Region.PhysicsModule.ODE } #endif - // Initialize the mesh plugin - public override void Initialise(IMesher meshmerizer, IConfigSource config) + // Initialize from configs + private void InitialiseFromConfig(IConfigSource config) { InitializeExtraStats(); - mesher = meshmerizer; m_config = config; // Defaults @@ -1818,7 +1895,7 @@ namespace OpenSim.Region.PhysicsModule.ODE } catch (AccessViolationException) { - m_log.ErrorFormat("[ODE SCENE]: Unable to space collide {0}", Name); + m_log.ErrorFormat("[ODE SCENE]: Unable to space collide {0}", PhysicsSceneName); } //float terrainheight = GetTerrainHeightAtXY(chr.Position.X, chr.Position.Y); @@ -3082,7 +3159,7 @@ namespace OpenSim.Region.PhysicsModule.ODE { m_log.ErrorFormat( "[ODE SCENE]: Removing physics character {0} {1} from physics scene {2} due to defect found when moving", - actor.Name, actor.LocalID, Name); + actor.Name, actor.LocalID, PhysicsSceneName); RemoveCharacter(actor); actor.DestroyOdeStructures(); @@ -3198,7 +3275,7 @@ namespace OpenSim.Region.PhysicsModule.ODE { m_log.ErrorFormat( "[ODE SCENE]: Removing physics character {0} {1} from physics scene {2} due to defect found when updating position and velocity", - actor.Name, actor.LocalID, Name); + actor.Name, actor.LocalID, PhysicsSceneName); RemoveCharacter(actor); actor.DestroyOdeStructures(); @@ -3795,7 +3872,7 @@ namespace OpenSim.Region.PhysicsModule.ODE private void SetTerrain(float[] heightMap, Vector3 pOffset) { int startTime = Util.EnvironmentTickCount(); - m_log.DebugFormat("[ODE SCENE]: Setting terrain for {0} with offset {1}", Name, pOffset); + m_log.DebugFormat("[ODE SCENE]: Setting terrain for {0} with offset {1}", PhysicsSceneName, pOffset); // this._heightmap[i] = (double)heightMap[i]; // dbm (danx0r) -- creating a buffer zone of one extra sample all around @@ -3920,7 +3997,7 @@ namespace OpenSim.Region.PhysicsModule.ODE } m_log.DebugFormat( - "[ODE SCENE]: Setting terrain for {0} took {1}ms", Name, Util.EnvironmentTickCountSubtract(startTime)); + "[ODE SCENE]: Setting terrain for {0} took {1}ms", PhysicsSceneName, Util.EnvironmentTickCountSubtract(startTime)); } public override void DeleteTerrain() diff --git a/OpenSim/Region/PhysicsModules/Ode/Tests/ODETestClass.cs b/OpenSim/Region/PhysicsModules/Ode/Tests/ODETestClass.cs index bbf64d5a8d..eca670c8bd 100644 --- a/OpenSim/Region/PhysicsModules/Ode/Tests/ODETestClass.cs +++ b/OpenSim/Region/PhysicsModules/Ode/Tests/ODETestClass.cs @@ -43,7 +43,7 @@ namespace OpenSim.Region.PhysicsModule.ODE.Tests { private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); - private OpenSim.Region.PhysicsModule.ODE.OdePlugin cbt; + //private OpenSim.Region.PhysicsModule.ODE.OdePlugin cbt; private PhysicsScene ps; private IMeshingPlugin imp; @@ -55,11 +55,11 @@ namespace OpenSim.Region.PhysicsModule.ODE.Tests config.Set("DecodedSculptMapPath","j2kDecodeCache"); // Loading ODEPlugin - cbt = new OdePlugin(); + //cbt = new OdePlugin(); // Getting Physics Scene - ps = cbt.GetScene("test"); + //ps = cbt.GetScene("test"); // Initializing Physics Scene. - ps.Initialise(imp.GetMesher(TopConfig),null); + //ps.Initialise(imp.GetMesher(TopConfig), null, Vector3.Zero); float[] _heightmap = new float[(int)Constants.RegionSize * (int)Constants.RegionSize]; for (int i = 0; i < ((int)Constants.RegionSize * (int)Constants.RegionSize); i++) { diff --git a/OpenSim/Region/PhysicsModules/POS/AssemblyInfo.cs b/OpenSim/Region/PhysicsModules/POS/AssemblyInfo.cs index fc1ffba1cb..e3a3e356c2 100644 --- a/OpenSim/Region/PhysicsModules/POS/AssemblyInfo.cs +++ b/OpenSim/Region/PhysicsModules/POS/AssemblyInfo.cs @@ -27,6 +27,7 @@ using System.Reflection; using System.Runtime.InteropServices; +using Mono.Addins; // Information about this assembly is defined by the following // attributes. @@ -56,3 +57,6 @@ using System.Runtime.InteropServices; // numbers with the '*' character (the default): [assembly : AssemblyVersion("0.8.2.*")] + +[assembly: Addin("OpenSim.Region.PhysicsModule.POS", OpenSim.VersionInfo.VersionNumber)] +[assembly: AddinDependency("OpenSim.Region.Framework", OpenSim.VersionInfo.VersionNumber)] diff --git a/OpenSim/Region/PhysicsModules/POS/POSPlugin.cs b/OpenSim/Region/PhysicsModules/POS/POSPlugin.cs index 3fe1a0af04..d233097157 100644 --- a/OpenSim/Region/PhysicsModules/POS/POSPlugin.cs +++ b/OpenSim/Region/PhysicsModules/POS/POSPlugin.cs @@ -36,29 +36,29 @@ namespace OpenSim.Region.PhysicsModule.POS /// /// for now will be a very POS physics engine /// - public class POSPlugin : IPhysicsPlugin - { - public POSPlugin() - { - } + //public class POSPlugin : IPhysicsPlugin + //{ + // public POSPlugin() + // { + // } - public bool Init() - { - return true; - } + // public bool Init() + // { + // return true; + // } - public PhysicsScene GetScene(string sceneIdentifier) - { - return new POSScene(GetName(), sceneIdentifier); - } + // public PhysicsScene GetScene(string sceneIdentifier) + // { + // return new POSScene(GetName(), sceneIdentifier); + // } - public string GetName() - { - return ("POS"); - } + // public string GetName() + // { + // return ("POS"); + // } - public void Dispose() - { - } - } + // public void Dispose() + // { + // } + //} } diff --git a/OpenSim/Region/PhysicsModules/POS/POSScene.cs b/OpenSim/Region/PhysicsModules/POS/POSScene.cs index 603502f496..915fa8cf12 100644 --- a/OpenSim/Region/PhysicsModules/POS/POSScene.cs +++ b/OpenSim/Region/PhysicsModules/POS/POSScene.cs @@ -29,11 +29,15 @@ using System; using System.Collections.Generic; using Nini.Config; using OpenMetaverse; +using Mono.Addins; using OpenSim.Framework; using OpenSim.Region.PhysicsModules.SharedBase; +using OpenSim.Region.Framework.Scenes; +using OpenSim.Region.Framework.Interfaces; namespace OpenSim.Region.PhysicsModule.POS { + [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "POSPhysicsScene")] public class POSScene : PhysicsScene { private List _characters = new List(); @@ -41,19 +45,61 @@ namespace OpenSim.Region.PhysicsModule.POS private float[] _heightMap; private const float gravity = -9.8f; + private bool m_Enabled = false; //protected internal string sceneIdentifier; - public POSScene(string engineType, String _sceneIdentifier) + #region INonSharedRegionModule + public string Name { - EngineType = engineType; - Name = EngineType + "/" + _sceneIdentifier; - //sceneIdentifier = _sceneIdentifier; + get { return "POS"; } } - public override void Initialise(IMesher meshmerizer, IConfigSource config) + public Type ReplaceableInterface + { + get { return null; } + } + + public void Initialise(IConfigSource source) + { + // TODO: Move this out of Startup + IConfig config = source.Configs["Startup"]; + if (config != null) + { + string physics = config.GetString("physics", string.Empty); + if (physics == Name) + m_Enabled = true; + } + + } + + public void Close() { } + public void AddRegion(Scene scene) + { + if (!m_Enabled) + return; + + EngineType = Name; + PhysicsSceneName = EngineType + "/" + scene.RegionInfo.RegionName; + + scene.RegisterModuleInterface(this); + } + + public void RemoveRegion(Scene scene) + { + if (!m_Enabled) + return; + } + + public void RegionLoaded(Scene scene) + { + if (!m_Enabled) + return; + } + #endregion + public override void Dispose() { } diff --git a/OpenSim/Region/PhysicsModules/SharedBase/NullPhysicsScene.cs b/OpenSim/Region/PhysicsModules/SharedBase/NullPhysicsScene.cs index da896a3527..432708c840 100644 --- a/OpenSim/Region/PhysicsModules/SharedBase/NullPhysicsScene.cs +++ b/OpenSim/Region/PhysicsModules/SharedBase/NullPhysicsScene.cs @@ -40,11 +40,6 @@ namespace OpenSim.Region.PhysicsModules.SharedBase private static int m_workIndicator; - public override void Initialise(IMesher meshmerizer, IConfigSource config) - { - // Does nothing right now - } - public override PhysicsActor AddAvatar( string avName, Vector3 position, Vector3 velocity, Vector3 size, bool isFlying) { diff --git a/OpenSim/Region/PhysicsModules/SharedBase/PhysicsPluginManager.cs b/OpenSim/Region/PhysicsModules/SharedBase/PhysicsPluginManager.cs index 6316463ed5..487582c41a 100644 --- a/OpenSim/Region/PhysicsModules/SharedBase/PhysicsPluginManager.cs +++ b/OpenSim/Region/PhysicsModules/SharedBase/PhysicsPluginManager.cs @@ -89,7 +89,7 @@ namespace OpenSim.Region.PhysicsModules.SharedBase { m_log.Info("[PHYSICS]: creating " + physEngineName); PhysicsScene result = _PhysPlugins[physEngineName].GetScene(regionName); - result.Initialise(meshEngine, config, regionExtent); + //result.Initialise(meshEngine, config, regionExtent); return result; } else diff --git a/OpenSim/Region/PhysicsModules/SharedBase/PhysicsScene.cs b/OpenSim/Region/PhysicsModules/SharedBase/PhysicsScene.cs index 0394494d8b..247f355708 100644 --- a/OpenSim/Region/PhysicsModules/SharedBase/PhysicsScene.cs +++ b/OpenSim/Region/PhysicsModules/SharedBase/PhysicsScene.cs @@ -98,7 +98,7 @@ namespace OpenSim.Region.PhysicsModules.SharedBase /// Useful in debug messages to distinguish one OdeScene instance from another. /// Usually set to include the region name that the physics engine is acting for. /// - public string Name { get; protected set; } + public string PhysicsSceneName { get; protected set; } /// /// A string identifying the family of this physics engine. Most common values returned @@ -126,17 +126,6 @@ namespace OpenSim.Region.PhysicsModules.SharedBase } } - // Deprecated. Do not use this for new physics engines. - public abstract void Initialise(IMesher meshmerizer, IConfigSource config); - - // For older physics engines that do not implement non-legacy region sizes. - // If the physics engine handles the region extent feature, it overrides this function. - public virtual void Initialise(IMesher meshmerizer, IConfigSource config, Vector3 regionExtent) - { - // If not overridden, call the old initialization entry. - Initialise(meshmerizer, config); - } - /// /// Add an avatar /// diff --git a/prebuild.xml b/prebuild.xml index 77b1657f45..6de8c6dc12 100644 --- a/prebuild.xml +++ b/prebuild.xml @@ -1857,13 +1857,11 @@ - - @@ -3433,7 +3431,7 @@ - + From 11194209df8a29f5103e6e34104eae7834f3280a Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Mon, 31 Aug 2015 14:09:15 -0700 Subject: [PATCH 08/32] First commit where physics work as region module. Moved all physics dlls out of Physics and into bin directly, so they can be found by the module loader. Removed call to PhysicsPluginManager. --- OpenSim/Region/Application/OpenSimBase.cs | 15 +--- .../ClientStack/RegionApplicationBase.cs | 29 -------- .../Framework/Library/LibraryModule.cs | 2 +- .../Grid/Tests/GridConnectorsTests.cs | 8 +- OpenSim/Region/Framework/Scenes/Scene.cs | 7 +- OpenSim/Region/Framework/Scenes/SceneGraph.cs | 7 +- .../BasicPhysics/BasicPhysicsScene.cs | 1 + .../Region/PhysicsModules/BulletS/BSScene.cs | 5 +- .../BulletS/Tests/BulletSimTestsUtil.cs | 27 +++++-- OpenSim/Region/PhysicsModules/Ode/OdeScene.cs | 2 + OpenSim/Region/PhysicsModules/POS/POSScene.cs | 2 + .../PhysicsModules/SharedBase/PhysicsScene.cs | 8 ++ OpenSim/Tests/Common/Helpers/SceneHelpers.cs | 5 +- OpenSim/Tests/Common/Mock/TestScene.cs | 4 +- OpenSim/Tests/Common/OpenSimTestCase.cs | 2 +- ...m.Region.PhysicsModule.BulletS.dll.config} | 0 prebuild.xml | 73 +++++++++---------- 17 files changed, 91 insertions(+), 106 deletions(-) rename bin/{Physics/OpenSim.Region.Physics.BulletSPlugin.dll.config => OpenSim.Region.PhysicsModule.BulletS.dll.config} (100%) diff --git a/OpenSim/Region/Application/OpenSimBase.cs b/OpenSim/Region/Application/OpenSimBase.cs index 68fba972d9..980fa8508b 100644 --- a/OpenSim/Region/Application/OpenSimBase.cs +++ b/OpenSim/Region/Application/OpenSimBase.cs @@ -734,10 +734,6 @@ namespace OpenSim clientServer = clientNetworkServers; scene.LoadWorldMap(); - scene.PhysicsScene.RequestAssetMethod = scene.PhysicsRequestAsset; - scene.PhysicsScene.SetTerrain(scene.Heightmap.GetFloatsSerialised()); - scene.PhysicsScene.SetWaterLevel((float) regionInfo.RegionSettings.WaterHeight); - return scene; } @@ -749,11 +745,8 @@ namespace OpenSim protected override Scene CreateScene(RegionInfo regionInfo, ISimulationDataService simDataService, IEstateDataService estateDataService, AgentCircuitManager circuitManager) { - Vector3 regionExtent = new Vector3(regionInfo.RegionSizeX, regionInfo.RegionSizeY, regionInfo.RegionSizeZ); - PhysicsScene physicsScene = GetPhysicsScene(regionInfo.RegionName, regionExtent); - return new Scene( - regionInfo, circuitManager, physicsScene, + regionInfo, circuitManager, simDataService, estateDataService, Config, m_version); } @@ -796,12 +789,6 @@ namespace OpenSim # region Setup methods - protected override PhysicsScene GetPhysicsScene(string osSceneIdentifier, Vector3 regionExtent) - { - return GetPhysicsScene( - m_configSettings.PhysicsEngine, m_configSettings.MeshEngineName, Config, osSceneIdentifier, regionExtent); - } - /// /// Handler to supply the current status of this sim /// diff --git a/OpenSim/Region/ClientStack/RegionApplicationBase.cs b/OpenSim/Region/ClientStack/RegionApplicationBase.cs index 374e34d8e4..343780b56d 100644 --- a/OpenSim/Region/ClientStack/RegionApplicationBase.cs +++ b/OpenSim/Region/ClientStack/RegionApplicationBase.cs @@ -62,16 +62,6 @@ namespace OpenSim.Region.ClientStack protected abstract void Initialize(); - /// - /// Get a new physics scene. - /// - /// - /// - /// The name of the OpenSim scene this physics scene is serving. This will be used in log messages. - /// - /// - protected abstract PhysicsScene GetPhysicsScene(string osSceneIdentifier, Vector3 regionExtent); - protected abstract ClientStackManager CreateClientStackManager(); protected abstract Scene CreateScene(RegionInfo regionInfo, ISimulationDataService simDataService, IEstateDataService estateDataService, AgentCircuitManager circuitManager); @@ -113,24 +103,5 @@ namespace OpenSim.Region.ClientStack base.StartupSpecific(); } - /// - /// Get a new physics scene. - /// - /// The name of the physics engine to use - /// The name of the mesh engine to use - /// The configuration data to pass to the physics and mesh engines - /// - /// The name of the OpenSim scene this physics scene is serving. This will be used in log messages. - /// - /// - protected PhysicsScene GetPhysicsScene( - string engine, string meshEngine, IConfigSource config, string osSceneIdentifier, Vector3 regionExtent) - { - PhysicsPluginManager physicsPluginManager; - physicsPluginManager = new PhysicsPluginManager(); - physicsPluginManager.LoadPluginsFromAssemblies("Physics"); - - return physicsPluginManager.GetPhysicsScene(engine, meshEngine, config, osSceneIdentifier, regionExtent); - } } } \ No newline at end of file diff --git a/OpenSim/Region/CoreModules/Framework/Library/LibraryModule.cs b/OpenSim/Region/CoreModules/Framework/Library/LibraryModule.cs index d10c9b427a..69d7e16203 100644 --- a/OpenSim/Region/CoreModules/Framework/Library/LibraryModule.cs +++ b/OpenSim/Region/CoreModules/Framework/Library/LibraryModule.cs @@ -159,7 +159,7 @@ namespace OpenSim.Region.CoreModules.Framework.Library } RegionInfo regInfo = new RegionInfo(); - Scene m_MockScene = new Scene(regInfo, null); + Scene m_MockScene = new Scene(regInfo); LocalInventoryService invService = new LocalInventoryService(lib); m_MockScene.RegisterModuleInterface(invService); m_MockScene.RegisterModuleInterface(m_Scene.AssetService); diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/Tests/GridConnectorsTests.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/Tests/GridConnectorsTests.cs index aa5f889287..25ae689b7c 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/Tests/GridConnectorsTests.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/Tests/GridConnectorsTests.cs @@ -85,7 +85,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid.Tests r1.ExternalHostName = "127.0.0.1"; r1.HttpPort = 9001; r1.InternalEndPoint = new System.Net.IPEndPoint(System.Net.IPAddress.Parse("0.0.0.0"), 0); - Scene s = new Scene(new RegionInfo(), null); + Scene s = new Scene(new RegionInfo()); s.RegionInfo.RegionID = r1.RegionID; m_LocalConnector.AddRegion(s); @@ -97,7 +97,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid.Tests r2.ExternalHostName = "127.0.0.1"; r2.HttpPort = 9002; r2.InternalEndPoint = new System.Net.IPEndPoint(System.Net.IPAddress.Parse("0.0.0.0"), 0); - s = new Scene(new RegionInfo(), null); + s = new Scene(new RegionInfo()); s.RegionInfo.RegionID = r2.RegionID; m_LocalConnector.AddRegion(s); @@ -109,7 +109,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid.Tests r3.ExternalHostName = "127.0.0.1"; r3.HttpPort = 9003; r3.InternalEndPoint = new System.Net.IPEndPoint(System.Net.IPAddress.Parse("0.0.0.0"), 0); - s = new Scene(new RegionInfo(), null); + s = new Scene(new RegionInfo()); s.RegionInfo.RegionID = r3.RegionID; m_LocalConnector.AddRegion(s); @@ -121,7 +121,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid.Tests r4.ExternalHostName = "127.0.0.1"; r4.HttpPort = 9004; r4.InternalEndPoint = new System.Net.IPEndPoint(System.Net.IPAddress.Parse("0.0.0.0"), 0); - s = new Scene(new RegionInfo(), null); + s = new Scene(new RegionInfo()); s.RegionInfo.RegionID = r4.RegionID; m_LocalConnector.AddRegion(s); diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index 09a0a6b501..900e715651 100755 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs @@ -850,10 +850,10 @@ namespace OpenSim.Region.Framework.Scenes #region Constructors - public Scene(RegionInfo regInfo, AgentCircuitManager authen, PhysicsScene physicsScene, + public Scene(RegionInfo regInfo, AgentCircuitManager authen, ISimulationDataService simDataService, IEstateDataService estateDataService, IConfigSource config, string simulatorVersion) - : this(regInfo, physicsScene) + : this(regInfo) { m_config = config; MinFrameTicks = 89; @@ -1192,11 +1192,10 @@ namespace OpenSim.Region.Framework.Scenes } - public Scene(RegionInfo regInfo, PhysicsScene physicsScene) + public Scene(RegionInfo regInfo) : base(regInfo) { m_sceneGraph = new SceneGraph(this); - m_sceneGraph.PhysicsScene = physicsScene; // If the scene graph has an Unrecoverable error, restart this sim. // Currently the only thing that causes it to happen is two kinds of specific diff --git a/OpenSim/Region/Framework/Scenes/SceneGraph.cs b/OpenSim/Region/Framework/Scenes/SceneGraph.cs index eea0fff1fa..d77e3242d9 100755 --- a/OpenSim/Region/Framework/Scenes/SceneGraph.cs +++ b/OpenSim/Region/Framework/Scenes/SceneGraph.cs @@ -111,7 +111,12 @@ namespace OpenSim.Region.Framework.Scenes public PhysicsScene PhysicsScene { - get { return _PhyScene; } + get + { + if (_PhyScene == null) + _PhyScene = m_parentScene.RequestModuleInterface(); + return _PhyScene; + } set { // If we're not doing the initial set diff --git a/OpenSim/Region/PhysicsModules/BasicPhysics/BasicPhysicsScene.cs b/OpenSim/Region/PhysicsModules/BasicPhysics/BasicPhysicsScene.cs index 5ec0f858b5..f7760c5df7 100644 --- a/OpenSim/Region/PhysicsModules/BasicPhysics/BasicPhysicsScene.cs +++ b/OpenSim/Region/PhysicsModules/BasicPhysics/BasicPhysicsScene.cs @@ -93,6 +93,7 @@ namespace OpenSim.Region.PhysicsModule.BasicPhysics scene.RegisterModuleInterface(this); m_regionExtent = new Vector3(scene.RegionInfo.RegionSizeX, scene.RegionInfo.RegionSizeY, scene.RegionInfo.RegionSizeZ); + base.Initialise(scene.PhysicsRequestAsset, scene.Heightmap.GetFloatsSerialised(), (float)scene.RegionInfo.RegionSettings.WaterHeight); } diff --git a/OpenSim/Region/PhysicsModules/BulletS/BSScene.cs b/OpenSim/Region/PhysicsModules/BulletS/BSScene.cs index 26af343887..b412561c72 100644 --- a/OpenSim/Region/PhysicsModules/BulletS/BSScene.cs +++ b/OpenSim/Region/PhysicsModules/BulletS/BSScene.cs @@ -248,7 +248,10 @@ namespace OpenSim.Region.PhysicsModule.BulletS scene.RegisterModuleInterface(this); Vector3 extent = new Vector3(scene.RegionInfo.RegionSizeX, scene.RegionInfo.RegionSizeY, scene.RegionInfo.RegionSizeZ); - Initialise(m_Config, extent); + Initialise(m_Config, extent); + + base.Initialise(scene.PhysicsRequestAsset, scene.Heightmap.GetFloatsSerialised(), (float)scene.RegionInfo.RegionSettings.WaterHeight); + } public void RemoveRegion(Scene scene) diff --git a/OpenSim/Region/PhysicsModules/BulletS/Tests/BulletSimTestsUtil.cs b/OpenSim/Region/PhysicsModules/BulletS/Tests/BulletSimTestsUtil.cs index 34c057170a..d86c841e5f 100755 --- a/OpenSim/Region/PhysicsModules/BulletS/Tests/BulletSimTestsUtil.cs +++ b/OpenSim/Region/PhysicsModules/BulletS/Tests/BulletSimTestsUtil.cs @@ -35,6 +35,7 @@ using Nini.Config; using OpenSim.Framework; using OpenSim.Region.PhysicsModules.SharedBase; using OpenSim.Region.PhysicsModules.Meshing; +using OpenSim.Region.Framework.Interfaces; using OpenMetaverse; @@ -78,22 +79,32 @@ public static class BulletSimTestsUtil bulletSimConfig.Set("VehicleLoggingEnabled","True"); } - PhysicsPluginManager physicsPluginManager; - physicsPluginManager = new PhysicsPluginManager(); - physicsPluginManager.LoadPluginsFromAssemblies("Physics"); - Vector3 regionExtent = new Vector3(Constants.RegionSize, Constants.RegionSize, Constants.RegionHeight); - PhysicsScene pScene = physicsPluginManager.GetPhysicsScene( - "BulletSim", "Meshmerizer", openSimINI, "BSTestRegion", regionExtent); + //PhysicsScene pScene = physicsPluginManager.GetPhysicsScene( + // "BulletSim", "Meshmerizer", openSimINI, "BSTestRegion", regionExtent); + RegionInfo info = new RegionInfo(); + info.RegionName = "BSTestRegion"; + info.RegionSizeX = info.RegionSizeY = info.RegionSizeZ = Constants.RegionSize; + OpenSim.Region.Framework.Scenes.Scene scene = new OpenSim.Region.Framework.Scenes.Scene(info); - BSScene bsScene = pScene as BSScene; + IMesher mesher = new OpenSim.Region.PhysicsModules.Meshing.Meshmerizer(); + INonSharedRegionModule mod = mesher as INonSharedRegionModule; + mod.Initialise(openSimINI); + mod.AddRegion(scene); + mod.RegionLoaded(scene); + + BSScene pScene = new BSScene(); + mod = (pScene as INonSharedRegionModule); + mod.Initialise(openSimINI); + mod.AddRegion(scene); + mod.RegionLoaded(scene); // Since the asset requestor is not initialized, any mesh or sculptie will be a cube. // In the future, add a fake asset fetcher to get meshes and sculpts. // bsScene.RequestAssetMethod = ???; - return bsScene; + return pScene; } } diff --git a/OpenSim/Region/PhysicsModules/Ode/OdeScene.cs b/OpenSim/Region/PhysicsModules/Ode/OdeScene.cs index 36162006c8..f090953807 100644 --- a/OpenSim/Region/PhysicsModules/Ode/OdeScene.cs +++ b/OpenSim/Region/PhysicsModules/Ode/OdeScene.cs @@ -585,6 +585,8 @@ namespace OpenSim.Region.PhysicsModule.ODE Vector3 extent = new Vector3(scene.RegionInfo.RegionSizeX, scene.RegionInfo.RegionSizeY, scene.RegionInfo.RegionSizeZ); Initialise(); InitialiseFromConfig(m_config); + base.Initialise(scene.PhysicsRequestAsset, scene.Heightmap.GetFloatsSerialised(), (float)scene.RegionInfo.RegionSettings.WaterHeight); + } public void RemoveRegion(Scene scene) diff --git a/OpenSim/Region/PhysicsModules/POS/POSScene.cs b/OpenSim/Region/PhysicsModules/POS/POSScene.cs index 915fa8cf12..beaa177156 100644 --- a/OpenSim/Region/PhysicsModules/POS/POSScene.cs +++ b/OpenSim/Region/PhysicsModules/POS/POSScene.cs @@ -85,6 +85,8 @@ namespace OpenSim.Region.PhysicsModule.POS PhysicsSceneName = EngineType + "/" + scene.RegionInfo.RegionName; scene.RegisterModuleInterface(this); + base.Initialise(scene.PhysicsRequestAsset, scene.Heightmap.GetFloatsSerialised(), (float)scene.RegionInfo.RegionSettings.WaterHeight); + } public void RemoveRegion(Scene scene) diff --git a/OpenSim/Region/PhysicsModules/SharedBase/PhysicsScene.cs b/OpenSim/Region/PhysicsModules/SharedBase/PhysicsScene.cs index 247f355708..32691fc28a 100644 --- a/OpenSim/Region/PhysicsModules/SharedBase/PhysicsScene.cs +++ b/OpenSim/Region/PhysicsModules/SharedBase/PhysicsScene.cs @@ -117,6 +117,14 @@ namespace OpenSim.Region.PhysicsModules.SharedBase public RequestAssetDelegate RequestAssetMethod { get; set; } + protected void Initialise(RequestAssetDelegate m, float[] terrain, float waterHeight) + { + RequestAssetMethod = m; + SetTerrain(terrain); + SetWaterLevel(waterHeight); + + } + public virtual void TriggerPhysicsBasedRestart() { physicsCrash handler = OnPhysicsCrash; diff --git a/OpenSim/Tests/Common/Helpers/SceneHelpers.cs b/OpenSim/Tests/Common/Helpers/SceneHelpers.cs index a26e844cd1..27705bdad7 100644 --- a/OpenSim/Tests/Common/Helpers/SceneHelpers.cs +++ b/OpenSim/Tests/Common/Helpers/SceneHelpers.cs @@ -151,12 +151,9 @@ namespace OpenSim.Tests.Common PhysicsPluginManager physicsPluginManager = new PhysicsPluginManager(); physicsPluginManager.LoadPluginsFromAssembly("Physics/OpenSim.Region.PhysicsModule.BasicPhysics.dll"); Vector3 regionExtent = new Vector3( regInfo.RegionSizeX, regInfo.RegionSizeY, regInfo.RegionSizeZ); - PhysicsScene physicsScene - = physicsPluginManager.GetPhysicsScene( - "basicphysics", "ZeroMesher", new IniConfigSource(), "test", regionExtent); TestScene testScene = new TestScene( - regInfo, m_acm, physicsScene, SimDataService, m_estateDataService, configSource, null); + regInfo, m_acm, SimDataService, m_estateDataService, configSource, null); INonSharedRegionModule godsModule = new GodsModule(); godsModule.Initialise(new IniConfigSource()); diff --git a/OpenSim/Tests/Common/Mock/TestScene.cs b/OpenSim/Tests/Common/Mock/TestScene.cs index 08cfff2805..951f1035b6 100644 --- a/OpenSim/Tests/Common/Mock/TestScene.cs +++ b/OpenSim/Tests/Common/Mock/TestScene.cs @@ -41,10 +41,10 @@ namespace OpenSim.Tests.Common public class TestScene : Scene { public TestScene( - RegionInfo regInfo, AgentCircuitManager authen, PhysicsScene physicsScene, + RegionInfo regInfo, AgentCircuitManager authen, ISimulationDataService simDataService, IEstateDataService estateDataService, IConfigSource config, string simulatorVersion) - : base(regInfo, authen, physicsScene, simDataService, estateDataService, + : base(regInfo, authen, simDataService, estateDataService, config, simulatorVersion) { } diff --git a/OpenSim/Tests/Common/OpenSimTestCase.cs b/OpenSim/Tests/Common/OpenSimTestCase.cs index c1415afe43..9fea34820c 100644 --- a/OpenSim/Tests/Common/OpenSimTestCase.cs +++ b/OpenSim/Tests/Common/OpenSimTestCase.cs @@ -38,7 +38,7 @@ namespace OpenSim.Tests.Common [SetUp] public virtual void SetUp() { -// TestHelpers.InMethod(); + //TestHelpers.InMethod(); // Disable logging for each test so that one where logging is enabled doesn't cause all subsequent tests // to have logging on if it failed with an exception. TestHelpers.DisableLogging(); diff --git a/bin/Physics/OpenSim.Region.Physics.BulletSPlugin.dll.config b/bin/OpenSim.Region.PhysicsModule.BulletS.dll.config similarity index 100% rename from bin/Physics/OpenSim.Region.Physics.BulletSPlugin.dll.config rename to bin/OpenSim.Region.PhysicsModule.BulletS.dll.config diff --git a/prebuild.xml b/prebuild.xml index 6de8c6dc12..2685c30303 100644 --- a/prebuild.xml +++ b/prebuild.xml @@ -487,6 +487,32 @@ + + + + ../../../../bin/ + + + + + ../../../../bin/ + + + + ../../../../bin/ + + + + + + + + + + + + + @@ -1692,42 +1718,15 @@ - - - - ../../../../bin/ - - - - - ../../../../bin/ - - - - ../../../../bin/ - - - - - - - - - - - - - - - ../../../../bin/Physics/ + ../../../../bin/ - ../../../../bin/Physics/ + ../../../../bin/ @@ -1755,12 +1754,12 @@ - ../../../../bin/Physics/ + ../../../../bin/ - ../../../../bin/Physics/ + ../../../../bin/ @@ -1780,12 +1779,12 @@ - ../../../../bin/Physics/ + ../../../../bin/ - ../../../../bin/Physics/ + ../../../../bin/ @@ -1805,12 +1804,12 @@ - ../../../../bin/Physics/ + ../../../../bin/ - ../../../../bin/Physics/ + ../../../../bin/ @@ -1837,13 +1836,13 @@ - ../../../../bin/Physics/ + ../../../../bin/ true - ../../../../bin/Physics/ + ../../../../bin/ true From 50e7e38f450599b5755c9ab887b8d9bd9c3d8981 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Mon, 31 Aug 2015 15:04:10 -0700 Subject: [PATCH 09/32] Physics refactoring: all unit tests pass. --- .../BasicPhysics/BasicPhysicsScene.cs | 4 +- .../Region/PhysicsModules/BulletS/BSScene.cs | 4 +- .../BulletS/Tests/BulletSimTestsUtil.cs | 2 - OpenSim/Region/PhysicsModules/Ode/OdeScene.cs | 6 ++- .../PhysicsModules/Ode/Tests/ODETestClass.cs | 50 ++++++++++++++----- OpenSim/Region/PhysicsModules/POS/POSScene.cs | 4 +- prebuild.xml | 7 +-- 7 files changed, 55 insertions(+), 22 deletions(-) diff --git a/OpenSim/Region/PhysicsModules/BasicPhysics/BasicPhysicsScene.cs b/OpenSim/Region/PhysicsModules/BasicPhysics/BasicPhysicsScene.cs index f7760c5df7..10684d19f0 100644 --- a/OpenSim/Region/PhysicsModules/BasicPhysics/BasicPhysicsScene.cs +++ b/OpenSim/Region/PhysicsModules/BasicPhysics/BasicPhysicsScene.cs @@ -93,7 +93,9 @@ namespace OpenSim.Region.PhysicsModule.BasicPhysics scene.RegisterModuleInterface(this); m_regionExtent = new Vector3(scene.RegionInfo.RegionSizeX, scene.RegionInfo.RegionSizeY, scene.RegionInfo.RegionSizeZ); - base.Initialise(scene.PhysicsRequestAsset, scene.Heightmap.GetFloatsSerialised(), (float)scene.RegionInfo.RegionSettings.WaterHeight); + base.Initialise(scene.PhysicsRequestAsset, + (scene.Heightmap != null ? scene.Heightmap.GetFloatsSerialised() : new float[Constants.RegionSize * Constants.RegionSize]), + (float)scene.RegionInfo.RegionSettings.WaterHeight); } diff --git a/OpenSim/Region/PhysicsModules/BulletS/BSScene.cs b/OpenSim/Region/PhysicsModules/BulletS/BSScene.cs index b412561c72..d116c3b636 100644 --- a/OpenSim/Region/PhysicsModules/BulletS/BSScene.cs +++ b/OpenSim/Region/PhysicsModules/BulletS/BSScene.cs @@ -250,7 +250,9 @@ namespace OpenSim.Region.PhysicsModule.BulletS Vector3 extent = new Vector3(scene.RegionInfo.RegionSizeX, scene.RegionInfo.RegionSizeY, scene.RegionInfo.RegionSizeZ); Initialise(m_Config, extent); - base.Initialise(scene.PhysicsRequestAsset, scene.Heightmap.GetFloatsSerialised(), (float)scene.RegionInfo.RegionSettings.WaterHeight); + base.Initialise(scene.PhysicsRequestAsset, + (scene.Heightmap != null ? scene.Heightmap.GetFloatsSerialised() : new float[Constants.RegionSize * Constants.RegionSize]), + (float)scene.RegionInfo.RegionSettings.WaterHeight); } diff --git a/OpenSim/Region/PhysicsModules/BulletS/Tests/BulletSimTestsUtil.cs b/OpenSim/Region/PhysicsModules/BulletS/Tests/BulletSimTestsUtil.cs index d86c841e5f..4eeea4d618 100755 --- a/OpenSim/Region/PhysicsModules/BulletS/Tests/BulletSimTestsUtil.cs +++ b/OpenSim/Region/PhysicsModules/BulletS/Tests/BulletSimTestsUtil.cs @@ -81,8 +81,6 @@ public static class BulletSimTestsUtil Vector3 regionExtent = new Vector3(Constants.RegionSize, Constants.RegionSize, Constants.RegionHeight); - //PhysicsScene pScene = physicsPluginManager.GetPhysicsScene( - // "BulletSim", "Meshmerizer", openSimINI, "BSTestRegion", regionExtent); RegionInfo info = new RegionInfo(); info.RegionName = "BSTestRegion"; info.RegionSizeX = info.RegionSizeY = info.RegionSizeZ = Constants.RegionSize; diff --git a/OpenSim/Region/PhysicsModules/Ode/OdeScene.cs b/OpenSim/Region/PhysicsModules/Ode/OdeScene.cs index f090953807..f49b0f74e8 100644 --- a/OpenSim/Region/PhysicsModules/Ode/OdeScene.cs +++ b/OpenSim/Region/PhysicsModules/Ode/OdeScene.cs @@ -106,7 +106,7 @@ namespace OpenSim.Region.PhysicsModule.ODE } [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "ODEPhysicsScene")] - public class OdeScene : PhysicsScene + public class OdeScene : PhysicsScene, INonSharedRegionModule { private readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType.ToString()); private bool m_Enabled = false; @@ -585,7 +585,9 @@ namespace OpenSim.Region.PhysicsModule.ODE Vector3 extent = new Vector3(scene.RegionInfo.RegionSizeX, scene.RegionInfo.RegionSizeY, scene.RegionInfo.RegionSizeZ); Initialise(); InitialiseFromConfig(m_config); - base.Initialise(scene.PhysicsRequestAsset, scene.Heightmap.GetFloatsSerialised(), (float)scene.RegionInfo.RegionSettings.WaterHeight); + base.Initialise(scene.PhysicsRequestAsset, + (scene.Heightmap != null ? scene.Heightmap.GetFloatsSerialised() : new float[Constants.RegionSize * Constants.RegionSize]), + (float)scene.RegionInfo.RegionSettings.WaterHeight); } diff --git a/OpenSim/Region/PhysicsModules/Ode/Tests/ODETestClass.cs b/OpenSim/Region/PhysicsModules/Ode/Tests/ODETestClass.cs index eca670c8bd..36b65cf586 100644 --- a/OpenSim/Region/PhysicsModules/Ode/Tests/ODETestClass.cs +++ b/OpenSim/Region/PhysicsModules/Ode/Tests/ODETestClass.cs @@ -32,6 +32,8 @@ using OpenMetaverse; using OpenSim.Framework; using OpenSim.Region.PhysicsModules.SharedBase; using OpenSim.Region.PhysicsModule.ODE; +using OpenSim.Region.Framework.Scenes; +using OpenSim.Region.Framework.Interfaces; using OpenSim.Tests.Common; using log4net; using System.Reflection; @@ -44,15 +46,39 @@ namespace OpenSim.Region.PhysicsModule.ODE.Tests private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); //private OpenSim.Region.PhysicsModule.ODE.OdePlugin cbt; - private PhysicsScene ps; + private PhysicsScene pScene; private IMeshingPlugin imp; [SetUp] public void Initialize() { - IConfigSource TopConfig = new IniConfigSource(); - IConfig config = TopConfig.AddConfig("Startup"); - config.Set("DecodedSculptMapPath","j2kDecodeCache"); + IConfigSource openSimINI = new IniConfigSource(); + IConfig startupConfig = openSimINI.AddConfig("Startup"); + startupConfig.Set("physics", "OpenDynamicsEngine"); + startupConfig.Set("DecodedSculptMapPath", "j2kDecodeCache"); + + Vector3 regionExtent = new Vector3(Constants.RegionSize, Constants.RegionSize, Constants.RegionHeight); + + //PhysicsScene pScene = physicsPluginManager.GetPhysicsScene( + // "BulletSim", "Meshmerizer", openSimINI, "BSTestRegion", regionExtent); + RegionInfo info = new RegionInfo(); + info.RegionName = "ODETestRegion"; + info.RegionSizeX = info.RegionSizeY = info.RegionSizeZ = Constants.RegionSize; + OpenSim.Region.Framework.Scenes.Scene scene = new OpenSim.Region.Framework.Scenes.Scene(info); + + //IMesher mesher = new OpenSim.Region.PhysicsModules.Meshing.Meshmerizer(); + //INonSharedRegionModule mod = mesher as INonSharedRegionModule; + //mod.Initialise(openSimINI); + //mod.AddRegion(scene); + //mod.RegionLoaded(scene); + + pScene = new OdeScene(); + Console.WriteLine("HERE " + (pScene == null ? "Null" : "Not null")); + INonSharedRegionModule mod = (pScene as INonSharedRegionModule); + Console.WriteLine("HERE " + (mod == null ? "Null" : "Not null")); + mod.Initialise(openSimINI); + mod.AddRegion(scene); + mod.RegionLoaded(scene); // Loading ODEPlugin //cbt = new OdePlugin(); @@ -65,14 +91,14 @@ namespace OpenSim.Region.PhysicsModule.ODE.Tests { _heightmap[i] = 21f; } - ps.SetTerrain(_heightmap); + pScene.SetTerrain(_heightmap); } [TearDown] public void Terminate() { - ps.DeleteTerrain(); - ps.Dispose(); + pScene.DeleteTerrain(); + pScene.Dispose(); } @@ -83,9 +109,9 @@ namespace OpenSim.Region.PhysicsModule.ODE.Tests Vector3 position = new Vector3(((float)Constants.RegionSize * 0.5f), ((float)Constants.RegionSize * 0.5f), 128f); Vector3 size = new Vector3(0.5f, 0.5f, 0.5f); Quaternion rot = Quaternion.Identity; - PhysicsActor prim = ps.AddPrimShape("CoolShape", newcube, position, size, rot, true, 0); + PhysicsActor prim = pScene.AddPrimShape("CoolShape", newcube, position, size, rot, true, 0); OdePrim oprim = (OdePrim)prim; - OdeScene pscene = (OdeScene) ps; + OdeScene pscene = (OdeScene)pScene; Assert.That(oprim.m_taintadd); @@ -93,7 +119,7 @@ namespace OpenSim.Region.PhysicsModule.ODE.Tests for (int i = 0; i < 58; i++) { - ps.Simulate(0.133f); + pScene.Simulate(0.133f); Assert.That(oprim.prim_geom != (IntPtr)0); @@ -117,9 +143,9 @@ namespace OpenSim.Region.PhysicsModule.ODE.Tests // Make sure we're not somewhere above the ground Assert.That(prim.Position.Z < 21.5f); - ps.RemovePrim(prim); + pScene.RemovePrim(prim); Assert.That(oprim.m_taintremove); - ps.Simulate(0.133f); + pScene.Simulate(0.133f); Assert.That(oprim.Body == (IntPtr)0); } } diff --git a/OpenSim/Region/PhysicsModules/POS/POSScene.cs b/OpenSim/Region/PhysicsModules/POS/POSScene.cs index beaa177156..f47d245015 100644 --- a/OpenSim/Region/PhysicsModules/POS/POSScene.cs +++ b/OpenSim/Region/PhysicsModules/POS/POSScene.cs @@ -85,7 +85,9 @@ namespace OpenSim.Region.PhysicsModule.POS PhysicsSceneName = EngineType + "/" + scene.RegionInfo.RegionName; scene.RegisterModuleInterface(this); - base.Initialise(scene.PhysicsRequestAsset, scene.Heightmap.GetFloatsSerialised(), (float)scene.RegionInfo.RegionSettings.WaterHeight); + base.Initialise(scene.PhysicsRequestAsset, + (scene.Heightmap != null ? scene.Heightmap.GetFloatsSerialised() : new float[Constants.RegionSize * Constants.RegionSize]), + (float)scene.RegionInfo.RegionSettings.WaterHeight); } diff --git a/prebuild.xml b/prebuild.xml index 2685c30303..4d98c19607 100644 --- a/prebuild.xml +++ b/prebuild.xml @@ -3396,7 +3396,8 @@ - + + @@ -3431,9 +3432,9 @@ - + - + From 9435405ca1c173963dd6e97116a27b798a211801 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Mon, 31 Aug 2015 16:23:43 -0700 Subject: [PATCH 10/32] Deleted physics plugin classes. More unit tests fixed. --- .../BasicPhysics/BasicPhysicsPlugin.cs | 64 ----- .../BasicPhysics/BasicPhysicsScene.cs | 6 +- .../Region/PhysicsModules/BulletS/BSPlugin.cs | 76 ------ .../Region/PhysicsModules/BulletS/BSScene.cs | 2 +- .../Region/PhysicsModules/Ode/OdePlugin.cs | 90 ------- .../PhysicsModules/Ode/Tests/ODETestClass.cs | 1 - .../Region/PhysicsModules/POS/POSPlugin.cs | 64 ----- .../SharedBase/PhysicsPluginManager.cs | 235 ------------------ OpenSim/Tests/Common/Helpers/SceneHelpers.cs | 26 +- prebuild.xml | 1 + 10 files changed, 27 insertions(+), 538 deletions(-) delete mode 100644 OpenSim/Region/PhysicsModules/BasicPhysics/BasicPhysicsPlugin.cs delete mode 100644 OpenSim/Region/PhysicsModules/BulletS/BSPlugin.cs delete mode 100644 OpenSim/Region/PhysicsModules/Ode/OdePlugin.cs delete mode 100644 OpenSim/Region/PhysicsModules/POS/POSPlugin.cs delete mode 100644 OpenSim/Region/PhysicsModules/SharedBase/PhysicsPluginManager.cs diff --git a/OpenSim/Region/PhysicsModules/BasicPhysics/BasicPhysicsPlugin.cs b/OpenSim/Region/PhysicsModules/BasicPhysics/BasicPhysicsPlugin.cs deleted file mode 100644 index db02eb6c7f..0000000000 --- a/OpenSim/Region/PhysicsModules/BasicPhysics/BasicPhysicsPlugin.cs +++ /dev/null @@ -1,64 +0,0 @@ -/* - * Copyright (c) Contributors, http://opensimulator.org/ - * See CONTRIBUTORS.TXT for a full list of copyright holders. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * * Neither the name of the OpenSimulator Project nor the - * names of its contributors may be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY - * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -using System; -using System.Collections.Generic; -using Nini.Config; -using OpenSim.Framework; -using OpenSim.Region.PhysicsModules.SharedBase; - -namespace OpenSim.Region.PhysicsModule.BasicPhysics -{ - /// - /// Effectively a physics plugin that simulates no physics at all. - /// - //public class BasicPhysicsPlugin : IPhysicsPlugin - //{ - // public BasicPhysicsPlugin() - // { - // } - - // public bool Init() - // { - // return true; - // } - - // public PhysicsScene GetScene(string sceneIdentifier) - // { - // return new BasicScene(GetName(), sceneIdentifier); - // } - - // public string GetName() - // { - // return ("basicphysics"); - // } - - // public void Dispose() - // { - // } - //} -} diff --git a/OpenSim/Region/PhysicsModules/BasicPhysics/BasicPhysicsScene.cs b/OpenSim/Region/PhysicsModules/BasicPhysics/BasicPhysicsScene.cs index 10684d19f0..20b337a475 100644 --- a/OpenSim/Region/PhysicsModules/BasicPhysics/BasicPhysicsScene.cs +++ b/OpenSim/Region/PhysicsModules/BasicPhysics/BasicPhysicsScene.cs @@ -94,7 +94,7 @@ namespace OpenSim.Region.PhysicsModule.BasicPhysics scene.RegisterModuleInterface(this); m_regionExtent = new Vector3(scene.RegionInfo.RegionSizeX, scene.RegionInfo.RegionSizeY, scene.RegionInfo.RegionSizeZ); base.Initialise(scene.PhysicsRequestAsset, - (scene.Heightmap != null ? scene.Heightmap.GetFloatsSerialised() : new float[Constants.RegionSize * Constants.RegionSize]), + (scene.Heightmap != null ? scene.Heightmap.GetFloatsSerialised() : new float[scene.RegionInfo.RegionSizeX * scene.RegionInfo.RegionSizeY]), (float)scene.RegionInfo.RegionSettings.WaterHeight); } @@ -164,8 +164,8 @@ namespace OpenSim.Region.PhysicsModule.BasicPhysics Vector3 actorPosition = actor.Position; Vector3 actorVelocity = actor.Velocity; -// Console.WriteLine( -// "Processing actor {0}, starting pos {1}, starting vel {2}", i, actorPosition, actorVelocity); + //Console.WriteLine( + // "Processing actor {0}, starting pos {1}, starting vel {2}", i, actorPosition, actorVelocity); actorPosition.X += actor.Velocity.X * timeStep; actorPosition.Y += actor.Velocity.Y * timeStep; diff --git a/OpenSim/Region/PhysicsModules/BulletS/BSPlugin.cs b/OpenSim/Region/PhysicsModules/BulletS/BSPlugin.cs deleted file mode 100644 index 7fc51f78cb..0000000000 --- a/OpenSim/Region/PhysicsModules/BulletS/BSPlugin.cs +++ /dev/null @@ -1,76 +0,0 @@ -/* - * Copyright (c) Contributors, http://opensimulator.org/ - * See CONTRIBUTORS.TXT for a full list of copyright holders. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyrightD - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * * Neither the name of the OpenSimulator Project nor the - * names of its contributors may be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY - * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ -using System; -using System.Collections.Generic; -using OpenSim.Framework; -using OpenSim.Region.PhysicsModules.SharedBase; -using OpenMetaverse; - -namespace OpenSim.Region.PhysicsModule.BulletS -{ - /// - /// Entry for a port of Bullet (http://bulletphysics.org/) to OpenSim. - /// This module interfaces to an unmanaged C++ library which makes the - /// actual calls into the Bullet physics engine. - /// The unmanaged library is found in opensim-libs::trunk/unmanaged/BulletSim/. - /// The unmanaged library is compiled and linked statically with Bullet - /// to create BulletSim.dll and libBulletSim.so (for both 32 and 64 bit). - /// -//public class BSPlugin : IPhysicsPlugin -//{ -// //private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - -// private BSScene _mScene; - -// public BSPlugin() -// { -// } - -// public bool Init() -// { -// return true; -// } - -// public PhysicsScene GetScene(String sceneIdentifier) -// { -// if (_mScene == null) -// { -// _mScene = new BSScene(GetName(), sceneIdentifier); -// } -// return (_mScene); -// } - -// public string GetName() -// { -// return ("BulletSim"); -// } - -// public void Dispose() -// { -// } -//} -} diff --git a/OpenSim/Region/PhysicsModules/BulletS/BSScene.cs b/OpenSim/Region/PhysicsModules/BulletS/BSScene.cs index d116c3b636..db4d3cf72d 100644 --- a/OpenSim/Region/PhysicsModules/BulletS/BSScene.cs +++ b/OpenSim/Region/PhysicsModules/BulletS/BSScene.cs @@ -251,7 +251,7 @@ namespace OpenSim.Region.PhysicsModule.BulletS Initialise(m_Config, extent); base.Initialise(scene.PhysicsRequestAsset, - (scene.Heightmap != null ? scene.Heightmap.GetFloatsSerialised() : new float[Constants.RegionSize * Constants.RegionSize]), + (scene.Heightmap != null ? scene.Heightmap.GetFloatsSerialised() : new float[scene.RegionInfo.RegionSizeX * scene.RegionInfo.RegionSizeY]), (float)scene.RegionInfo.RegionSettings.WaterHeight); } diff --git a/OpenSim/Region/PhysicsModules/Ode/OdePlugin.cs b/OpenSim/Region/PhysicsModules/Ode/OdePlugin.cs deleted file mode 100644 index bb2fad9e92..0000000000 --- a/OpenSim/Region/PhysicsModules/Ode/OdePlugin.cs +++ /dev/null @@ -1,90 +0,0 @@ -/* - * Copyright (c) Contributors, http://opensimulator.org/ - * See CONTRIBUTORS.TXT for a full list of copyright holders. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * * Neither the name of the OpenSimulator Project nor the - * names of its contributors may be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY - * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -using System; -using System.Collections.Generic; -using System.Reflection; -using System.Runtime.InteropServices; -using System.Threading; -using System.IO; -using System.Diagnostics; -using log4net; -using Nini.Config; -using Ode.NET; -using OpenSim.Framework; -using OpenSim.Region.PhysicsModules.SharedBase; -using OpenMetaverse; - -namespace OpenSim.Region.PhysicsModule.ODE -{ - /// - /// ODE plugin - /// -// public class OdePlugin : IPhysicsPlugin -// { -//// private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - -// private OdeScene m_scene; - -// public bool Init() -// { -// return true; -// } - -// public PhysicsScene GetScene(String sceneIdentifier) -// { -// if (m_scene == null) -// { -// // We do this so that OpenSimulator on Windows loads the correct native ODE library depending on whether -// // it's running as a 32-bit process or a 64-bit one. By invoking LoadLibary here, later DLLImports -// // will find it already loaded later on. -// // -// // This isn't necessary for other platforms (e.g. Mac OSX and Linux) since the DLL used can be -// // controlled in Ode.NET.dll.config -// if (Util.IsWindows()) -// Util.LoadArchSpecificWindowsDll("ode.dll"); - -// // Initializing ODE only when a scene is created allows alternative ODE plugins to co-habit (according to -// // http://opensimulator.org/mantis/view.php?id=2750). -// d.InitODE(); - -// m_scene = new OdeScene(GetName(), sceneIdentifier); -// } - -// return m_scene; -// } - -// public string GetName() -// { -// return ("OpenDynamicsEngine"); -// } - -// public void Dispose() -// { -// } -// } -} \ No newline at end of file diff --git a/OpenSim/Region/PhysicsModules/Ode/Tests/ODETestClass.cs b/OpenSim/Region/PhysicsModules/Ode/Tests/ODETestClass.cs index 36b65cf586..6dc22bd66d 100644 --- a/OpenSim/Region/PhysicsModules/Ode/Tests/ODETestClass.cs +++ b/OpenSim/Region/PhysicsModules/Ode/Tests/ODETestClass.cs @@ -47,7 +47,6 @@ namespace OpenSim.Region.PhysicsModule.ODE.Tests //private OpenSim.Region.PhysicsModule.ODE.OdePlugin cbt; private PhysicsScene pScene; - private IMeshingPlugin imp; [SetUp] public void Initialize() diff --git a/OpenSim/Region/PhysicsModules/POS/POSPlugin.cs b/OpenSim/Region/PhysicsModules/POS/POSPlugin.cs deleted file mode 100644 index d233097157..0000000000 --- a/OpenSim/Region/PhysicsModules/POS/POSPlugin.cs +++ /dev/null @@ -1,64 +0,0 @@ -/* - * Copyright (c) Contributors, http://opensimulator.org/ - * See CONTRIBUTORS.TXT for a full list of copyright holders. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * * Neither the name of the OpenSimulator Project nor the - * names of its contributors may be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY - * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -using System; -using System.Collections.Generic; -using Nini.Config; -using OpenSim.Framework; -using OpenSim.Region.PhysicsModules.SharedBase; - -namespace OpenSim.Region.PhysicsModule.POS -{ - /// - /// for now will be a very POS physics engine - /// - //public class POSPlugin : IPhysicsPlugin - //{ - // public POSPlugin() - // { - // } - - // public bool Init() - // { - // return true; - // } - - // public PhysicsScene GetScene(string sceneIdentifier) - // { - // return new POSScene(GetName(), sceneIdentifier); - // } - - // public string GetName() - // { - // return ("POS"); - // } - - // public void Dispose() - // { - // } - //} -} diff --git a/OpenSim/Region/PhysicsModules/SharedBase/PhysicsPluginManager.cs b/OpenSim/Region/PhysicsModules/SharedBase/PhysicsPluginManager.cs deleted file mode 100644 index 487582c41a..0000000000 --- a/OpenSim/Region/PhysicsModules/SharedBase/PhysicsPluginManager.cs +++ /dev/null @@ -1,235 +0,0 @@ -/* - * Copyright (c) Contributors, http://opensimulator.org/ - * See CONTRIBUTORS.TXT for a full list of copyright holders. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * * Neither the name of the OpenSimulator Project nor the - * names of its contributors may be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY - * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -using System; -using System.Collections.Generic; -using System.IO; -using System.Reflection; -using Nini.Config; -using log4net; -using OpenSim.Framework; -using OpenMetaverse; - -namespace OpenSim.Region.PhysicsModules.SharedBase -{ - /// - /// Description of MyClass. - /// - public class PhysicsPluginManager - { - private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); - - private Dictionary _PhysPlugins = new Dictionary(); - private Dictionary _MeshPlugins = new Dictionary(); - - /// - /// Constructor. - /// - public PhysicsPluginManager() - { - } - - /// - /// Get a physics scene for the given physics engine and mesher. - /// - /// - /// - /// - /// - public PhysicsScene GetPhysicsScene(string physEngineName, string meshEngineName, - IConfigSource config, string regionName, Vector3 regionExtent) - { - if (String.IsNullOrEmpty(physEngineName)) - { - return PhysicsScene.Null; - } - - if (String.IsNullOrEmpty(meshEngineName)) - { - return PhysicsScene.Null; - } - - IMesher meshEngine = null; - if (_MeshPlugins.ContainsKey(meshEngineName)) - { - m_log.Info("[PHYSICS]: creating meshing engine " + meshEngineName); - meshEngine = _MeshPlugins[meshEngineName].GetMesher(config); - } - else - { - m_log.WarnFormat("[PHYSICS]: couldn't find meshingEngine: {0}", meshEngineName); - throw new ArgumentException(String.Format("couldn't find meshingEngine: {0}", meshEngineName)); - } - - if (_PhysPlugins.ContainsKey(physEngineName)) - { - m_log.Info("[PHYSICS]: creating " + physEngineName); - PhysicsScene result = _PhysPlugins[physEngineName].GetScene(regionName); - //result.Initialise(meshEngine, config, regionExtent); - return result; - } - else - { - m_log.WarnFormat("[PHYSICS]: couldn't find physicsEngine: {0}", physEngineName); - throw new ArgumentException(String.Format("couldn't find physicsEngine: {0}", physEngineName)); - } - } - - /// - /// Load all plugins in assemblies at the given path - /// - /// - public void LoadPluginsFromAssemblies(string assembliesPath) - { - // Walk all assemblies (DLLs effectively) and see if they are home - // of a plugin that is of interest for us - string[] pluginFiles = Directory.GetFiles(assembliesPath, "*.dll"); - - for (int i = 0; i < pluginFiles.Length; i++) - { - LoadPluginsFromAssembly(pluginFiles[i]); - } - } - - /// - /// Load plugins from an assembly at the given path - /// - /// - public void LoadPluginsFromAssembly(string assemblyPath) - { - // TODO / NOTE - // The assembly named 'OpenSim.Region.PhysicsModule.BasicPhysics' was loaded from - // 'file:///C:/OpenSim/trunk2/bin/Physics/OpenSim.Region.PhysicsModule.BasicPhysics.dll' - // using the LoadFrom context. The use of this context can result in unexpected behavior - // for serialization, casting and dependency resolution. In almost all cases, it is recommended - // that the LoadFrom context be avoided. This can be done by installing assemblies in the - // Global Assembly Cache or in the ApplicationBase directory and using Assembly. - // Load when explicitly loading assemblies. - Assembly pluginAssembly = null; - Type[] types = null; - - try - { - pluginAssembly = Assembly.LoadFrom(assemblyPath); - } - catch (Exception ex) - { - m_log.Error("[PHYSICS]: Failed to load plugin from " + assemblyPath, ex); - } - - if (pluginAssembly != null) - { - try - { - types = pluginAssembly.GetTypes(); - } - catch (ReflectionTypeLoadException ex) - { - m_log.Error("[PHYSICS]: Failed to enumerate types in plugin from " + assemblyPath + ": " + - ex.LoaderExceptions[0].Message, ex); - } - catch (Exception ex) - { - m_log.Error("[PHYSICS]: Failed to enumerate types in plugin from " + assemblyPath, ex); - } - - if (types != null) - { - foreach (Type pluginType in types) - { - if (pluginType.IsPublic) - { - if (!pluginType.IsAbstract) - { - Type physTypeInterface = pluginType.GetInterface("IPhysicsPlugin"); - - if (physTypeInterface != null) - { - IPhysicsPlugin plug = - (IPhysicsPlugin)Activator.CreateInstance(pluginAssembly.GetType(pluginType.ToString())); - plug.Init(); - if (!_PhysPlugins.ContainsKey(plug.GetName())) - { - _PhysPlugins.Add(plug.GetName(), plug); - m_log.Info("[PHYSICS]: Added physics engine: " + plug.GetName()); - } - } - - Type meshTypeInterface = pluginType.GetInterface("IMeshingPlugin"); - - if (meshTypeInterface != null) - { - IMeshingPlugin plug = - (IMeshingPlugin)Activator.CreateInstance(pluginAssembly.GetType(pluginType.ToString())); - if (!_MeshPlugins.ContainsKey(plug.GetName())) - { - _MeshPlugins.Add(plug.GetName(), plug); - m_log.Info("[PHYSICS]: Added meshing engine: " + plug.GetName()); - } - } - - physTypeInterface = null; - meshTypeInterface = null; - } - } - } - } - } - - pluginAssembly = null; - } - - //--- - public static void PhysicsPluginMessage(string message, bool isWarning) - { - if (isWarning) - { - m_log.Warn("[PHYSICS]: " + message); - } - else - { - m_log.Info("[PHYSICS]: " + message); - } - } - - //--- - } - - public interface IPhysicsPlugin - { - bool Init(); - PhysicsScene GetScene(String sceneIdentifier); - string GetName(); - void Dispose(); - } - - public interface IMeshingPlugin - { - string GetName(); - IMesher GetMesher(IConfigSource config); - } -} diff --git a/OpenSim/Tests/Common/Helpers/SceneHelpers.cs b/OpenSim/Tests/Common/Helpers/SceneHelpers.cs index 27705bdad7..53509dc23e 100644 --- a/OpenSim/Tests/Common/Helpers/SceneHelpers.cs +++ b/OpenSim/Tests/Common/Helpers/SceneHelpers.cs @@ -48,6 +48,7 @@ using OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory; using OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid; using OpenSim.Region.CoreModules.ServiceConnectorsOut.UserAccounts; using OpenSim.Region.CoreModules.ServiceConnectorsOut.Presence; +using OpenSim.Region.PhysicsModule.BasicPhysics; using OpenSim.Services.Interfaces; using GridRegion = OpenSim.Services.Interfaces.GridRegion; @@ -77,6 +78,8 @@ namespace OpenSim.Tests.Common private CoreAssetCache m_cache; + private PhysicsScene m_physicsScene; + public SceneHelpers() : this(null) {} public SceneHelpers(CoreAssetCache cache) @@ -97,6 +100,8 @@ namespace OpenSim.Tests.Common m_cache = cache; + m_physicsScene = StartPhysicsScene(); + SimDataService = OpenSim.Server.Base.ServerUtils.LoadPlugin("OpenSim.Tests.Common.dll", null); } @@ -148,10 +153,6 @@ namespace OpenSim.Tests.Common regInfo.RegionSizeX = sizeX; regInfo.RegionSizeY = sizeY; - PhysicsPluginManager physicsPluginManager = new PhysicsPluginManager(); - physicsPluginManager.LoadPluginsFromAssembly("Physics/OpenSim.Region.PhysicsModule.BasicPhysics.dll"); - Vector3 regionExtent = new Vector3( regInfo.RegionSizeX, regInfo.RegionSizeY, regInfo.RegionSizeZ); - TestScene testScene = new TestScene( regInfo, m_acm, SimDataService, m_estateDataService, configSource, null); @@ -159,6 +160,10 @@ namespace OpenSim.Tests.Common godsModule.Initialise(new IniConfigSource()); godsModule.AddRegion(testScene); + // Add scene to physics + ((INonSharedRegionModule)m_physicsScene).AddRegion(testScene); + ((INonSharedRegionModule)m_physicsScene).RegionLoaded(testScene); + // Add scene to services m_assetService.AddRegion(testScene); @@ -325,6 +330,19 @@ namespace OpenSim.Tests.Common return presenceService; } + private static PhysicsScene StartPhysicsScene() + { + IConfigSource config = new IniConfigSource(); + config.AddConfig("Startup"); + config.Configs["Startup"].Set("physics", "basicphysics"); + + PhysicsScene pScene = new BasicScene(); + INonSharedRegionModule mod = pScene as INonSharedRegionModule; + mod.Initialise(config); + + return pScene; + } + /// /// Setup modules for a scene using their default settings. /// diff --git a/prebuild.xml b/prebuild.xml index 4d98c19607..d41c145fcf 100644 --- a/prebuild.xml +++ b/prebuild.xml @@ -2737,6 +2737,7 @@ + From 0235e58fff47d3794777392a987feb4de8a5f99a Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Tue, 1 Sep 2015 09:20:20 -0700 Subject: [PATCH 11/32] Moved ExtendedPhysics from OptionalModules to Bullet project, because it's very much an optional Bullet feature. This way, Bullet doesn't need to depend on the OptionalModules dll. No changes in configs or behavior. --- .../ExtendedPhysics/ExtendedPhysics.cs | 623 ------------------ .../BulletS/BSLinksetConstraints.cs | 2 - .../Region/PhysicsModules/BulletS/BSPrim.cs | 1 - .../PhysicsModules/BulletS/BSPrimLinkable.cs | 1 - .../PhysicsModules/BulletS/ExtendedPhysics.cs | 622 +++++++++++++++++ prebuild.xml | 1 - 6 files changed, 622 insertions(+), 628 deletions(-) delete mode 100755 OpenSim/Region/OptionalModules/Scripting/ExtendedPhysics/ExtendedPhysics.cs create mode 100755 OpenSim/Region/PhysicsModules/BulletS/ExtendedPhysics.cs diff --git a/OpenSim/Region/OptionalModules/Scripting/ExtendedPhysics/ExtendedPhysics.cs b/OpenSim/Region/OptionalModules/Scripting/ExtendedPhysics/ExtendedPhysics.cs deleted file mode 100755 index ab363e5ec2..0000000000 --- a/OpenSim/Region/OptionalModules/Scripting/ExtendedPhysics/ExtendedPhysics.cs +++ /dev/null @@ -1,623 +0,0 @@ -/* - * Copyright (c) Contributors, http://opensimulator.org/ - * See CONTRIBUTORS.TXT for a full list of copyright holders. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyrightD - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * * Neither the name of the OpenSimulator Project nor the - * names of its contributors may be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY - * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Reflection; -using System.Text; -using System.Threading; - -using OpenSim.Framework; -using OpenSim.Region.CoreModules; -using OpenSim.Region.Framework; -using OpenSim.Region.Framework.Interfaces; -using OpenSim.Region.Framework.Scenes; -using OpenSim.Region.PhysicsModules.SharedBase; - -using Mono.Addins; -using Nini.Config; -using log4net; -using OpenMetaverse; - -namespace OpenSim.Region.OptionalModules.Scripting -{ -[Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")] -public class ExtendedPhysics : INonSharedRegionModule -{ - private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); - private static string LogHeader = "[EXTENDED PHYSICS]"; - - // ============================================================= - // Since BulletSim is a plugin, this these values aren't defined easily in one place. - // This table must correspond to an identical table in BSScene. - - // Per scene functions. See BSScene. - - // Per avatar functions. See BSCharacter. - - // Per prim functions. See BSPrim. - public const string PhysFunctGetLinksetType = "BulletSim.GetLinksetType"; - public const string PhysFunctSetLinksetType = "BulletSim.SetLinksetType"; - public const string PhysFunctChangeLinkFixed = "BulletSim.ChangeLinkFixed"; - public const string PhysFunctChangeLinkType = "BulletSim.ChangeLinkType"; - public const string PhysFunctGetLinkType = "BulletSim.GetLinkType"; - public const string PhysFunctChangeLinkParams = "BulletSim.ChangeLinkParams"; - public const string PhysFunctAxisLockLimits = "BulletSim.AxisLockLimits"; - - // ============================================================= - - private IConfig Configuration { get; set; } - private bool Enabled { get; set; } - private Scene BaseScene { get; set; } - private IScriptModuleComms Comms { get; set; } - - #region INonSharedRegionModule - - public string Name { get { return this.GetType().Name; } } - - public void Initialise(IConfigSource config) - { - BaseScene = null; - Enabled = false; - Configuration = null; - Comms = null; - - try - { - if ((Configuration = config.Configs["ExtendedPhysics"]) != null) - { - Enabled = Configuration.GetBoolean("Enabled", Enabled); - } - } - catch (Exception e) - { - m_log.ErrorFormat("{0} Initialization error: {0}", LogHeader, e); - } - - m_log.InfoFormat("{0} module {1} enabled", LogHeader, (Enabled ? "is" : "is not")); - } - - public void Close() - { - if (BaseScene != null) - { - BaseScene.EventManager.OnObjectAddedToScene -= EventManager_OnObjectAddedToScene; - BaseScene.EventManager.OnSceneObjectPartUpdated -= EventManager_OnSceneObjectPartUpdated; - BaseScene = null; - } - } - - public void AddRegion(Scene scene) - { - } - - public void RemoveRegion(Scene scene) - { - if (BaseScene != null && BaseScene == scene) - { - Close(); - } - } - - public void RegionLoaded(Scene scene) - { - if (!Enabled) return; - - BaseScene = scene; - - Comms = BaseScene.RequestModuleInterface(); - if (Comms == null) - { - m_log.WarnFormat("{0} ScriptModuleComms interface not defined", LogHeader); - Enabled = false; - - return; - } - - // Register as LSL functions all the [ScriptInvocation] marked methods. - Comms.RegisterScriptInvocations(this); - Comms.RegisterConstants(this); - - // When an object is modified, we might need to update its extended physics parameters - BaseScene.EventManager.OnObjectAddedToScene += EventManager_OnObjectAddedToScene; - BaseScene.EventManager.OnSceneObjectPartUpdated += EventManager_OnSceneObjectPartUpdated; - - } - - public Type ReplaceableInterface { get { return null; } } - - #endregion // INonSharedRegionModule - - private void EventManager_OnObjectAddedToScene(SceneObjectGroup obj) - { - } - - // Event generated when some property of a prim changes. - private void EventManager_OnSceneObjectPartUpdated(SceneObjectPart sop, bool isFullUpdate) - { - } - - [ScriptConstant] - public const int PHYS_CENTER_OF_MASS = 1 << 0; - - [ScriptInvocation] - public string physGetEngineType(UUID hostID, UUID scriptID) - { - string ret = string.Empty; - - if (BaseScene.PhysicsScene != null) - { - ret = BaseScene.PhysicsScene.EngineType; - } - - return ret; - } - - // Code for specifying params. - // The choice if 14700 is arbitrary and only serves to catch parameter code misuse. - [ScriptConstant] - public const int PHYS_AXIS_LOCK_LINEAR = 14700; - [ScriptConstant] - public const int PHYS_AXIS_LOCK_LINEAR_X = 14701; - [ScriptConstant] - public const int PHYS_AXIS_LIMIT_LINEAR_X = 14702; - [ScriptConstant] - public const int PHYS_AXIS_LOCK_LINEAR_Y = 14703; - [ScriptConstant] - public const int PHYS_AXIS_LIMIT_LINEAR_Y = 14704; - [ScriptConstant] - public const int PHYS_AXIS_LOCK_LINEAR_Z = 14705; - [ScriptConstant] - public const int PHYS_AXIS_LIMIT_LINEAR_Z = 14706; - [ScriptConstant] - public const int PHYS_AXIS_LOCK_ANGULAR = 14707; - [ScriptConstant] - public const int PHYS_AXIS_LOCK_ANGULAR_X = 14708; - [ScriptConstant] - public const int PHYS_AXIS_LIMIT_ANGULAR_X = 14709; - [ScriptConstant] - public const int PHYS_AXIS_LOCK_ANGULAR_Y = 14710; - [ScriptConstant] - public const int PHYS_AXIS_LIMIT_ANGULAR_Y = 14711; - [ScriptConstant] - public const int PHYS_AXIS_LOCK_ANGULAR_Z = 14712; - [ScriptConstant] - public const int PHYS_AXIS_LIMIT_ANGULAR_Z = 14713; - [ScriptConstant] - public const int PHYS_AXIS_UNLOCK_LINEAR = 14714; - [ScriptConstant] - public const int PHYS_AXIS_UNLOCK_LINEAR_X = 14715; - [ScriptConstant] - public const int PHYS_AXIS_UNLOCK_LINEAR_Y = 14716; - [ScriptConstant] - public const int PHYS_AXIS_UNLOCK_LINEAR_Z = 14717; - [ScriptConstant] - public const int PHYS_AXIS_UNLOCK_ANGULAR = 14718; - [ScriptConstant] - public const int PHYS_AXIS_UNLOCK_ANGULAR_X = 14719; - [ScriptConstant] - public const int PHYS_AXIS_UNLOCK_ANGULAR_Y = 14720; - [ScriptConstant] - public const int PHYS_AXIS_UNLOCK_ANGULAR_Z = 14721; - [ScriptConstant] - public const int PHYS_AXIS_UNLOCK = 14722; - // physAxisLockLimits() - [ScriptInvocation] - public int physAxisLock(UUID hostID, UUID scriptID, object[] parms) - { - int ret = -1; - if (!Enabled) return ret; - - PhysicsActor rootPhysActor; - if (GetRootPhysActor(hostID, out rootPhysActor)) - { - object[] parms2 = AddToBeginningOfArray(rootPhysActor, null, parms); - ret = MakeIntError(rootPhysActor.Extension(PhysFunctAxisLockLimits, parms2)); - } - - return ret; - } - - [ScriptConstant] - public const int PHYS_LINKSET_TYPE_CONSTRAINT = 0; - [ScriptConstant] - public const int PHYS_LINKSET_TYPE_COMPOUND = 1; - [ScriptConstant] - public const int PHYS_LINKSET_TYPE_MANUAL = 2; - - [ScriptInvocation] - public int physSetLinksetType(UUID hostID, UUID scriptID, int linksetType) - { - int ret = -1; - if (!Enabled) return ret; - - // The part that is requesting the change. - SceneObjectPart requestingPart = BaseScene.GetSceneObjectPart(hostID); - - if (requestingPart != null) - { - // The change is always made to the root of a linkset. - SceneObjectGroup containingGroup = requestingPart.ParentGroup; - SceneObjectPart rootPart = containingGroup.RootPart; - - if (rootPart != null) - { - PhysicsActor rootPhysActor = rootPart.PhysActor; - if (rootPhysActor != null) - { - if (rootPhysActor.IsPhysical) - { - // Change a physical linkset by making non-physical, waiting for one heartbeat so all - // the prim and linkset state is updated, changing the type and making the - // linkset physical again. - containingGroup.ScriptSetPhysicsStatus(false); - Thread.Sleep(150); // longer than one heartbeat tick - - // A kludge for the moment. - // Since compound linksets move the children but don't generate position updates to the - // simulator, it is possible for compound linkset children to have out-of-sync simulator - // and physical positions. The following causes the simulator to push the real child positions - // down into the physics engine to get everything synced. - containingGroup.UpdateGroupPosition(containingGroup.AbsolutePosition); - containingGroup.UpdateGroupRotationR(containingGroup.GroupRotation); - - object[] parms2 = { rootPhysActor, null, linksetType }; - ret = MakeIntError(rootPhysActor.Extension(PhysFunctSetLinksetType, parms2)); - Thread.Sleep(150); // longer than one heartbeat tick - - containingGroup.ScriptSetPhysicsStatus(true); - } - else - { - // Non-physical linksets don't have a physical instantiation so there is no state to - // worry about being updated. - object[] parms2 = { rootPhysActor, null, linksetType }; - ret = MakeIntError(rootPhysActor.Extension(PhysFunctSetLinksetType, parms2)); - } - } - else - { - m_log.WarnFormat("{0} physSetLinksetType: root part does not have a physics actor. rootName={1}, hostID={2}", - LogHeader, rootPart.Name, hostID); - } - } - else - { - m_log.WarnFormat("{0} physSetLinksetType: root part does not exist. RequestingPartName={1}, hostID={2}", - LogHeader, requestingPart.Name, hostID); - } - } - else - { - m_log.WarnFormat("{0} physSetLinsetType: cannot find script object in scene. hostID={1}", LogHeader, hostID); - } - return ret; - } - - [ScriptInvocation] - public int physGetLinksetType(UUID hostID, UUID scriptID) - { - int ret = -1; - if (!Enabled) return ret; - - PhysicsActor rootPhysActor; - if (GetRootPhysActor(hostID, out rootPhysActor)) - { - object[] parms2 = { rootPhysActor, null }; - ret = MakeIntError(rootPhysActor.Extension(PhysFunctGetLinksetType, parms2)); - } - else - { - m_log.WarnFormat("{0} physGetLinsetType: cannot find script object in scene. hostID={1}", LogHeader, hostID); - } - return ret; - } - - [ScriptConstant] - public const int PHYS_LINK_TYPE_FIXED = 1234; - [ScriptConstant] - public const int PHYS_LINK_TYPE_HINGE = 4; - [ScriptConstant] - public const int PHYS_LINK_TYPE_SPRING = 9; - [ScriptConstant] - public const int PHYS_LINK_TYPE_6DOF = 6; - [ScriptConstant] - public const int PHYS_LINK_TYPE_SLIDER = 7; - - // physChangeLinkType(integer linkNum, integer typeCode) - [ScriptInvocation] - public int physChangeLinkType(UUID hostID, UUID scriptID, int linkNum, int typeCode) - { - int ret = -1; - if (!Enabled) return ret; - - PhysicsActor rootPhysActor; - PhysicsActor childPhysActor; - - if (GetRootAndChildPhysActors(hostID, linkNum, out rootPhysActor, out childPhysActor)) - { - object[] parms2 = { rootPhysActor, childPhysActor, typeCode }; - ret = MakeIntError(rootPhysActor.Extension(PhysFunctChangeLinkType, parms2)); - } - - return ret; - } - - // physGetLinkType(integer linkNum) - [ScriptInvocation] - public int physGetLinkType(UUID hostID, UUID scriptID, int linkNum) - { - int ret = -1; - if (!Enabled) return ret; - - PhysicsActor rootPhysActor; - PhysicsActor childPhysActor; - - if (GetRootAndChildPhysActors(hostID, linkNum, out rootPhysActor, out childPhysActor)) - { - object[] parms2 = { rootPhysActor, childPhysActor }; - ret = MakeIntError(rootPhysActor.Extension(PhysFunctGetLinkType, parms2)); - } - - return ret; - } - - // physChangeLinkFixed(integer linkNum) - // Change the link between the root and the linkNum into a fixed, static physical connection. - [ScriptInvocation] - public int physChangeLinkFixed(UUID hostID, UUID scriptID, int linkNum) - { - int ret = -1; - if (!Enabled) return ret; - - PhysicsActor rootPhysActor; - PhysicsActor childPhysActor; - - if (GetRootAndChildPhysActors(hostID, linkNum, out rootPhysActor, out childPhysActor)) - { - object[] parms2 = { rootPhysActor, childPhysActor , PHYS_LINK_TYPE_FIXED }; - ret = MakeIntError(rootPhysActor.Extension(PhysFunctChangeLinkType, parms2)); - } - - return ret; - } - - // Code for specifying params. - // The choice if 14400 is arbitrary and only serves to catch parameter code misuse. - public const int PHYS_PARAM_MIN = 14401; - - [ScriptConstant] - public const int PHYS_PARAM_FRAMEINA_LOC = 14401; - [ScriptConstant] - public const int PHYS_PARAM_FRAMEINA_ROT = 14402; - [ScriptConstant] - public const int PHYS_PARAM_FRAMEINB_LOC = 14403; - [ScriptConstant] - public const int PHYS_PARAM_FRAMEINB_ROT = 14404; - [ScriptConstant] - public const int PHYS_PARAM_LINEAR_LIMIT_LOW = 14405; - [ScriptConstant] - public const int PHYS_PARAM_LINEAR_LIMIT_HIGH = 14406; - [ScriptConstant] - public const int PHYS_PARAM_ANGULAR_LIMIT_LOW = 14407; - [ScriptConstant] - public const int PHYS_PARAM_ANGULAR_LIMIT_HIGH = 14408; - [ScriptConstant] - public const int PHYS_PARAM_USE_FRAME_OFFSET = 14409; - [ScriptConstant] - public const int PHYS_PARAM_ENABLE_TRANSMOTOR = 14410; - [ScriptConstant] - public const int PHYS_PARAM_TRANSMOTOR_MAXVEL = 14411; - [ScriptConstant] - public const int PHYS_PARAM_TRANSMOTOR_MAXFORCE = 14412; - [ScriptConstant] - public const int PHYS_PARAM_CFM = 14413; - [ScriptConstant] - public const int PHYS_PARAM_ERP = 14414; - [ScriptConstant] - public const int PHYS_PARAM_SOLVER_ITERATIONS = 14415; - [ScriptConstant] - public const int PHYS_PARAM_SPRING_AXIS_ENABLE = 14416; - [ScriptConstant] - public const int PHYS_PARAM_SPRING_DAMPING = 14417; - [ScriptConstant] - public const int PHYS_PARAM_SPRING_STIFFNESS = 14418; - [ScriptConstant] - public const int PHYS_PARAM_LINK_TYPE = 14419; - [ScriptConstant] - public const int PHYS_PARAM_USE_LINEAR_FRAMEA = 14420; - [ScriptConstant] - public const int PHYS_PARAM_SPRING_EQUILIBRIUM_POINT = 14421; - - public const int PHYS_PARAM_MAX = 14421; - - // Used when specifying a parameter that has settings for the three linear and three angular axis - [ScriptConstant] - public const int PHYS_AXIS_ALL = -1; - [ScriptConstant] - public const int PHYS_AXIS_LINEAR_ALL = -2; - [ScriptConstant] - public const int PHYS_AXIS_ANGULAR_ALL = -3; - [ScriptConstant] - public const int PHYS_AXIS_LINEAR_X = 0; - [ScriptConstant] - public const int PHYS_AXIS_LINEAR_Y = 1; - [ScriptConstant] - public const int PHYS_AXIS_LINEAR_Z = 2; - [ScriptConstant] - public const int PHYS_AXIS_ANGULAR_X = 3; - [ScriptConstant] - public const int PHYS_AXIS_ANGULAR_Y = 4; - [ScriptConstant] - public const int PHYS_AXIS_ANGULAR_Z = 5; - - // physChangeLinkParams(integer linkNum, [ PHYS_PARAM_*, value, PHYS_PARAM_*, value, ...]) - [ScriptInvocation] - public int physChangeLinkParams(UUID hostID, UUID scriptID, int linkNum, object[] parms) - { - int ret = -1; - if (!Enabled) return ret; - - PhysicsActor rootPhysActor; - PhysicsActor childPhysActor; - - if (GetRootAndChildPhysActors(hostID, linkNum, out rootPhysActor, out childPhysActor)) - { - object[] parms2 = AddToBeginningOfArray(rootPhysActor, childPhysActor, parms); - ret = MakeIntError(rootPhysActor.Extension(PhysFunctChangeLinkParams, parms2)); - } - - return ret; - } - - private bool GetRootPhysActor(UUID hostID, out PhysicsActor rootPhysActor) - { - SceneObjectGroup containingGroup; - SceneObjectPart rootPart; - return GetRootPhysActor(hostID, out containingGroup, out rootPart, out rootPhysActor); - } - - private bool GetRootPhysActor(UUID hostID, out SceneObjectGroup containingGroup, out SceneObjectPart rootPart, out PhysicsActor rootPhysActor) - { - bool ret = false; - rootPhysActor = null; - containingGroup = null; - rootPart = null; - - SceneObjectPart requestingPart; - - requestingPart = BaseScene.GetSceneObjectPart(hostID); - if (requestingPart != null) - { - // The type is is always on the root of a linkset. - containingGroup = requestingPart.ParentGroup; - if (containingGroup != null && !containingGroup.IsDeleted) - { - rootPart = containingGroup.RootPart; - if (rootPart != null) - { - rootPhysActor = rootPart.PhysActor; - if (rootPhysActor != null) - { - ret = true; - } - else - { - m_log.WarnFormat("{0} GetRootAndChildPhysActors: Root part does not have a physics actor. rootName={1}, hostID={2}", - LogHeader, rootPart.Name, hostID); - } - } - else - { - m_log.WarnFormat("{0} GetRootAndChildPhysActors: Root part does not exist. RequestingPartName={1}, hostID={2}", - LogHeader, requestingPart.Name, hostID); - } - } - else - { - m_log.WarnFormat("{0} GetRootAndChildPhysActors: Containing group missing or deleted. hostID={1}", LogHeader, hostID); - } - } - else - { - m_log.WarnFormat("{0} GetRootAndChildPhysActors: cannot find script object in scene. hostID={1}", LogHeader, hostID); - } - - return ret; - } - - // Find the root and child PhysActors based on the linkNum. - // Return 'true' if both are found and returned. - private bool GetRootAndChildPhysActors(UUID hostID, int linkNum, out PhysicsActor rootPhysActor, out PhysicsActor childPhysActor) - { - bool ret = false; - rootPhysActor = null; - childPhysActor = null; - - SceneObjectGroup containingGroup; - SceneObjectPart rootPart; - - if (GetRootPhysActor(hostID, out containingGroup, out rootPart, out rootPhysActor)) - { - SceneObjectPart linkPart = containingGroup.GetLinkNumPart(linkNum); - if (linkPart != null) - { - childPhysActor = linkPart.PhysActor; - if (childPhysActor != null) - { - ret = true; - } - else - { - m_log.WarnFormat("{0} GetRootAndChildPhysActors: Link part has no physical actor. rootName={1}, hostID={2}, linknum={3}", - LogHeader, rootPart.Name, hostID, linkNum); - } - } - else - { - m_log.WarnFormat("{0} GetRootAndChildPhysActors: Could not find linknum part. rootName={1}, hostID={2}, linknum={3}", - LogHeader, rootPart.Name, hostID, linkNum); - } - } - else - { - m_log.WarnFormat("{0} GetRootAndChildPhysActors: Root part does not have a physics actor. rootName={1}, hostID={2}", - LogHeader, rootPart.Name, hostID); - } - - return ret; - } - - // Return an array of objects with the passed object as the first object of a new array - private object[] AddToBeginningOfArray(object firstOne, object secondOne, object[] prevArray) - { - object[] newArray = new object[2 + prevArray.Length]; - newArray[0] = firstOne; - newArray[1] = secondOne; - prevArray.CopyTo(newArray, 2); - return newArray; - } - - // Extension() returns an object. Convert that object into the integer error we expect to return. - private int MakeIntError(object extensionRet) - { - int ret = -1; - if (extensionRet != null) - { - try - { - ret = (int)extensionRet; - } - catch - { - ret = -1; - } - } - return ret; - } -} -} diff --git a/OpenSim/Region/PhysicsModules/BulletS/BSLinksetConstraints.cs b/OpenSim/Region/PhysicsModules/BulletS/BSLinksetConstraints.cs index d7be470d81..c4b4c86ec8 100755 --- a/OpenSim/Region/PhysicsModules/BulletS/BSLinksetConstraints.cs +++ b/OpenSim/Region/PhysicsModules/BulletS/BSLinksetConstraints.cs @@ -28,8 +28,6 @@ using System; using System.Collections.Generic; using System.Text; -using OpenSim.Region.OptionalModules.Scripting; - using OMV = OpenMetaverse; namespace OpenSim.Region.PhysicsModule.BulletS diff --git a/OpenSim/Region/PhysicsModules/BulletS/BSPrim.cs b/OpenSim/Region/PhysicsModules/BulletS/BSPrim.cs index 3e744281be..6f27ac7683 100644 --- a/OpenSim/Region/PhysicsModules/BulletS/BSPrim.cs +++ b/OpenSim/Region/PhysicsModules/BulletS/BSPrim.cs @@ -34,7 +34,6 @@ using OMV = OpenMetaverse; using OpenSim.Framework; using OpenSim.Region.PhysicsModules.SharedBase; using OpenSim.Region.PhysicsModule.ConvexDecompositionDotNet; -using OpenSim.Region.OptionalModules.Scripting; // for ExtendedPhysics namespace OpenSim.Region.PhysicsModule.BulletS { diff --git a/OpenSim/Region/PhysicsModules/BulletS/BSPrimLinkable.cs b/OpenSim/Region/PhysicsModules/BulletS/BSPrimLinkable.cs index 8f494cca05..55b5da09c9 100755 --- a/OpenSim/Region/PhysicsModules/BulletS/BSPrimLinkable.cs +++ b/OpenSim/Region/PhysicsModules/BulletS/BSPrimLinkable.cs @@ -30,7 +30,6 @@ using System.Linq; using System.Text; using OpenSim.Framework; -using OpenSim.Region.OptionalModules.Scripting; using OMV = OpenMetaverse; diff --git a/OpenSim/Region/PhysicsModules/BulletS/ExtendedPhysics.cs b/OpenSim/Region/PhysicsModules/BulletS/ExtendedPhysics.cs new file mode 100755 index 0000000000..2ba3c5a762 --- /dev/null +++ b/OpenSim/Region/PhysicsModules/BulletS/ExtendedPhysics.cs @@ -0,0 +1,622 @@ +/* + * Copyright (c) Contributors, http://opensimulator.org/ + * See CONTRIBUTORS.TXT for a full list of copyright holders. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyrightD + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of the OpenSimulator Project nor the + * names of its contributors may be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Reflection; +using System.Text; +using System.Threading; + +using OpenSim.Framework; +using OpenSim.Region.Framework; +using OpenSim.Region.Framework.Interfaces; +using OpenSim.Region.Framework.Scenes; +using OpenSim.Region.PhysicsModules.SharedBase; + +using Mono.Addins; +using Nini.Config; +using log4net; +using OpenMetaverse; + +namespace OpenSim.Region.PhysicsModule.BulletS +{ + [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")] + public class ExtendedPhysics : INonSharedRegionModule + { + private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); + private static string LogHeader = "[EXTENDED PHYSICS]"; + + // ============================================================= + // Since BulletSim is a plugin, this these values aren't defined easily in one place. + // This table must correspond to an identical table in BSScene. + + // Per scene functions. See BSScene. + + // Per avatar functions. See BSCharacter. + + // Per prim functions. See BSPrim. + public const string PhysFunctGetLinksetType = "BulletSim.GetLinksetType"; + public const string PhysFunctSetLinksetType = "BulletSim.SetLinksetType"; + public const string PhysFunctChangeLinkFixed = "BulletSim.ChangeLinkFixed"; + public const string PhysFunctChangeLinkType = "BulletSim.ChangeLinkType"; + public const string PhysFunctGetLinkType = "BulletSim.GetLinkType"; + public const string PhysFunctChangeLinkParams = "BulletSim.ChangeLinkParams"; + public const string PhysFunctAxisLockLimits = "BulletSim.AxisLockLimits"; + + // ============================================================= + + private IConfig Configuration { get; set; } + private bool Enabled { get; set; } + private Scene BaseScene { get; set; } + private IScriptModuleComms Comms { get; set; } + + #region INonSharedRegionModule + + public string Name { get { return this.GetType().Name; } } + + public void Initialise(IConfigSource config) + { + BaseScene = null; + Enabled = false; + Configuration = null; + Comms = null; + + try + { + if ((Configuration = config.Configs["ExtendedPhysics"]) != null) + { + Enabled = Configuration.GetBoolean("Enabled", Enabled); + } + } + catch (Exception e) + { + m_log.ErrorFormat("{0} Initialization error: {0}", LogHeader, e); + } + + m_log.InfoFormat("{0} module {1} enabled", LogHeader, (Enabled ? "is" : "is not")); + } + + public void Close() + { + if (BaseScene != null) + { + BaseScene.EventManager.OnObjectAddedToScene -= EventManager_OnObjectAddedToScene; + BaseScene.EventManager.OnSceneObjectPartUpdated -= EventManager_OnSceneObjectPartUpdated; + BaseScene = null; + } + } + + public void AddRegion(Scene scene) + { + } + + public void RemoveRegion(Scene scene) + { + if (BaseScene != null && BaseScene == scene) + { + Close(); + } + } + + public void RegionLoaded(Scene scene) + { + if (!Enabled) return; + + BaseScene = scene; + + Comms = BaseScene.RequestModuleInterface(); + if (Comms == null) + { + m_log.WarnFormat("{0} ScriptModuleComms interface not defined", LogHeader); + Enabled = false; + + return; + } + + // Register as LSL functions all the [ScriptInvocation] marked methods. + Comms.RegisterScriptInvocations(this); + Comms.RegisterConstants(this); + + // When an object is modified, we might need to update its extended physics parameters + BaseScene.EventManager.OnObjectAddedToScene += EventManager_OnObjectAddedToScene; + BaseScene.EventManager.OnSceneObjectPartUpdated += EventManager_OnSceneObjectPartUpdated; + + } + + public Type ReplaceableInterface { get { return null; } } + + #endregion // INonSharedRegionModule + + private void EventManager_OnObjectAddedToScene(SceneObjectGroup obj) + { + } + + // Event generated when some property of a prim changes. + private void EventManager_OnSceneObjectPartUpdated(SceneObjectPart sop, bool isFullUpdate) + { + } + + [ScriptConstant] + public const int PHYS_CENTER_OF_MASS = 1 << 0; + + [ScriptInvocation] + public string physGetEngineType(UUID hostID, UUID scriptID) + { + string ret = string.Empty; + + if (BaseScene.PhysicsScene != null) + { + ret = BaseScene.PhysicsScene.EngineType; + } + + return ret; + } + + // Code for specifying params. + // The choice if 14700 is arbitrary and only serves to catch parameter code misuse. + [ScriptConstant] + public const int PHYS_AXIS_LOCK_LINEAR = 14700; + [ScriptConstant] + public const int PHYS_AXIS_LOCK_LINEAR_X = 14701; + [ScriptConstant] + public const int PHYS_AXIS_LIMIT_LINEAR_X = 14702; + [ScriptConstant] + public const int PHYS_AXIS_LOCK_LINEAR_Y = 14703; + [ScriptConstant] + public const int PHYS_AXIS_LIMIT_LINEAR_Y = 14704; + [ScriptConstant] + public const int PHYS_AXIS_LOCK_LINEAR_Z = 14705; + [ScriptConstant] + public const int PHYS_AXIS_LIMIT_LINEAR_Z = 14706; + [ScriptConstant] + public const int PHYS_AXIS_LOCK_ANGULAR = 14707; + [ScriptConstant] + public const int PHYS_AXIS_LOCK_ANGULAR_X = 14708; + [ScriptConstant] + public const int PHYS_AXIS_LIMIT_ANGULAR_X = 14709; + [ScriptConstant] + public const int PHYS_AXIS_LOCK_ANGULAR_Y = 14710; + [ScriptConstant] + public const int PHYS_AXIS_LIMIT_ANGULAR_Y = 14711; + [ScriptConstant] + public const int PHYS_AXIS_LOCK_ANGULAR_Z = 14712; + [ScriptConstant] + public const int PHYS_AXIS_LIMIT_ANGULAR_Z = 14713; + [ScriptConstant] + public const int PHYS_AXIS_UNLOCK_LINEAR = 14714; + [ScriptConstant] + public const int PHYS_AXIS_UNLOCK_LINEAR_X = 14715; + [ScriptConstant] + public const int PHYS_AXIS_UNLOCK_LINEAR_Y = 14716; + [ScriptConstant] + public const int PHYS_AXIS_UNLOCK_LINEAR_Z = 14717; + [ScriptConstant] + public const int PHYS_AXIS_UNLOCK_ANGULAR = 14718; + [ScriptConstant] + public const int PHYS_AXIS_UNLOCK_ANGULAR_X = 14719; + [ScriptConstant] + public const int PHYS_AXIS_UNLOCK_ANGULAR_Y = 14720; + [ScriptConstant] + public const int PHYS_AXIS_UNLOCK_ANGULAR_Z = 14721; + [ScriptConstant] + public const int PHYS_AXIS_UNLOCK = 14722; + // physAxisLockLimits() + [ScriptInvocation] + public int physAxisLock(UUID hostID, UUID scriptID, object[] parms) + { + int ret = -1; + if (!Enabled) return ret; + + PhysicsActor rootPhysActor; + if (GetRootPhysActor(hostID, out rootPhysActor)) + { + object[] parms2 = AddToBeginningOfArray(rootPhysActor, null, parms); + ret = MakeIntError(rootPhysActor.Extension(PhysFunctAxisLockLimits, parms2)); + } + + return ret; + } + + [ScriptConstant] + public const int PHYS_LINKSET_TYPE_CONSTRAINT = 0; + [ScriptConstant] + public const int PHYS_LINKSET_TYPE_COMPOUND = 1; + [ScriptConstant] + public const int PHYS_LINKSET_TYPE_MANUAL = 2; + + [ScriptInvocation] + public int physSetLinksetType(UUID hostID, UUID scriptID, int linksetType) + { + int ret = -1; + if (!Enabled) return ret; + + // The part that is requesting the change. + SceneObjectPart requestingPart = BaseScene.GetSceneObjectPart(hostID); + + if (requestingPart != null) + { + // The change is always made to the root of a linkset. + SceneObjectGroup containingGroup = requestingPart.ParentGroup; + SceneObjectPart rootPart = containingGroup.RootPart; + + if (rootPart != null) + { + PhysicsActor rootPhysActor = rootPart.PhysActor; + if (rootPhysActor != null) + { + if (rootPhysActor.IsPhysical) + { + // Change a physical linkset by making non-physical, waiting for one heartbeat so all + // the prim and linkset state is updated, changing the type and making the + // linkset physical again. + containingGroup.ScriptSetPhysicsStatus(false); + Thread.Sleep(150); // longer than one heartbeat tick + + // A kludge for the moment. + // Since compound linksets move the children but don't generate position updates to the + // simulator, it is possible for compound linkset children to have out-of-sync simulator + // and physical positions. The following causes the simulator to push the real child positions + // down into the physics engine to get everything synced. + containingGroup.UpdateGroupPosition(containingGroup.AbsolutePosition); + containingGroup.UpdateGroupRotationR(containingGroup.GroupRotation); + + object[] parms2 = { rootPhysActor, null, linksetType }; + ret = MakeIntError(rootPhysActor.Extension(PhysFunctSetLinksetType, parms2)); + Thread.Sleep(150); // longer than one heartbeat tick + + containingGroup.ScriptSetPhysicsStatus(true); + } + else + { + // Non-physical linksets don't have a physical instantiation so there is no state to + // worry about being updated. + object[] parms2 = { rootPhysActor, null, linksetType }; + ret = MakeIntError(rootPhysActor.Extension(PhysFunctSetLinksetType, parms2)); + } + } + else + { + m_log.WarnFormat("{0} physSetLinksetType: root part does not have a physics actor. rootName={1}, hostID={2}", + LogHeader, rootPart.Name, hostID); + } + } + else + { + m_log.WarnFormat("{0} physSetLinksetType: root part does not exist. RequestingPartName={1}, hostID={2}", + LogHeader, requestingPart.Name, hostID); + } + } + else + { + m_log.WarnFormat("{0} physSetLinsetType: cannot find script object in scene. hostID={1}", LogHeader, hostID); + } + return ret; + } + + [ScriptInvocation] + public int physGetLinksetType(UUID hostID, UUID scriptID) + { + int ret = -1; + if (!Enabled) return ret; + + PhysicsActor rootPhysActor; + if (GetRootPhysActor(hostID, out rootPhysActor)) + { + object[] parms2 = { rootPhysActor, null }; + ret = MakeIntError(rootPhysActor.Extension(PhysFunctGetLinksetType, parms2)); + } + else + { + m_log.WarnFormat("{0} physGetLinsetType: cannot find script object in scene. hostID={1}", LogHeader, hostID); + } + return ret; + } + + [ScriptConstant] + public const int PHYS_LINK_TYPE_FIXED = 1234; + [ScriptConstant] + public const int PHYS_LINK_TYPE_HINGE = 4; + [ScriptConstant] + public const int PHYS_LINK_TYPE_SPRING = 9; + [ScriptConstant] + public const int PHYS_LINK_TYPE_6DOF = 6; + [ScriptConstant] + public const int PHYS_LINK_TYPE_SLIDER = 7; + + // physChangeLinkType(integer linkNum, integer typeCode) + [ScriptInvocation] + public int physChangeLinkType(UUID hostID, UUID scriptID, int linkNum, int typeCode) + { + int ret = -1; + if (!Enabled) return ret; + + PhysicsActor rootPhysActor; + PhysicsActor childPhysActor; + + if (GetRootAndChildPhysActors(hostID, linkNum, out rootPhysActor, out childPhysActor)) + { + object[] parms2 = { rootPhysActor, childPhysActor, typeCode }; + ret = MakeIntError(rootPhysActor.Extension(PhysFunctChangeLinkType, parms2)); + } + + return ret; + } + + // physGetLinkType(integer linkNum) + [ScriptInvocation] + public int physGetLinkType(UUID hostID, UUID scriptID, int linkNum) + { + int ret = -1; + if (!Enabled) return ret; + + PhysicsActor rootPhysActor; + PhysicsActor childPhysActor; + + if (GetRootAndChildPhysActors(hostID, linkNum, out rootPhysActor, out childPhysActor)) + { + object[] parms2 = { rootPhysActor, childPhysActor }; + ret = MakeIntError(rootPhysActor.Extension(PhysFunctGetLinkType, parms2)); + } + + return ret; + } + + // physChangeLinkFixed(integer linkNum) + // Change the link between the root and the linkNum into a fixed, static physical connection. + [ScriptInvocation] + public int physChangeLinkFixed(UUID hostID, UUID scriptID, int linkNum) + { + int ret = -1; + if (!Enabled) return ret; + + PhysicsActor rootPhysActor; + PhysicsActor childPhysActor; + + if (GetRootAndChildPhysActors(hostID, linkNum, out rootPhysActor, out childPhysActor)) + { + object[] parms2 = { rootPhysActor, childPhysActor , PHYS_LINK_TYPE_FIXED }; + ret = MakeIntError(rootPhysActor.Extension(PhysFunctChangeLinkType, parms2)); + } + + return ret; + } + + // Code for specifying params. + // The choice if 14400 is arbitrary and only serves to catch parameter code misuse. + public const int PHYS_PARAM_MIN = 14401; + + [ScriptConstant] + public const int PHYS_PARAM_FRAMEINA_LOC = 14401; + [ScriptConstant] + public const int PHYS_PARAM_FRAMEINA_ROT = 14402; + [ScriptConstant] + public const int PHYS_PARAM_FRAMEINB_LOC = 14403; + [ScriptConstant] + public const int PHYS_PARAM_FRAMEINB_ROT = 14404; + [ScriptConstant] + public const int PHYS_PARAM_LINEAR_LIMIT_LOW = 14405; + [ScriptConstant] + public const int PHYS_PARAM_LINEAR_LIMIT_HIGH = 14406; + [ScriptConstant] + public const int PHYS_PARAM_ANGULAR_LIMIT_LOW = 14407; + [ScriptConstant] + public const int PHYS_PARAM_ANGULAR_LIMIT_HIGH = 14408; + [ScriptConstant] + public const int PHYS_PARAM_USE_FRAME_OFFSET = 14409; + [ScriptConstant] + public const int PHYS_PARAM_ENABLE_TRANSMOTOR = 14410; + [ScriptConstant] + public const int PHYS_PARAM_TRANSMOTOR_MAXVEL = 14411; + [ScriptConstant] + public const int PHYS_PARAM_TRANSMOTOR_MAXFORCE = 14412; + [ScriptConstant] + public const int PHYS_PARAM_CFM = 14413; + [ScriptConstant] + public const int PHYS_PARAM_ERP = 14414; + [ScriptConstant] + public const int PHYS_PARAM_SOLVER_ITERATIONS = 14415; + [ScriptConstant] + public const int PHYS_PARAM_SPRING_AXIS_ENABLE = 14416; + [ScriptConstant] + public const int PHYS_PARAM_SPRING_DAMPING = 14417; + [ScriptConstant] + public const int PHYS_PARAM_SPRING_STIFFNESS = 14418; + [ScriptConstant] + public const int PHYS_PARAM_LINK_TYPE = 14419; + [ScriptConstant] + public const int PHYS_PARAM_USE_LINEAR_FRAMEA = 14420; + [ScriptConstant] + public const int PHYS_PARAM_SPRING_EQUILIBRIUM_POINT = 14421; + + public const int PHYS_PARAM_MAX = 14421; + + // Used when specifying a parameter that has settings for the three linear and three angular axis + [ScriptConstant] + public const int PHYS_AXIS_ALL = -1; + [ScriptConstant] + public const int PHYS_AXIS_LINEAR_ALL = -2; + [ScriptConstant] + public const int PHYS_AXIS_ANGULAR_ALL = -3; + [ScriptConstant] + public const int PHYS_AXIS_LINEAR_X = 0; + [ScriptConstant] + public const int PHYS_AXIS_LINEAR_Y = 1; + [ScriptConstant] + public const int PHYS_AXIS_LINEAR_Z = 2; + [ScriptConstant] + public const int PHYS_AXIS_ANGULAR_X = 3; + [ScriptConstant] + public const int PHYS_AXIS_ANGULAR_Y = 4; + [ScriptConstant] + public const int PHYS_AXIS_ANGULAR_Z = 5; + + // physChangeLinkParams(integer linkNum, [ PHYS_PARAM_*, value, PHYS_PARAM_*, value, ...]) + [ScriptInvocation] + public int physChangeLinkParams(UUID hostID, UUID scriptID, int linkNum, object[] parms) + { + int ret = -1; + if (!Enabled) return ret; + + PhysicsActor rootPhysActor; + PhysicsActor childPhysActor; + + if (GetRootAndChildPhysActors(hostID, linkNum, out rootPhysActor, out childPhysActor)) + { + object[] parms2 = AddToBeginningOfArray(rootPhysActor, childPhysActor, parms); + ret = MakeIntError(rootPhysActor.Extension(PhysFunctChangeLinkParams, parms2)); + } + + return ret; + } + + private bool GetRootPhysActor(UUID hostID, out PhysicsActor rootPhysActor) + { + SceneObjectGroup containingGroup; + SceneObjectPart rootPart; + return GetRootPhysActor(hostID, out containingGroup, out rootPart, out rootPhysActor); + } + + private bool GetRootPhysActor(UUID hostID, out SceneObjectGroup containingGroup, out SceneObjectPart rootPart, out PhysicsActor rootPhysActor) + { + bool ret = false; + rootPhysActor = null; + containingGroup = null; + rootPart = null; + + SceneObjectPart requestingPart; + + requestingPart = BaseScene.GetSceneObjectPart(hostID); + if (requestingPart != null) + { + // The type is is always on the root of a linkset. + containingGroup = requestingPart.ParentGroup; + if (containingGroup != null && !containingGroup.IsDeleted) + { + rootPart = containingGroup.RootPart; + if (rootPart != null) + { + rootPhysActor = rootPart.PhysActor; + if (rootPhysActor != null) + { + ret = true; + } + else + { + m_log.WarnFormat("{0} GetRootAndChildPhysActors: Root part does not have a physics actor. rootName={1}, hostID={2}", + LogHeader, rootPart.Name, hostID); + } + } + else + { + m_log.WarnFormat("{0} GetRootAndChildPhysActors: Root part does not exist. RequestingPartName={1}, hostID={2}", + LogHeader, requestingPart.Name, hostID); + } + } + else + { + m_log.WarnFormat("{0} GetRootAndChildPhysActors: Containing group missing or deleted. hostID={1}", LogHeader, hostID); + } + } + else + { + m_log.WarnFormat("{0} GetRootAndChildPhysActors: cannot find script object in scene. hostID={1}", LogHeader, hostID); + } + + return ret; + } + + // Find the root and child PhysActors based on the linkNum. + // Return 'true' if both are found and returned. + private bool GetRootAndChildPhysActors(UUID hostID, int linkNum, out PhysicsActor rootPhysActor, out PhysicsActor childPhysActor) + { + bool ret = false; + rootPhysActor = null; + childPhysActor = null; + + SceneObjectGroup containingGroup; + SceneObjectPart rootPart; + + if (GetRootPhysActor(hostID, out containingGroup, out rootPart, out rootPhysActor)) + { + SceneObjectPart linkPart = containingGroup.GetLinkNumPart(linkNum); + if (linkPart != null) + { + childPhysActor = linkPart.PhysActor; + if (childPhysActor != null) + { + ret = true; + } + else + { + m_log.WarnFormat("{0} GetRootAndChildPhysActors: Link part has no physical actor. rootName={1}, hostID={2}, linknum={3}", + LogHeader, rootPart.Name, hostID, linkNum); + } + } + else + { + m_log.WarnFormat("{0} GetRootAndChildPhysActors: Could not find linknum part. rootName={1}, hostID={2}, linknum={3}", + LogHeader, rootPart.Name, hostID, linkNum); + } + } + else + { + m_log.WarnFormat("{0} GetRootAndChildPhysActors: Root part does not have a physics actor. rootName={1}, hostID={2}", + LogHeader, rootPart.Name, hostID); + } + + return ret; + } + + // Return an array of objects with the passed object as the first object of a new array + private object[] AddToBeginningOfArray(object firstOne, object secondOne, object[] prevArray) + { + object[] newArray = new object[2 + prevArray.Length]; + newArray[0] = firstOne; + newArray[1] = secondOne; + prevArray.CopyTo(newArray, 2); + return newArray; + } + + // Extension() returns an object. Convert that object into the integer error we expect to return. + private int MakeIntError(object extensionRet) + { + int ret = -1; + if (extensionRet != null) + { + try + { + ret = (int)extensionRet; + } + catch + { + ret = -1; + } + } + return ret; + } + } +} diff --git a/prebuild.xml b/prebuild.xml index d41c145fcf..0550211d3f 100644 --- a/prebuild.xml +++ b/prebuild.xml @@ -1856,7 +1856,6 @@ - From dac8edd5dddb5f3d2a2447fb479144429e32ea68 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Thu, 3 Sep 2015 15:59:06 -0700 Subject: [PATCH 12/32] Transformed the LLUDP ad-hoc plugin into a region module. It works. --- .../Region/Application/OpenSimBackground.cs | 2 +- OpenSim/Region/Application/OpenSimBase.cs | 147 ++++++++---------- .../RegionApplicationBase.cs | 5 +- .../Region/ClientStack/ClientStackManager.cs | 147 ------------------ .../ClientStack/IClientNetworkServer.cs | 59 ------- .../ClientStack/Linden/UDP/LLUDPServer.cs | 49 +++++- .../Linden/UDP/Properties/AssemblyInfo.cs | 3 + prebuild.xml | 43 +---- 8 files changed, 118 insertions(+), 337 deletions(-) rename OpenSim/Region/{ClientStack => Application}/RegionApplicationBase.cs (95%) delete mode 100644 OpenSim/Region/ClientStack/ClientStackManager.cs delete mode 100644 OpenSim/Region/ClientStack/IClientNetworkServer.cs diff --git a/OpenSim/Region/Application/OpenSimBackground.cs b/OpenSim/Region/Application/OpenSimBackground.cs index 008c6b07b5..15d9065af3 100644 --- a/OpenSim/Region/Application/OpenSimBackground.cs +++ b/OpenSim/Region/Application/OpenSimBackground.cs @@ -55,7 +55,7 @@ namespace OpenSim base.Startup(); m_log.InfoFormat("[OPENSIM MAIN]: Startup complete, serving {0} region{1}", - m_clientServers.Count.ToString(), m_clientServers.Count > 1 ? "s" : ""); + SceneManager.Scenes.Count, SceneManager.Scenes.Count > 1 ? "s" : ""); WorldHasComeToAnEnd.WaitOne(); WorldHasComeToAnEnd.Close(); diff --git a/OpenSim/Region/Application/OpenSimBase.cs b/OpenSim/Region/Application/OpenSimBase.cs index 980fa8508b..6e984d8f8e 100644 --- a/OpenSim/Region/Application/OpenSimBase.cs +++ b/OpenSim/Region/Application/OpenSimBase.cs @@ -41,7 +41,6 @@ using OpenSim.Framework.Console; using OpenSim.Framework.Servers; using OpenSim.Framework.Servers.HttpServer; using OpenSim.Framework.Monitoring; -using OpenSim.Region.ClientStack; using OpenSim.Region.CoreModules.ServiceConnectorsOut.UserAccounts; using OpenSim.Region.Framework; using OpenSim.Region.Framework.Interfaces; @@ -117,19 +116,12 @@ namespace OpenSim /// public OpenSimConfigSource ConfigSource { get; private set; } - public List ClientServers - { - get { return m_clientServers; } - } - protected EnvConfigSource m_EnvConfigSource = new EnvConfigSource(); public EnvConfigSource envConfigSource { get { return m_EnvConfigSource; } } - - protected List m_clientServers = new List(); public uint HttpServerPort { @@ -359,9 +351,9 @@ namespace OpenSim /// /// /// - public List CreateRegion(RegionInfo regionInfo, bool portadd_flag, out IScene scene) + public void CreateRegion(RegionInfo regionInfo, bool portadd_flag, out IScene scene) { - return CreateRegion(regionInfo, portadd_flag, false, out scene); + CreateRegion(regionInfo, portadd_flag, false, out scene); } /// @@ -369,9 +361,9 @@ namespace OpenSim /// /// /// - public List CreateRegion(RegionInfo regionInfo, out IScene scene) + public void CreateRegion(RegionInfo regionInfo, out IScene scene) { - return CreateRegion(regionInfo, false, true, out scene); + CreateRegion(regionInfo, false, true, out scene); } /// @@ -381,7 +373,7 @@ namespace OpenSim /// /// /// - public List CreateRegion(RegionInfo regionInfo, bool portadd_flag, bool do_post_init, out IScene mscene) + public void CreateRegion(RegionInfo regionInfo, bool portadd_flag, bool do_post_init, out IScene mscene) { int port = regionInfo.InternalEndPoint.Port; @@ -406,8 +398,7 @@ namespace OpenSim Util.XmlRpcCommand(proxyUrl, "AddPort", port, port + proxyOffset, regionInfo.ExternalHostName); } - List clientServers; - Scene scene = SetupScene(regionInfo, proxyOffset, Config, out clientServers); + Scene scene = SetupScene(regionInfo, proxyOffset, Config); m_log.Info("[MODULES]: Loading Region's modules (old style)"); @@ -455,20 +446,20 @@ namespace OpenSim SceneManager.Add(scene); - if (m_autoCreateClientStack) - { - foreach (IClientNetworkServer clientserver in clientServers) - { - m_clientServers.Add(clientserver); - clientserver.Start(); - } - } + //if (m_autoCreateClientStack) + //{ + // foreach (IClientNetworkServer clientserver in clientServers) + // { + // m_clientServers.Add(clientserver); + // clientserver.Start(); + // } + //} scene.EventManager.OnShutdown += delegate() { ShutdownRegion(scene); }; mscene = scene; - return clientServers; + //return clientServers; } /// @@ -602,7 +593,7 @@ namespace OpenSim scene.DeleteAllSceneObjects(); SceneManager.CloseScene(scene); - ShutdownClientServer(scene.RegionInfo); + //ShutdownClientServer(scene.RegionInfo); if (!cleanup) return; @@ -663,7 +654,7 @@ namespace OpenSim } SceneManager.CloseScene(scene); - ShutdownClientServer(scene.RegionInfo); + //ShutdownClientServer(scene.RegionInfo); } /// @@ -684,9 +675,9 @@ namespace OpenSim /// /// /// - protected Scene SetupScene(RegionInfo regionInfo, out List clientServer) + protected Scene SetupScene(RegionInfo regionInfo) { - return SetupScene(regionInfo, 0, null, out clientServer); + return SetupScene(regionInfo, 0, null); } /// @@ -697,51 +688,45 @@ namespace OpenSim /// /// /// - protected Scene SetupScene( - RegionInfo regionInfo, int proxyOffset, IConfigSource configSource, out List clientServer) + protected Scene SetupScene(RegionInfo regionInfo, int proxyOffset, IConfigSource configSource) { - List clientNetworkServers = null; + //List clientNetworkServers = null; AgentCircuitManager circuitManager = new AgentCircuitManager(); - IPAddress listenIP = regionInfo.InternalEndPoint.Address; - //if (!IPAddress.TryParse(regionInfo.InternalEndPoint, out listenIP)) - // listenIP = IPAddress.Parse("0.0.0.0"); + //IPAddress listenIP = regionInfo.InternalEndPoint.Address; + ////if (!IPAddress.TryParse(regionInfo.InternalEndPoint, out listenIP)) + //// listenIP = IPAddress.Parse("0.0.0.0"); - uint port = (uint) regionInfo.InternalEndPoint.Port; + //uint port = (uint) regionInfo.InternalEndPoint.Port; - if (m_autoCreateClientStack) - { - clientNetworkServers = m_clientStackManager.CreateServers( - listenIP, ref port, proxyOffset, regionInfo.m_allow_alternate_ports, configSource, - circuitManager); - } - else - { - clientServer = null; - } + //if (m_autoCreateClientStack) + //{ + // clientNetworkServers = m_clientStackManager.CreateServers( + // listenIP, ref port, proxyOffset, regionInfo.m_allow_alternate_ports, configSource, + // circuitManager); + //} + //else + //{ + // clientServer = null; + //} - regionInfo.InternalEndPoint.Port = (int) port; + //regionInfo.InternalEndPoint.Port = (int) port; Scene scene = CreateScene(regionInfo, m_simulationDataService, m_estateDataService, circuitManager); - if (m_autoCreateClientStack) - { - foreach (IClientNetworkServer clientnetserver in clientNetworkServers) - { - clientnetserver.AddScene(scene); - } - } - clientServer = clientNetworkServers; + //if (m_autoCreateClientStack) + //{ + // foreach (IClientNetworkServer clientnetserver in clientNetworkServers) + // { + // clientnetserver.AddScene(scene); + // } + //} + //clientServer = clientNetworkServers; scene.LoadWorldMap(); return scene; } - protected override ClientStackManager CreateClientStackManager() - { - return new ClientStackManager(m_configSettings.ClientstackDll); - } - protected override Scene CreateScene(RegionInfo regionInfo, ISimulationDataService simDataService, IEstateDataService estateDataService, AgentCircuitManager circuitManager) { @@ -751,29 +736,29 @@ namespace OpenSim Config, m_version); } - protected void ShutdownClientServer(RegionInfo whichRegion) - { - // Close and remove the clientserver for a region - bool foundClientServer = false; - int clientServerElement = 0; - Location location = new Location(whichRegion.RegionHandle); + //protected void ShutdownClientServer(RegionInfo whichRegion) + //{ + // // Close and remove the clientserver for a region + // bool foundClientServer = false; + // int clientServerElement = 0; + // Location location = new Location(whichRegion.RegionHandle); - for (int i = 0; i < m_clientServers.Count; i++) - { - if (m_clientServers[i].HandlesRegion(location)) - { - clientServerElement = i; - foundClientServer = true; - break; - } - } + // for (int i = 0; i < m_clientServers.Count; i++) + // { + // if (m_clientServers[i].HandlesRegion(location)) + // { + // clientServerElement = i; + // foundClientServer = true; + // break; + // } + // } - if (foundClientServer) - { - m_clientServers[clientServerElement].Stop(); - m_clientServers.RemoveAt(clientServerElement); - } - } + // if (foundClientServer) + // { + // m_clientServers[clientServerElement].Stop(); + // m_clientServers.RemoveAt(clientServerElement); + // } + //} protected virtual void HandleRestartRegion(RegionInfo whichRegion) { @@ -781,7 +766,7 @@ namespace OpenSim "[OPENSIM]: Got restart signal from SceneManager for region {0} ({1},{2})", whichRegion.RegionName, whichRegion.RegionLocX, whichRegion.RegionLocY); - ShutdownClientServer(whichRegion); + //ShutdownClientServer(whichRegion); IScene scene; CreateRegion(whichRegion, true, out scene); scene.Start(); diff --git a/OpenSim/Region/ClientStack/RegionApplicationBase.cs b/OpenSim/Region/Application/RegionApplicationBase.cs similarity index 95% rename from OpenSim/Region/ClientStack/RegionApplicationBase.cs rename to OpenSim/Region/Application/RegionApplicationBase.cs index 343780b56d..b58c99832a 100644 --- a/OpenSim/Region/ClientStack/RegionApplicationBase.cs +++ b/OpenSim/Region/Application/RegionApplicationBase.cs @@ -41,7 +41,7 @@ using OpenSim.Region.Framework.Scenes; using OpenSim.Region.PhysicsModules.SharedBase; using OpenSim.Services.Interfaces; -namespace OpenSim.Region.ClientStack +namespace OpenSim { public abstract class RegionApplicationBase : BaseOpenSimServer { @@ -53,7 +53,6 @@ namespace OpenSim.Region.ClientStack protected uint m_httpServerPort; protected ISimulationDataService m_simulationDataService; protected IEstateDataService m_estateDataService; - protected ClientStackManager m_clientStackManager; public SceneManager SceneManager { get; protected set; } public NetworkServersInfo NetServersInfo { get { return m_networkServersInfo; } } @@ -62,13 +61,11 @@ namespace OpenSim.Region.ClientStack protected abstract void Initialize(); - protected abstract ClientStackManager CreateClientStackManager(); protected abstract Scene CreateScene(RegionInfo regionInfo, ISimulationDataService simDataService, IEstateDataService estateDataService, AgentCircuitManager circuitManager); protected override void StartupSpecific() { SceneManager = SceneManager.Instance; - m_clientStackManager = CreateClientStackManager(); Initialize(); diff --git a/OpenSim/Region/ClientStack/ClientStackManager.cs b/OpenSim/Region/ClientStack/ClientStackManager.cs deleted file mode 100644 index 3ec968f706..0000000000 --- a/OpenSim/Region/ClientStack/ClientStackManager.cs +++ /dev/null @@ -1,147 +0,0 @@ -/* - * Copyright (c) Contributors, http://opensimulator.org/ - * See CONTRIBUTORS.TXT for a full list of copyright holders. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * * Neither the name of the OpenSimulator Project nor the - * names of its contributors may be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY - * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -using System; -using System.Collections.Generic; -using System.Net; -using System.Reflection; -using log4net; -using Nini.Config; -using OpenSim.Framework; - -namespace OpenSim.Region.ClientStack -{ - public class ClientStackManager - { - private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); - - private List plugin = new List(); - private List pluginAssembly = new List(); - - public ClientStackManager(string pDllName) - { - List clientstacks = new List(); - if (pDllName.Contains(",")) - { - clientstacks = new List(pDllName.Split(',')); - } - else - { - clientstacks.Add(pDllName); - } - foreach (string dllName in clientstacks) - { - m_log.Info("[CLIENTSTACK]: Attempting to load " + dllName); - - try - { - //plugin = null; - Assembly itemAssembly = Assembly.LoadFrom(dllName); - pluginAssembly.Add(itemAssembly); - - foreach (Type pluginType in itemAssembly.GetTypes()) - { - if (pluginType.IsPublic) - { - Type typeInterface = pluginType.GetInterface("IClientNetworkServer"); - - if (typeInterface != null) - { - m_log.Info("[CLIENTSTACK]: Added IClientNetworkServer Interface"); - plugin.Add(pluginType); - break; - } - } - } - } - catch (ReflectionTypeLoadException e) - { - foreach (Exception e2 in e.LoaderExceptions) - { - m_log.Error(e2.ToString()); - } - throw e; - } - } - } - - /// - /// Create a server that can set up sessions for virtual world client <-> server communications - /// - /// - /// - /// - /// - /// - /// - /// - public List CreateServers( - IPAddress _listenIP, ref uint port, int proxyPortOffset, bool allow_alternate_port, - AgentCircuitManager authenticateClass) - { - return CreateServers( - _listenIP, ref port, proxyPortOffset, allow_alternate_port, null, authenticateClass); - } - - /// - /// Create a server that can set up sessions for virtual world client <-> server communications - /// - /// - /// - /// - /// - /// - /// Can be null, in which case default values are used - /// - /// - /// - /// - public List CreateServers( - IPAddress _listenIP, ref uint port, int proxyPortOffset, bool allow_alternate_port, IConfigSource configSource, - AgentCircuitManager authenticateClass) - { - List servers = new List(); - if (plugin != null) - { - for (int i = 0; i < plugin.Count; i++) - { - IClientNetworkServer server = - (IClientNetworkServer) Activator.CreateInstance(pluginAssembly[i].GetType(plugin[i].ToString())); - - server.Initialise( - _listenIP, ref port, proxyPortOffset, allow_alternate_port, - configSource, authenticateClass); - servers.Add(server); - } - return servers; - } - - m_log.Error("[CLIENTSTACK]: Couldn't initialize a new server"); - return null; - } - } -} diff --git a/OpenSim/Region/ClientStack/IClientNetworkServer.cs b/OpenSim/Region/ClientStack/IClientNetworkServer.cs deleted file mode 100644 index bb7e6d0e6f..0000000000 --- a/OpenSim/Region/ClientStack/IClientNetworkServer.cs +++ /dev/null @@ -1,59 +0,0 @@ -/* - * Copyright (c) Contributors, http://opensimulator.org/ - * See CONTRIBUTORS.TXT for a full list of copyright holders. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * * Neither the name of the OpenSimulator Project nor the - * names of its contributors may be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY - * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -using System.Net; -using System.Net.Sockets; -using Nini.Config; -using OpenSim.Framework; - -namespace OpenSim.Region.ClientStack -{ - public interface IClientNetworkServer - { - void Initialise( - IPAddress _listenIP, ref uint port, int proxyPortOffsetParm, bool allow_alternate_port, IConfigSource configSource, - AgentCircuitManager authenticateClass); - - bool HandlesRegion(Location x); - - /// - /// Add the given scene to be handled by this IClientNetworkServer. - /// - /// - void AddScene(IScene scene); - - /// - /// Start sending and receiving data. - /// - void Start(); - - /// - /// Stop sending and receiving data. - /// - void Stop(); - } -} diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs index 76be91a40b..45287148cd 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs @@ -40,8 +40,9 @@ using OpenSim.Framework; using OpenSim.Framework.Console; using OpenSim.Framework.Monitoring; using OpenSim.Region.Framework.Scenes; +using OpenSim.Region.Framework.Interfaces; using OpenMetaverse; - +using Mono.Addins; using TokenBucket = OpenSim.Region.ClientStack.LindenUDP.TokenBucket; namespace OpenSim.Region.ClientStack.LindenUDP @@ -49,14 +50,55 @@ namespace OpenSim.Region.ClientStack.LindenUDP /// /// A shim around LLUDPServer that implements the IClientNetworkServer interface /// - public sealed class LLUDPServerShim : IClientNetworkServer + [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "LLUDPServerShim")] + public sealed class LLUDPServerShim : INonSharedRegionModule { + private bool m_Enabled = true; + private IConfigSource m_Config; LLUDPServer m_udpServer; - public LLUDPServerShim() + #region INonSharedRegionModule + public string Name + { + get { return "LLUDPServerShim"; } + } + + public Type ReplaceableInterface + { + get { return null; } + } + + public void Initialise(IConfigSource source) + { + m_Config = source; + } + + public void Close() { } + public void AddRegion(Scene scene) + { + uint port = (uint)scene.RegionInfo.InternalEndPoint.Port; + + IPAddress listenIP = scene.RegionInfo.InternalEndPoint.Address; + Initialise(listenIP, ref port, scene.RegionInfo.ProxyOffset, scene.RegionInfo.m_allow_alternate_ports, m_Config, scene.AuthenticateHandler); + scene.RegionInfo.InternalEndPoint.Port = (int)port; + + AddScene(scene); + } + + public void RemoveRegion(Scene scene) + { + Stop(); + } + + public void RegionLoaded(Scene scene) + { + Start(); + } + #endregion + public void Initialise(IPAddress listenIP, ref uint port, int proxyPortOffsetParm, bool allow_alternate_port, IConfigSource configSource, AgentCircuitManager circuitManager) { m_udpServer = new LLUDPServer(listenIP, ref port, proxyPortOffsetParm, allow_alternate_port, configSource, circuitManager); @@ -200,6 +242,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP { m_udpServer.Stop(); } + } /// diff --git a/OpenSim/Region/ClientStack/Linden/UDP/Properties/AssemblyInfo.cs b/OpenSim/Region/ClientStack/Linden/UDP/Properties/AssemblyInfo.cs index 8795c0c07a..a1ff69e115 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/Properties/AssemblyInfo.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/Properties/AssemblyInfo.cs @@ -1,6 +1,7 @@ using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; +using Mono.Addins; // General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information @@ -31,3 +32,5 @@ using System.Runtime.InteropServices; // [assembly: AssemblyVersion("0.8.2.*")] +[assembly: Addin("LindenUDP", OpenSim.VersionInfo.VersionNumber)] +[assembly: AddinDependency("OpenSim.Region.Framework", OpenSim.VersionInfo.VersionNumber)] diff --git a/prebuild.xml b/prebuild.xml index 0550211d3f..06310f9c55 100644 --- a/prebuild.xml +++ b/prebuild.xml @@ -1375,41 +1375,6 @@ - - - - ../../../bin/ - - - - - ../../../bin/ - - - - ../../../bin/ - - - - - - - - - - - - - - - - - - - - - - @@ -1440,13 +1405,13 @@ - + @@ -1902,7 +1867,6 @@ - @@ -1936,7 +1900,6 @@ - @@ -1972,7 +1935,6 @@ - @@ -2006,7 +1968,6 @@ - @@ -3206,7 +3167,6 @@ - @@ -3304,7 +3264,6 @@ - From 9d7e310e21b6405f1ecde074e9b7d4ea29c76ad7 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Fri, 4 Sep 2015 09:40:21 -0700 Subject: [PATCH 13/32] Deleted commented code --- OpenSim/Region/Application/OpenSimBase.cs | 51 ----------------------- 1 file changed, 51 deletions(-) diff --git a/OpenSim/Region/Application/OpenSimBase.cs b/OpenSim/Region/Application/OpenSimBase.cs index 6e984d8f8e..83c07f163b 100644 --- a/OpenSim/Region/Application/OpenSimBase.cs +++ b/OpenSim/Region/Application/OpenSimBase.cs @@ -693,35 +693,8 @@ namespace OpenSim //List clientNetworkServers = null; AgentCircuitManager circuitManager = new AgentCircuitManager(); - //IPAddress listenIP = regionInfo.InternalEndPoint.Address; - ////if (!IPAddress.TryParse(regionInfo.InternalEndPoint, out listenIP)) - //// listenIP = IPAddress.Parse("0.0.0.0"); - - //uint port = (uint) regionInfo.InternalEndPoint.Port; - - //if (m_autoCreateClientStack) - //{ - // clientNetworkServers = m_clientStackManager.CreateServers( - // listenIP, ref port, proxyOffset, regionInfo.m_allow_alternate_ports, configSource, - // circuitManager); - //} - //else - //{ - // clientServer = null; - //} - - //regionInfo.InternalEndPoint.Port = (int) port; - Scene scene = CreateScene(regionInfo, m_simulationDataService, m_estateDataService, circuitManager); - //if (m_autoCreateClientStack) - //{ - // foreach (IClientNetworkServer clientnetserver in clientNetworkServers) - // { - // clientnetserver.AddScene(scene); - // } - //} - //clientServer = clientNetworkServers; scene.LoadWorldMap(); return scene; @@ -736,30 +709,6 @@ namespace OpenSim Config, m_version); } - //protected void ShutdownClientServer(RegionInfo whichRegion) - //{ - // // Close and remove the clientserver for a region - // bool foundClientServer = false; - // int clientServerElement = 0; - // Location location = new Location(whichRegion.RegionHandle); - - // for (int i = 0; i < m_clientServers.Count; i++) - // { - // if (m_clientServers[i].HandlesRegion(location)) - // { - // clientServerElement = i; - // foundClientServer = true; - // break; - // } - // } - - // if (foundClientServer) - // { - // m_clientServers[clientServerElement].Stop(); - // m_clientServers.RemoveAt(clientServerElement); - // } - //} - protected virtual void HandleRestartRegion(RegionInfo whichRegion) { m_log.InfoFormat( From 218eb908be33c1f9694562998e2d4d0b991f58f9 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Fri, 4 Sep 2015 10:54:04 -0700 Subject: [PATCH 14/32] In SceneGraph, use the property PhysicsScene instead of the variable _PhysScene, so that it gets properly initialized before being dereferenced. --- OpenSim/Region/Framework/Scenes/SceneGraph.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/OpenSim/Region/Framework/Scenes/SceneGraph.cs b/OpenSim/Region/Framework/Scenes/SceneGraph.cs index d77e3242d9..e0080f2049 100755 --- a/OpenSim/Region/Framework/Scenes/SceneGraph.cs +++ b/OpenSim/Region/Framework/Scenes/SceneGraph.cs @@ -162,9 +162,9 @@ namespace OpenSim.Region.Framework.Scenes // PhysX does this (runs in the background). - if (_PhyScene.IsThreaded) + if (PhysicsScene.IsThreaded) { - _PhyScene.GetResults(); + PhysicsScene.GetResults(); } } @@ -204,7 +204,7 @@ namespace OpenSim.Region.Framework.Scenes // position). // // Therefore, JointMoved and JointDeactivated events will be fired as a result of the following Simulate(). - return _PhyScene.Simulate((float)elapsed); + return PhysicsScene.Simulate((float)elapsed); } protected internal void UpdateScenePresenceMovement() From cb79e580dca781da9293cbc7a55c8ecafdf7830b Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Fri, 4 Sep 2015 11:27:39 -0700 Subject: [PATCH 15/32] Fixed wrong path to Meshing dll --- prebuild.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/prebuild.xml b/prebuild.xml index 06310f9c55..00fc0c7066 100644 --- a/prebuild.xml +++ b/prebuild.xml @@ -1823,7 +1823,7 @@ - + From 1559fc42b6b4a7510e654773b3d22100ab539de1 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Fri, 4 Sep 2015 13:45:52 -0700 Subject: [PATCH 16/32] Deleted unused interface --- .../Framework/Communications/IUserService.cs | 157 ------------------ 1 file changed, 157 deletions(-) delete mode 100644 OpenSim/Framework/Communications/IUserService.cs diff --git a/OpenSim/Framework/Communications/IUserService.cs b/OpenSim/Framework/Communications/IUserService.cs deleted file mode 100644 index dfa059d929..0000000000 --- a/OpenSim/Framework/Communications/IUserService.cs +++ /dev/null @@ -1,157 +0,0 @@ -/* - * Copyright (c) Contributors, http://opensimulator.org/ - * See CONTRIBUTORS.TXT for a full list of copyright holders. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * * Neither the name of the OpenSimulator Project nor the - * names of its contributors may be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY - * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -using System; -using System.Collections.Generic; -using OpenMetaverse; -using OpenSim.Services.Interfaces; - -namespace OpenSim.Framework.Communications -{ - public interface IUserService - { - /// - /// Add a temporary user profile. - /// - /// A temporary user profile is one that should exist only for the lifetime of the process. - /// - void AddTemporaryUserProfile(UserProfileData userProfile); - - /// - /// Loads a user profile by name - /// - /// First name - /// Last name - /// A user profile. Returns null if no profile is found - UserProfileData GetUserProfile(string firstName, string lastName); - - /// - /// Loads a user profile from a database by UUID - /// - /// The target UUID - /// A user profile. Returns null if no user profile is found. - UserProfileData GetUserProfile(UUID userId); - - UserProfileData GetUserProfile(Uri uri); - - Uri GetUserUri(UserProfileData userProfile); - - UserAgentData GetAgentByUUID(UUID userId); - - void ClearUserAgent(UUID avatarID); - List GenerateAgentPickerRequestResponse(UUID QueryID, string Query); - - UserProfileData SetupMasterUser(string firstName, string lastName); - UserProfileData SetupMasterUser(string firstName, string lastName, string password); - UserProfileData SetupMasterUser(UUID userId); - - /// - /// Update the user's profile. - /// - /// UserProfileData object with updated data. Should be obtained - /// via a call to GetUserProfile(). - /// true if the update could be applied, false if it could not be applied. - bool UpdateUserProfile(UserProfileData data); - - /// - /// Adds a new friend to the database for XUser - /// - /// The agent that who's friends list is being added to - /// The agent that being added to the friends list of the friends list owner - /// A uint bit vector for set perms that the friend being added has; 0 = none, 1=This friend can see when they sign on, 2 = map, 4 edit objects - void AddNewUserFriend(UUID friendlistowner, UUID friend, uint perms); - - /// - /// Delete friend on friendlistowner's friendlist. - /// - /// The agent that who's friends list is being updated - /// The Ex-friend agent - void RemoveUserFriend(UUID friendlistowner, UUID friend); - - /// - /// Update permissions for friend on friendlistowner's friendlist. - /// - /// The agent that who's friends list is being updated - /// The agent that is getting or loosing permissions - /// A uint bit vector for set perms that the friend being added has; 0 = none, 1=This friend can see when they sign on, 2 = map, 4 edit objects - void UpdateUserFriendPerms(UUID friendlistowner, UUID friend, uint perms); - - /// - /// Logs off a user on the user server - /// - /// UUID of the user - /// UUID of the Region - /// regionhandle - /// final position - /// final lookat - void LogOffUser(UUID userid, UUID regionid, ulong regionhandle, Vector3 position, Vector3 lookat); - - /// - /// Logs off a user on the user server (deprecated as of 2008-08-27) - /// - /// UUID of the user - /// UUID of the Region - /// regionhandle - /// final position x - /// final position y - /// final position z - void LogOffUser(UUID userid, UUID regionid, ulong regionhandle, float posx, float posy, float posz); - - /// - /// Returns a list of FriendsListItems that describe the friends and permissions in the friend relationship - /// for UUID friendslistowner - /// - /// - /// The agent for whom we're retreiving the friends Data. - /// - /// A List of FriendListItems that contains info about the user's friends. - /// Always returns a list even if the user has no friends - /// - List GetUserFriendList(UUID friendlistowner); - - // This probably shouldn't be here, it belongs to IAuthentication - // But since Scenes only have IUserService references, I'm placing it here for now. - bool VerifySession(UUID userID, UUID sessionID); - - /// - /// Authenticate a user by their password. - /// - /// - /// This is used by callers outside the login process that want to - /// verify a user who has given their password. - /// - /// This should probably also be in IAuthentication but is here for the same reasons as VerifySession() is - /// - /// - /// - /// - bool AuthenticateUserByPassword(UUID userID, string password); - - // Temporary Hack until we move everything to the new service model - void SetInventoryService(IInventoryService invService); - } -} From 9005365115a0c56c4d4827bff67bf8e5e317e5d6 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Fri, 4 Sep 2015 14:14:53 -0700 Subject: [PATCH 17/32] Deleted old unfinished code under Framework.Communications that wasn't being used anywhere. Also folded GenericAsyncResult into RestClient, since it is used only there. This is preparation to remove Framework.Communications entirely. --- .../Communications/GenericAsyncResult.cs | 185 ------------------ .../Limit/IRequestLimitStrategy.cs | 66 ------- .../Communications/Limit/NullLimitStrategy.cs | 40 ---- .../Limit/RepeatLimitStrategy.cs | 109 ----------- .../Communications/Limit/TimeLimitStrategy.cs | 140 ------------- .../Framework/Communications/RestClient.cs | 154 +++++++++++++++ .../Communications/XMPP/XmppError.cs | 39 ---- .../Communications/XMPP/XmppIqStanza.cs | 60 ------ .../Communications/XMPP/XmppMessageStanza.cs | 93 --------- .../Communications/XMPP/XmppPresenceStanza.cs | 69 ------- .../Communications/XMPP/XmppSerializer.cs | 79 -------- .../Communications/XMPP/XmppStanza.cs | 70 ------- .../Communications/XMPP/XmppWriter.cs | 57 ------ 13 files changed, 154 insertions(+), 1007 deletions(-) delete mode 100644 OpenSim/Framework/Communications/GenericAsyncResult.cs delete mode 100644 OpenSim/Framework/Communications/Limit/IRequestLimitStrategy.cs delete mode 100644 OpenSim/Framework/Communications/Limit/NullLimitStrategy.cs delete mode 100644 OpenSim/Framework/Communications/Limit/RepeatLimitStrategy.cs delete mode 100644 OpenSim/Framework/Communications/Limit/TimeLimitStrategy.cs delete mode 100644 OpenSim/Framework/Communications/XMPP/XmppError.cs delete mode 100644 OpenSim/Framework/Communications/XMPP/XmppIqStanza.cs delete mode 100644 OpenSim/Framework/Communications/XMPP/XmppMessageStanza.cs delete mode 100644 OpenSim/Framework/Communications/XMPP/XmppPresenceStanza.cs delete mode 100644 OpenSim/Framework/Communications/XMPP/XmppSerializer.cs delete mode 100644 OpenSim/Framework/Communications/XMPP/XmppStanza.cs delete mode 100644 OpenSim/Framework/Communications/XMPP/XmppWriter.cs diff --git a/OpenSim/Framework/Communications/GenericAsyncResult.cs b/OpenSim/Framework/Communications/GenericAsyncResult.cs deleted file mode 100644 index 8e3f62b40e..0000000000 --- a/OpenSim/Framework/Communications/GenericAsyncResult.cs +++ /dev/null @@ -1,185 +0,0 @@ -/* - * Copyright (c) Contributors, http://opensimulator.org/ - * See CONTRIBUTORS.TXT for a full list of copyright holders. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * * Neither the name of the OpenSimulator Project nor the - * names of its contributors may be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY - * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -using System; -using System.Threading; - -namespace OpenSim.Framework.Communications -{ - internal class SimpleAsyncResult : IAsyncResult - { - private readonly AsyncCallback m_callback; - - /// - /// Is process completed? - /// - /// Should really be boolean, but VolatileRead has no boolean method - private byte m_completed; - - /// - /// Did process complete synchronously? - /// - /// I have a hard time imagining a scenario where this is the case, again, same issue about - /// booleans and VolatileRead as m_completed - /// - private byte m_completedSynchronously; - - private readonly object m_asyncState; - private ManualResetEvent m_waitHandle; - private Exception m_exception; - - internal SimpleAsyncResult(AsyncCallback cb, object state) - { - m_callback = cb; - m_asyncState = state; - m_completed = 0; - m_completedSynchronously = 1; - } - - #region IAsyncResult Members - - public object AsyncState - { - get { return m_asyncState; } - } - - public WaitHandle AsyncWaitHandle - { - get - { - if (m_waitHandle == null) - { - bool done = IsCompleted; - ManualResetEvent mre = new ManualResetEvent(done); - if (Interlocked.CompareExchange(ref m_waitHandle, mre, null) != null) - { - mre.Close(); - } - else - { - if (!done && IsCompleted) - { - m_waitHandle.Set(); - } - } - } - - return m_waitHandle; - } - } - - - public bool CompletedSynchronously - { - get { return Thread.VolatileRead(ref m_completedSynchronously) == 1; } - } - - - public bool IsCompleted - { - get { return Thread.VolatileRead(ref m_completed) == 1; } - } - - #endregion - - #region class Methods - - internal void SetAsCompleted(bool completedSynchronously) - { - m_completed = 1; - if (completedSynchronously) - m_completedSynchronously = 1; - else - m_completedSynchronously = 0; - - SignalCompletion(); - } - - internal void HandleException(Exception e, bool completedSynchronously) - { - m_completed = 1; - if (completedSynchronously) - m_completedSynchronously = 1; - else - m_completedSynchronously = 0; - m_exception = e; - - SignalCompletion(); - } - - private void SignalCompletion() - { - if (m_waitHandle != null) m_waitHandle.Set(); - - if (m_callback != null) m_callback(this); - } - - public void EndInvoke() - { - // This method assumes that only 1 thread calls EndInvoke - if (!IsCompleted) - { - // If the operation isn't done, wait for it - AsyncWaitHandle.WaitOne(); - AsyncWaitHandle.Close(); - m_waitHandle.Close(); - m_waitHandle = null; // Allow early GC - } - - // Operation is done: if an exception occured, throw it - if (m_exception != null) throw m_exception; - } - - #endregion - } - - internal class AsyncResult : SimpleAsyncResult - { - private T m_result = default(T); - - public AsyncResult(AsyncCallback asyncCallback, Object state) : - base(asyncCallback, state) - { - } - - public void SetAsCompleted(T result, bool completedSynchronously) - { - // Save the asynchronous operation's result - m_result = result; - - // Tell the base class that the operation completed - // sucessfully (no exception) - base.SetAsCompleted(completedSynchronously); - } - - public new T EndInvoke() - { - base.EndInvoke(); - return m_result; - } - } -} \ No newline at end of file diff --git a/OpenSim/Framework/Communications/Limit/IRequestLimitStrategy.cs b/OpenSim/Framework/Communications/Limit/IRequestLimitStrategy.cs deleted file mode 100644 index 070d106252..0000000000 --- a/OpenSim/Framework/Communications/Limit/IRequestLimitStrategy.cs +++ /dev/null @@ -1,66 +0,0 @@ -/* - * Copyright (c) Contributors, http://opensimulator.org/ - * See CONTRIBUTORS.TXT for a full list of copyright holders. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * * Neither the name of the OpenSimulator Project nor the - * names of its contributors may be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY - * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -namespace OpenSim.Framework.Communications.Limit -{ - /// - /// Interface for strategies that can limit requests from the client. Currently only used in the - /// texture modules to deal with repeated requests for certain textures. However, limiting strategies - /// could be used with other requests. - /// - public interface IRequestLimitStrategy - { - /// - /// Should the request be allowed? If the id is not monitored, then the request is always allowed. - /// Otherwise, the strategy criteria will be applied. - /// - /// - /// - bool AllowRequest(TId id); - - /// - /// Has the request been refused just once? - /// - /// False if the request has not yet been refused, or if the request has been refused more - /// than once. - bool IsFirstRefusal(TId id); - - /// - /// Start monitoring for future AllowRequest calls. If the id is already monitored, then monitoring - /// continues. - /// - /// - void MonitorRequests(TId id); - - /// - /// Is the id being monitored? - /// - /// - /// - bool IsMonitoringRequests(TId id); - } -} diff --git a/OpenSim/Framework/Communications/Limit/NullLimitStrategy.cs b/OpenSim/Framework/Communications/Limit/NullLimitStrategy.cs deleted file mode 100644 index 76726531a8..0000000000 --- a/OpenSim/Framework/Communications/Limit/NullLimitStrategy.cs +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright (c) Contributors, http://opensimulator.org/ - * See CONTRIBUTORS.TXT for a full list of copyright holders. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * * Neither the name of the OpenSimulator Project nor the - * names of its contributors may be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY - * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -namespace OpenSim.Framework.Communications.Limit -{ - /// - /// Strategy which polices no limits - /// - public class NullLimitStrategy : IRequestLimitStrategy - { - public bool AllowRequest(TId id) { return true; } - public bool IsFirstRefusal(TId id) { return false; } - public void MonitorRequests(TId id) { /* intentionally blank */ } - public bool IsMonitoringRequests(TId id) { return false; } - } -} diff --git a/OpenSim/Framework/Communications/Limit/RepeatLimitStrategy.cs b/OpenSim/Framework/Communications/Limit/RepeatLimitStrategy.cs deleted file mode 100644 index 44dd5927a3..0000000000 --- a/OpenSim/Framework/Communications/Limit/RepeatLimitStrategy.cs +++ /dev/null @@ -1,109 +0,0 @@ -/* - * Copyright (c) Contributors, http://opensimulator.org/ - * See CONTRIBUTORS.TXT for a full list of copyright holders. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * * Neither the name of the OpenSimulator Project nor the - * names of its contributors may be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY - * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -using System.Collections.Generic; - -namespace OpenSim.Framework.Communications.Limit -{ - /// - /// Limit requests by discarding them after they've been repeated a certain number of times. - /// - public class RepeatLimitStrategy : IRequestLimitStrategy - { - /// - /// Record each asset request that we're notified about. - /// - private readonly Dictionary requestCounts = new Dictionary(); - - /// - /// The maximum number of requests that can be made before we drop subsequent requests. - /// - private readonly int m_maxRequests; - public int MaxRequests - { - get { return m_maxRequests; } - } - - /// - /// The maximum number of requests that may be served before all further - /// requests are dropped. - public RepeatLimitStrategy(int maxRequests) - { - m_maxRequests = maxRequests; - } - - /// - /// - /// - public bool AllowRequest(TId id) - { - if (requestCounts.ContainsKey(id)) - { - requestCounts[id] += 1; - - if (requestCounts[id] > m_maxRequests) - { - return false; - } - } - - return true; - } - - /// - /// - /// - public bool IsFirstRefusal(TId id) - { - if (requestCounts.ContainsKey(id) && m_maxRequests + 1 == requestCounts[id]) - { - return true; - } - - return false; - } - - /// - /// - /// - public void MonitorRequests(TId id) - { - if (!IsMonitoringRequests(id)) - { - requestCounts.Add(id, 1); - } - } - - /// - /// - /// - public bool IsMonitoringRequests(TId id) - { - return requestCounts.ContainsKey(id); - } - } -} diff --git a/OpenSim/Framework/Communications/Limit/TimeLimitStrategy.cs b/OpenSim/Framework/Communications/Limit/TimeLimitStrategy.cs deleted file mode 100644 index 7ac8293b77..0000000000 --- a/OpenSim/Framework/Communications/Limit/TimeLimitStrategy.cs +++ /dev/null @@ -1,140 +0,0 @@ -/* - * Copyright (c) Contributors, http://opensimulator.org/ - * See CONTRIBUTORS.TXT for a full list of copyright holders. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * * Neither the name of the OpenSimulator Project nor the - * names of its contributors may be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY - * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -using System; -using System.Collections.Generic; - -namespace OpenSim.Framework.Communications.Limit -{ - /// - /// Limit requests by discarding repeat attempts that occur within a given time period - /// - /// XXX Don't use this for limiting texture downloading, at least not until we better handle multiple requests - /// for the same texture at different resolutions. - /// - public class TimeLimitStrategy : IRequestLimitStrategy - { - /// - /// Record the time at which an asset request occurs. - /// - private readonly Dictionary requests = new Dictionary(); - - /// - /// The minimum time period between which requests for the same data will be serviced. - /// - private readonly TimeSpan m_repeatPeriod; - public TimeSpan RepeatPeriod - { - get { return m_repeatPeriod; } - } - - /// - /// - public TimeLimitStrategy(TimeSpan repeatPeriod) - { - m_repeatPeriod = repeatPeriod; - } - - /// - /// - /// - public bool AllowRequest(TId id) - { - if (IsMonitoringRequests(id)) - { - DateTime now = DateTime.Now; - TimeSpan elapsed = now - requests[id].Time; - - if (elapsed < RepeatPeriod) - { - requests[id].Refusals += 1; - return false; - } - - requests[id].Time = now; - } - - return true; - } - - /// - /// - /// - public bool IsFirstRefusal(TId id) - { - if (IsMonitoringRequests(id)) - { - if (1 == requests[id].Refusals) - { - return true; - } - } - - return false; - } - - /// - /// - /// - public void MonitorRequests(TId id) - { - if (!IsMonitoringRequests(id)) - { - requests.Add(id, new Request(DateTime.Now)); - } - } - - /// - /// - /// - public bool IsMonitoringRequests(TId id) - { - return requests.ContainsKey(id); - } - } - - /// - /// Private request details. - /// - class Request - { - /// - /// Time of last request - /// - public DateTime Time; - - /// - /// Number of refusals associated with this request - /// - public int Refusals; - - public Request(DateTime time) - { - Time = time; - } - } -} diff --git a/OpenSim/Framework/Communications/RestClient.cs b/OpenSim/Framework/Communications/RestClient.cs index 6f517b6f87..ff7cb4d8fb 100644 --- a/OpenSim/Framework/Communications/RestClient.cs +++ b/OpenSim/Framework/Communications/RestClient.cs @@ -519,4 +519,158 @@ namespace OpenSim.Framework.Communications #endregion Async Invocation } + + internal class SimpleAsyncResult : IAsyncResult + { + private readonly AsyncCallback m_callback; + + /// + /// Is process completed? + /// + /// Should really be boolean, but VolatileRead has no boolean method + private byte m_completed; + + /// + /// Did process complete synchronously? + /// + /// I have a hard time imagining a scenario where this is the case, again, same issue about + /// booleans and VolatileRead as m_completed + /// + private byte m_completedSynchronously; + + private readonly object m_asyncState; + private ManualResetEvent m_waitHandle; + private Exception m_exception; + + internal SimpleAsyncResult(AsyncCallback cb, object state) + { + m_callback = cb; + m_asyncState = state; + m_completed = 0; + m_completedSynchronously = 1; + } + + #region IAsyncResult Members + + public object AsyncState + { + get { return m_asyncState; } + } + + public WaitHandle AsyncWaitHandle + { + get + { + if (m_waitHandle == null) + { + bool done = IsCompleted; + ManualResetEvent mre = new ManualResetEvent(done); + if (Interlocked.CompareExchange(ref m_waitHandle, mre, null) != null) + { + mre.Close(); + } + else + { + if (!done && IsCompleted) + { + m_waitHandle.Set(); + } + } + } + + return m_waitHandle; + } + } + + + public bool CompletedSynchronously + { + get { return Thread.VolatileRead(ref m_completedSynchronously) == 1; } + } + + + public bool IsCompleted + { + get { return Thread.VolatileRead(ref m_completed) == 1; } + } + + #endregion + + #region class Methods + + internal void SetAsCompleted(bool completedSynchronously) + { + m_completed = 1; + if (completedSynchronously) + m_completedSynchronously = 1; + else + m_completedSynchronously = 0; + + SignalCompletion(); + } + + internal void HandleException(Exception e, bool completedSynchronously) + { + m_completed = 1; + if (completedSynchronously) + m_completedSynchronously = 1; + else + m_completedSynchronously = 0; + m_exception = e; + + SignalCompletion(); + } + + private void SignalCompletion() + { + if (m_waitHandle != null) m_waitHandle.Set(); + + if (m_callback != null) m_callback(this); + } + + public void EndInvoke() + { + // This method assumes that only 1 thread calls EndInvoke + if (!IsCompleted) + { + // If the operation isn't done, wait for it + AsyncWaitHandle.WaitOne(); + AsyncWaitHandle.Close(); + m_waitHandle.Close(); + m_waitHandle = null; // Allow early GC + } + + // Operation is done: if an exception occured, throw it + if (m_exception != null) throw m_exception; + } + + #endregion + } + + internal class AsyncResult : SimpleAsyncResult + { + private T m_result = default(T); + + public AsyncResult(AsyncCallback asyncCallback, Object state) : + base(asyncCallback, state) + { + } + + public void SetAsCompleted(T result, bool completedSynchronously) + { + // Save the asynchronous operation's result + m_result = result; + + // Tell the base class that the operation completed + // sucessfully (no exception) + base.SetAsCompleted(completedSynchronously); + } + + public new T EndInvoke() + { + base.EndInvoke(); + return m_result; + } + } + } \ No newline at end of file diff --git a/OpenSim/Framework/Communications/XMPP/XmppError.cs b/OpenSim/Framework/Communications/XMPP/XmppError.cs deleted file mode 100644 index 3d36e9c8cf..0000000000 --- a/OpenSim/Framework/Communications/XMPP/XmppError.cs +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright (c) Contributors, http://opensimulator.org/ - * See CONTRIBUTORS.TXT for a full list of copyright holders. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * * Neither the name of the OpenSimulator Project nor the - * names of its contributors may be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY - * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -using System.Xml.Serialization; - -namespace OpenSim.Framework.Communications.XMPP -{ - [XmlRoot("error")] - public class XmppErrorStanza - { - public XmppErrorStanza() - { - } - } -} diff --git a/OpenSim/Framework/Communications/XMPP/XmppIqStanza.cs b/OpenSim/Framework/Communications/XMPP/XmppIqStanza.cs deleted file mode 100644 index 12263f4e89..0000000000 --- a/OpenSim/Framework/Communications/XMPP/XmppIqStanza.cs +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Copyright (c) Contributors, http://opensimulator.org/ - * See CONTRIBUTORS.TXT for a full list of copyright holders. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * * Neither the name of the OpenSimulator Project nor the - * names of its contributors may be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY - * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -using System.Xml.Serialization; - -namespace OpenSim.Framework.Communications.XMPP -{ - /// - /// An IQ needs to have one of the follow types set. - /// - public enum XmppIqType - { - [XmlEnum("set")] set, - [XmlEnum("get")] get, - [XmlEnum("result")] result, - [XmlEnum("error")] error, - } - - /// - /// XmppIqStanza needs to be subclassed as the query content is - /// specific to the query type. - /// - [XmlRoot("iq")] - public abstract class XmppIqStanza: XmppStanza - { - /// - /// IQ type: one of set, get, result, error - /// - [XmlAttribute("type")] - public XmppIqType Type; - - public XmppIqStanza(): base() - { - } - } -} diff --git a/OpenSim/Framework/Communications/XMPP/XmppMessageStanza.cs b/OpenSim/Framework/Communications/XMPP/XmppMessageStanza.cs deleted file mode 100644 index 1e8c33e52d..0000000000 --- a/OpenSim/Framework/Communications/XMPP/XmppMessageStanza.cs +++ /dev/null @@ -1,93 +0,0 @@ -/* - * Copyright (c) Contributors, http://opensimulator.org/ - * See CONTRIBUTORS.TXT for a full list of copyright holders. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * * Neither the name of the OpenSimulator Project nor the - * names of its contributors may be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY - * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -using System.Xml.Serialization; - -namespace OpenSim.Framework.Communications.XMPP -{ - /// - /// Message types. - /// - public enum XmppMessageType - { - [XmlEnum("chat")] chat, - [XmlEnum("error")] error, - [XmlEnum("groupchat")] groupchat, - [XmlEnum("headline")] headline, - [XmlEnum("normal")] normal, - } - - /// - /// Message body. - /// - public class XmppMessageBody - { - [XmlText] - public string Text; - - public XmppMessageBody() - { - } - - public XmppMessageBody(string message) - { - Text = message; - } - - new public string ToString() - { - return Text; - } - } - - [XmlRoot("message")] - public class XmppMessageStanza: XmppStanza - { - /// - /// IQ type: one of set, get, result, error - /// - [XmlAttribute("type")] - public XmppMessageType MessageType; - - // [XmlAttribute("error")] - // public XmppError Error; - - [XmlElement("body")] - public XmppMessageBody Body; - - public XmppMessageStanza() : base() - { - } - - public XmppMessageStanza(string fromJid, string toJid, XmppMessageType mType, string message) : - base(fromJid, toJid) - { - MessageType = mType; - Body = new XmppMessageBody(message); - } - } -} diff --git a/OpenSim/Framework/Communications/XMPP/XmppPresenceStanza.cs b/OpenSim/Framework/Communications/XMPP/XmppPresenceStanza.cs deleted file mode 100644 index 4d45ac0663..0000000000 --- a/OpenSim/Framework/Communications/XMPP/XmppPresenceStanza.cs +++ /dev/null @@ -1,69 +0,0 @@ -/* - * Copyright (c) Contributors, http://opensimulator.org/ - * See CONTRIBUTORS.TXT for a full list of copyright holders. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * * Neither the name of the OpenSimulator Project nor the - * names of its contributors may be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY - * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -using System.Xml.Serialization; - -namespace OpenSim.Framework.Communications.XMPP -{ - /// - /// Message types. - /// - public enum XmppPresenceType - { - [XmlEnum("unavailable")] unavailable, - [XmlEnum("subscribe")] subscribe, - [XmlEnum("subscribed")] subscribed, - [XmlEnum("unsubscribe")] unsubscribe, - [XmlEnum("unsubscribed")] unsubscribed, - [XmlEnum("probe")] probe, - [XmlEnum("error")] error, - } - - - [XmlRoot("message")] - public class XmppPresenceStanza: XmppStanza - { - /// - /// IQ type: one of set, get, result, error - /// - [XmlAttribute("type")] - public XmppPresenceType PresenceType; - - // [XmlAttribute("error")] - // public XmppError Error; - - public XmppPresenceStanza() : base() - { - } - - public XmppPresenceStanza(string fromJid, string toJid, XmppPresenceType pType) : - base(fromJid, toJid) - { - PresenceType = pType; - } - } -} diff --git a/OpenSim/Framework/Communications/XMPP/XmppSerializer.cs b/OpenSim/Framework/Communications/XMPP/XmppSerializer.cs deleted file mode 100644 index e37ef2853d..0000000000 --- a/OpenSim/Framework/Communications/XMPP/XmppSerializer.cs +++ /dev/null @@ -1,79 +0,0 @@ -/* - * Copyright (c) Contributors, http://opensimulator.org/ - * See CONTRIBUTORS.TXT for a full list of copyright holders. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * * Neither the name of the OpenSimulator Project nor the - * names of its contributors may be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY - * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -using System; -using System.Collections.Generic; -using System.Xml; -using System.Xml.Serialization; - -namespace OpenSim.Framework.Communications.XMPP -{ - public class XmppSerializer - { - // private static readonly ILog _log = - // LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); - - // need to do it this way, as XmlSerializer(type, extratypes) - // does not work on mono (at least). - private Dictionary _serializerForType = new Dictionary(); - private Dictionary _serializerForName = new Dictionary(); - private XmlSerializerNamespaces _xmlNs; - private string _defaultNS; - - public XmppSerializer(bool server) - { - _xmlNs = new XmlSerializerNamespaces(); - _xmlNs.Add(String.Empty, String.Empty); - if (server) - _defaultNS = "jabber:server"; - else - _defaultNS = "jabber:client"; - - // TODO: do this via reflection - _serializerForType[typeof(XmppMessageStanza)] = _serializerForName["message"] = - new XmlSerializer(typeof(XmppMessageStanza), _defaultNS); - } - - public void Serialize(XmlWriter xw, object o) - { - if (!_serializerForType.ContainsKey(o.GetType())) - throw new ArgumentException(String.Format("no serializer available for type {0}", o.GetType())); - - _serializerForType[o.GetType()].Serialize(xw, o, _xmlNs); - } - - public object Deserialize(XmlReader xr) - { - // position on next element - xr.Read(); - if (!_serializerForName.ContainsKey(xr.LocalName)) - throw new ArgumentException(String.Format("no serializer available for name {0}", xr.LocalName)); - - return _serializerForName[xr.LocalName].Deserialize(xr); - } - } -} diff --git a/OpenSim/Framework/Communications/XMPP/XmppStanza.cs b/OpenSim/Framework/Communications/XMPP/XmppStanza.cs deleted file mode 100644 index 5312a31bb6..0000000000 --- a/OpenSim/Framework/Communications/XMPP/XmppStanza.cs +++ /dev/null @@ -1,70 +0,0 @@ -/* - * Copyright (c) Contributors, http://opensimulator.org/ - * See CONTRIBUTORS.TXT for a full list of copyright holders. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * * Neither the name of the OpenSimulator Project nor the - * names of its contributors may be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY - * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -using System; -using System.Xml.Serialization; - -namespace OpenSim.Framework.Communications.XMPP -{ - public abstract class XmppStanza - { - /// - /// counter used for generating ID - /// - [XmlIgnore] - private static ulong _ctr = 0; - - /// - /// recipient JID - /// - [XmlAttribute("to")] - public string ToJid; - - /// - /// sender JID - /// - [XmlAttribute("from")] - public string FromJid; - - /// - /// unique ID. - /// - [XmlAttribute("id")] - public string MessageId; - - public XmppStanza() - { - } - - public XmppStanza(string fromJid, string toJid) - { - ToJid = toJid; - FromJid = fromJid; - MessageId = String.Format("OpenSim_{0}{1}", DateTime.UtcNow.Ticks, _ctr++); - } - } -} diff --git a/OpenSim/Framework/Communications/XMPP/XmppWriter.cs b/OpenSim/Framework/Communications/XMPP/XmppWriter.cs deleted file mode 100644 index 415d808c2f..0000000000 --- a/OpenSim/Framework/Communications/XMPP/XmppWriter.cs +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Copyright (c) Contributors, http://opensimulator.org/ - * See CONTRIBUTORS.TXT for a full list of copyright holders. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * * Neither the name of the OpenSimulator Project nor the - * names of its contributors may be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY - * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -using System.IO; -using System.Text; -using System.Xml; -using IOStream = System.IO.Stream; - -namespace OpenSim.Framework.Communications.XMPP -{ - public class XMPPWriter: XmlTextWriter - { - public XMPPWriter(TextWriter textWriter) : base(textWriter) - { - } - - public XMPPWriter(IOStream stream) : this(stream, Util.UTF8) - { - } - - public XMPPWriter(IOStream stream, Encoding enc) : base(stream, enc) - { - } - - public override void WriteStartDocument() - { - } - - public override void WriteStartDocument(bool standalone) - { - } - } -} From d00f73c3a4cac77c97dcf4df1613fb85a516ffb4 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Fri, 4 Sep 2015 14:39:23 -0700 Subject: [PATCH 18/32] Deleted OpenSim.Framework.Communications. Moved its two remaining files to OpenSim.Framework. --- .../RemoteController/RemoteAdminPlugin.cs | 1 - .../Communications/Properties/AssemblyInfo.cs | 65 ---------------- .../{Communications => }/OutboundUrlFilter.cs | 4 +- .../{Communications => }/RestClient.cs | 2 +- OpenSim/Region/Application/OpenSimBase.cs | 1 - .../Application/RegionApplicationBase.cs | 1 - .../Tests/AttachmentsModuleTests.cs | 1 - .../Avatar/BakedTextures/XBakesModule.cs | 1 - .../Avatar/Friends/FriendsModule.cs | 1 - .../Avatar/InstantMessage/MuteListModule.cs | 1 - .../InstantMessage/OfflineMessageModule.cs | 1 - .../Archiver/InventoryArchiverModule.cs | 1 - .../Tests/InventoryArchiveLoadPathTests.cs | 1 - .../Tests/InventoryArchiveLoadTests.cs | 1 - .../Tests/InventoryArchiveSaveTests.cs | 1 - .../Tests/InventoryArchiveTestCase.cs | 1 - .../Tests/InventoryAccessModuleTests.cs | 1 - .../Framework/Library/LibraryModule.cs | 1 - .../HttpRequest/ScriptsHttpRequests.cs | 1 - .../LoadImageURL/LoadImageURLModule.cs | 2 +- .../Simulation/RemoteSimulationConnector.cs | 1 - .../CoreModules/World/Estate/XEstateModule.cs | 1 - .../DataSnapshot/DataSnapshotManager.cs | 1 - .../Framework/Scenes/RegionStatsHandler.cs | 1 - .../Framework/Scenes/Scene.PacketHandlers.cs | 1 - OpenSim/Region/Framework/Scenes/Scene.cs | 1 - .../Scenes/SceneCommunicationService.cs | 1 - .../Scenes/Tests/EntityManagerTests.cs | 1 - .../Framework/Scenes/Tests/SceneGraphTests.cs | 1 - .../Scenes/Tests/SceneManagerTests.cs | 1 - .../Scenes/Tests/SceneObjectBasicTests.cs | 1 - .../Scenes/Tests/SceneObjectCopyTests.cs | 1 - .../Scenes/Tests/SceneObjectDeRezTests.cs | 1 - .../Scenes/Tests/SceneObjectLinkingTests.cs | 1 - .../Scenes/Tests/SceneObjectResizeTests.cs | 1 - .../Scenes/Tests/SceneObjectScriptTests.cs | 1 - .../Tests/SceneObjectSerializationTests.cs | 1 - .../Scenes/Tests/SceneObjectSpatialTests.cs | 1 - .../Scenes/Tests/SceneObjectStatusTests.cs | 1 - .../Scenes/Tests/SceneObjectUndoRedoTests.cs | 1 - .../Scenes/Tests/SceneObjectUserGroupTests.cs | 1 - .../Scenes/Tests/ScenePresenceAgentTests.cs | 1 - .../Tests/ScenePresenceAnimationTests.cs | 1 - .../Tests/ScenePresenceAutopilotTests.cs | 1 - .../Tests/ScenePresenceCapabilityTests.cs | 1 - .../Tests/ScenePresenceCrossingTests.cs | 1 - .../Scenes/Tests/ScenePresenceSitTests.cs | 1 - .../Tests/ScenePresenceTeleportTests.cs | 1 - .../Scenes/Tests/SceneStatisticsTests.cs | 1 - .../Framework/Scenes/Tests/SceneTests.cs | 1 - .../Scenes/Tests/TaskInventoryTests.cs | 1 - .../Scenes/Tests/UserInventoryTests.cs | 1 - .../Avatar/XmlRpcGroups/GroupsModule.cs | 1 - .../SimianGroupsServicesConnectorModule.cs | 1 - .../XmlRpcGroups/Tests/GroupsModuleTests.cs | 1 - .../XmlRpcGroupsServicesConnectorModule.cs | 1 - .../XmlRpcGridRouterModule.cs | 1 - .../World/NPC/Tests/NPCModuleTests.cs | 1 - .../Asset/AssetServicesConnector.cs | 1 - .../AuthorizationServicesConnector.cs | 1 - .../Freeswitch/RemoteFreeswitchConnector.cs | 2 +- .../Friends/FriendsServicesConnector.cs | 2 +- .../Connectors/Grid/GridServicesConnector.cs | 2 +- .../GridUser/GridUserServicesConnector.cs | 2 +- .../Inventory/XInventoryServicesConnector.cs | 2 +- .../Connectors/Land/LandServicesConnector.cs | 2 +- .../MapImage/MapImageServicesConnector.cs | 2 +- .../Neighbour/NeighbourServicesConnector.cs | 2 +- .../Presence/PresenceServicesConnector.cs | 2 +- .../UserAccountServicesConnector.cs | 2 +- .../Common/Helpers/EntityTransferHelpers.cs | 2 +- OpenSim/Tests/Common/Helpers/SceneHelpers.cs | 2 +- .../Common/Helpers/UserAccountHelpers.cs | 2 +- OpenSim/Tests/Common/Mock/TestScene.cs | 2 +- .../Tests/Performance/NPCPerformanceTests.cs | 2 +- prebuild.xml | 77 +------------------ 76 files changed, 20 insertions(+), 216 deletions(-) delete mode 100644 OpenSim/Framework/Communications/Properties/AssemblyInfo.cs rename OpenSim/Framework/{Communications => }/OutboundUrlFilter.cs (99%) rename OpenSim/Framework/{Communications => }/RestClient.cs (99%) diff --git a/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs b/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs index 0228c3c690..808d9e42a2 100644 --- a/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs +++ b/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs @@ -42,7 +42,6 @@ using OpenMetaverse; using Mono.Addins; using OpenSim; using OpenSim.Framework; -using OpenSim.Framework.Communications; using OpenSim.Framework.Console; using OpenSim.Framework.Servers; using OpenSim.Framework.Servers.HttpServer; diff --git a/OpenSim/Framework/Communications/Properties/AssemblyInfo.cs b/OpenSim/Framework/Communications/Properties/AssemblyInfo.cs deleted file mode 100644 index b398167211..0000000000 --- a/OpenSim/Framework/Communications/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,65 +0,0 @@ -/* - * Copyright (c) Contributors, http://opensimulator.org/ - * See CONTRIBUTORS.TXT for a full list of copyright holders. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * * Neither the name of the OpenSimulator Project nor the - * names of its contributors may be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY - * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -using System.Reflection; -using System.Runtime.InteropServices; - -// General information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. - -[assembly : AssemblyTitle("OpenSim.Framework.Communications")] -[assembly : AssemblyDescription("")] -[assembly : AssemblyConfiguration("")] -[assembly : AssemblyCompany("http://opensimulator.org")] -[assembly : AssemblyProduct("OpenSim")] -[assembly : AssemblyCopyright("Copyright (c) OpenSimulator.org Developers")] -[assembly : AssemblyTrademark("")] -[assembly : AssemblyCulture("")] - -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. - -[assembly : ComVisible(false)] - -// The following GUID is for the ID of the typelib if this project is exposed to COM - -[assembly : Guid("13e7c396-78a9-4a5c-baf2-6f980ea75d95")] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Revision and Build Numbers -// by using the '*' as shown below: - -[assembly : AssemblyVersion("0.8.2.*")] - diff --git a/OpenSim/Framework/Communications/OutboundUrlFilter.cs b/OpenSim/Framework/OutboundUrlFilter.cs similarity index 99% rename from OpenSim/Framework/Communications/OutboundUrlFilter.cs rename to OpenSim/Framework/OutboundUrlFilter.cs index 8b572d1c58..baa3647677 100644 --- a/OpenSim/Framework/Communications/OutboundUrlFilter.cs +++ b/OpenSim/Framework/OutboundUrlFilter.cs @@ -34,7 +34,7 @@ using log4net; using LukeSkywalker.IPNetwork; using Nini.Config; -namespace OpenSim.Framework.Communications +namespace OpenSim.Framework { public class OutboundUrlFilter { @@ -62,7 +62,7 @@ namespace OpenSim.Framework.Communications } /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// /// Name of the filter for logging purposes. /// Filter configuration diff --git a/OpenSim/Framework/Communications/RestClient.cs b/OpenSim/Framework/RestClient.cs similarity index 99% rename from OpenSim/Framework/Communications/RestClient.cs rename to OpenSim/Framework/RestClient.cs index ff7cb4d8fb..7080ca5f87 100644 --- a/OpenSim/Framework/Communications/RestClient.cs +++ b/OpenSim/Framework/RestClient.cs @@ -37,7 +37,7 @@ using log4net; using OpenSim.Framework.ServiceAuth; -namespace OpenSim.Framework.Communications +namespace OpenSim.Framework { /// /// Implementation of a generic REST client diff --git a/OpenSim/Region/Application/OpenSimBase.cs b/OpenSim/Region/Application/OpenSimBase.cs index 83c07f163b..ab6f036225 100644 --- a/OpenSim/Region/Application/OpenSimBase.cs +++ b/OpenSim/Region/Application/OpenSimBase.cs @@ -36,7 +36,6 @@ using log4net; using Nini.Config; using OpenMetaverse; using OpenSim.Framework; -using OpenSim.Framework.Communications; using OpenSim.Framework.Console; using OpenSim.Framework.Servers; using OpenSim.Framework.Servers.HttpServer; diff --git a/OpenSim/Region/Application/RegionApplicationBase.cs b/OpenSim/Region/Application/RegionApplicationBase.cs index b58c99832a..08c8579811 100644 --- a/OpenSim/Region/Application/RegionApplicationBase.cs +++ b/OpenSim/Region/Application/RegionApplicationBase.cs @@ -32,7 +32,6 @@ using log4net; using Nini.Config; using OpenMetaverse; using OpenSim.Framework; -using OpenSim.Framework.Communications; using OpenSim.Framework.Servers; using OpenSim.Framework.Servers.HttpServer; using OpenSim.Region.Framework; diff --git a/OpenSim/Region/CoreModules/Avatar/Attachments/Tests/AttachmentsModuleTests.cs b/OpenSim/Region/CoreModules/Avatar/Attachments/Tests/AttachmentsModuleTests.cs index f1b002b8a9..3e7e4ed72a 100644 --- a/OpenSim/Region/CoreModules/Avatar/Attachments/Tests/AttachmentsModuleTests.cs +++ b/OpenSim/Region/CoreModules/Avatar/Attachments/Tests/AttachmentsModuleTests.cs @@ -37,7 +37,6 @@ using Nini.Config; using NUnit.Framework; using OpenMetaverse; using OpenSim.Framework; -using OpenSim.Framework.Communications; using OpenSim.Framework.Servers; using OpenSim.Framework.Servers.HttpServer; using OpenSim.Region.CoreModules.Avatar.Attachments; diff --git a/OpenSim/Region/CoreModules/Avatar/BakedTextures/XBakesModule.cs b/OpenSim/Region/CoreModules/Avatar/BakedTextures/XBakesModule.cs index 7d2cad67c3..414f06a552 100644 --- a/OpenSim/Region/CoreModules/Avatar/BakedTextures/XBakesModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/BakedTextures/XBakesModule.cs @@ -38,7 +38,6 @@ using System.Reflection; using log4net; using OpenSim.Framework; using OpenSim.Framework.ServiceAuth; -using OpenSim.Framework.Communications; using OpenSim.Region.Framework.Interfaces; using OpenSim.Region.Framework.Scenes; using OpenSim.Services.Interfaces; diff --git a/OpenSim/Region/CoreModules/Avatar/Friends/FriendsModule.cs b/OpenSim/Region/CoreModules/Avatar/Friends/FriendsModule.cs index 7ab568e8e5..08e7dd2cbc 100644 --- a/OpenSim/Region/CoreModules/Avatar/Friends/FriendsModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Friends/FriendsModule.cs @@ -38,7 +38,6 @@ using OpenMetaverse; using Mono.Addins; using OpenSim.Framework; using OpenSim.Framework.Servers.HttpServer; -using OpenSim.Framework.Communications; using OpenSim.Framework.Servers; using OpenSim.Region.Framework.Interfaces; using OpenSim.Region.Framework.Scenes; diff --git a/OpenSim/Region/CoreModules/Avatar/InstantMessage/MuteListModule.cs b/OpenSim/Region/CoreModules/Avatar/InstantMessage/MuteListModule.cs index 7ce2813139..315d372a60 100644 --- a/OpenSim/Region/CoreModules/Avatar/InstantMessage/MuteListModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/InstantMessage/MuteListModule.cs @@ -32,7 +32,6 @@ using Nini.Config; using Mono.Addins; using OpenMetaverse; using OpenSim.Framework; -using OpenSim.Framework.Communications; using OpenSim.Framework.Servers; using OpenSim.Framework.Client; using OpenSim.Region.Framework.Interfaces; diff --git a/OpenSim/Region/CoreModules/Avatar/InstantMessage/OfflineMessageModule.cs b/OpenSim/Region/CoreModules/Avatar/InstantMessage/OfflineMessageModule.cs index c75920d8df..9cdb1c2db8 100644 --- a/OpenSim/Region/CoreModules/Avatar/InstantMessage/OfflineMessageModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/InstantMessage/OfflineMessageModule.cs @@ -32,7 +32,6 @@ using Mono.Addins; using Nini.Config; using OpenMetaverse; using OpenSim.Framework; -using OpenSim.Framework.Communications; using OpenSim.Framework.Servers; using OpenSim.Framework.Client; using OpenSim.Region.Framework.Interfaces; diff --git a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiverModule.cs b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiverModule.cs index 420520e1c6..884741442e 100644 --- a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiverModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiverModule.cs @@ -34,7 +34,6 @@ using NDesk.Options; using Nini.Config; using OpenMetaverse; using OpenSim.Framework; -using OpenSim.Framework.Communications; using OpenSim.Framework.Console; using OpenSim.Region.Framework.Interfaces; using OpenSim.Region.Framework.Scenes; diff --git a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiveLoadPathTests.cs b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiveLoadPathTests.cs index 84f9f3f6bd..c2e645f0c1 100644 --- a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiveLoadPathTests.cs +++ b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiveLoadPathTests.cs @@ -36,7 +36,6 @@ using OpenSim.Data; using OpenSim.Framework; using OpenSim.Framework.Serialization; using OpenSim.Framework.Serialization.External; -using OpenSim.Framework.Communications; using OpenSim.Region.CoreModules.Avatar.Inventory.Archiver; using OpenSim.Region.CoreModules.World.Serialiser; using OpenSim.Region.Framework.Scenes; diff --git a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiveLoadTests.cs b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiveLoadTests.cs index d5f3a22742..57b4f8067a 100644 --- a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiveLoadTests.cs +++ b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiveLoadTests.cs @@ -36,7 +36,6 @@ using OpenSim.Data; using OpenSim.Framework; using OpenSim.Framework.Serialization; using OpenSim.Framework.Serialization.External; -using OpenSim.Framework.Communications; using OpenSim.Region.CoreModules.Avatar.Inventory.Archiver; using OpenSim.Region.CoreModules.World.Serialiser; using OpenSim.Region.Framework.Scenes; diff --git a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiveSaveTests.cs b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiveSaveTests.cs index b614c180d7..7265405c3c 100644 --- a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiveSaveTests.cs +++ b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiveSaveTests.cs @@ -36,7 +36,6 @@ using OpenSim.Data; using OpenSim.Framework; using OpenSim.Framework.Serialization; using OpenSim.Framework.Serialization.External; -using OpenSim.Framework.Communications; using OpenSim.Region.CoreModules.Avatar.Inventory.Archiver; using OpenSim.Region.CoreModules.World.Serialiser; using OpenSim.Region.Framework.Scenes; diff --git a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiveTestCase.cs b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiveTestCase.cs index 4b015d7488..519c697483 100644 --- a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiveTestCase.cs +++ b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiveTestCase.cs @@ -36,7 +36,6 @@ using OpenSim.Data; using OpenSim.Framework; using OpenSim.Framework.Serialization; using OpenSim.Framework.Serialization.External; -using OpenSim.Framework.Communications; using OpenSim.Region.CoreModules.Avatar.Inventory.Archiver; using OpenSim.Region.CoreModules.World.Serialiser; using OpenSim.Region.Framework.Scenes; diff --git a/OpenSim/Region/CoreModules/Framework/InventoryAccess/Tests/InventoryAccessModuleTests.cs b/OpenSim/Region/CoreModules/Framework/InventoryAccess/Tests/InventoryAccessModuleTests.cs index c64ab44a8d..1d9116542a 100644 --- a/OpenSim/Region/CoreModules/Framework/InventoryAccess/Tests/InventoryAccessModuleTests.cs +++ b/OpenSim/Region/CoreModules/Framework/InventoryAccess/Tests/InventoryAccessModuleTests.cs @@ -37,7 +37,6 @@ using OpenSim.Data; using OpenSim.Framework; using OpenSim.Framework.Serialization; using OpenSim.Framework.Serialization.External; -using OpenSim.Framework.Communications; using OpenSim.Region.CoreModules.Avatar.Inventory.Archiver; using OpenSim.Region.CoreModules.Framework.InventoryAccess; using OpenSim.Region.Framework.Scenes; diff --git a/OpenSim/Region/CoreModules/Framework/Library/LibraryModule.cs b/OpenSim/Region/CoreModules/Framework/Library/LibraryModule.cs index 69d7e16203..862f0b7eb5 100644 --- a/OpenSim/Region/CoreModules/Framework/Library/LibraryModule.cs +++ b/OpenSim/Region/CoreModules/Framework/Library/LibraryModule.cs @@ -30,7 +30,6 @@ using System.IO; using System.Reflection; using OpenSim.Framework; -using OpenSim.Framework.Communications; using OpenSim.Region.CoreModules.Avatar.Inventory.Archiver; using OpenSim.Region.Framework; diff --git a/OpenSim/Region/CoreModules/Scripting/HttpRequest/ScriptsHttpRequests.cs b/OpenSim/Region/CoreModules/Scripting/HttpRequest/ScriptsHttpRequests.cs index b1f3f9bc8a..9dfeb964b5 100644 --- a/OpenSim/Region/CoreModules/Scripting/HttpRequest/ScriptsHttpRequests.cs +++ b/OpenSim/Region/CoreModules/Scripting/HttpRequest/ScriptsHttpRequests.cs @@ -40,7 +40,6 @@ using log4net; using Nini.Config; using OpenMetaverse; using OpenSim.Framework; -using OpenSim.Framework.Communications; using OpenSim.Framework.Servers; using OpenSim.Framework.Servers.HttpServer; using OpenSim.Region.Framework.Interfaces; diff --git a/OpenSim/Region/CoreModules/Scripting/LoadImageURL/LoadImageURLModule.cs b/OpenSim/Region/CoreModules/Scripting/LoadImageURL/LoadImageURLModule.cs index 7462ebd182..d45962f520 100644 --- a/OpenSim/Region/CoreModules/Scripting/LoadImageURL/LoadImageURLModule.cs +++ b/OpenSim/Region/CoreModules/Scripting/LoadImageURL/LoadImageURLModule.cs @@ -32,7 +32,7 @@ using System.Net; using Nini.Config; using OpenMetaverse; using OpenMetaverse.Imaging; -using OpenSim.Framework.Communications; +using OpenSim.Framework; using OpenSim.Region.CoreModules.Scripting.DynamicTexture; using OpenSim.Region.Framework.Interfaces; using OpenSim.Region.Framework.Scenes; diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/RemoteSimulationConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/RemoteSimulationConnector.cs index dca3dd72f7..f96324210f 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/RemoteSimulationConnector.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/RemoteSimulationConnector.cs @@ -38,7 +38,6 @@ using Nini.Config; using OpenMetaverse; using OpenMetaverse.StructuredData; using OpenSim.Framework; -using OpenSim.Framework.Communications; using OpenSim.Region.Framework.Interfaces; using OpenSim.Region.Framework.Scenes; using OpenSim.Region.Framework.Scenes.Serialization; diff --git a/OpenSim/Region/CoreModules/World/Estate/XEstateModule.cs b/OpenSim/Region/CoreModules/World/Estate/XEstateModule.cs index f54ab2c13e..4bb3799dc9 100644 --- a/OpenSim/Region/CoreModules/World/Estate/XEstateModule.cs +++ b/OpenSim/Region/CoreModules/World/Estate/XEstateModule.cs @@ -34,7 +34,6 @@ using Nini.Config; using Nwc.XmlRpc; using OpenMetaverse; using OpenSim.Framework; -using OpenSim.Framework.Communications; using OpenSim.Region.Framework.Interfaces; using OpenSim.Region.Framework.Scenes; using OpenSim.Services.Interfaces; diff --git a/OpenSim/Region/DataSnapshot/DataSnapshotManager.cs b/OpenSim/Region/DataSnapshot/DataSnapshotManager.cs index 600e826b82..d5ae83ee3b 100644 --- a/OpenSim/Region/DataSnapshot/DataSnapshotManager.cs +++ b/OpenSim/Region/DataSnapshot/DataSnapshotManager.cs @@ -39,7 +39,6 @@ using Nini.Config; using OpenMetaverse; using Mono.Addins; using OpenSim.Framework; -using OpenSim.Framework.Communications; using OpenSim.Region.DataSnapshot.Interfaces; using OpenSim.Region.Framework.Interfaces; using OpenSim.Region.Framework.Scenes; diff --git a/OpenSim/Region/Framework/Scenes/RegionStatsHandler.cs b/OpenSim/Region/Framework/Scenes/RegionStatsHandler.cs index f208afb758..3b31281cbe 100644 --- a/OpenSim/Region/Framework/Scenes/RegionStatsHandler.cs +++ b/OpenSim/Region/Framework/Scenes/RegionStatsHandler.cs @@ -35,7 +35,6 @@ using Nini.Config; using OpenMetaverse; using OpenMetaverse.StructuredData; using OpenSim.Framework; -using OpenSim.Framework.Communications; using OpenSim.Framework.Console; using OpenSim.Framework.Servers; using OpenSim.Framework.Servers.HttpServer; diff --git a/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs b/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs index ef2125b0fb..8ebcd92190 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs @@ -31,7 +31,6 @@ using System.Threading; using OpenMetaverse; using OpenMetaverse.Packets; using OpenSim.Framework; -using OpenSim.Framework.Communications; using OpenSim.Services.Interfaces; namespace OpenSim.Region.Framework.Scenes diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index 900e715651..8c2f45e9e8 100755 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs @@ -42,7 +42,6 @@ using OpenMetaverse.Imaging; using OpenSim.Framework; using OpenSim.Framework.Monitoring; using OpenSim.Services.Interfaces; -using OpenSim.Framework.Communications; using OpenSim.Framework.Console; using OpenSim.Region.Framework.Interfaces; using OpenSim.Region.Framework.Scenes.Scripting; diff --git a/OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs b/OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs index c8c8714a5e..b9526da753 100644 --- a/OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs +++ b/OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs @@ -35,7 +35,6 @@ using OpenMetaverse.StructuredData; using log4net; using OpenSim.Framework; using OpenSim.Framework.Client; -using OpenSim.Framework.Communications; using OpenSim.Framework.Capabilities; using OpenSim.Region.Framework.Interfaces; using OpenSim.Services.Interfaces; diff --git a/OpenSim/Region/Framework/Scenes/Tests/EntityManagerTests.cs b/OpenSim/Region/Framework/Scenes/Tests/EntityManagerTests.cs index 766ce8399a..da1894143e 100644 --- a/OpenSim/Region/Framework/Scenes/Tests/EntityManagerTests.cs +++ b/OpenSim/Region/Framework/Scenes/Tests/EntityManagerTests.cs @@ -34,7 +34,6 @@ using Nini.Config; using NUnit.Framework; using OpenMetaverse; using OpenSim.Framework; -using OpenSim.Framework.Communications; using OpenSim.Region.Framework.Scenes; using OpenSim.Tests.Common; diff --git a/OpenSim/Region/Framework/Scenes/Tests/SceneGraphTests.cs b/OpenSim/Region/Framework/Scenes/Tests/SceneGraphTests.cs index b6b3344cf1..ee7c8a917e 100644 --- a/OpenSim/Region/Framework/Scenes/Tests/SceneGraphTests.cs +++ b/OpenSim/Region/Framework/Scenes/Tests/SceneGraphTests.cs @@ -32,7 +32,6 @@ using System.Text; using NUnit.Framework; using OpenMetaverse; using OpenSim.Framework; -using OpenSim.Framework.Communications; using OpenSim.Region.Framework.Scenes; using OpenSim.Tests.Common; diff --git a/OpenSim/Region/Framework/Scenes/Tests/SceneManagerTests.cs b/OpenSim/Region/Framework/Scenes/Tests/SceneManagerTests.cs index 6118004bf9..31722278a9 100644 --- a/OpenSim/Region/Framework/Scenes/Tests/SceneManagerTests.cs +++ b/OpenSim/Region/Framework/Scenes/Tests/SceneManagerTests.cs @@ -32,7 +32,6 @@ using System.Threading; using NUnit.Framework; using OpenMetaverse; using OpenSim.Framework; -using OpenSim.Framework.Communications; using OpenSim.Region.Framework.Scenes; using OpenSim.Services.Interfaces; using OpenSim.Tests.Common; diff --git a/OpenSim/Region/Framework/Scenes/Tests/SceneObjectBasicTests.cs b/OpenSim/Region/Framework/Scenes/Tests/SceneObjectBasicTests.cs index bdf0700846..098f1b4b96 100644 --- a/OpenSim/Region/Framework/Scenes/Tests/SceneObjectBasicTests.cs +++ b/OpenSim/Region/Framework/Scenes/Tests/SceneObjectBasicTests.cs @@ -33,7 +33,6 @@ using Nini.Config; using NUnit.Framework; using OpenMetaverse; using OpenSim.Framework; -using OpenSim.Framework.Communications; using OpenSim.Region.Framework.Scenes; using OpenSim.Services.Interfaces; using OpenSim.Tests.Common; diff --git a/OpenSim/Region/Framework/Scenes/Tests/SceneObjectCopyTests.cs b/OpenSim/Region/Framework/Scenes/Tests/SceneObjectCopyTests.cs index 1d41d3381d..0b196c1b7e 100644 --- a/OpenSim/Region/Framework/Scenes/Tests/SceneObjectCopyTests.cs +++ b/OpenSim/Region/Framework/Scenes/Tests/SceneObjectCopyTests.cs @@ -32,7 +32,6 @@ using Nini.Config; using NUnit.Framework; using OpenMetaverse; using OpenSim.Framework; -using OpenSim.Framework.Communications; using OpenSim.Region.CoreModules.Framework.EntityTransfer; using OpenSim.Region.CoreModules.Framework.InventoryAccess; using OpenSim.Region.CoreModules.ServiceConnectorsOut.Simulation; diff --git a/OpenSim/Region/Framework/Scenes/Tests/SceneObjectDeRezTests.cs b/OpenSim/Region/Framework/Scenes/Tests/SceneObjectDeRezTests.cs index 558ba2c1bc..1c396ac081 100644 --- a/OpenSim/Region/Framework/Scenes/Tests/SceneObjectDeRezTests.cs +++ b/OpenSim/Region/Framework/Scenes/Tests/SceneObjectDeRezTests.cs @@ -32,7 +32,6 @@ using Nini.Config; using NUnit.Framework; using OpenMetaverse; using OpenSim.Framework; -using OpenSim.Framework.Communications; using OpenSim.Region.CoreModules.Framework.EntityTransfer; using OpenSim.Region.CoreModules.Framework.InventoryAccess; using OpenSim.Region.CoreModules.ServiceConnectorsOut.Simulation; diff --git a/OpenSim/Region/Framework/Scenes/Tests/SceneObjectLinkingTests.cs b/OpenSim/Region/Framework/Scenes/Tests/SceneObjectLinkingTests.cs index c2e0ae318f..e6d5a2f676 100644 --- a/OpenSim/Region/Framework/Scenes/Tests/SceneObjectLinkingTests.cs +++ b/OpenSim/Region/Framework/Scenes/Tests/SceneObjectLinkingTests.cs @@ -31,7 +31,6 @@ using System.Reflection; using NUnit.Framework; using OpenMetaverse; using OpenSim.Framework; -using OpenSim.Framework.Communications; using OpenSim.Region.Framework.Scenes; using OpenSim.Tests.Common; using log4net; diff --git a/OpenSim/Region/Framework/Scenes/Tests/SceneObjectResizeTests.cs b/OpenSim/Region/Framework/Scenes/Tests/SceneObjectResizeTests.cs index 11e90848b1..975c4d9008 100644 --- a/OpenSim/Region/Framework/Scenes/Tests/SceneObjectResizeTests.cs +++ b/OpenSim/Region/Framework/Scenes/Tests/SceneObjectResizeTests.cs @@ -30,7 +30,6 @@ using System.Reflection; using NUnit.Framework; using OpenMetaverse; using OpenSim.Framework; -using OpenSim.Framework.Communications; using OpenSim.Region.Framework.Scenes; using OpenSim.Tests.Common; diff --git a/OpenSim/Region/Framework/Scenes/Tests/SceneObjectScriptTests.cs b/OpenSim/Region/Framework/Scenes/Tests/SceneObjectScriptTests.cs index fdbe7aedfa..8a2d2af90f 100644 --- a/OpenSim/Region/Framework/Scenes/Tests/SceneObjectScriptTests.cs +++ b/OpenSim/Region/Framework/Scenes/Tests/SceneObjectScriptTests.cs @@ -31,7 +31,6 @@ using System.Reflection; using NUnit.Framework; using OpenMetaverse; using OpenSim.Framework; -using OpenSim.Framework.Communications; using OpenSim.Region.Framework.Interfaces; using OpenSim.Region.Framework.Scenes; using OpenSim.Tests.Common; diff --git a/OpenSim/Region/Framework/Scenes/Tests/SceneObjectSerializationTests.cs b/OpenSim/Region/Framework/Scenes/Tests/SceneObjectSerializationTests.cs index 927d8e88d3..e3ceb04e88 100644 --- a/OpenSim/Region/Framework/Scenes/Tests/SceneObjectSerializationTests.cs +++ b/OpenSim/Region/Framework/Scenes/Tests/SceneObjectSerializationTests.cs @@ -36,7 +36,6 @@ using NUnit.Framework; using OpenMetaverse; using OpenSim.Framework; using OpenSim.Framework.Serialization.External; -using OpenSim.Framework.Communications; using OpenSim.Region.Framework.Scenes; using OpenSim.Region.Framework.Scenes.Serialization; using OpenSim.Services.Interfaces; diff --git a/OpenSim/Region/Framework/Scenes/Tests/SceneObjectSpatialTests.cs b/OpenSim/Region/Framework/Scenes/Tests/SceneObjectSpatialTests.cs index 974529ae13..e00defd383 100644 --- a/OpenSim/Region/Framework/Scenes/Tests/SceneObjectSpatialTests.cs +++ b/OpenSim/Region/Framework/Scenes/Tests/SceneObjectSpatialTests.cs @@ -31,7 +31,6 @@ using System.Threading; using NUnit.Framework; using OpenMetaverse; using OpenSim.Framework; -using OpenSim.Framework.Communications; using OpenSim.Region.Framework.Scenes; using OpenSim.Tests.Common; diff --git a/OpenSim/Region/Framework/Scenes/Tests/SceneObjectStatusTests.cs b/OpenSim/Region/Framework/Scenes/Tests/SceneObjectStatusTests.cs index 5ba754cbb0..1737e3c40c 100644 --- a/OpenSim/Region/Framework/Scenes/Tests/SceneObjectStatusTests.cs +++ b/OpenSim/Region/Framework/Scenes/Tests/SceneObjectStatusTests.cs @@ -31,7 +31,6 @@ using System.Reflection; using NUnit.Framework; using OpenMetaverse; using OpenSim.Framework; -using OpenSim.Framework.Communications; using OpenSim.Region.Framework.Scenes; using OpenSim.Tests.Common; diff --git a/OpenSim/Region/Framework/Scenes/Tests/SceneObjectUndoRedoTests.cs b/OpenSim/Region/Framework/Scenes/Tests/SceneObjectUndoRedoTests.cs index cdebe2547b..af3ce8e50a 100644 --- a/OpenSim/Region/Framework/Scenes/Tests/SceneObjectUndoRedoTests.cs +++ b/OpenSim/Region/Framework/Scenes/Tests/SceneObjectUndoRedoTests.cs @@ -30,7 +30,6 @@ using System.Reflection; using NUnit.Framework; using OpenMetaverse; using OpenSim.Framework; -using OpenSim.Framework.Communications; using OpenSim.Region.Framework.Scenes; using OpenSim.Tests.Common; diff --git a/OpenSim/Region/Framework/Scenes/Tests/SceneObjectUserGroupTests.cs b/OpenSim/Region/Framework/Scenes/Tests/SceneObjectUserGroupTests.cs index fd49c887f8..aadf7c636d 100644 --- a/OpenSim/Region/Framework/Scenes/Tests/SceneObjectUserGroupTests.cs +++ b/OpenSim/Region/Framework/Scenes/Tests/SceneObjectUserGroupTests.cs @@ -32,7 +32,6 @@ using Nini.Config; using NUnit.Framework; using OpenMetaverse; using OpenSim.Framework; -using OpenSim.Framework.Communications; using OpenSim.Region.CoreModules.Avatar.InstantMessage; using OpenSim.Region.CoreModules.World.Permissions; using OpenSim.Region.Framework.Interfaces; diff --git a/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceAgentTests.cs b/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceAgentTests.cs index 06e6423141..96d112d9f1 100644 --- a/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceAgentTests.cs +++ b/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceAgentTests.cs @@ -36,7 +36,6 @@ using Nini.Config; using NUnit.Framework; using OpenMetaverse; using OpenSim.Framework; -using OpenSim.Framework.Communications; using OpenSim.Region.Framework.Scenes; using OpenSim.Region.Framework.Interfaces; using OpenSim.Region.ClientStack.Linden; diff --git a/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceAnimationTests.cs b/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceAnimationTests.cs index 700ca8c77a..42d91b954a 100644 --- a/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceAnimationTests.cs +++ b/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceAnimationTests.cs @@ -35,7 +35,6 @@ using Nini.Config; using NUnit.Framework; using OpenMetaverse; using OpenSim.Framework; -using OpenSim.Framework.Communications; using OpenSim.Region.Framework.Scenes; using OpenSim.Region.Framework.Interfaces; using OpenSim.Region.CoreModules.Framework.EntityTransfer; diff --git a/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceAutopilotTests.cs b/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceAutopilotTests.cs index c6e3b8b7d6..e5c847e3eb 100644 --- a/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceAutopilotTests.cs +++ b/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceAutopilotTests.cs @@ -33,7 +33,6 @@ using Nini.Config; using NUnit.Framework; using OpenMetaverse; using OpenSim.Framework; -using OpenSim.Framework.Communications; using OpenSim.Region.Framework.Interfaces; using OpenSim.Region.Framework.Scenes; using OpenSim.Tests.Common; diff --git a/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceCapabilityTests.cs b/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceCapabilityTests.cs index cca30db32f..2e6dc70ef2 100644 --- a/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceCapabilityTests.cs +++ b/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceCapabilityTests.cs @@ -36,7 +36,6 @@ using Nini.Config; using NUnit.Framework; using OpenMetaverse; using OpenSim.Framework; -using OpenSim.Framework.Communications; using OpenSim.Framework.Servers; using OpenSim.Framework.Servers.HttpServer; using OpenSim.Region.ClientStack.Linden; diff --git a/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceCrossingTests.cs b/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceCrossingTests.cs index e14da8b107..712764400c 100644 --- a/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceCrossingTests.cs +++ b/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceCrossingTests.cs @@ -32,7 +32,6 @@ using Nini.Config; using NUnit.Framework; using OpenMetaverse; using OpenSim.Framework; -using OpenSim.Framework.Communications; using OpenSim.Framework.Servers; using OpenSim.Region.Framework.Interfaces; using OpenSim.Region.CoreModules.Framework; diff --git a/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceSitTests.cs b/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceSitTests.cs index b77517828c..b232a4483a 100644 --- a/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceSitTests.cs +++ b/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceSitTests.cs @@ -32,7 +32,6 @@ using Nini.Config; using NUnit.Framework; using OpenMetaverse; using OpenSim.Framework; -using OpenSim.Framework.Communications; using OpenSim.Framework.Servers; using OpenSim.Region.Framework.Interfaces; using OpenSim.Region.CoreModules.ServiceConnectorsOut.Simulation; diff --git a/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceTeleportTests.cs b/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceTeleportTests.cs index da93d44d1f..bacfc179ce 100644 --- a/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceTeleportTests.cs +++ b/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceTeleportTests.cs @@ -35,7 +35,6 @@ using Nini.Config; using NUnit.Framework; using OpenMetaverse; using OpenSim.Framework; -using OpenSim.Framework.Communications; using OpenSim.Framework.Servers; using OpenSim.Region.Framework.Interfaces; using OpenSim.Region.CoreModules.Framework; diff --git a/OpenSim/Region/Framework/Scenes/Tests/SceneStatisticsTests.cs b/OpenSim/Region/Framework/Scenes/Tests/SceneStatisticsTests.cs index 2d36214e16..045fd3cec5 100644 --- a/OpenSim/Region/Framework/Scenes/Tests/SceneStatisticsTests.cs +++ b/OpenSim/Region/Framework/Scenes/Tests/SceneStatisticsTests.cs @@ -31,7 +31,6 @@ using System.Reflection; using NUnit.Framework; using OpenMetaverse; using OpenSim.Framework; -using OpenSim.Framework.Communications; using OpenSim.Region.Framework.Scenes; using OpenSim.Tests.Common; diff --git a/OpenSim/Region/Framework/Scenes/Tests/SceneTests.cs b/OpenSim/Region/Framework/Scenes/Tests/SceneTests.cs index 33ef83b7ef..517faf14d6 100644 --- a/OpenSim/Region/Framework/Scenes/Tests/SceneTests.cs +++ b/OpenSim/Region/Framework/Scenes/Tests/SceneTests.cs @@ -36,7 +36,6 @@ using Nini.Config; using NUnit.Framework; using OpenMetaverse; using OpenSim.Framework; -using OpenSim.Framework.Communications; using OpenSim.Region.Framework.Scenes; using OpenSim.Region.Framework.Interfaces; using OpenSim.Region.CoreModules.World.Serialiser; diff --git a/OpenSim/Region/Framework/Scenes/Tests/TaskInventoryTests.cs b/OpenSim/Region/Framework/Scenes/Tests/TaskInventoryTests.cs index 8ec69740e7..b01088d58f 100644 --- a/OpenSim/Region/Framework/Scenes/Tests/TaskInventoryTests.cs +++ b/OpenSim/Region/Framework/Scenes/Tests/TaskInventoryTests.cs @@ -37,7 +37,6 @@ using NUnit.Framework; using OpenMetaverse; using OpenMetaverse.Assets; using OpenSim.Framework; -using OpenSim.Framework.Communications; using OpenSim.Region.Framework.Scenes; using OpenSim.Region.Framework.Interfaces; using OpenSim.Region.CoreModules.Avatar.Inventory.Archiver; diff --git a/OpenSim/Region/Framework/Scenes/Tests/UserInventoryTests.cs b/OpenSim/Region/Framework/Scenes/Tests/UserInventoryTests.cs index edc0a5299a..8250e6c892 100644 --- a/OpenSim/Region/Framework/Scenes/Tests/UserInventoryTests.cs +++ b/OpenSim/Region/Framework/Scenes/Tests/UserInventoryTests.cs @@ -37,7 +37,6 @@ using NUnit.Framework; using OpenMetaverse; using OpenMetaverse.Assets; using OpenSim.Framework; -using OpenSim.Framework.Communications; using OpenSim.Region.Framework.Scenes; using OpenSim.Region.Framework.Interfaces; using OpenSim.Region.CoreModules.Avatar.Inventory.Archiver; diff --git a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs index dff3f78f33..1565da9220 100644 --- a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs +++ b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs @@ -35,7 +35,6 @@ using Nini.Config; using OpenMetaverse; using OpenMetaverse.StructuredData; using OpenSim.Framework; -using OpenSim.Framework.Communications; using OpenSim.Region.Framework.Interfaces; using OpenSim.Region.Framework.Scenes; using OpenSim.Services.Interfaces; diff --git a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/SimianGroupsServicesConnectorModule.cs b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/SimianGroupsServicesConnectorModule.cs index 8095b28f5e..1cb4747a58 100644 --- a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/SimianGroupsServicesConnectorModule.cs +++ b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/SimianGroupsServicesConnectorModule.cs @@ -42,7 +42,6 @@ using OpenMetaverse; using OpenMetaverse.StructuredData; using OpenSim.Framework; -using OpenSim.Framework.Communications; using OpenSim.Region.Framework.Interfaces; using OpenSim.Services.Interfaces; diff --git a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/Tests/GroupsModuleTests.cs b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/Tests/GroupsModuleTests.cs index e03e71dd71..9a42bacc59 100644 --- a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/Tests/GroupsModuleTests.cs +++ b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/Tests/GroupsModuleTests.cs @@ -37,7 +37,6 @@ using OpenMetaverse.Messages.Linden; using OpenMetaverse.Packets; using OpenMetaverse.StructuredData; using OpenSim.Framework; -using OpenSim.Framework.Communications; using OpenSim.Framework.Servers; using OpenSim.Framework.Servers.HttpServer; using OpenSim.Region.ClientStack.Linden; diff --git a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/XmlRpcGroupsServicesConnectorModule.cs b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/XmlRpcGroupsServicesConnectorModule.cs index a040f43d66..20555e4fb6 100644 --- a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/XmlRpcGroupsServicesConnectorModule.cs +++ b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/XmlRpcGroupsServicesConnectorModule.cs @@ -41,7 +41,6 @@ using OpenMetaverse; using OpenMetaverse.StructuredData; using OpenSim.Framework; -using OpenSim.Framework.Communications; using OpenSim.Region.Framework.Interfaces; using OpenSim.Services.Interfaces; diff --git a/OpenSim/Region/OptionalModules/Scripting/XmlRpcRouterModule/XmlRpcGridRouterModule.cs b/OpenSim/Region/OptionalModules/Scripting/XmlRpcRouterModule/XmlRpcGridRouterModule.cs index 709d389b75..744d1e31f6 100644 --- a/OpenSim/Region/OptionalModules/Scripting/XmlRpcRouterModule/XmlRpcGridRouterModule.cs +++ b/OpenSim/Region/OptionalModules/Scripting/XmlRpcRouterModule/XmlRpcGridRouterModule.cs @@ -35,7 +35,6 @@ using OpenMetaverse; using Mono.Addins; using OpenSim.Framework; -using OpenSim.Framework.Communications; using OpenSim.Framework.Servers; using OpenSim.Framework.Servers.HttpServer; using OpenSim.Framework.Client; diff --git a/OpenSim/Region/OptionalModules/World/NPC/Tests/NPCModuleTests.cs b/OpenSim/Region/OptionalModules/World/NPC/Tests/NPCModuleTests.cs index 0bebb588b3..77dfd40ea0 100644 --- a/OpenSim/Region/OptionalModules/World/NPC/Tests/NPCModuleTests.cs +++ b/OpenSim/Region/OptionalModules/World/NPC/Tests/NPCModuleTests.cs @@ -33,7 +33,6 @@ using Nini.Config; using NUnit.Framework; using OpenMetaverse; using OpenSim.Framework; -using OpenSim.Framework.Communications; using OpenSim.Region.CoreModules.Avatar.Attachments; using OpenSim.Region.CoreModules.Avatar.AvatarFactory; using OpenSim.Region.CoreModules.Framework.InventoryAccess; diff --git a/OpenSim/Services/Connectors/Asset/AssetServicesConnector.cs b/OpenSim/Services/Connectors/Asset/AssetServicesConnector.cs index badacb7b8c..bd43552ad4 100644 --- a/OpenSim/Services/Connectors/Asset/AssetServicesConnector.cs +++ b/OpenSim/Services/Connectors/Asset/AssetServicesConnector.cs @@ -33,7 +33,6 @@ using System.Reflection; using Nini.Config; using OpenSim.Framework; using OpenSim.Framework.Console; -using OpenSim.Framework.Communications; using OpenSim.Services.Interfaces; using OpenMetaverse; diff --git a/OpenSim/Services/Connectors/Authorization/AuthorizationServicesConnector.cs b/OpenSim/Services/Connectors/Authorization/AuthorizationServicesConnector.cs index 63730b3a83..d2da85f398 100644 --- a/OpenSim/Services/Connectors/Authorization/AuthorizationServicesConnector.cs +++ b/OpenSim/Services/Connectors/Authorization/AuthorizationServicesConnector.cs @@ -32,7 +32,6 @@ using System.IO; using System.Reflection; using Nini.Config; using OpenSim.Framework; -using OpenSim.Framework.Communications; using OpenSim.Services.Interfaces; using OpenMetaverse; diff --git a/OpenSim/Services/Connectors/Freeswitch/RemoteFreeswitchConnector.cs b/OpenSim/Services/Connectors/Freeswitch/RemoteFreeswitchConnector.cs index d68829996d..20dc1ccf03 100644 --- a/OpenSim/Services/Connectors/Freeswitch/RemoteFreeswitchConnector.cs +++ b/OpenSim/Services/Connectors/Freeswitch/RemoteFreeswitchConnector.cs @@ -32,7 +32,7 @@ using System.Collections; using System.Reflection; using Nini.Config; using OpenSim.Framework; -using OpenSim.Framework.Communications; + using OpenSim.Services.Interfaces; using OpenSim.Server.Base; using OpenMetaverse; diff --git a/OpenSim/Services/Connectors/Friends/FriendsServicesConnector.cs b/OpenSim/Services/Connectors/Friends/FriendsServicesConnector.cs index 74851a94db..b7702a8ed0 100644 --- a/OpenSim/Services/Connectors/Friends/FriendsServicesConnector.cs +++ b/OpenSim/Services/Connectors/Friends/FriendsServicesConnector.cs @@ -33,7 +33,7 @@ using System.Reflection; using Nini.Config; using OpenSim.Framework; using OpenSim.Framework.ServiceAuth; -using OpenSim.Framework.Communications; + using OpenSim.Services.Interfaces; using FriendInfo = OpenSim.Services.Interfaces.FriendInfo; using OpenSim.Server.Base; diff --git a/OpenSim/Services/Connectors/Grid/GridServicesConnector.cs b/OpenSim/Services/Connectors/Grid/GridServicesConnector.cs index 9e553568bd..596f86715e 100644 --- a/OpenSim/Services/Connectors/Grid/GridServicesConnector.cs +++ b/OpenSim/Services/Connectors/Grid/GridServicesConnector.cs @@ -32,7 +32,7 @@ using System.IO; using System.Reflection; using Nini.Config; using OpenSim.Framework; -using OpenSim.Framework.Communications; + using OpenSim.Framework.ServiceAuth; using OpenSim.Services.Interfaces; using GridRegion = OpenSim.Services.Interfaces.GridRegion; diff --git a/OpenSim/Services/Connectors/GridUser/GridUserServicesConnector.cs b/OpenSim/Services/Connectors/GridUser/GridUserServicesConnector.cs index ffdd94aca8..b5ca1adb7a 100644 --- a/OpenSim/Services/Connectors/GridUser/GridUserServicesConnector.cs +++ b/OpenSim/Services/Connectors/GridUser/GridUserServicesConnector.cs @@ -32,7 +32,7 @@ using System.IO; using System.Reflection; using Nini.Config; using OpenSim.Framework; -using OpenSim.Framework.Communications; + using OpenSim.Framework.ServiceAuth; using OpenSim.Services.Interfaces; using GridRegion = OpenSim.Services.Interfaces.GridRegion; diff --git a/OpenSim/Services/Connectors/Inventory/XInventoryServicesConnector.cs b/OpenSim/Services/Connectors/Inventory/XInventoryServicesConnector.cs index b0615b8f3d..f235446ac9 100644 --- a/OpenSim/Services/Connectors/Inventory/XInventoryServicesConnector.cs +++ b/OpenSim/Services/Connectors/Inventory/XInventoryServicesConnector.cs @@ -33,7 +33,7 @@ using System.Reflection; using Nini.Config; using OpenSim.Framework; using OpenSim.Framework.Console; -using OpenSim.Framework.Communications; + using OpenSim.Framework.Monitoring; using OpenSim.Services.Interfaces; using OpenSim.Server.Base; diff --git a/OpenSim/Services/Connectors/Land/LandServicesConnector.cs b/OpenSim/Services/Connectors/Land/LandServicesConnector.cs index 644331acf6..034c42e94a 100644 --- a/OpenSim/Services/Connectors/Land/LandServicesConnector.cs +++ b/OpenSim/Services/Connectors/Land/LandServicesConnector.cs @@ -33,7 +33,7 @@ using System.IO; using System.Reflection; using Nini.Config; using OpenSim.Framework; -using OpenSim.Framework.Communications; + using OpenSim.Services.Interfaces; using OpenMetaverse; using Nwc.XmlRpc; diff --git a/OpenSim/Services/Connectors/MapImage/MapImageServicesConnector.cs b/OpenSim/Services/Connectors/MapImage/MapImageServicesConnector.cs index 677825e098..c91ed84932 100644 --- a/OpenSim/Services/Connectors/MapImage/MapImageServicesConnector.cs +++ b/OpenSim/Services/Connectors/MapImage/MapImageServicesConnector.cs @@ -35,7 +35,7 @@ using System.Reflection; using Nini.Config; using OpenSim.Framework; using OpenSim.Framework.Console; -using OpenSim.Framework.Communications; + using OpenSim.Framework.ServiceAuth; using OpenSim.Server.Base; using OpenSim.Services.Interfaces; diff --git a/OpenSim/Services/Connectors/Neighbour/NeighbourServicesConnector.cs b/OpenSim/Services/Connectors/Neighbour/NeighbourServicesConnector.cs index eecf096e2f..925364a8ea 100644 --- a/OpenSim/Services/Connectors/Neighbour/NeighbourServicesConnector.cs +++ b/OpenSim/Services/Connectors/Neighbour/NeighbourServicesConnector.cs @@ -35,7 +35,7 @@ using System.Reflection; using System.Text; using Nini.Config; using OpenSim.Framework; -using OpenSim.Framework.Communications; + using OpenSim.Services.Interfaces; using OpenMetaverse; using OpenMetaverse.StructuredData; diff --git a/OpenSim/Services/Connectors/Presence/PresenceServicesConnector.cs b/OpenSim/Services/Connectors/Presence/PresenceServicesConnector.cs index 63f3f37047..b7e95c43a9 100644 --- a/OpenSim/Services/Connectors/Presence/PresenceServicesConnector.cs +++ b/OpenSim/Services/Connectors/Presence/PresenceServicesConnector.cs @@ -32,7 +32,7 @@ using System.IO; using System.Reflection; using Nini.Config; using OpenSim.Framework; -using OpenSim.Framework.Communications; + using OpenSim.Framework.ServiceAuth; using OpenSim.Services.Interfaces; using GridRegion = OpenSim.Services.Interfaces.GridRegion; diff --git a/OpenSim/Services/Connectors/UserAccounts/UserAccountServicesConnector.cs b/OpenSim/Services/Connectors/UserAccounts/UserAccountServicesConnector.cs index 560e6c4c13..c21db549b9 100644 --- a/OpenSim/Services/Connectors/UserAccounts/UserAccountServicesConnector.cs +++ b/OpenSim/Services/Connectors/UserAccounts/UserAccountServicesConnector.cs @@ -32,7 +32,7 @@ using System.IO; using System.Reflection; using Nini.Config; using OpenSim.Framework; -using OpenSim.Framework.Communications; + using OpenSim.Framework.ServiceAuth; using OpenSim.Server.Base; using OpenSim.Services.Interfaces; diff --git a/OpenSim/Tests/Common/Helpers/EntityTransferHelpers.cs b/OpenSim/Tests/Common/Helpers/EntityTransferHelpers.cs index cf7583e3d4..b215f1e235 100644 --- a/OpenSim/Tests/Common/Helpers/EntityTransferHelpers.cs +++ b/OpenSim/Tests/Common/Helpers/EntityTransferHelpers.cs @@ -37,7 +37,7 @@ using Nini.Config; using NUnit.Framework; using OpenMetaverse; using OpenSim.Framework; -using OpenSim.Framework.Communications; + using OpenSim.Framework.Servers; using OpenSim.Region.Framework.Interfaces; using OpenSim.Region.Framework.Scenes; diff --git a/OpenSim/Tests/Common/Helpers/SceneHelpers.cs b/OpenSim/Tests/Common/Helpers/SceneHelpers.cs index 53509dc23e..df8b14ca2d 100644 --- a/OpenSim/Tests/Common/Helpers/SceneHelpers.cs +++ b/OpenSim/Tests/Common/Helpers/SceneHelpers.cs @@ -32,7 +32,7 @@ using Nini.Config; using OpenMetaverse; using OpenSim.Data.Null; using OpenSim.Framework; -using OpenSim.Framework.Communications; + using OpenSim.Framework.Console; using OpenSim.Framework.Servers; using OpenSim.Framework.Servers.HttpServer; diff --git a/OpenSim/Tests/Common/Helpers/UserAccountHelpers.cs b/OpenSim/Tests/Common/Helpers/UserAccountHelpers.cs index 2fbebc4ea9..c62b58eff0 100644 --- a/OpenSim/Tests/Common/Helpers/UserAccountHelpers.cs +++ b/OpenSim/Tests/Common/Helpers/UserAccountHelpers.cs @@ -27,7 +27,7 @@ using System.Collections.Generic; using OpenMetaverse; -using OpenSim.Framework.Communications; + using OpenSim.Region.Framework.Scenes; using OpenSim.Services.Interfaces; diff --git a/OpenSim/Tests/Common/Mock/TestScene.cs b/OpenSim/Tests/Common/Mock/TestScene.cs index 951f1035b6..1a93c9fef1 100644 --- a/OpenSim/Tests/Common/Mock/TestScene.cs +++ b/OpenSim/Tests/Common/Mock/TestScene.cs @@ -28,7 +28,7 @@ using System; using Nini.Config; using OpenSim.Framework; -using OpenSim.Framework.Communications; + using OpenSim.Framework.Servers; using OpenSim.Region.Framework; using OpenSim.Region.Framework.Interfaces; diff --git a/OpenSim/Tests/Performance/NPCPerformanceTests.cs b/OpenSim/Tests/Performance/NPCPerformanceTests.cs index e222dc2dfe..ca6ae42049 100644 --- a/OpenSim/Tests/Performance/NPCPerformanceTests.cs +++ b/OpenSim/Tests/Performance/NPCPerformanceTests.cs @@ -34,7 +34,7 @@ using Nini.Config; using NUnit.Framework; using OpenMetaverse; using OpenSim.Framework; -using OpenSim.Framework.Communications; + using OpenSim.Region.CoreModules.Avatar.Attachments; using OpenSim.Region.CoreModules.Avatar.AvatarFactory; using OpenSim.Region.CoreModules.Framework.InventoryAccess; diff --git a/prebuild.xml b/prebuild.xml index 00fc0c7066..e714abd860 100644 --- a/prebuild.xml +++ b/prebuild.xml @@ -107,6 +107,7 @@ + @@ -445,48 +446,6 @@ - - - - ../../../bin/ - - - - - ../../../bin/ - - - - ../../../bin/ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -538,7 +497,6 @@ - @@ -549,7 +507,6 @@ - @@ -562,8 +519,6 @@ - - @@ -716,7 +671,6 @@ - @@ -1404,7 +1358,6 @@ - @@ -1497,7 +1450,6 @@ - @@ -1517,7 +1469,6 @@ - @@ -1552,13 +1503,11 @@ - - @@ -1597,7 +1546,6 @@ - @@ -1616,7 +1564,6 @@ - @@ -1860,7 +1807,6 @@ - @@ -1970,7 +1916,6 @@ - @@ -2005,7 +1950,6 @@ - @@ -2158,7 +2102,6 @@ - @@ -2195,7 +2138,6 @@ - @@ -2232,7 +2174,6 @@ - @@ -2300,7 +2241,6 @@ - @@ -2340,7 +2280,6 @@ - @@ -2376,7 +2315,6 @@ - @@ -2437,7 +2375,6 @@ - @@ -2687,7 +2624,6 @@ - @@ -3016,7 +2952,6 @@ - @@ -3036,7 +2971,6 @@ - @@ -3095,7 +3029,6 @@ - @@ -3116,7 +3049,6 @@ - @@ -3161,7 +3093,6 @@ - @@ -3182,7 +3113,6 @@ - @@ -3223,7 +3153,6 @@ - @@ -3262,7 +3191,6 @@ - @@ -3293,7 +3221,6 @@ - @@ -3472,7 +3399,6 @@ - @@ -3512,7 +3438,6 @@ - From f9a7099abcc8bb2da81dc514adbe7803b14fcd6f Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Fri, 4 Sep 2015 15:12:36 -0700 Subject: [PATCH 19/32] Moved RegionCombinerModule to OptionalModules. Removed it as its own top-level project/dll. --- .../RegionCombinerClientEventForwarder.cs | 0 .../RegionCombinerIndividualEventForwarder.cs | 0 .../RegionCombinerLargeLandChannel.cs | 0 .../RegionCombinerModule.cs | 0 .../RegionCombinerPermissionModule.cs | 0 .../RegionCombinerModule/RegionConnections.cs | 0 .../RegionCourseLocation.cs | 0 .../RegionCombinerModule/RegionData.cs | 0 .../Properties/AssemblyInfo.cs | 36 ------------------- prebuild.xml | 36 ------------------- 10 files changed, 72 deletions(-) rename OpenSim/Region/{ => OptionalModules}/RegionCombinerModule/RegionCombinerClientEventForwarder.cs (100%) rename OpenSim/Region/{ => OptionalModules}/RegionCombinerModule/RegionCombinerIndividualEventForwarder.cs (100%) rename OpenSim/Region/{ => OptionalModules}/RegionCombinerModule/RegionCombinerLargeLandChannel.cs (100%) rename OpenSim/Region/{ => OptionalModules}/RegionCombinerModule/RegionCombinerModule.cs (100%) rename OpenSim/Region/{ => OptionalModules}/RegionCombinerModule/RegionCombinerPermissionModule.cs (100%) rename OpenSim/Region/{ => OptionalModules}/RegionCombinerModule/RegionConnections.cs (100%) rename OpenSim/Region/{ => OptionalModules}/RegionCombinerModule/RegionCourseLocation.cs (100%) rename OpenSim/Region/{ => OptionalModules}/RegionCombinerModule/RegionData.cs (100%) delete mode 100644 OpenSim/Region/RegionCombinerModule/Properties/AssemblyInfo.cs diff --git a/OpenSim/Region/RegionCombinerModule/RegionCombinerClientEventForwarder.cs b/OpenSim/Region/OptionalModules/RegionCombinerModule/RegionCombinerClientEventForwarder.cs similarity index 100% rename from OpenSim/Region/RegionCombinerModule/RegionCombinerClientEventForwarder.cs rename to OpenSim/Region/OptionalModules/RegionCombinerModule/RegionCombinerClientEventForwarder.cs diff --git a/OpenSim/Region/RegionCombinerModule/RegionCombinerIndividualEventForwarder.cs b/OpenSim/Region/OptionalModules/RegionCombinerModule/RegionCombinerIndividualEventForwarder.cs similarity index 100% rename from OpenSim/Region/RegionCombinerModule/RegionCombinerIndividualEventForwarder.cs rename to OpenSim/Region/OptionalModules/RegionCombinerModule/RegionCombinerIndividualEventForwarder.cs diff --git a/OpenSim/Region/RegionCombinerModule/RegionCombinerLargeLandChannel.cs b/OpenSim/Region/OptionalModules/RegionCombinerModule/RegionCombinerLargeLandChannel.cs similarity index 100% rename from OpenSim/Region/RegionCombinerModule/RegionCombinerLargeLandChannel.cs rename to OpenSim/Region/OptionalModules/RegionCombinerModule/RegionCombinerLargeLandChannel.cs diff --git a/OpenSim/Region/RegionCombinerModule/RegionCombinerModule.cs b/OpenSim/Region/OptionalModules/RegionCombinerModule/RegionCombinerModule.cs similarity index 100% rename from OpenSim/Region/RegionCombinerModule/RegionCombinerModule.cs rename to OpenSim/Region/OptionalModules/RegionCombinerModule/RegionCombinerModule.cs diff --git a/OpenSim/Region/RegionCombinerModule/RegionCombinerPermissionModule.cs b/OpenSim/Region/OptionalModules/RegionCombinerModule/RegionCombinerPermissionModule.cs similarity index 100% rename from OpenSim/Region/RegionCombinerModule/RegionCombinerPermissionModule.cs rename to OpenSim/Region/OptionalModules/RegionCombinerModule/RegionCombinerPermissionModule.cs diff --git a/OpenSim/Region/RegionCombinerModule/RegionConnections.cs b/OpenSim/Region/OptionalModules/RegionCombinerModule/RegionConnections.cs similarity index 100% rename from OpenSim/Region/RegionCombinerModule/RegionConnections.cs rename to OpenSim/Region/OptionalModules/RegionCombinerModule/RegionConnections.cs diff --git a/OpenSim/Region/RegionCombinerModule/RegionCourseLocation.cs b/OpenSim/Region/OptionalModules/RegionCombinerModule/RegionCourseLocation.cs similarity index 100% rename from OpenSim/Region/RegionCombinerModule/RegionCourseLocation.cs rename to OpenSim/Region/OptionalModules/RegionCombinerModule/RegionCourseLocation.cs diff --git a/OpenSim/Region/RegionCombinerModule/RegionData.cs b/OpenSim/Region/OptionalModules/RegionCombinerModule/RegionData.cs similarity index 100% rename from OpenSim/Region/RegionCombinerModule/RegionData.cs rename to OpenSim/Region/OptionalModules/RegionCombinerModule/RegionData.cs diff --git a/OpenSim/Region/RegionCombinerModule/Properties/AssemblyInfo.cs b/OpenSim/Region/RegionCombinerModule/Properties/AssemblyInfo.cs deleted file mode 100644 index 11b89d2e03..0000000000 --- a/OpenSim/Region/RegionCombinerModule/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,36 +0,0 @@ -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using Mono.Addins; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("OpenSim.Region.RegionCombinerModule")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("http://opensimulator.org")] -[assembly: AssemblyProduct("OpenSim")] -[assembly: AssemblyCopyright("OpenSimulator developers")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] - -// The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("73c166d2-c9d8-4ab8-af4e-89c41b4b58a9")] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -[assembly: AssemblyVersion("0.8.2.*")] - -[assembly: Addin("OpenSim.RegionModules.RegionCombinerModule", OpenSim.VersionInfo.VersionNumber)] -[assembly: AddinDependency("OpenSim.Region.Framework", OpenSim.VersionInfo.VersionNumber)] diff --git a/prebuild.xml b/prebuild.xml index e714abd860..d46d178cf3 100644 --- a/prebuild.xml +++ b/prebuild.xml @@ -1485,42 +1485,6 @@ - - - - ../../../bin/ - - - - - ../../../bin/ - - - - ../../../bin/ - - - - - - - - - - - - - - - - - - - - - - - From 49d19e36507a01c657e9e9efb3edbfb5b15ddfa8 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Fri, 4 Sep 2015 15:17:53 -0700 Subject: [PATCH 20/32] Moved DataSnapshot feature to OptionalModules too. --- .../DataSnapshot/Properties/AssemblyInfo.cs | 33 ----------------- .../DataSnapshot/DataRequestHandler.cs | 0 .../DataSnapshot/DataSnapshotManager.cs | 3 -- .../DataSnapshot/EstateSnapshot.cs | 0 .../DataSnapshot/Interfaces/IDataSnapshot.cs | 0 .../Interfaces/IDataSnapshotProvider.cs | 0 .../DataSnapshot/LLSDDiscovery.cs | 0 .../DataSnapshot/LandSnapshot.cs | 0 .../DataSnapshot/ObjectSnapshot.cs | 0 .../DataSnapshot/SnapshotStore.cs | 0 prebuild.xml | 35 ------------------- 11 files changed, 71 deletions(-) delete mode 100644 OpenSim/Region/DataSnapshot/Properties/AssemblyInfo.cs rename OpenSim/Region/{ => OptionalModules}/DataSnapshot/DataRequestHandler.cs (100%) rename OpenSim/Region/{ => OptionalModules}/DataSnapshot/DataSnapshotManager.cs (99%) rename OpenSim/Region/{ => OptionalModules}/DataSnapshot/EstateSnapshot.cs (100%) rename OpenSim/Region/{ => OptionalModules}/DataSnapshot/Interfaces/IDataSnapshot.cs (100%) rename OpenSim/Region/{ => OptionalModules}/DataSnapshot/Interfaces/IDataSnapshotProvider.cs (100%) rename OpenSim/Region/{ => OptionalModules}/DataSnapshot/LLSDDiscovery.cs (100%) rename OpenSim/Region/{ => OptionalModules}/DataSnapshot/LandSnapshot.cs (100%) rename OpenSim/Region/{ => OptionalModules}/DataSnapshot/ObjectSnapshot.cs (100%) rename OpenSim/Region/{ => OptionalModules}/DataSnapshot/SnapshotStore.cs (100%) diff --git a/OpenSim/Region/DataSnapshot/Properties/AssemblyInfo.cs b/OpenSim/Region/DataSnapshot/Properties/AssemblyInfo.cs deleted file mode 100644 index e60d3ae0a0..0000000000 --- a/OpenSim/Region/DataSnapshot/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,33 +0,0 @@ -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("OpenSim.Region.DataSnapshot")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("http://opensimulator.org")] -[assembly: AssemblyProduct("OpenSim")] -[assembly: AssemblyCopyright("OpenSimulator developers")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] - -// The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("06c36944-a28d-470e-912c-654c3edaba6b")] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -[assembly: AssemblyVersion("0.8.2.*")] - diff --git a/OpenSim/Region/DataSnapshot/DataRequestHandler.cs b/OpenSim/Region/OptionalModules/DataSnapshot/DataRequestHandler.cs similarity index 100% rename from OpenSim/Region/DataSnapshot/DataRequestHandler.cs rename to OpenSim/Region/OptionalModules/DataSnapshot/DataRequestHandler.cs diff --git a/OpenSim/Region/DataSnapshot/DataSnapshotManager.cs b/OpenSim/Region/OptionalModules/DataSnapshot/DataSnapshotManager.cs similarity index 99% rename from OpenSim/Region/DataSnapshot/DataSnapshotManager.cs rename to OpenSim/Region/OptionalModules/DataSnapshot/DataSnapshotManager.cs index d5ae83ee3b..0c3446d56e 100644 --- a/OpenSim/Region/DataSnapshot/DataSnapshotManager.cs +++ b/OpenSim/Region/OptionalModules/DataSnapshot/DataSnapshotManager.cs @@ -43,9 +43,6 @@ using OpenSim.Region.DataSnapshot.Interfaces; using OpenSim.Region.Framework.Interfaces; using OpenSim.Region.Framework.Scenes; -[assembly: Addin("DataSnapshot", OpenSim.VersionInfo.VersionNumber)] -[assembly: AddinDependency("OpenSim.Region.Framework", OpenSim.VersionInfo.VersionNumber)] - namespace OpenSim.Region.DataSnapshot { [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "DataSnapshotManager")] diff --git a/OpenSim/Region/DataSnapshot/EstateSnapshot.cs b/OpenSim/Region/OptionalModules/DataSnapshot/EstateSnapshot.cs similarity index 100% rename from OpenSim/Region/DataSnapshot/EstateSnapshot.cs rename to OpenSim/Region/OptionalModules/DataSnapshot/EstateSnapshot.cs diff --git a/OpenSim/Region/DataSnapshot/Interfaces/IDataSnapshot.cs b/OpenSim/Region/OptionalModules/DataSnapshot/Interfaces/IDataSnapshot.cs similarity index 100% rename from OpenSim/Region/DataSnapshot/Interfaces/IDataSnapshot.cs rename to OpenSim/Region/OptionalModules/DataSnapshot/Interfaces/IDataSnapshot.cs diff --git a/OpenSim/Region/DataSnapshot/Interfaces/IDataSnapshotProvider.cs b/OpenSim/Region/OptionalModules/DataSnapshot/Interfaces/IDataSnapshotProvider.cs similarity index 100% rename from OpenSim/Region/DataSnapshot/Interfaces/IDataSnapshotProvider.cs rename to OpenSim/Region/OptionalModules/DataSnapshot/Interfaces/IDataSnapshotProvider.cs diff --git a/OpenSim/Region/DataSnapshot/LLSDDiscovery.cs b/OpenSim/Region/OptionalModules/DataSnapshot/LLSDDiscovery.cs similarity index 100% rename from OpenSim/Region/DataSnapshot/LLSDDiscovery.cs rename to OpenSim/Region/OptionalModules/DataSnapshot/LLSDDiscovery.cs diff --git a/OpenSim/Region/DataSnapshot/LandSnapshot.cs b/OpenSim/Region/OptionalModules/DataSnapshot/LandSnapshot.cs similarity index 100% rename from OpenSim/Region/DataSnapshot/LandSnapshot.cs rename to OpenSim/Region/OptionalModules/DataSnapshot/LandSnapshot.cs diff --git a/OpenSim/Region/DataSnapshot/ObjectSnapshot.cs b/OpenSim/Region/OptionalModules/DataSnapshot/ObjectSnapshot.cs similarity index 100% rename from OpenSim/Region/DataSnapshot/ObjectSnapshot.cs rename to OpenSim/Region/OptionalModules/DataSnapshot/ObjectSnapshot.cs diff --git a/OpenSim/Region/DataSnapshot/SnapshotStore.cs b/OpenSim/Region/OptionalModules/DataSnapshot/SnapshotStore.cs similarity index 100% rename from OpenSim/Region/DataSnapshot/SnapshotStore.cs rename to OpenSim/Region/OptionalModules/DataSnapshot/SnapshotStore.cs diff --git a/prebuild.xml b/prebuild.xml index d46d178cf3..f47e237a47 100644 --- a/prebuild.xml +++ b/prebuild.xml @@ -1895,41 +1895,6 @@ - - - - ../../../bin/ - - - - - ../../../bin/ - - - - ../../../bin/ - - - - - - - - - - - - - - - - - - - - - - From a32187f53a1e72c2bc6c503085c35211e922a4f7 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Fri, 4 Sep 2015 15:28:51 -0700 Subject: [PATCH 21/32] Moved UserStatistics feature to OptionalModules too. --- .../UserStatistics/ActiveConnectionsAJAX.cs | 0 .../UserStatistics/Clients_report.cs | 0 .../UserStatistics/Default_Report.cs | 0 .../UserStatistics/HTMLUtil.cs | 0 .../UserStatistics/IStatsReport.cs | 0 .../UserStatistics/LogLinesAJAX.cs | 0 .../UserStatistics/Prototype_distributor.cs | 0 .../UserStatistics/Sessions_Report.cs | 0 .../UserStatistics/SimStatsAJAX.cs | 0 .../UserStatistics/Updater_distributor.cs | 0 .../UserStatistics/WebStatsModule.cs | 3 -- .../UserStatistics/Properties/AssemblyInfo.cs | 33 ------------ prebuild.xml | 50 +------------------ 13 files changed, 2 insertions(+), 84 deletions(-) rename OpenSim/Region/{ => OptionalModules}/UserStatistics/ActiveConnectionsAJAX.cs (100%) rename OpenSim/Region/{ => OptionalModules}/UserStatistics/Clients_report.cs (100%) rename OpenSim/Region/{ => OptionalModules}/UserStatistics/Default_Report.cs (100%) rename OpenSim/Region/{ => OptionalModules}/UserStatistics/HTMLUtil.cs (100%) rename OpenSim/Region/{ => OptionalModules}/UserStatistics/IStatsReport.cs (100%) rename OpenSim/Region/{ => OptionalModules}/UserStatistics/LogLinesAJAX.cs (100%) rename OpenSim/Region/{ => OptionalModules}/UserStatistics/Prototype_distributor.cs (100%) rename OpenSim/Region/{ => OptionalModules}/UserStatistics/Sessions_Report.cs (100%) rename OpenSim/Region/{ => OptionalModules}/UserStatistics/SimStatsAJAX.cs (100%) rename OpenSim/Region/{ => OptionalModules}/UserStatistics/Updater_distributor.cs (100%) rename OpenSim/Region/{ => OptionalModules}/UserStatistics/WebStatsModule.cs (99%) delete mode 100644 OpenSim/Region/UserStatistics/Properties/AssemblyInfo.cs diff --git a/OpenSim/Region/UserStatistics/ActiveConnectionsAJAX.cs b/OpenSim/Region/OptionalModules/UserStatistics/ActiveConnectionsAJAX.cs similarity index 100% rename from OpenSim/Region/UserStatistics/ActiveConnectionsAJAX.cs rename to OpenSim/Region/OptionalModules/UserStatistics/ActiveConnectionsAJAX.cs diff --git a/OpenSim/Region/UserStatistics/Clients_report.cs b/OpenSim/Region/OptionalModules/UserStatistics/Clients_report.cs similarity index 100% rename from OpenSim/Region/UserStatistics/Clients_report.cs rename to OpenSim/Region/OptionalModules/UserStatistics/Clients_report.cs diff --git a/OpenSim/Region/UserStatistics/Default_Report.cs b/OpenSim/Region/OptionalModules/UserStatistics/Default_Report.cs similarity index 100% rename from OpenSim/Region/UserStatistics/Default_Report.cs rename to OpenSim/Region/OptionalModules/UserStatistics/Default_Report.cs diff --git a/OpenSim/Region/UserStatistics/HTMLUtil.cs b/OpenSim/Region/OptionalModules/UserStatistics/HTMLUtil.cs similarity index 100% rename from OpenSim/Region/UserStatistics/HTMLUtil.cs rename to OpenSim/Region/OptionalModules/UserStatistics/HTMLUtil.cs diff --git a/OpenSim/Region/UserStatistics/IStatsReport.cs b/OpenSim/Region/OptionalModules/UserStatistics/IStatsReport.cs similarity index 100% rename from OpenSim/Region/UserStatistics/IStatsReport.cs rename to OpenSim/Region/OptionalModules/UserStatistics/IStatsReport.cs diff --git a/OpenSim/Region/UserStatistics/LogLinesAJAX.cs b/OpenSim/Region/OptionalModules/UserStatistics/LogLinesAJAX.cs similarity index 100% rename from OpenSim/Region/UserStatistics/LogLinesAJAX.cs rename to OpenSim/Region/OptionalModules/UserStatistics/LogLinesAJAX.cs diff --git a/OpenSim/Region/UserStatistics/Prototype_distributor.cs b/OpenSim/Region/OptionalModules/UserStatistics/Prototype_distributor.cs similarity index 100% rename from OpenSim/Region/UserStatistics/Prototype_distributor.cs rename to OpenSim/Region/OptionalModules/UserStatistics/Prototype_distributor.cs diff --git a/OpenSim/Region/UserStatistics/Sessions_Report.cs b/OpenSim/Region/OptionalModules/UserStatistics/Sessions_Report.cs similarity index 100% rename from OpenSim/Region/UserStatistics/Sessions_Report.cs rename to OpenSim/Region/OptionalModules/UserStatistics/Sessions_Report.cs diff --git a/OpenSim/Region/UserStatistics/SimStatsAJAX.cs b/OpenSim/Region/OptionalModules/UserStatistics/SimStatsAJAX.cs similarity index 100% rename from OpenSim/Region/UserStatistics/SimStatsAJAX.cs rename to OpenSim/Region/OptionalModules/UserStatistics/SimStatsAJAX.cs diff --git a/OpenSim/Region/UserStatistics/Updater_distributor.cs b/OpenSim/Region/OptionalModules/UserStatistics/Updater_distributor.cs similarity index 100% rename from OpenSim/Region/UserStatistics/Updater_distributor.cs rename to OpenSim/Region/OptionalModules/UserStatistics/Updater_distributor.cs diff --git a/OpenSim/Region/UserStatistics/WebStatsModule.cs b/OpenSim/Region/OptionalModules/UserStatistics/WebStatsModule.cs similarity index 99% rename from OpenSim/Region/UserStatistics/WebStatsModule.cs rename to OpenSim/Region/OptionalModules/UserStatistics/WebStatsModule.cs index 13832084a9..bcb63617e3 100644 --- a/OpenSim/Region/UserStatistics/WebStatsModule.cs +++ b/OpenSim/Region/OptionalModules/UserStatistics/WebStatsModule.cs @@ -50,9 +50,6 @@ using Caps = OpenSim.Framework.Capabilities.Caps; using OSD = OpenMetaverse.StructuredData.OSD; using OSDMap = OpenMetaverse.StructuredData.OSDMap; -[assembly: Addin("WebStats", OpenSim.VersionInfo.VersionNumber)] -[assembly: AddinDependency("OpenSim.Region.Framework", OpenSim.VersionInfo.VersionNumber)] - namespace OpenSim.Region.UserStatistics { [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "WebStatsModule")] diff --git a/OpenSim/Region/UserStatistics/Properties/AssemblyInfo.cs b/OpenSim/Region/UserStatistics/Properties/AssemblyInfo.cs deleted file mode 100644 index 9fac53e12c..0000000000 --- a/OpenSim/Region/UserStatistics/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,33 +0,0 @@ -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("OpenSim.Region.UserStatistics")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("http://opensimulator.org")] -[assembly: AssemblyProduct("OpenSim")] -[assembly: AssemblyCopyright("OpenSimulator developers")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] - -// The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("42b28288-5fdd-478f-8903-8dccbbb2d5f9")] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -[assembly: AssemblyVersion("0.8.2.*")] - diff --git a/prebuild.xml b/prebuild.xml index f47e237a47..0daf6a403f 100644 --- a/prebuild.xml +++ b/prebuild.xml @@ -1500,6 +1500,7 @@ ../../../bin/ + @@ -1508,6 +1509,7 @@ + @@ -2267,54 +2269,6 @@ - - - - ../../../bin/ - - - - - ../../../bin/ - - - - ../../../bin/ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - From d7f22fb2cca6f8b682e9a4de26265ea3d1762e45 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Fri, 4 Sep 2015 15:48:59 -0700 Subject: [PATCH 22/32] POSScene wasn't really a region module. Fixed now. --- OpenSim/Region/PhysicsModules/POS/POSScene.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OpenSim/Region/PhysicsModules/POS/POSScene.cs b/OpenSim/Region/PhysicsModules/POS/POSScene.cs index f47d245015..6375f18a96 100644 --- a/OpenSim/Region/PhysicsModules/POS/POSScene.cs +++ b/OpenSim/Region/PhysicsModules/POS/POSScene.cs @@ -38,7 +38,7 @@ using OpenSim.Region.Framework.Interfaces; namespace OpenSim.Region.PhysicsModule.POS { [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "POSPhysicsScene")] - public class POSScene : PhysicsScene + public class POSScene : PhysicsScene, INonSharedRegionModule { private List _characters = new List(); private List _prims = new List(); From 2210c5807f9d75eab87098c7d2c49d67543043e3 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Fri, 4 Sep 2015 16:33:07 -0700 Subject: [PATCH 23/32] Fixes a problem with Bullet physics when it is configured to run on a separate thread. --- OpenSim/Region/PhysicsModules/BulletS/BSScene.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/OpenSim/Region/PhysicsModules/BulletS/BSScene.cs b/OpenSim/Region/PhysicsModules/BulletS/BSScene.cs index db4d3cf72d..452ce55509 100644 --- a/OpenSim/Region/PhysicsModules/BulletS/BSScene.cs +++ b/OpenSim/Region/PhysicsModules/BulletS/BSScene.cs @@ -270,6 +270,8 @@ namespace OpenSim.Region.PhysicsModule.BulletS mesher = scene.RequestModuleInterface(); if (mesher == null) m_log.WarnFormat("{0} No mesher. Things will not work well.", LogHeader); + + scene.PhysicsEnabled = true; } #endregion From 4b0dc6253cf6c8e1c30f930aa062dac47487fd52 Mon Sep 17 00:00:00 2001 From: dahlia Date: Sat, 5 Sep 2015 01:58:59 -0700 Subject: [PATCH 24/32] Best wishes everyone! --- CONTRIBUTORS.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CONTRIBUTORS.txt b/CONTRIBUTORS.txt index e14e5efcc1..41c22b8436 100644 --- a/CONTRIBUTORS.txt +++ b/CONTRIBUTORS.txt @@ -4,8 +4,7 @@ The following people have contributed to OpenSim (Thank you for your effort!) These folks represent the current core team for OpenSim, and are the people that make the day to day of OpenSim happen. -* justincc (OSVW Consulting, justincc.org) -* dahlia +* justincc (OSVW Consulting, justincc.org) * Melanie Thielker * Diva (Crista Lopes, University of California, Irvine) * BlueWall (James Hughes) @@ -56,6 +55,7 @@ where we are today. * nlin (3Di) * John Hurliman * chi11ken (Genkii) +* dahlia = Additional OpenSim Contributors = From 13b1c5dfcef6e6e74709da8d588ed48d99d560d2 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Sat, 5 Sep 2015 17:50:55 +0100 Subject: [PATCH 25/32] let ode suport var size regions Signed-off-by: Diva Canto --- .../Ode/ODERayCastRequestManager.cs | 7 + OpenSim/Region/PhysicsModules/Ode/OdeScene.cs | 290 +++++++++--------- 2 files changed, 144 insertions(+), 153 deletions(-) diff --git a/OpenSim/Region/PhysicsModules/Ode/ODERayCastRequestManager.cs b/OpenSim/Region/PhysicsModules/Ode/ODERayCastRequestManager.cs index 21bfea3eff..aafc7c6a46 100644 --- a/OpenSim/Region/PhysicsModules/Ode/ODERayCastRequestManager.cs +++ b/OpenSim/Region/PhysicsModules/Ode/ODERayCastRequestManager.cs @@ -172,6 +172,13 @@ namespace OpenSim.Region.PhysicsModule.ODE /// private void RayCast(ODERayCastRequest req) { + // UBIT: limit ray lenght or collisions will take all avaiable stack space + // this value may still be too large, depending on machine configuration + // of maximum stack + float len = req.length; + if (len > 250f) + len = 250f; + // Create the ray IntPtr ray = d.CreateRay(m_scene.space, req.length); d.GeomRaySet(ray, req.Origin.X, req.Origin.Y, req.Origin.Z, req.Normal.X, req.Normal.Y, req.Normal.Z); diff --git a/OpenSim/Region/PhysicsModules/Ode/OdeScene.cs b/OpenSim/Region/PhysicsModules/Ode/OdeScene.cs index f49b0f74e8..19b957f11d 100644 --- a/OpenSim/Region/PhysicsModules/Ode/OdeScene.cs +++ b/OpenSim/Region/PhysicsModules/Ode/OdeScene.cs @@ -25,6 +25,12 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +// Ubit changes for varsize regions +// note that raycasts need to have limited range +// (even in normal regions) +// or aplication thread stack may just blowup +// see RayCast(ODERayCastRequest req) + //#define USE_DRAWSTUFF //#define SPAM @@ -270,8 +276,10 @@ namespace OpenSim.Region.PhysicsModule.ODE private Random fluidRandomizer = new Random(Environment.TickCount); - private const uint m_regionWidth = Constants.RegionSize; - private const uint m_regionHeight = Constants.RegionSize; + public bool m_suportCombine = true; + + private uint m_regionWidth = Constants.RegionSize; + private uint m_regionHeight = Constants.RegionSize; private float ODE_STEPSIZE = 0.0178f; private float metersInSpace = 29.9f; @@ -297,7 +305,7 @@ namespace OpenSim.Region.PhysicsModule.ODE private IntPtr contactgroup; - internal IntPtr WaterGeom; +// internal IntPtr WaterGeom; private float nmTerrainContactFriction = 255.0f; private float nmTerrainContactBounce = 0.1f; @@ -514,17 +522,17 @@ namespace OpenSim.Region.PhysicsModule.ODE public d.Vector3 xyz = new d.Vector3(128.1640f, 128.3079f, 25.7600f); public d.Vector3 hpr = new d.Vector3(125.5000f, -17.0000f, 0.0000f); - // TODO: unused: private uint heightmapWidth = m_regionWidth + 1; - // TODO: unused: private uint heightmapHeight = m_regionHeight + 1; - // TODO: unused: private uint heightmapWidthSamples; - // TODO: unused: private uint heightmapHeightSamples; - private volatile int m_global_contactcount = 0; private Vector3 m_worldOffset = Vector3.Zero; public Vector2 WorldExtents = new Vector2((int)Constants.RegionSize, (int)Constants.RegionSize); private PhysicsScene m_parentScene = null; + float spacesPerMeterX; + float spacesPerMeterY; + int spaceGridMaxX; + int spaceGridMaxY; + private ODERayCastRequestManager m_rayCastManager; @@ -583,10 +591,12 @@ namespace OpenSim.Region.PhysicsModule.ODE scene.RegisterModuleInterface(this); Vector3 extent = new Vector3(scene.RegionInfo.RegionSizeX, scene.RegionInfo.RegionSizeY, scene.RegionInfo.RegionSizeZ); - Initialise(); + Initialise(extent); InitialiseFromConfig(m_config); + + // This may not be that good since terrain may not be avaiable at this point base.Initialise(scene.PhysicsRequestAsset, - (scene.Heightmap != null ? scene.Heightmap.GetFloatsSerialised() : new float[Constants.RegionSize * Constants.RegionSize]), + (scene.Heightmap != null ? scene.Heightmap.GetFloatsSerialised() : new float[(int)(extent.X * extent.Y)]), (float)scene.RegionInfo.RegionSettings.WaterHeight); } @@ -613,8 +623,15 @@ namespace OpenSim.Region.PhysicsModule.ODE /// Sets many properties that ODE requires to be stable /// These settings need to be tweaked 'exactly' right or weird stuff happens. /// - private void Initialise() + private void Initialise(Vector3 regionExtent) { + WorldExtents.X = regionExtent.X; + m_regionWidth = (uint)regionExtent.X; + WorldExtents.Y = regionExtent.Y; + m_regionHeight = (uint)regionExtent.Y; + + m_suportCombine = false; + nearCallback = near; triCallback = TriCallback; triArrayCallback = TriArrayCallback; @@ -633,7 +650,7 @@ namespace OpenSim.Region.PhysicsModule.ODE viewthread.Start(); #endif - _watermap = new float[258 * 258]; + // _watermap = new float[258 * 258]; // Zero out the prim spaces array (we split our space into smaller spaces so // we can hit test less. @@ -780,7 +797,31 @@ namespace OpenSim.Region.PhysicsModule.ODE contacts = new d.ContactGeom[contactsPerCollision]; - staticPrimspace = new IntPtr[(int)(300 / metersInSpace), (int)(300 / metersInSpace)]; + spacesPerMeterX = 1.0f / metersInSpace; + spacesPerMeterY = 1.0f / metersInSpace; + + spaceGridMaxX = (int)(WorldExtents.X * spacesPerMeterX); + spaceGridMaxY = (int)(WorldExtents.Y * spacesPerMeterY); + + // ubit: limit number of spaces + if (spaceGridMaxX > 24) + { + spaceGridMaxX = 24; + spacesPerMeterX = spaceGridMaxX / WorldExtents.X; + } + if (spaceGridMaxY > 24) + { + spaceGridMaxY = 24; + spacesPerMeterY = spaceGridMaxY / WorldExtents.Y ; + } + + staticPrimspace = new IntPtr[spaceGridMaxX, spaceGridMaxY]; + + // make this index limits + spaceGridMaxX--; + spaceGridMaxY--; + + // Centeral contact friction and bounce // ckrinke 11/10/08 Enabling soft_erp but not soft_cfm until I figure out why @@ -1964,6 +2005,8 @@ namespace OpenSim.Region.PhysicsModule.ODE public override void Combine(PhysicsScene pScene, Vector3 offset, Vector3 extents) { + if (!m_suportCombine) + return; m_worldOffset = offset; WorldExtents = new Vector2(extents.X, extents.Y); m_parentScene = pScene; @@ -1972,12 +2015,17 @@ namespace OpenSim.Region.PhysicsModule.ODE // Recovered for use by fly height. Kitto Flora internal float GetTerrainHeightAtXY(float x, float y) { - int offsetX = ((int)(x / (int)Constants.RegionSize)) * (int)Constants.RegionSize; - int offsetY = ((int)(y / (int)Constants.RegionSize)) * (int)Constants.RegionSize; - IntPtr heightFieldGeom = IntPtr.Zero; + int offsetX = 0; + int offsetY = 0; - if (RegionTerrain.TryGetValue(new Vector3(offsetX,offsetY,0), out heightFieldGeom)) + if (m_suportCombine) + { + offsetX = ((int)(x / (int)Constants.RegionSize)) * (int)Constants.RegionSize; + offsetY = ((int)(y / (int)Constants.RegionSize)) * (int)Constants.RegionSize; + } + + if(RegionTerrain.TryGetValue(new Vector3(offsetX,offsetY,0), out heightFieldGeom)) { if (heightFieldGeom != IntPtr.Zero) { @@ -1991,8 +2039,8 @@ namespace OpenSim.Region.PhysicsModule.ODE (int)x < 0.001f || (int)y < 0.001f) return 0; - x = x - offsetX; - y = y - offsetY; + x = x - offsetX + 1f; + y = y - offsetY + 1f; index = (int)((int)x * ((int)Constants.RegionSize + 2) + (int)y); @@ -2828,16 +2876,16 @@ namespace OpenSim.Region.PhysicsModule.ODE { int[] returnint = new int[2]; - returnint[0] = (int) (pos.X/metersInSpace); + returnint[0] = (int) (pos.X * spacesPerMeterX); - if (returnint[0] > ((int) (259f/metersInSpace))) - returnint[0] = ((int) (259f/metersInSpace)); + if (returnint[0] > spaceGridMaxX) + returnint[0] = spaceGridMaxX; if (returnint[0] < 0) returnint[0] = 0; - returnint[1] = (int) (pos.Y/metersInSpace); - if (returnint[1] > ((int) (259f/metersInSpace))) - returnint[1] = ((int) (259f/metersInSpace)); + returnint[1] = (int)(pos.Y * spacesPerMeterY); + if (returnint[1] > spaceGridMaxY) + returnint[1] = spaceGridMaxY; if (returnint[1] < 0) returnint[1] = 0; @@ -3591,6 +3639,7 @@ namespace OpenSim.Region.PhysicsModule.ODE get { return false; } } +/* godd try.. but not a fix #region ODE Specific Terrain Fixes private float[] ResizeTerrain512NearestNeighbour(float[] heightMap) { @@ -3857,7 +3906,7 @@ namespace OpenSim.Region.PhysicsModule.ODE } #endregion - +*/ public override void SetTerrain(float[] heightMap) { if (m_worldOffset != Vector3.Zero && m_parentScene != null) @@ -3878,71 +3927,65 @@ namespace OpenSim.Region.PhysicsModule.ODE int startTime = Util.EnvironmentTickCount(); m_log.DebugFormat("[ODE SCENE]: Setting terrain for {0} with offset {1}", PhysicsSceneName, pOffset); - // this._heightmap[i] = (double)heightMap[i]; - // dbm (danx0r) -- creating a buffer zone of one extra sample all around - //_origheightmap = heightMap; - + float[] _heightmap; - // zero out a heightmap array float array (single dimension [flattened])) - //if ((int)Constants.RegionSize == 256) - // _heightmap = new float[514 * 514]; - //else + // ok im lasy this are just a aliases + uint regionsizeX = m_regionWidth; + uint regionsizeY = m_regionHeight; - _heightmap = new float[(((int)Constants.RegionSize + 2) * ((int)Constants.RegionSize + 2))]; + // map is rotated + uint heightmapWidth = regionsizeY + 2; + uint heightmapHeight = regionsizeX + 2; - uint heightmapWidth = Constants.RegionSize + 1; - uint heightmapHeight = Constants.RegionSize + 1; + uint heightmapWidthSamples = heightmapWidth + 1; + uint heightmapHeightSamples = heightmapHeight + 1; - uint heightmapWidthSamples; + _heightmap = new float[heightmapWidthSamples * heightmapHeightSamples]; - uint heightmapHeightSamples; - - //if (((int)Constants.RegionSize) == 256) - //{ - // heightmapWidthSamples = 2 * (uint)Constants.RegionSize + 2; - // heightmapHeightSamples = 2 * (uint)Constants.RegionSize + 2; - // heightmapWidth++; - // heightmapHeight++; - //} - //else - //{ - - heightmapWidthSamples = (uint)Constants.RegionSize + 1; - heightmapHeightSamples = (uint)Constants.RegionSize + 1; - //} const float scale = 1.0f; const float offset = 0.0f; - const float thickness = 0.2f; + const float thickness = 10f; const int wrap = 0; - int regionsize = (int) Constants.RegionSize + 2; - //Double resolution - //if (((int)Constants.RegionSize) == 256) - // heightMap = ResizeTerrain512Interpolation(heightMap); + + float hfmin = float.MaxValue; + float hfmax = float.MinValue; + float val; + uint xx; + uint yy; + + uint maxXX = regionsizeX - 1; + uint maxYY = regionsizeY - 1; + + // flipping map adding one margin all around so things don't fall in edges + + uint xt = 0; + xx = 0; - // if (((int)Constants.RegionSize) == 256 && (int)Constants.RegionSize == 256) - // regionsize = 512; - - float hfmin = 2000; - float hfmax = -2000; - - for (int x = 0; x < heightmapWidthSamples; x++) + for (uint x = 0; x < heightmapWidthSamples; x++) { - for (int y = 0; y < heightmapHeightSamples; y++) + if (x > 1 && xx < maxXX) + xx++; + yy = 0; + for (uint y = 0; y < heightmapHeightSamples; y++) { - int xx = Util.Clip(x - 1, 0, regionsize - 1); - int yy = Util.Clip(y - 1, 0, regionsize - 1); - - - float val= heightMap[yy * (int)Constants.RegionSize + xx]; - _heightmap[x * ((int)Constants.RegionSize + 2) + y] = val; - - hfmin = (val < hfmin) ? val : hfmin; - hfmax = (val > hfmax) ? val : hfmax; + if (y > 1 && y < maxYY) + yy += regionsizeX; + + val = heightMap[yy + xx]; + if (val < 0.0f) + val = 0.0f; + _heightmap[xt + y] = val; + + if (hfmin > val) + hfmin = val; + if (hfmax < val) + hfmax = val; } + xt += heightmapHeightSamples; } lock (OdeLock) @@ -3963,9 +4006,10 @@ namespace OpenSim.Region.PhysicsModule.ODE } IntPtr HeightmapData = d.GeomHeightfieldDataCreate(); - d.GeomHeightfieldDataBuildSingle(HeightmapData, _heightmap, 0, heightmapWidth + 1, heightmapHeight + 1, - (int)heightmapWidthSamples + 1, (int)heightmapHeightSamples + 1, scale, + d.GeomHeightfieldDataBuildSingle(HeightmapData, _heightmap, 0, heightmapWidth, heightmapHeight, + (int)heightmapWidthSamples, (int)heightmapHeightSamples, scale, offset, thickness, wrap); + d.GeomHeightfieldDataSetBounds(HeightmapData, hfmin - 1, hfmax + 1); GroundGeom = d.CreateHeightfield(space, HeightmapData, 1); if (GroundGeom != IntPtr.Zero) @@ -3980,17 +4024,15 @@ namespace OpenSim.Region.PhysicsModule.ODE Quaternion q1 = Quaternion.CreateFromAxisAngle(new Vector3(1, 0, 0), 1.5707f); Quaternion q2 = Quaternion.CreateFromAxisAngle(new Vector3(0, 1, 0), 1.5707f); - //Axiom.Math.Quaternion q3 = Axiom.Math.Quaternion.FromAngleAxis(3.14f, new Axiom.Math.Vector3(0, 0, 1)); q1 = q1 * q2; - //q1 = q1 * q3; Vector3 v3; float angle; q1.GetAxisAngle(out v3, out angle); d.RFromAxisAndAngle(out R, v3.X, v3.Y, v3.Z, angle); d.GeomSetRotation(GroundGeom, ref R); - d.GeomSetPosition(GroundGeom, (pOffset.X + ((int)Constants.RegionSize * 0.5f)), (pOffset.Y + ((int)Constants.RegionSize * 0.5f)), 0); + d.GeomSetPosition(GroundGeom, pOffset.X + regionsizeX * 0.5f, pOffset.Y + regionsizeY * 0.5f, 0); IntPtr testGround = IntPtr.Zero; if (RegionTerrain.TryGetValue(pOffset, out testGround)) { @@ -4015,89 +4057,31 @@ namespace OpenSim.Region.PhysicsModule.ODE public override bool SupportsCombining() { - return true; + return m_suportCombine; } -// public override void UnCombine(PhysicsScene pScene) -// { -// IntPtr localGround = IntPtr.Zero; -//// float[] localHeightfield; -// bool proceed = false; -// List geomDestroyList = new List(); -// -// lock (OdeLock) -// { -// if (RegionTerrain.TryGetValue(Vector3.Zero, out localGround)) -// { -// foreach (IntPtr geom in TerrainHeightFieldHeights.Keys) -// { -// if (geom == localGround) -// { -//// localHeightfield = TerrainHeightFieldHeights[geom]; -// proceed = true; -// } -// else -// { -// geomDestroyList.Add(geom); -// } -// } -// -// if (proceed) -// { -// m_worldOffset = Vector3.Zero; -// WorldExtents = new Vector2((int)Constants.RegionSize, (int)Constants.RegionSize); -// m_parentScene = null; -// -// foreach (IntPtr g in geomDestroyList) -// { -// // removingHeightField needs to be done or the garbage collector will -// // collect the terrain data before we tell ODE to destroy it causing -// // memory corruption -// if (TerrainHeightFieldHeights.ContainsKey(g)) -// { -//// float[] removingHeightField = TerrainHeightFieldHeights[g]; -// TerrainHeightFieldHeights.Remove(g); -// -// if (RegionTerrain.ContainsKey(g)) -// { -// RegionTerrain.Remove(g); -// } -// -// d.GeomDestroy(g); -// //removingHeightField = new float[0]; -// } -// } -// -// } -// else -// { -// m_log.Warn("[PHYSICS]: Couldn't proceed with UnCombine. Region has inconsistant data."); -// } -// } -// } -// } - public override void SetWaterLevel(float baseheight) { waterlevel = baseheight; - randomizeWater(waterlevel); +// randomizeWater(waterlevel); } +/* private void randomizeWater(float baseheight) { - const uint heightmapWidth = m_regionWidth + 2; - const uint heightmapHeight = m_regionHeight + 2; - const uint heightmapWidthSamples = m_regionWidth + 2; - const uint heightmapHeightSamples = m_regionHeight + 2; - const float scale = 1.0f; - const float offset = 0.0f; - const float thickness = 2.9f; - const int wrap = 0; + uint heightmapWidth = m_regionWidth + 2; + uint heightmapHeight = m_regionHeight + 2; + uint heightmapWidthSamples = m_regionWidth + 2; + uint heightmapHeightSamples = m_regionHeight + 2; + float scale = 1.0f; + float offset = 0.0f; + float thickness = 2.9f; + int wrap = 0; for (int i = 0; i < (258 * 258); i++) { _watermap[i] = (baseheight-0.1f) + ((float)fluidRandomizer.Next(1,9) / 10f); - // m_log.Info((baseheight - 0.1f) + ((float)fluidRandomizer.Next(1, 9) / 10f)); + // m_log.Info((baseheight - 0.1f) + ((float)fluidRandomizer.Next(1, 9) / 10f)); } lock (OdeLock) @@ -4108,8 +4092,8 @@ namespace OpenSim.Region.PhysicsModule.ODE } IntPtr HeightmapData = d.GeomHeightfieldDataCreate(); d.GeomHeightfieldDataBuildSingle(HeightmapData, _watermap, 0, heightmapWidth, heightmapHeight, - (int)heightmapWidthSamples, (int)heightmapHeightSamples, scale, - offset, thickness, wrap); + (int)heightmapWidthSamples, (int)heightmapHeightSamples, scale, + offset, thickness, wrap); d.GeomHeightfieldDataSetBounds(HeightmapData, m_regionWidth, m_regionHeight); WaterGeom = d.CreateHeightfield(space, HeightmapData, 1); if (WaterGeom != IntPtr.Zero) @@ -4137,7 +4121,7 @@ namespace OpenSim.Region.PhysicsModule.ODE d.GeomSetPosition(WaterGeom, 128, 128, 0); } } - +*/ public override void Dispose() { _worldInitialized = false; From c2346a082336ee8ab50d86b04007389adad64f45 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Sat, 5 Sep 2015 10:28:44 -0700 Subject: [PATCH 26/32] Changed a couple of comments to be more generic --- OpenSim/Region/PhysicsModules/Ode/ODERayCastRequestManager.cs | 2 +- OpenSim/Region/PhysicsModules/Ode/OdeScene.cs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/OpenSim/Region/PhysicsModules/Ode/ODERayCastRequestManager.cs b/OpenSim/Region/PhysicsModules/Ode/ODERayCastRequestManager.cs index aafc7c6a46..cd5dbf8ea6 100644 --- a/OpenSim/Region/PhysicsModules/Ode/ODERayCastRequestManager.cs +++ b/OpenSim/Region/PhysicsModules/Ode/ODERayCastRequestManager.cs @@ -172,7 +172,7 @@ namespace OpenSim.Region.PhysicsModule.ODE /// private void RayCast(ODERayCastRequest req) { - // UBIT: limit ray lenght or collisions will take all avaiable stack space + // NOTE: limit ray lenght or collisions will take all avaiable stack space // this value may still be too large, depending on machine configuration // of maximum stack float len = req.length; diff --git a/OpenSim/Region/PhysicsModules/Ode/OdeScene.cs b/OpenSim/Region/PhysicsModules/Ode/OdeScene.cs index 19b957f11d..88d4d157ea 100644 --- a/OpenSim/Region/PhysicsModules/Ode/OdeScene.cs +++ b/OpenSim/Region/PhysicsModules/Ode/OdeScene.cs @@ -25,7 +25,7 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -// Ubit changes for varsize regions +// changes for varsize regions // note that raycasts need to have limited range // (even in normal regions) // or aplication thread stack may just blowup @@ -803,7 +803,7 @@ namespace OpenSim.Region.PhysicsModule.ODE spaceGridMaxX = (int)(WorldExtents.X * spacesPerMeterX); spaceGridMaxY = (int)(WorldExtents.Y * spacesPerMeterY); - // ubit: limit number of spaces + // note: limit number of spaces if (spaceGridMaxX > 24) { spaceGridMaxX = 24; From 5bfc2743c68a74ad59d9ae5e3e73fef58e17bf89 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Sat, 5 Sep 2015 15:20:32 -0700 Subject: [PATCH 27/32] Deleted unused file. --- OpenSim/Framework/ForeignUserProfileData.cs | 77 --------------------- 1 file changed, 77 deletions(-) delete mode 100644 OpenSim/Framework/ForeignUserProfileData.cs diff --git a/OpenSim/Framework/ForeignUserProfileData.cs b/OpenSim/Framework/ForeignUserProfileData.cs deleted file mode 100644 index 2beaf80f80..0000000000 --- a/OpenSim/Framework/ForeignUserProfileData.cs +++ /dev/null @@ -1,77 +0,0 @@ -/* - * Copyright (c) Contributors, http://opensimulator.org/ - * See CONTRIBUTORS.TXT for a full list of copyright holders. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * * Neither the name of the OpenSimulator Project nor the - * names of its contributors may be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY - * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -using System; - -namespace OpenSim.Framework -{ - public class ForeignUserProfileData : UserProfileData - { - /// - /// The address of the users home sim, used for foreigners. - /// - private string _userUserServerURI = String.Empty; - - /// - /// The address of the users home sim, used for foreigners. - /// - private string _userHomeAddress = String.Empty; - - /// - /// The port of the users home sim, used for foreigners. - /// - private string _userHomePort = String.Empty; - /// - /// The remoting port of the users home sim, used for foreigners. - /// - private string _userHomeRemotingPort = String.Empty; - - public string UserServerURI - { - get { return _userUserServerURI; } - set { _userUserServerURI = value; } - } - - public string UserHomeAddress - { - get { return _userHomeAddress; } - set { _userHomeAddress = value; } - } - - public string UserHomePort - { - get { return _userHomePort; } - set { _userHomePort = value; } - } - - public string UserHomeRemotingPort - { - get { return _userHomeRemotingPort; } - set { _userHomeRemotingPort = value; } - } - } -} From 3cf07564b6d4e72f6193f5affdcb0dc14624991a Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Sat, 5 Sep 2015 17:37:07 -0700 Subject: [PATCH 28/32] Moved the two region loaders into the RegionLoaderPlugin dll, therefore eliminating 2 top-level dlls that didn't make much sense. --- .../LoadRegions}/IRegionLoader.cs | 0 .../LoadRegions/LoadRegionsPlugin.cs | 2 - .../LoadRegions}/RegionLoaderFileSystem.cs | 3 +- .../LoadRegions}/RegionLoaderWebServer.cs | 3 +- prebuild.xml | 52 ------------------- 5 files changed, 4 insertions(+), 56 deletions(-) rename OpenSim/{Framework => ApplicationPlugins/LoadRegions}/IRegionLoader.cs (100%) rename OpenSim/{Framework/RegionLoader/Filesystem => ApplicationPlugins/LoadRegions}/RegionLoaderFileSystem.cs (98%) rename OpenSim/{Framework/RegionLoader/Web => ApplicationPlugins/LoadRegions}/RegionLoaderWebServer.cs (98%) diff --git a/OpenSim/Framework/IRegionLoader.cs b/OpenSim/ApplicationPlugins/LoadRegions/IRegionLoader.cs similarity index 100% rename from OpenSim/Framework/IRegionLoader.cs rename to OpenSim/ApplicationPlugins/LoadRegions/IRegionLoader.cs diff --git a/OpenSim/ApplicationPlugins/LoadRegions/LoadRegionsPlugin.cs b/OpenSim/ApplicationPlugins/LoadRegions/LoadRegionsPlugin.cs index 74d9ae4bbf..89224a64a8 100644 --- a/OpenSim/ApplicationPlugins/LoadRegions/LoadRegionsPlugin.cs +++ b/OpenSim/ApplicationPlugins/LoadRegions/LoadRegionsPlugin.cs @@ -32,8 +32,6 @@ using System.Threading; using log4net; using OpenMetaverse; using OpenSim.Framework; -using OpenSim.Framework.RegionLoader.Filesystem; -using OpenSim.Framework.RegionLoader.Web; using OpenSim.Region.CoreModules.Agent.AssetTransaction; using OpenSim.Region.CoreModules.Avatar.InstantMessage; using OpenSim.Region.CoreModules.Scripting.DynamicTexture; diff --git a/OpenSim/Framework/RegionLoader/Filesystem/RegionLoaderFileSystem.cs b/OpenSim/ApplicationPlugins/LoadRegions/RegionLoaderFileSystem.cs similarity index 98% rename from OpenSim/Framework/RegionLoader/Filesystem/RegionLoaderFileSystem.cs rename to OpenSim/ApplicationPlugins/LoadRegions/RegionLoaderFileSystem.cs index 8332c14478..1873a0658e 100644 --- a/OpenSim/Framework/RegionLoader/Filesystem/RegionLoaderFileSystem.cs +++ b/OpenSim/ApplicationPlugins/LoadRegions/RegionLoaderFileSystem.cs @@ -31,8 +31,9 @@ using System.Collections.Generic; using System.IO; using System.Reflection; using Nini.Config; +using OpenSim.Framework; -namespace OpenSim.Framework.RegionLoader.Filesystem +namespace OpenSim.ApplicationPlugins.LoadRegions { public class RegionLoaderFileSystem : IRegionLoader { diff --git a/OpenSim/Framework/RegionLoader/Web/RegionLoaderWebServer.cs b/OpenSim/ApplicationPlugins/LoadRegions/RegionLoaderWebServer.cs similarity index 98% rename from OpenSim/Framework/RegionLoader/Web/RegionLoaderWebServer.cs rename to OpenSim/ApplicationPlugins/LoadRegions/RegionLoaderWebServer.cs index f60bb121c3..850f3e08d2 100644 --- a/OpenSim/Framework/RegionLoader/Web/RegionLoaderWebServer.cs +++ b/OpenSim/ApplicationPlugins/LoadRegions/RegionLoaderWebServer.cs @@ -32,8 +32,9 @@ using System.Reflection; using System.Xml; using log4net; using Nini.Config; +using OpenSim.Framework; -namespace OpenSim.Framework.RegionLoader.Web +namespace OpenSim.ApplicationPlugins.LoadRegions { public class RegionLoaderWebServer : IRegionLoader { diff --git a/prebuild.xml b/prebuild.xml index 0daf6a403f..7b17001bea 100644 --- a/prebuild.xml +++ b/prebuild.xml @@ -325,58 +325,6 @@ - - - - ../../../../bin/ - - - - - ../../../../bin/ - - - - ../../../../bin/ - - - - - - - - - - - - - - - - - ../../../../bin/ - - - - - ../../../../bin/ - - - - ../../../../bin/ - - - - - - - - - - - - - From f928d41a275daf661a4d0df0e6bebd33a52d79a6 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Sat, 5 Sep 2015 17:40:27 -0700 Subject: [PATCH 29/32] Amend to previous commit: delete the corresponding AssemblyInfo's --- .../Filesystem/Properties/AssemblyInfo.cs | 33 ------------------- .../Web/Properties/AssemblyInfo.cs | 33 ------------------- 2 files changed, 66 deletions(-) delete mode 100644 OpenSim/Framework/RegionLoader/Filesystem/Properties/AssemblyInfo.cs delete mode 100644 OpenSim/Framework/RegionLoader/Web/Properties/AssemblyInfo.cs diff --git a/OpenSim/Framework/RegionLoader/Filesystem/Properties/AssemblyInfo.cs b/OpenSim/Framework/RegionLoader/Filesystem/Properties/AssemblyInfo.cs deleted file mode 100644 index 3bcbe2fa71..0000000000 --- a/OpenSim/Framework/RegionLoader/Filesystem/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,33 +0,0 @@ -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("OpenSim.Framework.RegionLoader.Filesystem")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("http://opensimulator.org")] -[assembly: AssemblyProduct("OpenSim")] -[assembly: AssemblyCopyright("OpenSimulator developers")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] - -// The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("4ab5c74b-e886-40a1-b67d-a04df285e706")] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -[assembly: AssemblyVersion("0.8.2.*")] - diff --git a/OpenSim/Framework/RegionLoader/Web/Properties/AssemblyInfo.cs b/OpenSim/Framework/RegionLoader/Web/Properties/AssemblyInfo.cs deleted file mode 100644 index 1b2519cb61..0000000000 --- a/OpenSim/Framework/RegionLoader/Web/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,33 +0,0 @@ -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("OpenSim.Framework.RegionLoader.Web")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("http://opensimulator.org")] -[assembly: AssemblyProduct("OpenSim")] -[assembly: AssemblyCopyright("OpenSimulator developers")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] - -// The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("985afff8-e7ed-4056-acce-39abf7a43d33")] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -[assembly: AssemblyVersion("0.8.2.*")] - From 4f208b6282174bf19a5d9c6802f90900c0e74ec8 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Sun, 6 Sep 2015 09:31:35 -0700 Subject: [PATCH 30/32] Related to previous commits: fixed namespace. --- OpenSim/ApplicationPlugins/LoadRegions/IRegionLoader.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/OpenSim/ApplicationPlugins/LoadRegions/IRegionLoader.cs b/OpenSim/ApplicationPlugins/LoadRegions/IRegionLoader.cs index c566fc7916..2d1505dbe5 100644 --- a/OpenSim/ApplicationPlugins/LoadRegions/IRegionLoader.cs +++ b/OpenSim/ApplicationPlugins/LoadRegions/IRegionLoader.cs @@ -26,8 +26,9 @@ */ using Nini.Config; +using OpenSim.Framework; -namespace OpenSim.Framework +namespace OpenSim.ApplicationPlugins.LoadRegions { public interface IRegionLoader { From 82ea4179da7ea32ea2efbd1cb209c77d5871b3fd Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Sun, 6 Sep 2015 10:00:20 -0700 Subject: [PATCH 31/32] Clean up viewer-based access control specifications. --- OpenSim/Region/Framework/Scenes/Scene.cs | 10 ++-- .../HypergridService/GatekeeperService.cs | 7 ++- .../Services/LLLoginService/LLLoginService.cs | 8 ++- bin/OpenSim.ini.example | 7 +-- bin/OpenSimDefaults.ini | 8 +++ bin/Robust.HG.ini.example | 54 +++++++------------ bin/Robust.ini.example | 38 +++++++------ 7 files changed, 71 insertions(+), 61 deletions(-) diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index 8c2f45e9e8..dce2247dc5 100755 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs @@ -1051,11 +1051,11 @@ namespace OpenSim.Region.Framework.Scenes } } - string[] possibleAccessControlConfigSections = new string[] { "AccessControl", "Startup" }; + string[] possibleAccessControlConfigSections = new string[] { "Startup", "AccessControl"}; string grant = Util.GetConfigVarFromSections( - config, "AllowedClients", possibleAccessControlConfigSections, ""); + config, "AllowedClients", possibleAccessControlConfigSections, string.Empty); if (grant.Length > 0) { @@ -1067,7 +1067,11 @@ namespace OpenSim.Region.Framework.Scenes grant = Util.GetConfigVarFromSections( - config, "BannedClients", possibleAccessControlConfigSections, ""); + config, "DeniedClients", possibleAccessControlConfigSections, String.Empty); + // Deal with the mess of someone having used a different word at some point + if (grant == String.Empty) + grant = Util.GetConfigVarFromSections( + config, "BannedClients", possibleAccessControlConfigSections, String.Empty); if (grant.Length > 0) { diff --git a/OpenSim/Services/HypergridService/GatekeeperService.cs b/OpenSim/Services/HypergridService/GatekeeperService.cs index 44b26d5ac2..87c681033d 100644 --- a/OpenSim/Services/HypergridService/GatekeeperService.cs +++ b/OpenSim/Services/HypergridService/GatekeeperService.cs @@ -131,8 +131,11 @@ namespace OpenSim.Services.HypergridService else if (simulationService != string.Empty) m_SimulationService = ServerUtils.LoadPlugin(simulationService, args); - m_AllowedClients = serverConfig.GetString("AllowedClients", string.Empty); - m_DeniedClients = serverConfig.GetString("DeniedClients", string.Empty); + string[] possibleAccessControlConfigSections = new string[] { "AccessControl", "GatekeeperService" }; + m_AllowedClients = Util.GetConfigVarFromSections( + config, "AllowedClients", possibleAccessControlConfigSections, string.Empty); + m_DeniedClients = Util.GetConfigVarFromSections( + config, "DeniedClients", possibleAccessControlConfigSections, string.Empty); m_ForeignAgentsAllowed = serverConfig.GetBoolean("ForeignAgentsAllowed", true); LoadDomainExceptionsFromConfig(serverConfig, "AllowExcept", m_ForeignsAllowedExceptions); diff --git a/OpenSim/Services/LLLoginService/LLLoginService.cs b/OpenSim/Services/LLLoginService/LLLoginService.cs index d67bc4df25..10c2e8cb94 100644 --- a/OpenSim/Services/LLLoginService/LLLoginService.cs +++ b/OpenSim/Services/LLLoginService/LLLoginService.cs @@ -123,8 +123,12 @@ namespace OpenSim.Services.LLLoginService m_DestinationGuide = m_LoginServerConfig.GetString ("DestinationGuide", string.Empty); m_AvatarPicker = m_LoginServerConfig.GetString ("AvatarPicker", string.Empty); - m_AllowedClients = m_LoginServerConfig.GetString("AllowedClients", string.Empty); - m_DeniedClients = m_LoginServerConfig.GetString("DeniedClients", string.Empty); + string[] possibleAccessControlConfigSections = new string[] { "AccessControl", "LoginService" }; + m_AllowedClients = Util.GetConfigVarFromSections( + config, "AllowedClients", possibleAccessControlConfigSections, string.Empty); + m_DeniedClients = Util.GetConfigVarFromSections( + config, "DeniedClients", possibleAccessControlConfigSections, string.Empty); + m_MessageUrl = m_LoginServerConfig.GetString("MessageUrl", string.Empty); m_DSTZone = m_LoginServerConfig.GetString("DSTZone", "America/Los_Angeles;Pacific Standard Time"); diff --git a/bin/OpenSim.ini.example b/bin/OpenSim.ini.example index 71e76dbe8e..f5268bdb10 100644 --- a/bin/OpenSim.ini.example +++ b/bin/OpenSim.ini.example @@ -308,9 +308,9 @@ ;; - "Imprudence" has access ;; - "Imprudence 1.3" has access ;; - "Imprudence 1.3.1" has no access - ; AllowedClients = + ; AllowedClients = "" - ;# {BannedClients} {} {Bar (|) separated list of banned clients} {} + ;# {DeniedClients} {} {Bar (|) separated list of denied clients} {} ;; Bar (|) separated list of viewers which may not gain access to the regions. ;; One can use a Substring of the viewer name to disable only certain ;; versions @@ -318,7 +318,8 @@ ;; - "Imprudence" has no access ;; - "Imprudence 1.3" has no access ;; - "Imprudence 1.3.1" has access - ; BannedClients = + ;; + ; DeniedClients = "" [Map] diff --git a/bin/OpenSimDefaults.ini b/bin/OpenSimDefaults.ini index c0c81346ff..963eeffe07 100644 --- a/bin/OpenSimDefaults.ini +++ b/bin/OpenSimDefaults.ini @@ -531,6 +531,14 @@ ; many simultaneous requests, default is 30 and is currently applied only to assets ;MaxRequestConcurrency = 30 +[AccessControl] + ; Viewer-based access control. |-separated list of allowed viewers. + ; AllowedClients = "" + + ; Viewer-based access control. |-separated list of denied viewers. + ; No restrictions by default. + ; DeniedClients = "" + [ClientStack.LindenUDP] ; Set this to true to process incoming packets asynchronously. Networking is diff --git a/bin/Robust.HG.ini.example b/bin/Robust.HG.ini.example index 36025d5fba..82eaf1ffa8 100644 --- a/bin/Robust.HG.ini.example +++ b/bin/Robust.HG.ini.example @@ -184,6 +184,26 @@ ;; This is a default that can be overwritten in some sections. ; GatekeeperURI = "${Const|BaseURL}:${Const|PublicPort}" +[AccessControl] + ;# {AllowedClients} {} {Bar (|) separated list of allowed clients} {} + ;; Bar (|) separated list of viewers which may gain access to the regions. + ;; One can use a substring of the viewer name to enable only certain + ;; versions + ;; Example: Agent uses the viewer "Imprudence 1.3.2.0" + ;; - "Imprudence" has access + ;; - "Imprudence 1.3" has access + ;; - "Imprudence 1.3.1" has no access + ; AllowedClients = "" + + ;# {DeniedClients} {} {Bar (|) separated list of denied clients} {} + ;; Bar (|) separated list of viewers which may not gain access to the regions. + ;; One can use a Substring of the viewer name to disable only certain + ;; versions + ;; Example: Agent uses the viewer "Imprudence 1.3.2.0" + ;; - "Imprudence" has no access + ;; - "Imprudence 1.3" has no access + ;; - "Imprudence 1.3.1" has access + ; DeniedClients = "" [DatabaseService] ; PGSQL @@ -482,23 +502,6 @@ SRV_IMServerURI = "${Const|BaseURL}:${Const|PublicPort}" SRV_GroupsServerURI = "${Const|BaseURL}:${Const|PublicPort}" - ;; Regular expressions for controlling which client versions are accepted/denied. - ;; An empty string means nothing is checked. - ;; - ;; Example 1: allow only these 3 types of clients (any version of them) - ;; AllowedClients = "Imprudence|Hippo|Second Life" - ;; - ;; Example 2: allow all clients except these - ;; DeniedClients = "Twisted|Crawler|Cryolife|FuckLife|StreetLife|GreenLife|AntiLife|KORE-Phaze|Synlyfe|Purple Second Life|SecondLi |Emerald" - ;; - ;; Note that these are regular expressions, so every character counts. - ;; Also note that this is very weak security and should not be trusted as a reliable means - ;; for keeping bad clients out; modified clients can fake their identifiers. - ;; - ;; - ;AllowedClients = "" - ;DeniedClients = "" - ;# {DSTZone} {} {Override Daylight Saving Time rules} {* none local} "America/Los_Angeles;Pacific Standard Time" ;; Viewers do not receive timezone information from the server - almost all (?) default to Pacific Standard Time ;; However, they do rely on the server to tell them whether it's Daylight Saving Time or not. @@ -595,23 +598,6 @@ ; If you run this gatekeeper server behind a proxy, set this to true ; HasProxy = false - ;; Regular expressions for controlling which client versions are accepted/denied. - ;; An empty string means nothing is checked. - ;; - ;; Example 1: allow only these 3 types of clients (any version of them) - ;; AllowedClients = "Imprudence|Hippo|Second Life" - ;; - ;; Example 2: allow all clients except these - ;; DeniedClients = "Twisted|Crawler|Cryolife|FuckLife|StreetLife|GreenLife|AntiLife|KORE-Phaze|Synlyfe|Purple Second Life|SecondLi |Emerald" - ;; - ;; Note that these are regular expressions, so every character counts. - ;; Also note that this is very weak security and should not be trusted as a reliable means - ;; for keeping bad clients out; modified clients can fake their identifiers. - ;; - ;; - ;AllowedClients = "" - ;DeniedClients = "" - ;; Are foreign visitors allowed? ;ForeignAgentsAllowed = true ;; diff --git a/bin/Robust.ini.example b/bin/Robust.ini.example index 284e9699e1..8d6496db6a 100644 --- a/bin/Robust.ini.example +++ b/bin/Robust.ini.example @@ -145,6 +145,27 @@ ;ConsolePass = secret ;ConsolePort = 0 +[AccessControl] + ;# {AllowedClients} {} {Bar (|) separated list of allowed clients} {} + ;; Bar (|) separated list of viewers which may gain access to the regions. + ;; One can use a substring of the viewer name to enable only certain + ;; versions + ;; Example: Agent uses the viewer "Imprudence 1.3.2.0" + ;; - "Imprudence" has access + ;; - "Imprudence 1.3" has access + ;; - "Imprudence 1.3.1" has no access + ; AllowedClients = "" + + ;# {DeniedClients} {} {Bar (|) separated list of denied clients} {} + ;; Bar (|) separated list of viewers which may not gain access to the regions. + ;; One can use a Substring of the viewer name to disable only certain + ;; versions + ;; Example: Agent uses the viewer "Imprudence 1.3.2.0" + ;; - "Imprudence" has no access + ;; - "Imprudence 1.3" has no access + ;; - "Imprudence 1.3.1" has access + ; DeniedClients = "" + [DatabaseService] ; PGSQL @@ -431,23 +452,6 @@ ; If you run this login server behind a proxy, set this to true ; HasProxy = false - ;; Regular expressions for controlling which client versions are accepted/denied. - ;; An empty string means nothing is checked. - ;; - ;; Example 1: allow only these 3 types of clients (any version of them) - ;; AllowedClients = "Imprudence|Hippo|Second Life" - ;; - ;; Example 2: allow all clients except these - ;; DeniedClients = "Twisted|Crawler|Cryolife|FuckLife|StreetLife|GreenLife|AntiLife|KORE-Phaze|Synlyfe|Purple Second Life|SecondLi |Emerald" - ;; - ;; Note that these are regular expressions, so every character counts. - ;; Also note that this is very weak security and should not be trusted as a reliable means - ;; for keeping bad clients out; modified clients can fake their identifiers. - ;; - ;; - ;AllowedClients = "" - ;DeniedClients = "" - ;# {DSTZone} {} {Override Daylight Saving Time rules} {* none local} "America/Los_Angeles;Pacific Standard Time" ;; Viewers do not listen to timezone sent by the server. They use Pacific Standard Time instead, ;; but rely on the server to calculate Daylight Saving Time. Sending another DST than US Pacific From 3a72e755b900c39248f1d12092ffbb91a7f28a0d Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Sun, 6 Sep 2015 10:02:16 -0700 Subject: [PATCH 32/32] Deleted access control spec from [LoginService] section of standalone config. It's in OpenSim.ini now under [AccessControl]. Backwards compatibility preserved. --- bin/config-include/StandaloneCommon.ini.example | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/bin/config-include/StandaloneCommon.ini.example b/bin/config-include/StandaloneCommon.ini.example index 179be94775..76d7a9953c 100644 --- a/bin/config-include/StandaloneCommon.ini.example +++ b/bin/config-include/StandaloneCommon.ini.example @@ -145,23 +145,6 @@ ;; Set minimum fee to publish classified ; ClassifiedFee = 0 - ;; Regular expressions for controlling which client versions are accepted/denied. - ;; An empty string means nothing is checked. - ;; - ;; Example 1: allow only these 3 types of clients (any version of them) - ;; AllowedClients = "Imprudence|Hippo|Second Life" - ;; - ;; Example 2: allow all clients except these - ;; DeniedClients = "Twisted|Crawler|Cryolife|FuckLife|StreetLife|GreenLife|AntiLife|KORE-Phaze|Synlyfe|Purple Second Life|SecondLi |Emerald" - ;; - ;; Note that these are regular expressions, so every character counts. - ;; Also note that this is very weak security and should not be trusted as a reliable means - ;; for keeping bad clients out; modified clients can fake their identifiers. - ;; - ;; - ;AllowedClients = "" - ;DeniedClients = "" - ; Basic Login Service Dos Protection Tweaks ; ; ; ; Some Grids/Users use a transparent proxy that makes use of the X-Forwarded-For HTTP Header, If you do, set this to true