30 using System.Collections.Generic;
35 using OpenSim.Framework;
36 using OpenSim.Region.PhysicsModules.SharedBase;
37 using OpenSim.Region.PhysicsModule.Meshing;
38 using OpenSim.Region.Framework.Interfaces;
42 namespace OpenSim.
Region.PhysicsModule.BulletS.Tests
45 public static class BulletSimTestsUtil
50 public static BSScene CreateBasicPhysicsEngine(Dictionary<string,string> paramOverrides)
52 IConfigSource openSimINI =
new IniConfigSource();
53 IConfig startupConfig = openSimINI.AddConfig(
"Startup");
54 startupConfig.Set(
"physics",
"BulletSim");
55 startupConfig.Set(
"meshing",
"Meshmerizer");
56 startupConfig.Set(
"cacheSculptMaps",
"false");
58 IConfig bulletSimConfig = openSimINI.AddConfig(
"BulletSim");
62 bulletSimConfig.Set(
"MeshSculptedPrim",
"false");
63 bulletSimConfig.Set(
"ForceSimplePrimMeshing",
"true");
64 if (paramOverrides != null)
66 foreach (KeyValuePair<string, string> kvp
in paramOverrides)
68 bulletSimConfig.Set(kvp.Key, kvp.Value);
74 if (Directory.Exists(
"physlogs"))
76 bulletSimConfig.Set(
"PhysicsLoggingDir",
"./physlogs");
77 bulletSimConfig.Set(
"PhysicsLoggingEnabled",
"True");
78 bulletSimConfig.Set(
"PhysicsLoggingDoFlush",
"True");
79 bulletSimConfig.Set(
"VehicleLoggingEnabled",
"True");
85 info.RegionName =
"BSTestRegion";
86 info.RegionSizeX = info.RegionSizeY = info.RegionSizeZ = Constants.RegionSize;
91 mod.Initialise(openSimINI);
93 mod.RegionLoaded(scene);
95 BSScene pScene =
new BSScene();
96 mod = (pScene as INonSharedRegionModule);
97 mod.Initialise(openSimINI);
99 mod.RegionLoaded(scene);
OpenSim.Framework.RegionInfo RegionInfo