BulletSim: add a bunch of internal Bullet configuration parameters to OpenSimDefaults.ini and the code.
parent
1273f259e4
commit
142de1d02f
|
@ -240,6 +240,15 @@ public class BSScene : PhysicsScene, IPhysicsParameters
|
||||||
parms.avatarDensity = 60f;
|
parms.avatarDensity = 60f;
|
||||||
parms.avatarCapsuleRadius = 0.37f;
|
parms.avatarCapsuleRadius = 0.37f;
|
||||||
parms.avatarCapsuleHeight = 1.5f; // 2.140599f
|
parms.avatarCapsuleHeight = 1.5f; // 2.140599f
|
||||||
|
parms.avatarContactProcessingThreshold = 0.1f;
|
||||||
|
|
||||||
|
parms.maxPersistantManifoldPoolSize = 0f;
|
||||||
|
parms.shouldDisableContactPoolDynamicAllocation = ConfigurationParameters.numericFalse;
|
||||||
|
parms.shouldForceUpdateAllAabbs = ConfigurationParameters.numericFalse;
|
||||||
|
parms.shouldRandomizeSolverOrder = ConfigurationParameters.numericFalse;
|
||||||
|
parms.shouldSplitSimulationIslands = ConfigurationParameters.numericFalse;
|
||||||
|
parms.shouldEnableFrictionCaching = ConfigurationParameters.numericFalse;
|
||||||
|
parms.numberOfSolverIterations = 0f; // means use default
|
||||||
|
|
||||||
if (config != null)
|
if (config != null)
|
||||||
{
|
{
|
||||||
|
@ -285,11 +294,36 @@ public class BSScene : PhysicsScene, IPhysicsParameters
|
||||||
parms.avatarDensity = pConfig.GetFloat("AvatarDensity", parms.avatarDensity);
|
parms.avatarDensity = pConfig.GetFloat("AvatarDensity", parms.avatarDensity);
|
||||||
parms.avatarCapsuleRadius = pConfig.GetFloat("AvatarCapsuleRadius", parms.avatarCapsuleRadius);
|
parms.avatarCapsuleRadius = pConfig.GetFloat("AvatarCapsuleRadius", parms.avatarCapsuleRadius);
|
||||||
parms.avatarCapsuleHeight = pConfig.GetFloat("AvatarCapsuleHeight", parms.avatarCapsuleHeight);
|
parms.avatarCapsuleHeight = pConfig.GetFloat("AvatarCapsuleHeight", parms.avatarCapsuleHeight);
|
||||||
|
parms.avatarContactProcessingThreshold = pConfig.GetFloat("AvatarContactProcessingThreshold", parms.avatarContactProcessingThreshold);
|
||||||
|
|
||||||
|
parms.maxPersistantManifoldPoolSize = pConfig.GetFloat("MaxPersistantManifoldPoolSize", parms.maxPersistantManifoldPoolSize);
|
||||||
|
parms.shouldDisableContactPoolDynamicAllocation = ParamBoolean(pConfig, "ShouldDisableContactPoolDynamicAllocation", parms.shouldDisableContactPoolDynamicAllocation);
|
||||||
|
parms.shouldForceUpdateAllAabbs = ParamBoolean(pConfig, "ShouldForceUpdateAllAabbs", parms.shouldForceUpdateAllAabbs);
|
||||||
|
parms.shouldRandomizeSolverOrder = ParamBoolean(pConfig, "ShouldRandomizeSolverOrder", parms.shouldRandomizeSolverOrder);
|
||||||
|
parms.shouldSplitSimulationIslands = ParamBoolean(pConfig, "ShouldSplitSimulationIslands", parms.shouldSplitSimulationIslands);
|
||||||
|
parms.shouldEnableFrictionCaching = ParamBoolean(pConfig, "ShouldEnableFrictionCaching", parms.shouldEnableFrictionCaching);
|
||||||
|
parms.numberOfSolverIterations = pConfig.GetFloat("NumberOfSolverIterations", parms.numberOfSolverIterations);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
m_params[0] = parms;
|
m_params[0] = parms;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// A helper function that handles a true/false parameter and returns the proper float number encoding
|
||||||
|
float ParamBoolean(IConfig config, string parmName, float deflt)
|
||||||
|
{
|
||||||
|
float ret = deflt;
|
||||||
|
if (config.Contains(parmName))
|
||||||
|
{
|
||||||
|
ret = ConfigurationParameters.numericFalse;
|
||||||
|
if (config.GetBoolean(parmName, false))
|
||||||
|
{
|
||||||
|
ret = ConfigurationParameters.numericTrue;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// Called directly from unmanaged code so don't do much
|
// Called directly from unmanaged code so don't do much
|
||||||
private void BulletLogger(string msg)
|
private void BulletLogger(string msg)
|
||||||
{
|
{
|
||||||
|
|
|
@ -132,6 +132,15 @@ public struct ConfigurationParameters
|
||||||
public float avatarRestitution;
|
public float avatarRestitution;
|
||||||
public float avatarCapsuleRadius;
|
public float avatarCapsuleRadius;
|
||||||
public float avatarCapsuleHeight;
|
public float avatarCapsuleHeight;
|
||||||
|
public float avatarContactProcessingThreshold;
|
||||||
|
|
||||||
|
public float maxPersistantManifoldPoolSize;
|
||||||
|
public float shouldDisableContactPoolDynamicAllocation;
|
||||||
|
public float shouldForceUpdateAllAabbs;
|
||||||
|
public float shouldRandomizeSolverOrder;
|
||||||
|
public float shouldSplitSimulationIslands;
|
||||||
|
public float shouldEnableFrictionCaching;
|
||||||
|
public float numberOfSolverIterations;
|
||||||
|
|
||||||
public const float numericTrue = 1f;
|
public const float numericTrue = 1f;
|
||||||
public const float numericFalse = 0f;
|
public const float numericFalse = 0f;
|
||||||
|
|
|
@ -851,6 +851,7 @@
|
||||||
AvatarDensity = 60.0
|
AvatarDensity = 60.0
|
||||||
AvatarCapsuleRadius = 0.37
|
AvatarCapsuleRadius = 0.37
|
||||||
AvatarCapsuleHeight = 1.5
|
AvatarCapsuleHeight = 1.5
|
||||||
|
AvatarContactProcessingThreshold = 0.1;
|
||||||
|
|
||||||
MaxObjectMass = 10000.01
|
MaxObjectMass = 10000.01
|
||||||
|
|
||||||
|
@ -863,6 +864,14 @@
|
||||||
CcdMotionThreshold = 0.0
|
CcdMotionThreshold = 0.0
|
||||||
CcdSweptSphereRadius = 0.0
|
CcdSweptSphereRadius = 0.0
|
||||||
ContactProcessingThreshold = 0.1
|
ContactProcessingThreshold = 0.1
|
||||||
|
MaxPersistantManifoldPoolSize = 0;
|
||||||
|
ShouldDisableContactPoolDynamicAllocation = False;
|
||||||
|
ShouldForceUpdateAllAabbs = False;
|
||||||
|
ShouldRandomizeSolverOrder = False;
|
||||||
|
ShouldSplitSimulationIslands = False;
|
||||||
|
ShouldEnableFrictionCaching = False;
|
||||||
|
NumberOfSolverIterations = 0;
|
||||||
|
|
||||||
|
|
||||||
; Whether to mesh sculpties
|
; Whether to mesh sculpties
|
||||||
MeshSculptedPrim = true
|
MeshSculptedPrim = true
|
||||||
|
|
Loading…
Reference in New Issue