BulletSim: add parameter to set global contact breaking threshold. Update DLLs and SOs for setting same.

user_profiles
Robert Adams 2013-02-08 16:27:44 -08:00
parent 222040f1ec
commit 4808b8ee38
6 changed files with 7 additions and 0 deletions

View File

@ -183,6 +183,7 @@ public struct ConfigurationParameters
public float shouldEnableFrictionCaching;
public float numberOfSolverIterations;
public float useSingleSidedMeshes;
public float globalContactBreakingThreshold;
public float physicsLoggingFrames;

View File

@ -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,

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.