aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/PhysicsModules/BulletS/Tests/BulletSimTestsUtil.cs
diff options
context:
space:
mode:
authorDiva Canto2015-08-31 14:09:15 -0700
committerDiva Canto2015-08-31 14:09:15 -0700
commit11194209df8a29f5103e6e34104eae7834f3280a (patch)
tree605cd55258ef11167a8bfa4c894e1e026e172919 /OpenSim/Region/PhysicsModules/BulletS/Tests/BulletSimTestsUtil.cs
parentAll physics plugins are now region modules. Compiles but doesn't run. (diff)
downloadopensim-SC_OLD-11194209df8a29f5103e6e34104eae7834f3280a.zip
opensim-SC_OLD-11194209df8a29f5103e6e34104eae7834f3280a.tar.gz
opensim-SC_OLD-11194209df8a29f5103e6e34104eae7834f3280a.tar.bz2
opensim-SC_OLD-11194209df8a29f5103e6e34104eae7834f3280a.tar.xz
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.
Diffstat (limited to 'OpenSim/Region/PhysicsModules/BulletS/Tests/BulletSimTestsUtil.cs')
-rwxr-xr-xOpenSim/Region/PhysicsModules/BulletS/Tests/BulletSimTestsUtil.cs27
1 files changed, 19 insertions, 8 deletions
diff --git a/OpenSim/Region/PhysicsModules/BulletS/Tests/BulletSimTestsUtil.cs b/OpenSim/Region/PhysicsModules/BulletS/Tests/BulletSimTestsUtil.cs
index 34c0571..d86c841 100755
--- a/OpenSim/Region/PhysicsModules/BulletS/Tests/BulletSimTestsUtil.cs
+++ b/OpenSim/Region/PhysicsModules/BulletS/Tests/BulletSimTestsUtil.cs
@@ -35,6 +35,7 @@ using Nini.Config;
35using OpenSim.Framework; 35using OpenSim.Framework;
36using OpenSim.Region.PhysicsModules.SharedBase; 36using OpenSim.Region.PhysicsModules.SharedBase;
37using OpenSim.Region.PhysicsModules.Meshing; 37using OpenSim.Region.PhysicsModules.Meshing;
38using OpenSim.Region.Framework.Interfaces;
38 39
39using OpenMetaverse; 40using OpenMetaverse;
40 41
@@ -78,22 +79,32 @@ public static class BulletSimTestsUtil
78 bulletSimConfig.Set("VehicleLoggingEnabled","True"); 79 bulletSimConfig.Set("VehicleLoggingEnabled","True");
79 } 80 }
80 81
81 PhysicsPluginManager physicsPluginManager;
82 physicsPluginManager = new PhysicsPluginManager();
83 physicsPluginManager.LoadPluginsFromAssemblies("Physics");
84
85 Vector3 regionExtent = new Vector3(Constants.RegionSize, Constants.RegionSize, Constants.RegionHeight); 82 Vector3 regionExtent = new Vector3(Constants.RegionSize, Constants.RegionSize, Constants.RegionHeight);
86 83
87 PhysicsScene pScene = physicsPluginManager.GetPhysicsScene( 84 //PhysicsScene pScene = physicsPluginManager.GetPhysicsScene(
88 "BulletSim", "Meshmerizer", openSimINI, "BSTestRegion", regionExtent); 85 // "BulletSim", "Meshmerizer", openSimINI, "BSTestRegion", regionExtent);
86 RegionInfo info = new RegionInfo();
87 info.RegionName = "BSTestRegion";
88 info.RegionSizeX = info.RegionSizeY = info.RegionSizeZ = Constants.RegionSize;
89 OpenSim.Region.Framework.Scenes.Scene scene = new OpenSim.Region.Framework.Scenes.Scene(info);
90
91 IMesher mesher = new OpenSim.Region.PhysicsModules.Meshing.Meshmerizer();
92 INonSharedRegionModule mod = mesher as INonSharedRegionModule;
93 mod.Initialise(openSimINI);
94 mod.AddRegion(scene);
95 mod.RegionLoaded(scene);
89 96
90 BSScene bsScene = pScene as BSScene; 97 BSScene pScene = new BSScene();
98 mod = (pScene as INonSharedRegionModule);
99 mod.Initialise(openSimINI);
100 mod.AddRegion(scene);
101 mod.RegionLoaded(scene);
91 102
92 // Since the asset requestor is not initialized, any mesh or sculptie will be a cube. 103 // Since the asset requestor is not initialized, any mesh or sculptie will be a cube.
93 // In the future, add a fake asset fetcher to get meshes and sculpts. 104 // In the future, add a fake asset fetcher to get meshes and sculpts.
94 // bsScene.RequestAssetMethod = ???; 105 // bsScene.RequestAssetMethod = ???;
95 106
96 return bsScene; 107 return pScene;
97 } 108 }
98 109
99} 110}