aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Physics/BulletSPlugin/BSParam.cs
diff options
context:
space:
mode:
authorRobert Adams2013-01-01 20:26:31 -0800
committerRobert Adams2013-01-04 17:06:48 -0800
commit2eda385f5e72e165150d0925c56b1188c77cafe8 (patch)
tree1708456178efde631dc397874880aa0d7d2bfb16 /OpenSim/Region/Physics/BulletSPlugin/BSParam.cs
parentminor: Rename BUILDING.txt to BUILDING.md in distbin distribution nant target (diff)
downloadopensim-SC-2eda385f5e72e165150d0925c56b1188c77cafe8.zip
opensim-SC-2eda385f5e72e165150d0925c56b1188c77cafe8.tar.gz
opensim-SC-2eda385f5e72e165150d0925c56b1188c77cafe8.tar.bz2
opensim-SC-2eda385f5e72e165150d0925c56b1188c77cafe8.tar.xz
BulletSim: add ResetBroadphasePool and ResetConstraintSolver diagnostic
functions. If values set from console, the functions are called. Looking for why the collision pools fill up with unnecessary stuff.
Diffstat (limited to '')
-rwxr-xr-xOpenSim/Region/Physics/BulletSPlugin/BSParam.cs28
1 files changed, 28 insertions, 0 deletions
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSParam.cs b/OpenSim/Region/Physics/BulletSPlugin/BSParam.cs
index 69ac8cd..b9bd0bf 100755
--- a/OpenSim/Region/Physics/BulletSPlugin/BSParam.cs
+++ b/OpenSim/Region/Physics/BulletSPlugin/BSParam.cs
@@ -497,6 +497,16 @@ public static class BSParam
497 (s,cf,p,v) => { s.PhysicsMetricDumpFrames = cf.GetFloat(p, (int)v); }, 497 (s,cf,p,v) => { s.PhysicsMetricDumpFrames = cf.GetFloat(p, (int)v); },
498 (s) => { return (float)s.PhysicsMetricDumpFrames; }, 498 (s) => { return (float)s.PhysicsMetricDumpFrames; },
499 (s,p,l,v) => { s.PhysicsMetricDumpFrames = (int)v; } ), 499 (s,p,l,v) => { s.PhysicsMetricDumpFrames = (int)v; } ),
500 new ParameterDefn("ResetBroadphasePool", "Setting this is any value resets the broadphase collision pool",
501 0f,
502 (s,cf,p,v) => { ; },
503 (s) => { return 0f; },
504 (s,p,l,v) => { BSParam.ResetBroadphasePoolTainted(s, v); } ),
505 new ParameterDefn("ResetConstraintSolver", "Setting this is any value resets the constraint solver",
506 0f,
507 (s,cf,p,v) => { ; },
508 (s) => { return 0f; },
509 (s,p,l,v) => { BSParam.ResetConstraintSolverTainted(s, v); } ),
500 }; 510 };
501 511
502 // Convert a boolean to our numeric true and false values 512 // Convert a boolean to our numeric true and false values
@@ -511,6 +521,24 @@ public static class BSParam
511 return (b == ConfigurationParameters.numericTrue ? true : false); 521 return (b == ConfigurationParameters.numericTrue ? true : false);
512 } 522 }
513 523
524 private static void ResetBroadphasePoolTainted(BSScene pPhysScene, float v)
525 {
526 BSScene physScene = pPhysScene;
527 physScene.TaintedObject("BSParam.ResetBroadphasePoolTainted", delegate()
528 {
529 physScene.PE.ResetBroadphasePool(physScene.World);
530 });
531 }
532
533 private static void ResetConstraintSolverTainted(BSScene pPhysScene, float v)
534 {
535 BSScene physScene = pPhysScene;
536 physScene.TaintedObject("BSParam.ResetConstraintSolver", delegate()
537 {
538 physScene.PE.ResetConstraintSolver(physScene.World);
539 });
540 }
541
514 // Search through the parameter definitions and return the matching 542 // Search through the parameter definitions and return the matching
515 // ParameterDefn structure. 543 // ParameterDefn structure.
516 // Case does not matter as names are compared after converting to lower case. 544 // Case does not matter as names are compared after converting to lower case.