aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Physics/BulletSPlugin/BSParam.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Physics/BulletSPlugin/BSParam.cs')
-rwxr-xr-xOpenSim/Region/Physics/BulletSPlugin/BSParam.cs24
1 files changed, 24 insertions, 0 deletions
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSParam.cs b/OpenSim/Region/Physics/BulletSPlugin/BSParam.cs
index 77bdacb..4d89a88 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; }
@@ -74,9 +88,11 @@ public static class BSParam
74 public static bool ShouldRemoveZeroWidthTriangles { get; private set; } 88 public static bool ShouldRemoveZeroWidthTriangles { get; private set; }
75 89
76 public static float TerrainImplementation { get; private set; } 90 public static float TerrainImplementation { get; private set; }
91 public static int TerrainMeshMagnification { get; private set; }
77 public static float TerrainFriction { get; private set; } 92 public static float TerrainFriction { get; private set; }
78 public static float TerrainHitFraction { get; private set; } 93 public static float TerrainHitFraction { get; private set; }
79 public static float TerrainRestitution { get; private set; } 94 public static float TerrainRestitution { get; private set; }
95 public static float TerrainContactProcessingThreshold { get; private set; }
80 public static float TerrainCollisionMargin { get; private set; } 96 public static float TerrainCollisionMargin { get; private set; }
81 97
82 public static float DefaultFriction { get; private set; } 98 public static float DefaultFriction { get; private set; }
@@ -446,6 +462,10 @@ public static class BSParam
446 (float)BSTerrainPhys.TerrainImplementation.Mesh, 462 (float)BSTerrainPhys.TerrainImplementation.Mesh,
447 (s) => { return TerrainImplementation; }, 463 (s) => { return TerrainImplementation; },
448 (s,v) => { TerrainImplementation = v; } ), 464 (s,v) => { TerrainImplementation = v; } ),
465 new ParameterDefn<int>("TerrainMeshMagnification", "Number of times the 256x256 heightmap is multiplied to create the terrain mesh" ,
466 3,
467 (s) => { return TerrainMeshMagnification; },
468 (s,v) => { TerrainMeshMagnification = v; } ),
449 new ParameterDefn<float>("TerrainFriction", "Factor to reduce movement against terrain surface" , 469 new ParameterDefn<float>("TerrainFriction", "Factor to reduce movement against terrain surface" ,
450 0.3f, 470 0.3f,
451 (s) => { return TerrainFriction; }, 471 (s) => { return TerrainFriction; },
@@ -458,6 +478,10 @@ public static class BSParam
458 0f, 478 0f,
459 (s) => { return TerrainRestitution; }, 479 (s) => { return TerrainRestitution; },
460 (s,v) => { TerrainRestitution = v; /* TODO: set on real terrain */ } ), 480 (s,v) => { TerrainRestitution = v; /* TODO: set on real terrain */ } ),
481 new ParameterDefn<float>("TerrainContactProcessingThreshold", "Distance from terrain to stop processing collisions" ,
482 0.0f,
483 (s) => { return TerrainContactProcessingThreshold; },
484 (s,v) => { TerrainContactProcessingThreshold = v; /* TODO: set on real terrain */ } ),
461 new ParameterDefn<float>("TerrainCollisionMargin", "Margin where collision checking starts" , 485 new ParameterDefn<float>("TerrainCollisionMargin", "Margin where collision checking starts" ,
462 0.08f, 486 0.08f,
463 (s) => { return TerrainCollisionMargin; }, 487 (s) => { return TerrainCollisionMargin; },