aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Physics/BulletSPlugin/BSParam.cs
diff options
context:
space:
mode:
authorRobert Adams2013-03-17 18:44:09 -0700
committerRobert Adams2013-03-19 00:00:02 -0700
commit8510f57ad48db5f97dacc2a9be63c64e62477d14 (patch)
treec43402d78fa9edfc0e440a600bfdf0745d6a2f06 /OpenSim/Region/Physics/BulletSPlugin/BSParam.cs
parentProcess default attachment point in AttachObjectInternal before we check whet... (diff)
downloadopensim-SC_OLD-8510f57ad48db5f97dacc2a9be63c64e62477d14.zip
opensim-SC_OLD-8510f57ad48db5f97dacc2a9be63c64e62477d14.tar.gz
opensim-SC_OLD-8510f57ad48db5f97dacc2a9be63c64e62477d14.tar.bz2
opensim-SC_OLD-8510f57ad48db5f97dacc2a9be63c64e62477d14.tar.xz
BulletSim: add terrain contact processing threshold parameter. Initialize contact processing threshold for static object as well as mesh terrain.
Diffstat (limited to 'OpenSim/Region/Physics/BulletSPlugin/BSParam.cs')
-rwxr-xr-xOpenSim/Region/Physics/BulletSPlugin/BSParam.cs19
1 files changed, 19 insertions, 0 deletions
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSParam.cs b/OpenSim/Region/Physics/BulletSPlugin/BSParam.cs
index 77bdacb..cb0d929 100755
--- a/OpenSim/Region/Physics/BulletSPlugin/BSParam.cs
+++ b/OpenSim/Region/Physics/BulletSPlugin/BSParam.cs
@@ -39,6 +39,20 @@ public static class BSParam
39{ 39{
40 private static string LogHeader = "[BULLETSIM PARAMETERS]"; 40 private static string LogHeader = "[BULLETSIM PARAMETERS]";
41 41
42 // Tuning notes:
43 // From: http://bulletphysics.org/Bullet/phpBB3/viewtopic.php?t=6575
44 // Contact points can be added even if the distance is positive. The constraint solver can deal with
45 // contacts with positive distances as well as negative (penetration). Contact points are discarded
46 // if the distance exceeds a certain threshold.
47 // Bullet has a contact processing threshold and a contact breaking threshold.
48 // If the distance is larger than the contact breaking threshold, it will be removed after one frame.
49 // If the distance is larger than the contact processing threshold, the constraint solver will ignore it.
50
51 // This is separate/independent from the collision margin. The collision margin increases the object a bit
52 // to improve collision detection performance and accuracy.
53 // ===================
54 // From:
55
42 // Level of Detail values kept as float because that's what the Meshmerizer wants 56 // Level of Detail values kept as float because that's what the Meshmerizer wants
43 public static float MeshLOD { get; private set; } 57 public static float MeshLOD { get; private set; }
44 public static float MeshCircularLOD { get; private set; } 58 public static float MeshCircularLOD { get; private set; }
@@ -77,6 +91,7 @@ public static class BSParam
77 public static float TerrainFriction { get; private set; } 91 public static float TerrainFriction { get; private set; }
78 public static float TerrainHitFraction { get; private set; } 92 public static float TerrainHitFraction { get; private set; }
79 public static float TerrainRestitution { get; private set; } 93 public static float TerrainRestitution { get; private set; }
94 public static float TerrainContactProcessingThreshold { get; private set; }
80 public static float TerrainCollisionMargin { get; private set; } 95 public static float TerrainCollisionMargin { get; private set; }
81 96
82 public static float DefaultFriction { get; private set; } 97 public static float DefaultFriction { get; private set; }
@@ -458,6 +473,10 @@ public static class BSParam
458 0f, 473 0f,
459 (s) => { return TerrainRestitution; }, 474 (s) => { return TerrainRestitution; },
460 (s,v) => { TerrainRestitution = v; /* TODO: set on real terrain */ } ), 475 (s,v) => { TerrainRestitution = v; /* TODO: set on real terrain */ } ),
476 new ParameterDefn<float>("TerrainContactProcessingThreshold", "Distance from terrain to stop processing collisions" ,
477 0.0f,
478 (s) => { return TerrainContactProcessingThreshold; },
479 (s,v) => { TerrainContactProcessingThreshold = v; /* TODO: set on real terrain */ } ),
461 new ParameterDefn<float>("TerrainCollisionMargin", "Margin where collision checking starts" , 480 new ParameterDefn<float>("TerrainCollisionMargin", "Margin where collision checking starts" ,
462 0.08f, 481 0.08f,
463 (s) => { return TerrainCollisionMargin; }, 482 (s) => { return TerrainCollisionMargin; },