diff options
author | Robert Adams | 2014-12-31 12:48:26 -0800 |
---|---|---|
committer | Robert Adams | 2014-12-31 12:48:26 -0800 |
commit | c89d0e26b2c098cd2c5679fb73987a742a66ce38 (patch) | |
tree | 0ee422a9563736aab47385a97a6420d70adc97da /OpenSim/Region/Physics/BulletSPlugin/Tests/BulletSimTestsUtil.cs | |
parent | BulletSim: Add axis locking enabled through the ExtendedPhysics module. (diff) | |
download | opensim-SC-c89d0e26b2c098cd2c5679fb73987a742a66ce38.zip opensim-SC-c89d0e26b2c098cd2c5679fb73987a742a66ce38.tar.gz opensim-SC-c89d0e26b2c098cd2c5679fb73987a742a66ce38.tar.bz2 opensim-SC-c89d0e26b2c098cd2c5679fb73987a742a66ce38.tar.xz |
BulletSim: add the beginnings of hull creation unit testing.
Change how physics engine is created in unit tests to resolve a lib reference problem.
Add ShapeInfoInfo class to collect info about the created physical shape
for debugging and unit test testing.
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 | ||