diff options
Diffstat (limited to '')
-rwxr-xr-x | OpenSim/Region/Physics/BulletSPlugin/Tests/BulletSimTestsUtil.cs | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/OpenSim/Region/Physics/BulletSPlugin/Tests/BulletSimTestsUtil.cs b/OpenSim/Region/Physics/BulletSPlugin/Tests/BulletSimTestsUtil.cs index 28207a4..775bca2 100755 --- a/OpenSim/Region/Physics/BulletSPlugin/Tests/BulletSimTestsUtil.cs +++ b/OpenSim/Region/Physics/BulletSPlugin/Tests/BulletSimTestsUtil.cs | |||
@@ -28,15 +28,16 @@ | |||
28 | using System; | 28 | using System; |
29 | using System.IO; | 29 | using System.IO; |
30 | using System.Collections.Generic; | 30 | using System.Collections.Generic; |
31 | using System.Linq; | ||
32 | using System.Text; | 31 | using System.Text; |
33 | 32 | ||
34 | using Nini.Config; | 33 | using Nini.Config; |
35 | 34 | ||
36 | using OpenSim.Framework; | 35 | using OpenSim.Framework; |
37 | using OpenSim.Region.Physics.BulletSPlugin; | 36 | using OpenSim.Region.Physics.Manager; |
38 | using OpenSim.Region.Physics.Meshing; | 37 | using OpenSim.Region.Physics.Meshing; |
39 | 38 | ||
39 | using OpenMetaverse; | ||
40 | |||
40 | namespace OpenSim.Region.Physics.BulletSPlugin.Tests | 41 | namespace OpenSim.Region.Physics.BulletSPlugin.Tests |
41 | { | 42 | { |
42 | // Utility functions for building up and tearing down the sample physics environments | 43 | // Utility functions for building up and tearing down the sample physics environments |
@@ -77,17 +78,21 @@ public static class BulletSimTestsUtil | |||
77 | bulletSimConfig.Set("VehicleLoggingEnabled","True"); | 78 | bulletSimConfig.Set("VehicleLoggingEnabled","True"); |
78 | } | 79 | } |
79 | 80 | ||
80 | BSPlugin bsPlugin = new BSPlugin(); | 81 | PhysicsPluginManager physicsPluginManager; |
82 | physicsPluginManager = new PhysicsPluginManager(); | ||
83 | physicsPluginManager.LoadPluginsFromAssemblies("Physics"); | ||
84 | |||
85 | Vector3 regionExtent = new Vector3(Constants.RegionSize, Constants.RegionSize, Constants.RegionHeight); | ||
86 | |||
87 | PhysicsScene pScene = physicsPluginManager.GetPhysicsScene( | ||
88 | "BulletSim", "Meshmerizer", openSimINI, "BSTestRegion", regionExtent); | ||
81 | 89 | ||
82 | BSScene bsScene = (BSScene)bsPlugin.GetScene("BSTestRegion"); | 90 | BSScene bsScene = pScene as BSScene; |
83 | 91 | ||
84 | // Since the asset requestor is not initialized, any mesh or sculptie will be a cube. | 92 | // Since the asset requestor is not initialized, any mesh or sculptie will be a cube. |
85 | // In the future, add a fake asset fetcher to get meshes and sculpts. | 93 | // In the future, add a fake asset fetcher to get meshes and sculpts. |
86 | // bsScene.RequestAssetMethod = ???; | 94 | // bsScene.RequestAssetMethod = ???; |
87 | 95 | ||
88 | Meshing.Meshmerizer mesher = new Meshmerizer(openSimINI); | ||
89 | bsScene.Initialise(mesher, openSimINI); | ||
90 | |||
91 | return bsScene; | 96 | return bsScene; |
92 | } | 97 | } |
93 | 98 | ||