aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Physics/BulletSPlugin/Tests/BulletSimTestsUtil.cs
diff options
context:
space:
mode:
authorRobert Adams2014-12-31 12:48:26 -0800
committerRobert Adams2014-12-31 12:48:26 -0800
commitc89d0e26b2c098cd2c5679fb73987a742a66ce38 (patch)
tree0ee422a9563736aab47385a97a6420d70adc97da /OpenSim/Region/Physics/BulletSPlugin/Tests/BulletSimTestsUtil.cs
parentBulletSim: Add axis locking enabled through the ExtendedPhysics module. (diff)
downloadopensim-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-xOpenSim/Region/Physics/BulletSPlugin/Tests/BulletSimTestsUtil.cs19
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 @@
28using System; 28using System;
29using System.IO; 29using System.IO;
30using System.Collections.Generic; 30using System.Collections.Generic;
31using System.Linq;
32using System.Text; 31using System.Text;
33 32
34using Nini.Config; 33using Nini.Config;
35 34
36using OpenSim.Framework; 35using OpenSim.Framework;
37using OpenSim.Region.Physics.BulletSPlugin; 36using OpenSim.Region.Physics.Manager;
38using OpenSim.Region.Physics.Meshing; 37using OpenSim.Region.Physics.Meshing;
39 38
39using OpenMetaverse;
40
40namespace OpenSim.Region.Physics.BulletSPlugin.Tests 41namespace 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