aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/PhysicsModules/BulletS
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/PhysicsModules/BulletS/BSScene.cs5
-rwxr-xr-xOpenSim/Region/PhysicsModules/BulletS/Tests/BulletSimTestsUtil.cs27
2 files changed, 23 insertions, 9 deletions
diff --git a/OpenSim/Region/PhysicsModules/BulletS/BSScene.cs b/OpenSim/Region/PhysicsModules/BulletS/BSScene.cs
index 26af343..b412561 100644
--- a/OpenSim/Region/PhysicsModules/BulletS/BSScene.cs
+++ b/OpenSim/Region/PhysicsModules/BulletS/BSScene.cs
@@ -248,7 +248,10 @@ namespace OpenSim.Region.PhysicsModule.BulletS
248 248
249 scene.RegisterModuleInterface<PhysicsScene>(this); 249 scene.RegisterModuleInterface<PhysicsScene>(this);
250 Vector3 extent = new Vector3(scene.RegionInfo.RegionSizeX, scene.RegionInfo.RegionSizeY, scene.RegionInfo.RegionSizeZ); 250 Vector3 extent = new Vector3(scene.RegionInfo.RegionSizeX, scene.RegionInfo.RegionSizeY, scene.RegionInfo.RegionSizeZ);
251 Initialise(m_Config, extent); 251 Initialise(m_Config, extent);
252
253 base.Initialise(scene.PhysicsRequestAsset, scene.Heightmap.GetFloatsSerialised(), (float)scene.RegionInfo.RegionSettings.WaterHeight);
254
252 } 255 }
253 256
254 public void RemoveRegion(Scene scene) 257 public void RemoveRegion(Scene scene)
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}