From 4808b8ee380d32c1b63654f9c0170a5f07b46bd0 Mon Sep 17 00:00:00 2001 From: Robert Adams Date: Fri, 8 Feb 2013 16:27:44 -0800 Subject: BulletSim: add parameter to set global contact breaking threshold. Update DLLs and SOs for setting same. --- OpenSim/Region/Physics/BulletSPlugin/BSApiTemplate.cs | 1 + OpenSim/Region/Physics/BulletSPlugin/BSParam.cs | 6 ++++++ 2 files changed, 7 insertions(+) (limited to 'OpenSim') diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSApiTemplate.cs b/OpenSim/Region/Physics/BulletSPlugin/BSApiTemplate.cs index 5e06c1e..7ab86d2 100644 --- a/OpenSim/Region/Physics/BulletSPlugin/BSApiTemplate.cs +++ b/OpenSim/Region/Physics/BulletSPlugin/BSApiTemplate.cs @@ -183,6 +183,7 @@ public struct ConfigurationParameters public float shouldEnableFrictionCaching; public float numberOfSolverIterations; public float useSingleSidedMeshes; + public float globalContactBreakingThreshold; public float physicsLoggingFrames; diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSParam.cs b/OpenSim/Region/Physics/BulletSPlugin/BSParam.cs index 6cb7434..3e0b4bc 100755 --- a/OpenSim/Region/Physics/BulletSPlugin/BSParam.cs +++ b/OpenSim/Region/Physics/BulletSPlugin/BSParam.cs @@ -87,6 +87,7 @@ public static class BSParam public static float NumberOfSolverIterations; public static bool UseSingleSidedMeshes { get { return UseSingleSidedMeshesF != ConfigurationParameters.numericFalse; } } public static float UseSingleSidedMeshesF; + public static float GlobalContactBreakingThreshold; // Avatar parameters public static float AvatarFriction { get; private set; } @@ -570,6 +571,11 @@ public static class BSParam (s,cf,p,v) => { UseSingleSidedMeshesF = BSParam.NumericBool(cf.GetBoolean(p, BSParam.BoolNumeric(v))); }, (s) => { return UseSingleSidedMeshesF; }, (s,p,l,v) => { UseSingleSidedMeshesF = v; s.UnmanagedParams[0].useSingleSidedMeshes = v; } ), + new ParameterDefn("GlobalContactBreakingThreshold", "Amount of shape radius before breaking a collision contact (0 says Bullet default (0.2))", + 0f, + (s,cf,p,v) => { GlobalContactBreakingThreshold = cf.GetFloat(p, v); }, + (s) => { return GlobalContactBreakingThreshold; }, + (s,p,l,v) => { GlobalContactBreakingThreshold = v; s.UnmanagedParams[0].globalContactBreakingThreshold = v; } ), new ParameterDefn("LinksetImplementation", "Type of linkset implementation (0=Constraint, 1=Compound, 2=Manual)", (float)BSLinkset.LinksetImplementation.Compound, -- cgit v1.1