diff options
Diffstat (limited to '')
-rwxr-xr-x | OpenSim/Region/PhysicsModules/BulletS/Tests/BulletSimTestsUtil.cs | 27 |
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; | |||
35 | using OpenSim.Framework; | 35 | using OpenSim.Framework; |
36 | using OpenSim.Region.PhysicsModules.SharedBase; | 36 | using OpenSim.Region.PhysicsModules.SharedBase; |
37 | using OpenSim.Region.PhysicsModules.Meshing; | 37 | using OpenSim.Region.PhysicsModules.Meshing; |
38 | using OpenSim.Region.Framework.Interfaces; | ||
38 | 39 | ||
39 | using OpenMetaverse; | 40 | using 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 | } |