aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Tests/Common/Helpers/SceneHelpers.cs
diff options
context:
space:
mode:
authorDiva Canto2015-08-31 16:23:43 -0700
committerDiva Canto2015-08-31 16:23:43 -0700
commit9435405ca1c173963dd6e97116a27b798a211801 (patch)
treee48898721c32cc0ff43e17a4ba660b8bcb55534d /OpenSim/Tests/Common/Helpers/SceneHelpers.cs
parentPhysics refactoring: all unit tests pass. (diff)
downloadopensim-SC_OLD-9435405ca1c173963dd6e97116a27b798a211801.zip
opensim-SC_OLD-9435405ca1c173963dd6e97116a27b798a211801.tar.gz
opensim-SC_OLD-9435405ca1c173963dd6e97116a27b798a211801.tar.bz2
opensim-SC_OLD-9435405ca1c173963dd6e97116a27b798a211801.tar.xz
Deleted physics plugin classes.
More unit tests fixed.
Diffstat (limited to 'OpenSim/Tests/Common/Helpers/SceneHelpers.cs')
-rw-r--r--OpenSim/Tests/Common/Helpers/SceneHelpers.cs26
1 files changed, 22 insertions, 4 deletions
diff --git a/OpenSim/Tests/Common/Helpers/SceneHelpers.cs b/OpenSim/Tests/Common/Helpers/SceneHelpers.cs
index 27705bd..53509dc 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;
48using OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid; 48using OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid;
49using OpenSim.Region.CoreModules.ServiceConnectorsOut.UserAccounts; 49using OpenSim.Region.CoreModules.ServiceConnectorsOut.UserAccounts;
50using OpenSim.Region.CoreModules.ServiceConnectorsOut.Presence; 50using OpenSim.Region.CoreModules.ServiceConnectorsOut.Presence;
51using OpenSim.Region.PhysicsModule.BasicPhysics;
51using OpenSim.Services.Interfaces; 52using OpenSim.Services.Interfaces;
52using GridRegion = OpenSim.Services.Interfaces.GridRegion; 53using GridRegion = OpenSim.Services.Interfaces.GridRegion;
53 54
@@ -77,6 +78,8 @@ namespace OpenSim.Tests.Common
77 78
78 private CoreAssetCache m_cache; 79 private CoreAssetCache m_cache;
79 80
81 private PhysicsScene m_physicsScene;
82
80 public SceneHelpers() : this(null) {} 83 public SceneHelpers() : this(null) {}
81 84
82 public SceneHelpers(CoreAssetCache cache) 85 public SceneHelpers(CoreAssetCache cache)
@@ -97,6 +100,8 @@ namespace OpenSim.Tests.Common
97 100
98 m_cache = cache; 101 m_cache = cache;
99 102
103 m_physicsScene = StartPhysicsScene();
104
100 SimDataService 105 SimDataService
101 = OpenSim.Server.Base.ServerUtils.LoadPlugin<ISimulationDataService>("OpenSim.Tests.Common.dll", null); 106 = OpenSim.Server.Base.ServerUtils.LoadPlugin<ISimulationDataService>("OpenSim.Tests.Common.dll", null);
102 } 107 }
@@ -148,10 +153,6 @@ namespace OpenSim.Tests.Common
148 regInfo.RegionSizeX = sizeX; 153 regInfo.RegionSizeX = sizeX;
149 regInfo.RegionSizeY = sizeY; 154 regInfo.RegionSizeY = sizeY;
150 155
151 PhysicsPluginManager physicsPluginManager = new PhysicsPluginManager();
152 physicsPluginManager.LoadPluginsFromAssembly("Physics/OpenSim.Region.PhysicsModule.BasicPhysics.dll");
153 Vector3 regionExtent = new Vector3( regInfo.RegionSizeX, regInfo.RegionSizeY, regInfo.RegionSizeZ);
154
155 TestScene testScene = new TestScene( 156 TestScene testScene = new TestScene(
156 regInfo, m_acm, SimDataService, m_estateDataService, configSource, null); 157 regInfo, m_acm, SimDataService, m_estateDataService, configSource, null);
157 158
@@ -159,6 +160,10 @@ namespace OpenSim.Tests.Common
159 godsModule.Initialise(new IniConfigSource()); 160 godsModule.Initialise(new IniConfigSource());
160 godsModule.AddRegion(testScene); 161 godsModule.AddRegion(testScene);
161 162
163 // Add scene to physics
164 ((INonSharedRegionModule)m_physicsScene).AddRegion(testScene);
165 ((INonSharedRegionModule)m_physicsScene).RegionLoaded(testScene);
166
162 // Add scene to services 167 // Add scene to services
163 m_assetService.AddRegion(testScene); 168 m_assetService.AddRegion(testScene);
164 169
@@ -325,6 +330,19 @@ namespace OpenSim.Tests.Common
325 return presenceService; 330 return presenceService;
326 } 331 }
327 332
333 private static PhysicsScene StartPhysicsScene()
334 {
335 IConfigSource config = new IniConfigSource();
336 config.AddConfig("Startup");
337 config.Configs["Startup"].Set("physics", "basicphysics");
338
339 PhysicsScene pScene = new BasicScene();
340 INonSharedRegionModule mod = pScene as INonSharedRegionModule;
341 mod.Initialise(config);
342
343 return pScene;
344 }
345
328 /// <summary> 346 /// <summary>
329 /// Setup modules for a scene using their default settings. 347 /// Setup modules for a scene using their default settings.
330 /// </summary> 348 /// </summary>