BulletSim: simplify parameter specification by reducing the number of
specifications required for simple properties with defaults.user_profiles
parent
f9fb1484aa
commit
bf31896983
|
@ -146,7 +146,7 @@ namespace OpenSim.Region.Physics.BulletSPlugin
|
||||||
enableAngularVerticalAttraction = true;
|
enableAngularVerticalAttraction = true;
|
||||||
enableAngularDeflection = false;
|
enableAngularDeflection = false;
|
||||||
enableAngularBanking = true;
|
enableAngularBanking = true;
|
||||||
if (BSParam.VehicleDebuggingEnabled)
|
if (BSParam.VehicleDebuggingEnable)
|
||||||
{
|
{
|
||||||
enableAngularVerticalAttraction = true;
|
enableAngularVerticalAttraction = true;
|
||||||
enableAngularDeflection = false;
|
enableAngularDeflection = false;
|
||||||
|
|
|
@ -26,6 +26,7 @@
|
||||||
*/
|
*/
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using System.Reflection;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
|
|
||||||
using OpenSim.Region.Physics.Manager;
|
using OpenSim.Region.Physics.Manager;
|
||||||
|
@ -144,7 +145,7 @@ public static class BSParam
|
||||||
public static Vector3 VehicleAngularFactor { get; private set; }
|
public static Vector3 VehicleAngularFactor { get; private set; }
|
||||||
public static float VehicleGroundGravityFudge { get; private set; }
|
public static float VehicleGroundGravityFudge { get; private set; }
|
||||||
public static float VehicleAngularBankingTimescaleFudge { get; private set; }
|
public static float VehicleAngularBankingTimescaleFudge { get; private set; }
|
||||||
public static bool VehicleDebuggingEnabled { get; private set; }
|
public static bool VehicleDebuggingEnable { get; private set; }
|
||||||
|
|
||||||
// Convex Hulls
|
// Convex Hulls
|
||||||
public static int CSHullMaxDepthSplit { get; private set; }
|
public static int CSHullMaxDepthSplit { get; private set; }
|
||||||
|
@ -236,17 +237,41 @@ public static class BSParam
|
||||||
getter = pGetter;
|
getter = pGetter;
|
||||||
objectSet = pObjSetter;
|
objectSet = pObjSetter;
|
||||||
}
|
}
|
||||||
/* Wish I could simplify using this definition but CLR doesn't store references so closure around delegates of references won't work
|
// Simple parameter variable where property name is the same as the INI file name
|
||||||
* TODO: Maybe use reflection and the name of the variable to create a reference for the getter/setter.
|
// and the value is only a simple get and set.
|
||||||
public ParameterDefn(string pName, string pDesc, T pDefault, ref T loc)
|
public ParameterDefn(string pName, string pDesc, T pDefault)
|
||||||
: base(pName, pDesc)
|
: base(pName, pDesc)
|
||||||
{
|
{
|
||||||
defaultValue = pDefault;
|
defaultValue = pDefault;
|
||||||
setter = (s, v) => { loc = v; };
|
setter = (s, v) => { SetValueByName(s, name, v); };
|
||||||
getter = (s) => { return loc; };
|
getter = (s) => { return GetValueByName(s, name); };
|
||||||
objectSet = null;
|
objectSet = null;
|
||||||
}
|
}
|
||||||
*/
|
// Use reflection to find the property named 'pName' in BSParam and assign 'val' to same.
|
||||||
|
private void SetValueByName(BSScene s, string pName, T val)
|
||||||
|
{
|
||||||
|
PropertyInfo prop = typeof(BSParam).GetProperty(pName, BindingFlags.Public | BindingFlags.Static | BindingFlags.FlattenHierarchy);
|
||||||
|
if (prop == null)
|
||||||
|
{
|
||||||
|
// This should only be output when someone adds a new INI parameter and misspells the name.
|
||||||
|
s.Logger.ErrorFormat("{0} SetValueByName: did not find '{1}'. Verify specified property name is the same as the given INI parameters name.", LogHeader, pName);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
prop.SetValue(null, val, null);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// Use reflection to find the property named 'pName' in BSParam and return the value in same.
|
||||||
|
private T GetValueByName(BSScene s, string pName)
|
||||||
|
{
|
||||||
|
PropertyInfo prop = typeof(BSParam).GetProperty(pName, BindingFlags.Public | BindingFlags.Static | BindingFlags.FlattenHierarchy);
|
||||||
|
if (prop == null)
|
||||||
|
{
|
||||||
|
// This should only be output when someone adds a new INI parameter and misspells the name.
|
||||||
|
s.Logger.ErrorFormat("{0} GetValueByName: did not find '{1}'. Verify specified property name is the same as the given INI parameter name.", LogHeader, pName);
|
||||||
|
}
|
||||||
|
return (T)prop.GetValue(null, null);
|
||||||
|
}
|
||||||
public override void AssignDefault(BSScene s)
|
public override void AssignDefault(BSScene s)
|
||||||
{
|
{
|
||||||
setter(s, defaultValue);
|
setter(s, defaultValue);
|
||||||
|
@ -336,26 +361,16 @@ public static class BSParam
|
||||||
(s) => { return ShouldUseHullsForPhysicalObjects; },
|
(s) => { return ShouldUseHullsForPhysicalObjects; },
|
||||||
(s,v) => { ShouldUseHullsForPhysicalObjects = v; } ),
|
(s,v) => { ShouldUseHullsForPhysicalObjects = v; } ),
|
||||||
new ParameterDefn<bool>("ShouldRemoveZeroWidthTriangles", "If true, remove degenerate triangles from meshes",
|
new ParameterDefn<bool>("ShouldRemoveZeroWidthTriangles", "If true, remove degenerate triangles from meshes",
|
||||||
true,
|
true ),
|
||||||
(s) => { return ShouldRemoveZeroWidthTriangles; },
|
|
||||||
(s,v) => { ShouldRemoveZeroWidthTriangles = v; } ),
|
|
||||||
new ParameterDefn<bool>("ShouldUseBulletHACD", "If true, use the Bullet version of HACD",
|
new ParameterDefn<bool>("ShouldUseBulletHACD", "If true, use the Bullet version of HACD",
|
||||||
false,
|
false ),
|
||||||
(s) => { return ShouldUseBulletHACD; },
|
|
||||||
(s,v) => { ShouldUseBulletHACD = v; } ),
|
|
||||||
new ParameterDefn<bool>("ShouldUseSingleConvexHullForPrims", "If true, use a single convex hull shape for physical prims",
|
new ParameterDefn<bool>("ShouldUseSingleConvexHullForPrims", "If true, use a single convex hull shape for physical prims",
|
||||||
true,
|
true ),
|
||||||
(s) => { return ShouldUseSingleConvexHullForPrims; },
|
|
||||||
(s,v) => { ShouldUseSingleConvexHullForPrims = v; } ),
|
|
||||||
|
|
||||||
new ParameterDefn<int>("CrossingFailuresBeforeOutOfBounds", "How forgiving we are about getting into adjactent regions",
|
new ParameterDefn<int>("CrossingFailuresBeforeOutOfBounds", "How forgiving we are about getting into adjactent regions",
|
||||||
5,
|
5 ),
|
||||||
(s) => { return CrossingFailuresBeforeOutOfBounds; },
|
|
||||||
(s,v) => { CrossingFailuresBeforeOutOfBounds = v; } ),
|
|
||||||
new ParameterDefn<float>("UpdateVelocityChangeThreshold", "Change in updated velocity required before reporting change to simulator",
|
new ParameterDefn<float>("UpdateVelocityChangeThreshold", "Change in updated velocity required before reporting change to simulator",
|
||||||
0.1f,
|
0.1f ),
|
||||||
(s) => { return UpdateVelocityChangeThreshold; },
|
|
||||||
(s,v) => { UpdateVelocityChangeThreshold = v; } ),
|
|
||||||
|
|
||||||
new ParameterDefn<float>("MeshLevelOfDetail", "Level of detail to render meshes (32, 16, 8 or 4. 32=most detailed)",
|
new ParameterDefn<float>("MeshLevelOfDetail", "Level of detail to render meshes (32, 16, 8 or 4. 32=most detailed)",
|
||||||
32f,
|
32f,
|
||||||
|
@ -422,18 +437,12 @@ public static class BSParam
|
||||||
(s,v) => { MaxAddForceMagnitude = v; MaxAddForceMagnitudeSquared = v * v; } ),
|
(s,v) => { MaxAddForceMagnitude = v; MaxAddForceMagnitudeSquared = v * v; } ),
|
||||||
// Density is passed around as 100kg/m3. This scales that to 1kg/m3.
|
// Density is passed around as 100kg/m3. This scales that to 1kg/m3.
|
||||||
new ParameterDefn<float>("DensityScaleFactor", "Conversion for simulator/viewer density (100kg/m3) to physical density (1kg/m3)",
|
new ParameterDefn<float>("DensityScaleFactor", "Conversion for simulator/viewer density (100kg/m3) to physical density (1kg/m3)",
|
||||||
0.01f,
|
0.01f ),
|
||||||
(s) => { return DensityScaleFactor; },
|
|
||||||
(s,v) => { DensityScaleFactor = v; } ),
|
|
||||||
|
|
||||||
new ParameterDefn<float>("PID_D", "Derivitive factor for motion smoothing",
|
new ParameterDefn<float>("PID_D", "Derivitive factor for motion smoothing",
|
||||||
2200f,
|
2200f ),
|
||||||
(s) => { return (float)PID_D; },
|
|
||||||
(s,v) => { PID_D = v; } ),
|
|
||||||
new ParameterDefn<float>("PID_P", "Parameteric factor for motion smoothing",
|
new ParameterDefn<float>("PID_P", "Parameteric factor for motion smoothing",
|
||||||
900f,
|
900f ),
|
||||||
(s) => { return (float)PID_P; },
|
|
||||||
(s,v) => { PID_P = v; } ),
|
|
||||||
|
|
||||||
new ParameterDefn<float>("DefaultFriction", "Friction factor used on new objects",
|
new ParameterDefn<float>("DefaultFriction", "Friction factor used on new objects",
|
||||||
0.2f,
|
0.2f,
|
||||||
|
@ -500,94 +509,50 @@ public static class BSParam
|
||||||
(s,o) => { s.PE.SetContactProcessingThreshold(o.PhysBody, ContactProcessingThreshold); } ),
|
(s,o) => { s.PE.SetContactProcessingThreshold(o.PhysBody, ContactProcessingThreshold); } ),
|
||||||
|
|
||||||
new ParameterDefn<float>("TerrainImplementation", "Type of shape to use for terrain (0=heightmap, 1=mesh)",
|
new ParameterDefn<float>("TerrainImplementation", "Type of shape to use for terrain (0=heightmap, 1=mesh)",
|
||||||
(float)BSTerrainPhys.TerrainImplementation.Mesh,
|
(float)BSTerrainPhys.TerrainImplementation.Mesh ),
|
||||||
(s) => { return TerrainImplementation; },
|
|
||||||
(s,v) => { TerrainImplementation = v; } ),
|
|
||||||
new ParameterDefn<int>("TerrainMeshMagnification", "Number of times the 256x256 heightmap is multiplied to create the terrain mesh" ,
|
new ParameterDefn<int>("TerrainMeshMagnification", "Number of times the 256x256 heightmap is multiplied to create the terrain mesh" ,
|
||||||
2,
|
2 ),
|
||||||
(s) => { return TerrainMeshMagnification; },
|
|
||||||
(s,v) => { TerrainMeshMagnification = v; } ),
|
|
||||||
new ParameterDefn<float>("TerrainFriction", "Factor to reduce movement against terrain surface" ,
|
new ParameterDefn<float>("TerrainFriction", "Factor to reduce movement against terrain surface" ,
|
||||||
0.3f,
|
0.3f ),
|
||||||
(s) => { return TerrainFriction; },
|
|
||||||
(s,v) => { TerrainFriction = v; /* TODO: set on real terrain */} ),
|
|
||||||
new ParameterDefn<float>("TerrainHitFraction", "Distance to measure hit collisions" ,
|
new ParameterDefn<float>("TerrainHitFraction", "Distance to measure hit collisions" ,
|
||||||
0.8f,
|
0.8f ),
|
||||||
(s) => { return TerrainHitFraction; },
|
|
||||||
(s,v) => { TerrainHitFraction = v; /* TODO: set on real terrain */ } ),
|
|
||||||
new ParameterDefn<float>("TerrainRestitution", "Bouncyness" ,
|
new ParameterDefn<float>("TerrainRestitution", "Bouncyness" ,
|
||||||
0f,
|
0f ),
|
||||||
(s) => { return TerrainRestitution; },
|
|
||||||
(s,v) => { TerrainRestitution = v; /* TODO: set on real terrain */ } ),
|
|
||||||
new ParameterDefn<float>("TerrainContactProcessingThreshold", "Distance from terrain to stop processing collisions" ,
|
new ParameterDefn<float>("TerrainContactProcessingThreshold", "Distance from terrain to stop processing collisions" ,
|
||||||
0.0f,
|
0.0f ),
|
||||||
(s) => { return TerrainContactProcessingThreshold; },
|
|
||||||
(s,v) => { TerrainContactProcessingThreshold = v; /* TODO: set on real terrain */ } ),
|
|
||||||
new ParameterDefn<float>("TerrainCollisionMargin", "Margin where collision checking starts" ,
|
new ParameterDefn<float>("TerrainCollisionMargin", "Margin where collision checking starts" ,
|
||||||
0.08f,
|
0.08f ),
|
||||||
(s) => { return TerrainCollisionMargin; },
|
|
||||||
(s,v) => { TerrainCollisionMargin = v; /* TODO: set on real terrain */ } ),
|
|
||||||
|
|
||||||
new ParameterDefn<float>("AvatarFriction", "Factor to reduce movement against an avatar. Changed on avatar recreation.",
|
new ParameterDefn<float>("AvatarFriction", "Factor to reduce movement against an avatar. Changed on avatar recreation.",
|
||||||
0.2f,
|
0.2f ),
|
||||||
(s) => { return AvatarFriction; },
|
|
||||||
(s,v) => { AvatarFriction = v; } ),
|
|
||||||
new ParameterDefn<float>("AvatarStandingFriction", "Avatar friction when standing. Changed on avatar recreation.",
|
new ParameterDefn<float>("AvatarStandingFriction", "Avatar friction when standing. Changed on avatar recreation.",
|
||||||
0.95f,
|
0.95f ),
|
||||||
(s) => { return AvatarStandingFriction; },
|
|
||||||
(s,v) => { AvatarStandingFriction = v; } ),
|
|
||||||
new ParameterDefn<float>("AvatarAlwaysRunFactor", "Speed multiplier if avatar is set to always run",
|
new ParameterDefn<float>("AvatarAlwaysRunFactor", "Speed multiplier if avatar is set to always run",
|
||||||
1.3f,
|
1.3f ),
|
||||||
(s) => { return AvatarAlwaysRunFactor; },
|
|
||||||
(s,v) => { AvatarAlwaysRunFactor = v; } ),
|
|
||||||
new ParameterDefn<float>("AvatarDensity", "Density of an avatar. Changed on avatar recreation.",
|
new ParameterDefn<float>("AvatarDensity", "Density of an avatar. Changed on avatar recreation.",
|
||||||
3.5f,
|
3.5f) ,
|
||||||
(s) => { return AvatarDensity; },
|
|
||||||
(s,v) => { AvatarDensity = v; } ),
|
|
||||||
new ParameterDefn<float>("AvatarRestitution", "Bouncyness. Changed on avatar recreation.",
|
new ParameterDefn<float>("AvatarRestitution", "Bouncyness. Changed on avatar recreation.",
|
||||||
0f,
|
0f ),
|
||||||
(s) => { return AvatarRestitution; },
|
|
||||||
(s,v) => { AvatarRestitution = v; } ),
|
|
||||||
new ParameterDefn<float>("AvatarCapsuleWidth", "The distance between the sides of the avatar capsule",
|
new ParameterDefn<float>("AvatarCapsuleWidth", "The distance between the sides of the avatar capsule",
|
||||||
0.6f,
|
0.6f ) ,
|
||||||
(s) => { return AvatarCapsuleWidth; },
|
|
||||||
(s,v) => { AvatarCapsuleWidth = v; } ),
|
|
||||||
new ParameterDefn<float>("AvatarCapsuleDepth", "The distance between the front and back of the avatar capsule",
|
new ParameterDefn<float>("AvatarCapsuleDepth", "The distance between the front and back of the avatar capsule",
|
||||||
0.45f,
|
0.45f ),
|
||||||
(s) => { return AvatarCapsuleDepth; },
|
|
||||||
(s,v) => { AvatarCapsuleDepth = v; } ),
|
|
||||||
new ParameterDefn<float>("AvatarCapsuleHeight", "Default height of space around avatar",
|
new ParameterDefn<float>("AvatarCapsuleHeight", "Default height of space around avatar",
|
||||||
1.5f,
|
1.5f ),
|
||||||
(s) => { return AvatarCapsuleHeight; },
|
|
||||||
(s,v) => { AvatarCapsuleHeight = v; } ),
|
|
||||||
new ParameterDefn<float>("AvatarContactProcessingThreshold", "Distance from capsule to check for collisions",
|
new ParameterDefn<float>("AvatarContactProcessingThreshold", "Distance from capsule to check for collisions",
|
||||||
0.1f,
|
0.1f ),
|
||||||
(s) => { return AvatarContactProcessingThreshold; },
|
|
||||||
(s,v) => { AvatarContactProcessingThreshold = v; } ),
|
|
||||||
new ParameterDefn<float>("AvatarBelowGroundUpCorrectionMeters", "Meters to move avatar up if it seems to be below ground",
|
new ParameterDefn<float>("AvatarBelowGroundUpCorrectionMeters", "Meters to move avatar up if it seems to be below ground",
|
||||||
1.0f,
|
1.0f ),
|
||||||
(s) => { return AvatarBelowGroundUpCorrectionMeters; },
|
|
||||||
(s,v) => { AvatarBelowGroundUpCorrectionMeters = v; } ),
|
|
||||||
new ParameterDefn<float>("AvatarStepHeight", "Height of a step obstacle to consider step correction",
|
new ParameterDefn<float>("AvatarStepHeight", "Height of a step obstacle to consider step correction",
|
||||||
0.6f,
|
0.6f ) ,
|
||||||
(s) => { return AvatarStepHeight; },
|
|
||||||
(s,v) => { AvatarStepHeight = v; } ),
|
|
||||||
new ParameterDefn<float>("AvatarStepApproachFactor", "Factor to control angle of approach to step (0=straight on)",
|
new ParameterDefn<float>("AvatarStepApproachFactor", "Factor to control angle of approach to step (0=straight on)",
|
||||||
0.6f,
|
0.6f ),
|
||||||
(s) => { return AvatarStepApproachFactor; },
|
|
||||||
(s,v) => { AvatarStepApproachFactor = v; } ),
|
|
||||||
new ParameterDefn<float>("AvatarStepForceFactor", "Controls the amount of force up applied to step up onto a step",
|
new ParameterDefn<float>("AvatarStepForceFactor", "Controls the amount of force up applied to step up onto a step",
|
||||||
1.0f,
|
1.0f ),
|
||||||
(s) => { return AvatarStepForceFactor; },
|
|
||||||
(s,v) => { AvatarStepForceFactor = v; } ),
|
|
||||||
new ParameterDefn<float>("AvatarStepUpCorrectionFactor", "Multiplied by height of step collision to create up movement at step",
|
new ParameterDefn<float>("AvatarStepUpCorrectionFactor", "Multiplied by height of step collision to create up movement at step",
|
||||||
1.0f,
|
1.0f ),
|
||||||
(s) => { return AvatarStepUpCorrectionFactor; },
|
|
||||||
(s,v) => { AvatarStepUpCorrectionFactor = v; } ),
|
|
||||||
new ParameterDefn<int>("AvatarStepSmoothingSteps", "Number of frames after a step collision that we continue walking up stairs",
|
new ParameterDefn<int>("AvatarStepSmoothingSteps", "Number of frames after a step collision that we continue walking up stairs",
|
||||||
2,
|
2 ),
|
||||||
(s) => { return AvatarStepSmoothingSteps; },
|
|
||||||
(s,v) => { AvatarStepSmoothingSteps = v; } ),
|
|
||||||
|
|
||||||
new ParameterDefn<float>("VehicleMaxLinearVelocity", "Maximum velocity magnitude that can be assigned to a vehicle",
|
new ParameterDefn<float>("VehicleMaxLinearVelocity", "Maximum velocity magnitude that can be assigned to a vehicle",
|
||||||
1000.0f,
|
1000.0f,
|
||||||
|
@ -598,37 +563,21 @@ public static class BSParam
|
||||||
(s) => { return (float)VehicleMaxAngularVelocity; },
|
(s) => { return (float)VehicleMaxAngularVelocity; },
|
||||||
(s,v) => { VehicleMaxAngularVelocity = v; VehicleMaxAngularVelocitySq = v * v; } ),
|
(s,v) => { VehicleMaxAngularVelocity = v; VehicleMaxAngularVelocitySq = v * v; } ),
|
||||||
new ParameterDefn<float>("VehicleAngularDamping", "Factor to damp vehicle angular movement per second (0.0 - 1.0)",
|
new ParameterDefn<float>("VehicleAngularDamping", "Factor to damp vehicle angular movement per second (0.0 - 1.0)",
|
||||||
0.0f,
|
0.0f ),
|
||||||
(s) => { return VehicleAngularDamping; },
|
|
||||||
(s,v) => { VehicleAngularDamping = v; } ),
|
|
||||||
new ParameterDefn<Vector3>("VehicleLinearFactor", "Fraction of physical linear changes applied to vehicle (<0,0,0> to <1,1,1>)",
|
new ParameterDefn<Vector3>("VehicleLinearFactor", "Fraction of physical linear changes applied to vehicle (<0,0,0> to <1,1,1>)",
|
||||||
new Vector3(1f, 1f, 1f),
|
new Vector3(1f, 1f, 1f) ),
|
||||||
(s) => { return VehicleLinearFactor; },
|
|
||||||
(s,v) => { VehicleLinearFactor = v; } ),
|
|
||||||
new ParameterDefn<Vector3>("VehicleAngularFactor", "Fraction of physical angular changes applied to vehicle (<0,0,0> to <1,1,1>)",
|
new ParameterDefn<Vector3>("VehicleAngularFactor", "Fraction of physical angular changes applied to vehicle (<0,0,0> to <1,1,1>)",
|
||||||
new Vector3(1f, 1f, 1f),
|
new Vector3(1f, 1f, 1f) ),
|
||||||
(s) => { return VehicleAngularFactor; },
|
|
||||||
(s,v) => { VehicleAngularFactor = v; } ),
|
|
||||||
new ParameterDefn<float>("VehicleFriction", "Friction of vehicle on the ground (0.0 - 1.0)",
|
new ParameterDefn<float>("VehicleFriction", "Friction of vehicle on the ground (0.0 - 1.0)",
|
||||||
0.0f,
|
0.0f ),
|
||||||
(s) => { return VehicleFriction; },
|
|
||||||
(s,v) => { VehicleFriction = v; } ),
|
|
||||||
new ParameterDefn<float>("VehicleRestitution", "Bouncyness factor for vehicles (0.0 - 1.0)",
|
new ParameterDefn<float>("VehicleRestitution", "Bouncyness factor for vehicles (0.0 - 1.0)",
|
||||||
0.0f,
|
0.0f ),
|
||||||
(s) => { return VehicleRestitution; },
|
|
||||||
(s,v) => { VehicleRestitution = v; } ),
|
|
||||||
new ParameterDefn<float>("VehicleGroundGravityFudge", "Factor to multiply gravity if a ground vehicle is probably on the ground (0.0 - 1.0)",
|
new ParameterDefn<float>("VehicleGroundGravityFudge", "Factor to multiply gravity if a ground vehicle is probably on the ground (0.0 - 1.0)",
|
||||||
0.2f,
|
0.2f ),
|
||||||
(s) => { return VehicleGroundGravityFudge; },
|
|
||||||
(s,v) => { VehicleGroundGravityFudge = v; } ),
|
|
||||||
new ParameterDefn<float>("VehicleAngularBankingTimescaleFudge", "Factor to multiple angular banking timescale. Tune to increase realism.",
|
new ParameterDefn<float>("VehicleAngularBankingTimescaleFudge", "Factor to multiple angular banking timescale. Tune to increase realism.",
|
||||||
60.0f,
|
60.0f ),
|
||||||
(s) => { return VehicleAngularBankingTimescaleFudge; },
|
|
||||||
(s,v) => { VehicleAngularBankingTimescaleFudge = v; } ),
|
|
||||||
new ParameterDefn<bool>("VehicleDebuggingEnable", "Turn on/off vehicle debugging",
|
new ParameterDefn<bool>("VehicleDebuggingEnable", "Turn on/off vehicle debugging",
|
||||||
false,
|
false ),
|
||||||
(s) => { return VehicleDebuggingEnabled; },
|
|
||||||
(s,v) => { VehicleDebuggingEnabled = v; } ),
|
|
||||||
|
|
||||||
new ParameterDefn<float>("MaxPersistantManifoldPoolSize", "Number of manifolds pooled (0 means default of 4096)",
|
new ParameterDefn<float>("MaxPersistantManifoldPoolSize", "Number of manifolds pooled (0 means default of 4096)",
|
||||||
0f,
|
0f,
|
||||||
|
@ -673,99 +622,53 @@ public static class BSParam
|
||||||
(s,v) => { GlobalContactBreakingThreshold = v; s.UnmanagedParams[0].globalContactBreakingThreshold = v; } ),
|
(s,v) => { GlobalContactBreakingThreshold = v; s.UnmanagedParams[0].globalContactBreakingThreshold = v; } ),
|
||||||
|
|
||||||
new ParameterDefn<int>("CSHullMaxDepthSplit", "CS impl: max depth to split for hull. 1-10 but > 7 is iffy",
|
new ParameterDefn<int>("CSHullMaxDepthSplit", "CS impl: max depth to split for hull. 1-10 but > 7 is iffy",
|
||||||
7,
|
7 ),
|
||||||
(s) => { return CSHullMaxDepthSplit; },
|
|
||||||
(s,v) => { CSHullMaxDepthSplit = v; } ),
|
|
||||||
new ParameterDefn<int>("CSHullMaxDepthSplitForSimpleShapes", "CS impl: max depth setting for simple prim shapes",
|
new ParameterDefn<int>("CSHullMaxDepthSplitForSimpleShapes", "CS impl: max depth setting for simple prim shapes",
|
||||||
2,
|
2 ),
|
||||||
(s) => { return CSHullMaxDepthSplitForSimpleShapes; },
|
|
||||||
(s,v) => { CSHullMaxDepthSplitForSimpleShapes = v; } ),
|
|
||||||
new ParameterDefn<float>("CSHullConcavityThresholdPercent", "CS impl: concavity threshold percent (0-20)",
|
new ParameterDefn<float>("CSHullConcavityThresholdPercent", "CS impl: concavity threshold percent (0-20)",
|
||||||
5f,
|
5f ),
|
||||||
(s) => { return CSHullConcavityThresholdPercent; },
|
|
||||||
(s,v) => { CSHullConcavityThresholdPercent = v; } ),
|
|
||||||
new ParameterDefn<float>("CSHullVolumeConservationThresholdPercent", "percent volume conservation to collapse hulls (0-30)",
|
new ParameterDefn<float>("CSHullVolumeConservationThresholdPercent", "percent volume conservation to collapse hulls (0-30)",
|
||||||
5f,
|
5f ),
|
||||||
(s) => { return CSHullVolumeConservationThresholdPercent; },
|
|
||||||
(s,v) => { CSHullVolumeConservationThresholdPercent = v; } ),
|
|
||||||
new ParameterDefn<int>("CSHullMaxVertices", "CS impl: maximum number of vertices in output hulls. Keep < 50.",
|
new ParameterDefn<int>("CSHullMaxVertices", "CS impl: maximum number of vertices in output hulls. Keep < 50.",
|
||||||
32,
|
32 ),
|
||||||
(s) => { return CSHullMaxVertices; },
|
|
||||||
(s,v) => { CSHullMaxVertices = v; } ),
|
|
||||||
new ParameterDefn<float>("CSHullMaxSkinWidth", "CS impl: skin width to apply to output hulls.",
|
new ParameterDefn<float>("CSHullMaxSkinWidth", "CS impl: skin width to apply to output hulls.",
|
||||||
0f,
|
0f ),
|
||||||
(s) => { return CSHullMaxSkinWidth; },
|
|
||||||
(s,v) => { CSHullMaxSkinWidth = v; } ),
|
|
||||||
|
|
||||||
new ParameterDefn<float>("BHullMaxVerticesPerHull", "Bullet impl: max number of vertices per created hull",
|
new ParameterDefn<float>("BHullMaxVerticesPerHull", "Bullet impl: max number of vertices per created hull",
|
||||||
100f,
|
100f ),
|
||||||
(s) => { return BHullMaxVerticesPerHull; },
|
|
||||||
(s,v) => { BHullMaxVerticesPerHull = v; } ),
|
|
||||||
new ParameterDefn<float>("BHullMinClusters", "Bullet impl: minimum number of hulls to create per mesh",
|
new ParameterDefn<float>("BHullMinClusters", "Bullet impl: minimum number of hulls to create per mesh",
|
||||||
2f,
|
2f ),
|
||||||
(s) => { return BHullMinClusters; },
|
|
||||||
(s,v) => { BHullMinClusters = v; } ),
|
|
||||||
new ParameterDefn<float>("BHullCompacityWeight", "Bullet impl: weight factor for how compact to make hulls",
|
new ParameterDefn<float>("BHullCompacityWeight", "Bullet impl: weight factor for how compact to make hulls",
|
||||||
2f,
|
0.1f ),
|
||||||
(s) => { return BHullCompacityWeight; },
|
|
||||||
(s,v) => { BHullCompacityWeight = v; } ),
|
|
||||||
new ParameterDefn<float>("BHullVolumeWeight", "Bullet impl: weight factor for volume in created hull",
|
new ParameterDefn<float>("BHullVolumeWeight", "Bullet impl: weight factor for volume in created hull",
|
||||||
0.1f,
|
0f ),
|
||||||
(s) => { return BHullVolumeWeight; },
|
|
||||||
(s,v) => { BHullVolumeWeight = v; } ),
|
|
||||||
new ParameterDefn<float>("BHullConcavity", "Bullet impl: weight factor for how convex a created hull can be",
|
new ParameterDefn<float>("BHullConcavity", "Bullet impl: weight factor for how convex a created hull can be",
|
||||||
100f,
|
100f ),
|
||||||
(s) => { return BHullConcavity; },
|
|
||||||
(s,v) => { BHullConcavity = v; } ),
|
|
||||||
new ParameterDefn<bool>("BHullAddExtraDistPoints", "Bullet impl: whether to add extra vertices for long distance vectors",
|
new ParameterDefn<bool>("BHullAddExtraDistPoints", "Bullet impl: whether to add extra vertices for long distance vectors",
|
||||||
false,
|
false ),
|
||||||
(s) => { return BHullAddExtraDistPoints; },
|
|
||||||
(s,v) => { BHullAddExtraDistPoints = v; } ),
|
|
||||||
new ParameterDefn<bool>("BHullAddNeighboursDistPoints", "Bullet impl: whether to add extra vertices between neighbor hulls",
|
new ParameterDefn<bool>("BHullAddNeighboursDistPoints", "Bullet impl: whether to add extra vertices between neighbor hulls",
|
||||||
false,
|
false ),
|
||||||
(s) => { return BHullAddNeighboursDistPoints; },
|
|
||||||
(s,v) => { BHullAddNeighboursDistPoints = v; } ),
|
|
||||||
new ParameterDefn<bool>("BHullAddFacesPoints", "Bullet impl: whether to add extra vertices to break up hull faces",
|
new ParameterDefn<bool>("BHullAddFacesPoints", "Bullet impl: whether to add extra vertices to break up hull faces",
|
||||||
false,
|
false ),
|
||||||
(s) => { return BHullAddFacesPoints; },
|
|
||||||
(s,v) => { BHullAddFacesPoints = v; } ),
|
|
||||||
new ParameterDefn<bool>("BHullShouldAdjustCollisionMargin", "Bullet impl: whether to shrink resulting hulls to account for collision margin",
|
new ParameterDefn<bool>("BHullShouldAdjustCollisionMargin", "Bullet impl: whether to shrink resulting hulls to account for collision margin",
|
||||||
false,
|
false ),
|
||||||
(s) => { return BHullShouldAdjustCollisionMargin; },
|
|
||||||
(s,v) => { BHullShouldAdjustCollisionMargin = v; } ),
|
|
||||||
|
|
||||||
new ParameterDefn<float>("LinksetImplementation", "Type of linkset implementation (0=Constraint, 1=Compound, 2=Manual)",
|
new ParameterDefn<float>("LinksetImplementation", "Type of linkset implementation (0=Constraint, 1=Compound, 2=Manual)",
|
||||||
(float)BSLinkset.LinksetImplementation.Compound,
|
(float)BSLinkset.LinksetImplementation.Compound ),
|
||||||
(s) => { return LinksetImplementation; },
|
|
||||||
(s,v) => { LinksetImplementation = v; } ),
|
|
||||||
new ParameterDefn<bool>("LinkConstraintUseFrameOffset", "For linksets built with constraints, enable frame offsetFor linksets built with constraints, enable frame offset.",
|
new ParameterDefn<bool>("LinkConstraintUseFrameOffset", "For linksets built with constraints, enable frame offsetFor linksets built with constraints, enable frame offset.",
|
||||||
false,
|
false ),
|
||||||
(s) => { return LinkConstraintUseFrameOffset; },
|
|
||||||
(s,v) => { LinkConstraintUseFrameOffset = v; } ),
|
|
||||||
new ParameterDefn<bool>("LinkConstraintEnableTransMotor", "Whether to enable translational motor on linkset constraints",
|
new ParameterDefn<bool>("LinkConstraintEnableTransMotor", "Whether to enable translational motor on linkset constraints",
|
||||||
true,
|
true ),
|
||||||
(s) => { return LinkConstraintEnableTransMotor; },
|
|
||||||
(s,v) => { LinkConstraintEnableTransMotor = v; } ),
|
|
||||||
new ParameterDefn<float>("LinkConstraintTransMotorMaxVel", "Maximum velocity to be applied by translational motor in linkset constraints",
|
new ParameterDefn<float>("LinkConstraintTransMotorMaxVel", "Maximum velocity to be applied by translational motor in linkset constraints",
|
||||||
5.0f,
|
5.0f ),
|
||||||
(s) => { return LinkConstraintTransMotorMaxVel; },
|
|
||||||
(s,v) => { LinkConstraintTransMotorMaxVel = v; } ),
|
|
||||||
new ParameterDefn<float>("LinkConstraintTransMotorMaxForce", "Maximum force to be applied by translational motor in linkset constraints",
|
new ParameterDefn<float>("LinkConstraintTransMotorMaxForce", "Maximum force to be applied by translational motor in linkset constraints",
|
||||||
0.1f,
|
0.1f ),
|
||||||
(s) => { return LinkConstraintTransMotorMaxForce; },
|
|
||||||
(s,v) => { LinkConstraintTransMotorMaxForce = v; } ),
|
|
||||||
new ParameterDefn<float>("LinkConstraintCFM", "Amount constraint can be violated. 0=no violation, 1=infinite. Default=0.1",
|
new ParameterDefn<float>("LinkConstraintCFM", "Amount constraint can be violated. 0=no violation, 1=infinite. Default=0.1",
|
||||||
0.1f,
|
0.1f ),
|
||||||
(s) => { return LinkConstraintCFM; },
|
|
||||||
(s,v) => { LinkConstraintCFM = v; } ),
|
|
||||||
new ParameterDefn<float>("LinkConstraintERP", "Amount constraint is corrected each tick. 0=none, 1=all. Default = 0.2",
|
new ParameterDefn<float>("LinkConstraintERP", "Amount constraint is corrected each tick. 0=none, 1=all. Default = 0.2",
|
||||||
0.1f,
|
0.1f ),
|
||||||
(s) => { return LinkConstraintERP; },
|
|
||||||
(s,v) => { LinkConstraintERP = v; } ),
|
|
||||||
new ParameterDefn<float>("LinkConstraintSolverIterations", "Number of solver iterations when computing constraint. (0 = Bullet default)",
|
new ParameterDefn<float>("LinkConstraintSolverIterations", "Number of solver iterations when computing constraint. (0 = Bullet default)",
|
||||||
40,
|
40 ),
|
||||||
(s) => { return LinkConstraintSolverIterations; },
|
|
||||||
(s,v) => { LinkConstraintSolverIterations = v; } ),
|
|
||||||
|
|
||||||
new ParameterDefn<int>("PhysicsMetricFrames", "Frames between outputting detailed phys metrics. (0 is off)",
|
new ParameterDefn<int>("PhysicsMetricFrames", "Frames between outputting detailed phys metrics. (0 is off)",
|
||||||
0,
|
0,
|
||||||
|
|
Loading…
Reference in New Issue