aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--OpenSim/Region/Physics/BulletSPlugin/BSScene.cs34
-rw-r--r--OpenSim/Region/Physics/BulletSPlugin/BulletSimAPI.cs9
-rw-r--r--bin/OpenSimDefaults.ini9
3 files changed, 52 insertions, 0 deletions
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSScene.cs b/OpenSim/Region/Physics/BulletSPlugin/BSScene.cs
index 13d5e03..8d0f9a6 100644
--- a/OpenSim/Region/Physics/BulletSPlugin/BSScene.cs
+++ b/OpenSim/Region/Physics/BulletSPlugin/BSScene.cs
@@ -240,6 +240,15 @@ public class BSScene : PhysicsScene, IPhysicsParameters
240 parms.avatarDensity = 60f; 240 parms.avatarDensity = 60f;
241 parms.avatarCapsuleRadius = 0.37f; 241 parms.avatarCapsuleRadius = 0.37f;
242 parms.avatarCapsuleHeight = 1.5f; // 2.140599f 242 parms.avatarCapsuleHeight = 1.5f; // 2.140599f
243 parms.avatarContactProcessingThreshold = 0.1f;
244
245 parms.maxPersistantManifoldPoolSize = 0f;
246 parms.shouldDisableContactPoolDynamicAllocation = ConfigurationParameters.numericFalse;
247 parms.shouldForceUpdateAllAabbs = ConfigurationParameters.numericFalse;
248 parms.shouldRandomizeSolverOrder = ConfigurationParameters.numericFalse;
249 parms.shouldSplitSimulationIslands = ConfigurationParameters.numericFalse;
250 parms.shouldEnableFrictionCaching = ConfigurationParameters.numericFalse;
251 parms.numberOfSolverIterations = 0f; // means use default
243 252
244 if (config != null) 253 if (config != null)
245 { 254 {
@@ -285,11 +294,36 @@ public class BSScene : PhysicsScene, IPhysicsParameters
285 parms.avatarDensity = pConfig.GetFloat("AvatarDensity", parms.avatarDensity); 294 parms.avatarDensity = pConfig.GetFloat("AvatarDensity", parms.avatarDensity);
286 parms.avatarCapsuleRadius = pConfig.GetFloat("AvatarCapsuleRadius", parms.avatarCapsuleRadius); 295 parms.avatarCapsuleRadius = pConfig.GetFloat("AvatarCapsuleRadius", parms.avatarCapsuleRadius);
287 parms.avatarCapsuleHeight = pConfig.GetFloat("AvatarCapsuleHeight", parms.avatarCapsuleHeight); 296 parms.avatarCapsuleHeight = pConfig.GetFloat("AvatarCapsuleHeight", parms.avatarCapsuleHeight);
297 parms.avatarContactProcessingThreshold = pConfig.GetFloat("AvatarContactProcessingThreshold", parms.avatarContactProcessingThreshold);
298
299 parms.maxPersistantManifoldPoolSize = pConfig.GetFloat("MaxPersistantManifoldPoolSize", parms.maxPersistantManifoldPoolSize);
300 parms.shouldDisableContactPoolDynamicAllocation = ParamBoolean(pConfig, "ShouldDisableContactPoolDynamicAllocation", parms.shouldDisableContactPoolDynamicAllocation);
301 parms.shouldForceUpdateAllAabbs = ParamBoolean(pConfig, "ShouldForceUpdateAllAabbs", parms.shouldForceUpdateAllAabbs);
302 parms.shouldRandomizeSolverOrder = ParamBoolean(pConfig, "ShouldRandomizeSolverOrder", parms.shouldRandomizeSolverOrder);
303 parms.shouldSplitSimulationIslands = ParamBoolean(pConfig, "ShouldSplitSimulationIslands", parms.shouldSplitSimulationIslands);
304 parms.shouldEnableFrictionCaching = ParamBoolean(pConfig, "ShouldEnableFrictionCaching", parms.shouldEnableFrictionCaching);
305 parms.numberOfSolverIterations = pConfig.GetFloat("NumberOfSolverIterations", parms.numberOfSolverIterations);
288 } 306 }
289 } 307 }
290 m_params[0] = parms; 308 m_params[0] = parms;
291 } 309 }
292 310
311 // A helper function that handles a true/false parameter and returns the proper float number encoding
312 float ParamBoolean(IConfig config, string parmName, float deflt)
313 {
314 float ret = deflt;
315 if (config.Contains(parmName))
316 {
317 ret = ConfigurationParameters.numericFalse;
318 if (config.GetBoolean(parmName, false))
319 {
320 ret = ConfigurationParameters.numericTrue;
321 }
322 }
323 return ret;
324 }
325
326
293 // Called directly from unmanaged code so don't do much 327 // Called directly from unmanaged code so don't do much
294 private void BulletLogger(string msg) 328 private void BulletLogger(string msg)
295 { 329 {
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BulletSimAPI.cs b/OpenSim/Region/Physics/BulletSPlugin/BulletSimAPI.cs
index aab0994..086f0dc 100644
--- a/OpenSim/Region/Physics/BulletSPlugin/BulletSimAPI.cs
+++ b/OpenSim/Region/Physics/BulletSPlugin/BulletSimAPI.cs
@@ -132,6 +132,15 @@ public struct ConfigurationParameters
132 public float avatarRestitution; 132 public float avatarRestitution;
133 public float avatarCapsuleRadius; 133 public float avatarCapsuleRadius;
134 public float avatarCapsuleHeight; 134 public float avatarCapsuleHeight;
135 public float avatarContactProcessingThreshold;
136
137 public float maxPersistantManifoldPoolSize;
138 public float shouldDisableContactPoolDynamicAllocation;
139 public float shouldForceUpdateAllAabbs;
140 public float shouldRandomizeSolverOrder;
141 public float shouldSplitSimulationIslands;
142 public float shouldEnableFrictionCaching;
143 public float numberOfSolverIterations;
135 144
136 public const float numericTrue = 1f; 145 public const float numericTrue = 1f;
137 public const float numericFalse = 0f; 146 public const float numericFalse = 0f;
diff --git a/bin/OpenSimDefaults.ini b/bin/OpenSimDefaults.ini
index a31e6f4..34f70a2 100644
--- a/bin/OpenSimDefaults.ini
+++ b/bin/OpenSimDefaults.ini
@@ -851,6 +851,7 @@
851 AvatarDensity = 60.0 851 AvatarDensity = 60.0
852 AvatarCapsuleRadius = 0.37 852 AvatarCapsuleRadius = 0.37
853 AvatarCapsuleHeight = 1.5 853 AvatarCapsuleHeight = 1.5
854 AvatarContactProcessingThreshold = 0.1;
854 855
855 MaxObjectMass = 10000.01 856 MaxObjectMass = 10000.01
856 857
@@ -863,6 +864,14 @@
863 CcdMotionThreshold = 0.0 864 CcdMotionThreshold = 0.0
864 CcdSweptSphereRadius = 0.0 865 CcdSweptSphereRadius = 0.0
865 ContactProcessingThreshold = 0.1 866 ContactProcessingThreshold = 0.1
867 MaxPersistantManifoldPoolSize = 0;
868 ShouldDisableContactPoolDynamicAllocation = False;
869 ShouldForceUpdateAllAabbs = False;
870 ShouldRandomizeSolverOrder = False;
871 ShouldSplitSimulationIslands = False;
872 ShouldEnableFrictionCaching = False;
873 NumberOfSolverIterations = 0;
874
866 875
867 ; Whether to mesh sculpties 876 ; Whether to mesh sculpties
868 MeshSculptedPrim = true 877 MeshSculptedPrim = true