aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/PhysicsModules/BulletS/Tests/BulletSimTestsUtil.cs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rwxr-xr-xOpenSim/Region/PhysicsModules/BulletS/Tests/BulletSimTestsUtil.cs (renamed from OpenSim/Region/Physics/BulletSPlugin/Tests/BulletSimTestsUtil.cs)31
1 files changed, 20 insertions, 11 deletions
diff --git a/OpenSim/Region/Physics/BulletSPlugin/Tests/BulletSimTestsUtil.cs b/OpenSim/Region/PhysicsModules/BulletS/Tests/BulletSimTestsUtil.cs
index 775bca2..4eeea4d 100755
--- a/OpenSim/Region/Physics/BulletSPlugin/Tests/BulletSimTestsUtil.cs
+++ b/OpenSim/Region/PhysicsModules/BulletS/Tests/BulletSimTestsUtil.cs
@@ -33,12 +33,13 @@ using System.Text;
33using Nini.Config; 33using Nini.Config;
34 34
35using OpenSim.Framework; 35using OpenSim.Framework;
36using OpenSim.Region.Physics.Manager; 36using OpenSim.Region.PhysicsModules.SharedBase;
37using OpenSim.Region.Physics.Meshing; 37using OpenSim.Region.PhysicsModules.Meshing;
38using OpenSim.Region.Framework.Interfaces;
38 39
39using OpenMetaverse; 40using OpenMetaverse;
40 41
41namespace OpenSim.Region.Physics.BulletSPlugin.Tests 42namespace OpenSim.Region.PhysicsModule.BulletS.Tests
42{ 43{
43// Utility functions for building up and tearing down the sample physics environments 44// Utility functions for building up and tearing down the sample physics environments
44public static class BulletSimTestsUtil 45public static class BulletSimTestsUtil
@@ -78,22 +79,30 @@ 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 RegionInfo info = new RegionInfo();
88 "BulletSim", "Meshmerizer", openSimINI, "BSTestRegion", regionExtent); 85 info.RegionName = "BSTestRegion";
86 info.RegionSizeX = info.RegionSizeY = info.RegionSizeZ = Constants.RegionSize;
87 OpenSim.Region.Framework.Scenes.Scene scene = new OpenSim.Region.Framework.Scenes.Scene(info);
88
89 IMesher mesher = new OpenSim.Region.PhysicsModules.Meshing.Meshmerizer();
90 INonSharedRegionModule mod = mesher as INonSharedRegionModule;
91 mod.Initialise(openSimINI);
92 mod.AddRegion(scene);
93 mod.RegionLoaded(scene);
89 94
90 BSScene bsScene = pScene as BSScene; 95 BSScene pScene = new BSScene();
96 mod = (pScene as INonSharedRegionModule);
97 mod.Initialise(openSimINI);
98 mod.AddRegion(scene);
99 mod.RegionLoaded(scene);
91 100
92 // Since the asset requestor is not initialized, any mesh or sculptie will be a cube. 101 // 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. 102 // In the future, add a fake asset fetcher to get meshes and sculpts.
94 // bsScene.RequestAssetMethod = ???; 103 // bsScene.RequestAssetMethod = ???;
95 104
96 return bsScene; 105 return pScene;
97 } 106 }
98 107
99} 108}