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.cs155
1 files changed, 95 insertions, 60 deletions
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSParam.cs b/OpenSim/Region/Physics/BulletSPlugin/BSParam.cs
index 8c098b2..965c382 100755
--- a/OpenSim/Region/Physics/BulletSPlugin/BSParam.cs
+++ b/OpenSim/Region/Physics/BulletSPlugin/BSParam.cs
@@ -39,6 +39,7 @@ public static class BSParam
39{ 39{
40 // Level of Detail values kept as float because that's what the Meshmerizer wants 40 // Level of Detail values kept as float because that's what the Meshmerizer wants
41 public static float MeshLOD { get; private set; } 41 public static float MeshLOD { get; private set; }
42 public static float MeshCircularLOD { get; private set; }
42 public static float MeshMegaPrimLOD { get; private set; } 43 public static float MeshMegaPrimLOD { get; private set; }
43 public static float MeshMegaPrimThreshold { get; private set; } 44 public static float MeshMegaPrimThreshold { get; private set; }
44 public static float SculptLOD { get; private set; } 45 public static float SculptLOD { get; private set; }
@@ -61,6 +62,7 @@ public static class BSParam
61 public static bool ShouldMeshSculptedPrim { get; private set; } // cause scuplted prims to get meshed 62 public static bool ShouldMeshSculptedPrim { get; private set; } // cause scuplted prims to get meshed
62 public static bool ShouldForceSimplePrimMeshing { get; private set; } // if a cube or sphere, let Bullet do internal shapes 63 public static bool ShouldForceSimplePrimMeshing { get; private set; } // if a cube or sphere, let Bullet do internal shapes
63 public static bool ShouldUseHullsForPhysicalObjects { get; private set; } // 'true' if should create hulls for physical objects 64 public static bool ShouldUseHullsForPhysicalObjects { get; private set; } // 'true' if should create hulls for physical objects
65 public static bool ShouldRemoveZeroWidthTriangles { get; private set; }
64 66
65 public static float TerrainImplementation { get; private set; } 67 public static float TerrainImplementation { get; private set; }
66 public static float TerrainFriction { get; private set; } 68 public static float TerrainFriction { get; private set; }
@@ -68,6 +70,24 @@ public static class BSParam
68 public static float TerrainRestitution { get; private set; } 70 public static float TerrainRestitution { get; private set; }
69 public static float TerrainCollisionMargin { get; private set; } 71 public static float TerrainCollisionMargin { get; private set; }
70 72
73 public static float DefaultFriction;
74 public static float DefaultDensity;
75 public static float DefaultRestitution;
76 public static float CollisionMargin;
77 public static float Gravity;
78
79 // Physics Engine operation
80 public static float MaxPersistantManifoldPoolSize;
81 public static float MaxCollisionAlgorithmPoolSize;
82 public static float ShouldDisableContactPoolDynamicAllocation;
83 public static float ShouldForceUpdateAllAabbs;
84 public static float ShouldRandomizeSolverOrder;
85 public static float ShouldSplitSimulationIslands;
86 public static float ShouldEnableFrictionCaching;
87 public static float NumberOfSolverIterations;
88 public static bool UseSingleSidedMeshes { get { return UseSingleSidedMeshesF != ConfigurationParameters.numericFalse; } }
89 public static float UseSingleSidedMeshesF;
90
71 // Avatar parameters 91 // Avatar parameters
72 public static float AvatarFriction { get; private set; } 92 public static float AvatarFriction { get; private set; }
73 public static float AvatarStandingFriction { get; private set; } 93 public static float AvatarStandingFriction { get; private set; }
@@ -199,22 +219,32 @@ public static class BSParam
199 (s,cf,p,v) => { ShouldUseHullsForPhysicalObjects = cf.GetBoolean(p, BSParam.BoolNumeric(v)); }, 219 (s,cf,p,v) => { ShouldUseHullsForPhysicalObjects = cf.GetBoolean(p, BSParam.BoolNumeric(v)); },
200 (s) => { return BSParam.NumericBool(ShouldUseHullsForPhysicalObjects); }, 220 (s) => { return BSParam.NumericBool(ShouldUseHullsForPhysicalObjects); },
201 (s,p,l,v) => { ShouldUseHullsForPhysicalObjects = BSParam.BoolNumeric(v); } ), 221 (s,p,l,v) => { ShouldUseHullsForPhysicalObjects = BSParam.BoolNumeric(v); } ),
222 new ParameterDefn("ShouldRemoveZeroWidthTriangles", "If true, remove degenerate triangles from meshes",
223 ConfigurationParameters.numericTrue,
224 (s,cf,p,v) => { ShouldRemoveZeroWidthTriangles = cf.GetBoolean(p, BSParam.BoolNumeric(v)); },
225 (s) => { return BSParam.NumericBool(ShouldRemoveZeroWidthTriangles); },
226 (s,p,l,v) => { ShouldRemoveZeroWidthTriangles = BSParam.BoolNumeric(v); } ),
202 227
203 new ParameterDefn("MeshLevelOfDetail", "Level of detail to render meshes (32, 16, 8 or 4. 32=most detailed)", 228 new ParameterDefn("MeshLevelOfDetail", "Level of detail to render meshes (32, 16, 8 or 4. 32=most detailed)",
204 8f, 229 32f,
205 (s,cf,p,v) => { MeshLOD = (float)cf.GetInt(p, (int)v); }, 230 (s,cf,p,v) => { MeshLOD = (float)cf.GetInt(p, (int)v); },
206 (s) => { return MeshLOD; }, 231 (s) => { return MeshLOD; },
207 (s,p,l,v) => { MeshLOD = v; } ), 232 (s,p,l,v) => { MeshLOD = v; } ),
208 new ParameterDefn("MeshLevelOfDetailMegaPrim", "Level of detail to render meshes larger than threshold meters", 233 new ParameterDefn("MeshLevelOfDetailCircular", "Level of detail for prims with circular cuts or shapes",
209 16f, 234 32f,
210 (s,cf,p,v) => { MeshMegaPrimLOD = (float)cf.GetInt(p, (int)v); }, 235 (s,cf,p,v) => { MeshCircularLOD = (float)cf.GetInt(p, (int)v); },
211 (s) => { return MeshMegaPrimLOD; }, 236 (s) => { return MeshCircularLOD; },
212 (s,p,l,v) => { MeshMegaPrimLOD = v; } ), 237 (s,p,l,v) => { MeshCircularLOD = v; } ),
213 new ParameterDefn("MeshLevelOfDetailMegaPrimThreshold", "Size (in meters) of a mesh before using MeshMegaPrimLOD", 238 new ParameterDefn("MeshLevelOfDetailMegaPrimThreshold", "Size (in meters) of a mesh before using MeshMegaPrimLOD",
214 10f, 239 10f,
215 (s,cf,p,v) => { MeshMegaPrimThreshold = (float)cf.GetInt(p, (int)v); }, 240 (s,cf,p,v) => { MeshMegaPrimThreshold = (float)cf.GetInt(p, (int)v); },
216 (s) => { return MeshMegaPrimThreshold; }, 241 (s) => { return MeshMegaPrimThreshold; },
217 (s,p,l,v) => { MeshMegaPrimThreshold = v; } ), 242 (s,p,l,v) => { MeshMegaPrimThreshold = v; } ),
243 new ParameterDefn("MeshLevelOfDetailMegaPrim", "Level of detail to render meshes larger than threshold meters",
244 32f,
245 (s,cf,p,v) => { MeshMegaPrimLOD = (float)cf.GetInt(p, (int)v); },
246 (s) => { return MeshMegaPrimLOD; },
247 (s,p,l,v) => { MeshMegaPrimLOD = v; } ),
218 new ParameterDefn("SculptLevelOfDetail", "Level of detail to render sculpties (32, 16, 8 or 4. 32=most detailed)", 248 new ParameterDefn("SculptLevelOfDetail", "Level of detail to render sculpties (32, 16, 8 or 4. 32=most detailed)",
219 32f, 249 32f,
220 (s,cf,p,v) => { SculptLOD = (float)cf.GetInt(p, (int)v); }, 250 (s,cf,p,v) => { SculptLOD = (float)cf.GetInt(p, (int)v); },
@@ -287,29 +317,29 @@ public static class BSParam
287 317
288 new ParameterDefn("DefaultFriction", "Friction factor used on new objects", 318 new ParameterDefn("DefaultFriction", "Friction factor used on new objects",
289 0.2f, 319 0.2f,
290 (s,cf,p,v) => { s.UnmanagedParams[0].defaultFriction = cf.GetFloat(p, v); }, 320 (s,cf,p,v) => { DefaultFriction = cf.GetFloat(p, v); },
291 (s) => { return s.UnmanagedParams[0].defaultFriction; }, 321 (s) => { return DefaultFriction; },
292 (s,p,l,v) => { s.UnmanagedParams[0].defaultFriction = v; } ), 322 (s,p,l,v) => { DefaultFriction = v; s.UnmanagedParams[0].defaultFriction = v; } ),
293 new ParameterDefn("DefaultDensity", "Density for new objects" , 323 new ParameterDefn("DefaultDensity", "Density for new objects" ,
294 10.000006836f, // Aluminum g/cm3 324 10.000006836f, // Aluminum g/cm3
295 (s,cf,p,v) => { s.UnmanagedParams[0].defaultDensity = cf.GetFloat(p, v); }, 325 (s,cf,p,v) => { DefaultDensity = cf.GetFloat(p, v); },
296 (s) => { return s.UnmanagedParams[0].defaultDensity; }, 326 (s) => { return DefaultDensity; },
297 (s,p,l,v) => { s.UnmanagedParams[0].defaultDensity = v; } ), 327 (s,p,l,v) => { DefaultDensity = v; s.UnmanagedParams[0].defaultDensity = v; } ),
298 new ParameterDefn("DefaultRestitution", "Bouncyness of an object" , 328 new ParameterDefn("DefaultRestitution", "Bouncyness of an object" ,
299 0f, 329 0f,
300 (s,cf,p,v) => { s.UnmanagedParams[0].defaultRestitution = cf.GetFloat(p, v); }, 330 (s,cf,p,v) => { DefaultRestitution = cf.GetFloat(p, v); },
301 (s) => { return s.UnmanagedParams[0].defaultRestitution; }, 331 (s) => { return DefaultRestitution; },
302 (s,p,l,v) => { s.UnmanagedParams[0].defaultRestitution = v; } ), 332 (s,p,l,v) => { DefaultRestitution = v; s.UnmanagedParams[0].defaultRestitution = v; } ),
303 new ParameterDefn("CollisionMargin", "Margin around objects before collisions are calculated (must be zero!)", 333 new ParameterDefn("CollisionMargin", "Margin around objects before collisions are calculated (must be zero!)",
304 0.04f, 334 0.04f,
305 (s,cf,p,v) => { s.UnmanagedParams[0].collisionMargin = cf.GetFloat(p, v); }, 335 (s,cf,p,v) => { CollisionMargin = cf.GetFloat(p, v); },
306 (s) => { return s.UnmanagedParams[0].collisionMargin; }, 336 (s) => { return CollisionMargin; },
307 (s,p,l,v) => { s.UnmanagedParams[0].collisionMargin = v; } ), 337 (s,p,l,v) => { CollisionMargin = v; s.UnmanagedParams[0].collisionMargin = v; } ),
308 new ParameterDefn("Gravity", "Vertical force of gravity (negative means down)", 338 new ParameterDefn("Gravity", "Vertical force of gravity (negative means down)",
309 -9.80665f, 339 -9.80665f,
310 (s,cf,p,v) => { s.UnmanagedParams[0].gravity = cf.GetFloat(p, v); }, 340 (s,cf,p,v) => { Gravity = cf.GetFloat(p, v); },
311 (s) => { return s.UnmanagedParams[0].gravity; }, 341 (s) => { return Gravity; },
312 (s,p,l,v) => { s.UpdateParameterObject((x)=>{s.UnmanagedParams[0].gravity=x;}, p, PhysParameterEntry.APPLY_TO_NONE, v); }, 342 (s,p,l,v) => { Gravity = v; s.UnmanagedParams[0].gravity = v; },
313 (s,o,v) => { s.PE.SetGravity(o.PhysBody, new Vector3(0f,0f,v)); } ), 343 (s,o,v) => { s.PE.SetGravity(o.PhysBody, new Vector3(0f,0f,v)); } ),
314 344
315 345
@@ -317,49 +347,49 @@ public static class BSParam
317 0f, 347 0f,
318 (s,cf,p,v) => { LinearDamping = cf.GetFloat(p, v); }, 348 (s,cf,p,v) => { LinearDamping = cf.GetFloat(p, v); },
319 (s) => { return LinearDamping; }, 349 (s) => { return LinearDamping; },
320 (s,p,l,v) => { s.UpdateParameterObject((x)=>{LinearDamping=x;}, p, l, v); }, 350 (s,p,l,v) => { LinearDamping = v; },
321 (s,o,v) => { s.PE.SetDamping(o.PhysBody, v, AngularDamping); } ), 351 (s,o,v) => { s.PE.SetDamping(o.PhysBody, v, AngularDamping); } ),
322 new ParameterDefn("AngularDamping", "Factor to damp angular movement per second (0.0 - 1.0)", 352 new ParameterDefn("AngularDamping", "Factor to damp angular movement per second (0.0 - 1.0)",
323 0f, 353 0f,
324 (s,cf,p,v) => { AngularDamping = cf.GetFloat(p, v); }, 354 (s,cf,p,v) => { AngularDamping = cf.GetFloat(p, v); },
325 (s) => { return AngularDamping; }, 355 (s) => { return AngularDamping; },
326 (s,p,l,v) => { s.UpdateParameterObject((x)=>{AngularDamping=x;}, p, l, v); }, 356 (s,p,l,v) => { AngularDamping = v; },
327 (s,o,v) => { s.PE.SetDamping(o.PhysBody, LinearDamping, v); } ), 357 (s,o,v) => { s.PE.SetDamping(o.PhysBody, LinearDamping, v); } ),
328 new ParameterDefn("DeactivationTime", "Seconds before considering an object potentially static", 358 new ParameterDefn("DeactivationTime", "Seconds before considering an object potentially static",
329 0.2f, 359 0.2f,
330 (s,cf,p,v) => { DeactivationTime = cf.GetFloat(p, v); }, 360 (s,cf,p,v) => { DeactivationTime = cf.GetFloat(p, v); },
331 (s) => { return DeactivationTime; }, 361 (s) => { return DeactivationTime; },
332 (s,p,l,v) => { s.UpdateParameterObject((x)=>{DeactivationTime=x;}, p, l, v); }, 362 (s,p,l,v) => { DeactivationTime = v; },
333 (s,o,v) => { s.PE.SetDeactivationTime(o.PhysBody, v); } ), 363 (s,o,v) => { s.PE.SetDeactivationTime(o.PhysBody, v); } ),
334 new ParameterDefn("LinearSleepingThreshold", "Seconds to measure linear movement before considering static", 364 new ParameterDefn("LinearSleepingThreshold", "Seconds to measure linear movement before considering static",
335 0.8f, 365 0.8f,
336 (s,cf,p,v) => { LinearSleepingThreshold = cf.GetFloat(p, v); }, 366 (s,cf,p,v) => { LinearSleepingThreshold = cf.GetFloat(p, v); },
337 (s) => { return LinearSleepingThreshold; }, 367 (s) => { return LinearSleepingThreshold; },
338 (s,p,l,v) => { s.UpdateParameterObject((x)=>{LinearSleepingThreshold=x;}, p, l, v); }, 368 (s,p,l,v) => { LinearSleepingThreshold = v;},
339 (s,o,v) => { s.PE.SetSleepingThresholds(o.PhysBody, v, v); } ), 369 (s,o,v) => { s.PE.SetSleepingThresholds(o.PhysBody, v, v); } ),
340 new ParameterDefn("AngularSleepingThreshold", "Seconds to measure angular movement before considering static", 370 new ParameterDefn("AngularSleepingThreshold", "Seconds to measure angular movement before considering static",
341 1.0f, 371 1.0f,
342 (s,cf,p,v) => { AngularSleepingThreshold = cf.GetFloat(p, v); }, 372 (s,cf,p,v) => { AngularSleepingThreshold = cf.GetFloat(p, v); },
343 (s) => { return AngularSleepingThreshold; }, 373 (s) => { return AngularSleepingThreshold; },
344 (s,p,l,v) => { s.UpdateParameterObject((x)=>{AngularSleepingThreshold=x;}, p, l, v); }, 374 (s,p,l,v) => { AngularSleepingThreshold = v;},
345 (s,o,v) => { s.PE.SetSleepingThresholds(o.PhysBody, v, v); } ), 375 (s,o,v) => { s.PE.SetSleepingThresholds(o.PhysBody, v, v); } ),
346 new ParameterDefn("CcdMotionThreshold", "Continuious collision detection threshold (0 means no CCD)" , 376 new ParameterDefn("CcdMotionThreshold", "Continuious collision detection threshold (0 means no CCD)" ,
347 0.0f, // set to zero to disable 377 0.0f, // set to zero to disable
348 (s,cf,p,v) => { CcdMotionThreshold = cf.GetFloat(p, v); }, 378 (s,cf,p,v) => { CcdMotionThreshold = cf.GetFloat(p, v); },
349 (s) => { return CcdMotionThreshold; }, 379 (s) => { return CcdMotionThreshold; },
350 (s,p,l,v) => { s.UpdateParameterObject((x)=>{CcdMotionThreshold=x;}, p, l, v); }, 380 (s,p,l,v) => { CcdMotionThreshold = v;},
351 (s,o,v) => { s.PE.SetCcdMotionThreshold(o.PhysBody, v); } ), 381 (s,o,v) => { s.PE.SetCcdMotionThreshold(o.PhysBody, v); } ),
352 new ParameterDefn("CcdSweptSphereRadius", "Continuious collision detection test radius" , 382 new ParameterDefn("CcdSweptSphereRadius", "Continuious collision detection test radius" ,
353 0.2f, 383 0.2f,
354 (s,cf,p,v) => { CcdSweptSphereRadius = cf.GetFloat(p, v); }, 384 (s,cf,p,v) => { CcdSweptSphereRadius = cf.GetFloat(p, v); },
355 (s) => { return CcdSweptSphereRadius; }, 385 (s) => { return CcdSweptSphereRadius; },
356 (s,p,l,v) => { s.UpdateParameterObject((x)=>{CcdSweptSphereRadius=x;}, p, l, v); }, 386 (s,p,l,v) => { CcdSweptSphereRadius = v;},
357 (s,o,v) => { s.PE.SetCcdSweptSphereRadius(o.PhysBody, v); } ), 387 (s,o,v) => { s.PE.SetCcdSweptSphereRadius(o.PhysBody, v); } ),
358 new ParameterDefn("ContactProcessingThreshold", "Distance above which contacts can be discarded (0 means no discard)" , 388 new ParameterDefn("ContactProcessingThreshold", "Distance above which contacts can be discarded (0 means no discard)" ,
359 0.0f, 389 0.0f,
360 (s,cf,p,v) => { ContactProcessingThreshold = cf.GetFloat(p, v); }, 390 (s,cf,p,v) => { ContactProcessingThreshold = cf.GetFloat(p, v); },
361 (s) => { return ContactProcessingThreshold; }, 391 (s) => { return ContactProcessingThreshold; },
362 (s,p,l,v) => { s.UpdateParameterObject((x)=>{ContactProcessingThreshold=x;}, p, l, v); }, 392 (s,p,l,v) => { ContactProcessingThreshold = v;},
363 (s,o,v) => { s.PE.SetContactProcessingThreshold(o.PhysBody, v); } ), 393 (s,o,v) => { s.PE.SetContactProcessingThreshold(o.PhysBody, v); } ),
364 394
365 new ParameterDefn("TerrainImplementation", "Type of shape to use for terrain (0=heightmap, 1=mesh)", 395 new ParameterDefn("TerrainImplementation", "Type of shape to use for terrain (0=heightmap, 1=mesh)",
@@ -392,7 +422,7 @@ public static class BSParam
392 0.2f, 422 0.2f,
393 (s,cf,p,v) => { AvatarFriction = cf.GetFloat(p, v); }, 423 (s,cf,p,v) => { AvatarFriction = cf.GetFloat(p, v); },
394 (s) => { return AvatarFriction; }, 424 (s) => { return AvatarFriction; },
395 (s,p,l,v) => { s.UpdateParameterObject((x)=>{AvatarFriction=x;}, p, l, v); } ), 425 (s,p,l,v) => { AvatarFriction = v; } ),
396 new ParameterDefn("AvatarStandingFriction", "Avatar friction when standing. Changed on avatar recreation.", 426 new ParameterDefn("AvatarStandingFriction", "Avatar friction when standing. Changed on avatar recreation.",
397 10.0f, 427 10.0f,
398 (s,cf,p,v) => { AvatarStandingFriction = cf.GetFloat(p, v); }, 428 (s,cf,p,v) => { AvatarStandingFriction = cf.GetFloat(p, v); },
@@ -407,32 +437,32 @@ public static class BSParam
407 3.5f, 437 3.5f,
408 (s,cf,p,v) => { AvatarDensity = cf.GetFloat(p, v); }, 438 (s,cf,p,v) => { AvatarDensity = cf.GetFloat(p, v); },
409 (s) => { return AvatarDensity; }, 439 (s) => { return AvatarDensity; },
410 (s,p,l,v) => { s.UpdateParameterObject((x)=>{AvatarDensity=x;}, p, l, v); } ), 440 (s,p,l,v) => { AvatarDensity = v; } ),
411 new ParameterDefn("AvatarRestitution", "Bouncyness. Changed on avatar recreation.", 441 new ParameterDefn("AvatarRestitution", "Bouncyness. Changed on avatar recreation.",
412 0f, 442 0f,
413 (s,cf,p,v) => { AvatarRestitution = cf.GetFloat(p, v); }, 443 (s,cf,p,v) => { AvatarRestitution = cf.GetFloat(p, v); },
414 (s) => { return AvatarRestitution; }, 444 (s) => { return AvatarRestitution; },
415 (s,p,l,v) => { s.UpdateParameterObject((x)=>{AvatarRestitution=x;}, p, l, v); } ), 445 (s,p,l,v) => { AvatarRestitution = v; } ),
416 new ParameterDefn("AvatarCapsuleWidth", "The distance between the sides of the avatar capsule", 446 new ParameterDefn("AvatarCapsuleWidth", "The distance between the sides of the avatar capsule",
417 0.6f, 447 0.6f,
418 (s,cf,p,v) => { AvatarCapsuleWidth = cf.GetFloat(p, v); }, 448 (s,cf,p,v) => { AvatarCapsuleWidth = cf.GetFloat(p, v); },
419 (s) => { return AvatarCapsuleWidth; }, 449 (s) => { return AvatarCapsuleWidth; },
420 (s,p,l,v) => { s.UpdateParameterObject((x)=>{AvatarCapsuleWidth=x;}, p, l, v); } ), 450 (s,p,l,v) => { AvatarCapsuleWidth = v; } ),
421 new ParameterDefn("AvatarCapsuleDepth", "The distance between the front and back of the avatar capsule", 451 new ParameterDefn("AvatarCapsuleDepth", "The distance between the front and back of the avatar capsule",
422 0.45f, 452 0.45f,
423 (s,cf,p,v) => { AvatarCapsuleDepth = cf.GetFloat(p, v); }, 453 (s,cf,p,v) => { AvatarCapsuleDepth = cf.GetFloat(p, v); },
424 (s) => { return AvatarCapsuleDepth; }, 454 (s) => { return AvatarCapsuleDepth; },
425 (s,p,l,v) => { s.UpdateParameterObject((x)=>{AvatarCapsuleDepth=x;}, p, l, v); } ), 455 (s,p,l,v) => { AvatarCapsuleDepth = v; } ),
426 new ParameterDefn("AvatarCapsuleHeight", "Default height of space around avatar", 456 new ParameterDefn("AvatarCapsuleHeight", "Default height of space around avatar",
427 1.5f, 457 1.5f,
428 (s,cf,p,v) => { AvatarCapsuleHeight = cf.GetFloat(p, v); }, 458 (s,cf,p,v) => { AvatarCapsuleHeight = cf.GetFloat(p, v); },
429 (s) => { return AvatarCapsuleHeight; }, 459 (s) => { return AvatarCapsuleHeight; },
430 (s,p,l,v) => { s.UpdateParameterObject((x)=>{AvatarCapsuleHeight=x;}, p, l, v); } ), 460 (s,p,l,v) => { AvatarCapsuleHeight = v; } ),
431 new ParameterDefn("AvatarContactProcessingThreshold", "Distance from capsule to check for collisions", 461 new ParameterDefn("AvatarContactProcessingThreshold", "Distance from capsule to check for collisions",
432 0.1f, 462 0.1f,
433 (s,cf,p,v) => { AvatarContactProcessingThreshold = cf.GetFloat(p, v); }, 463 (s,cf,p,v) => { AvatarContactProcessingThreshold = cf.GetFloat(p, v); },
434 (s) => { return AvatarContactProcessingThreshold; }, 464 (s) => { return AvatarContactProcessingThreshold; },
435 (s,p,l,v) => { s.UpdateParameterObject((x)=>{AvatarContactProcessingThreshold=x;}, p, l, v); } ), 465 (s,p,l,v) => { AvatarContactProcessingThreshold = v; } ),
436 new ParameterDefn("AvatarStepHeight", "Height of a step obstacle to consider step correction", 466 new ParameterDefn("AvatarStepHeight", "Height of a step obstacle to consider step correction",
437 0.3f, 467 0.3f,
438 (s,cf,p,v) => { AvatarStepHeight = cf.GetFloat(p, v); }, 468 (s,cf,p,v) => { AvatarStepHeight = cf.GetFloat(p, v); },
@@ -497,44 +527,49 @@ public static class BSParam
497 527
498 new ParameterDefn("MaxPersistantManifoldPoolSize", "Number of manifolds pooled (0 means default of 4096)", 528 new ParameterDefn("MaxPersistantManifoldPoolSize", "Number of manifolds pooled (0 means default of 4096)",
499 0f, 529 0f,
500 (s,cf,p,v) => { s.UnmanagedParams[0].maxPersistantManifoldPoolSize = cf.GetFloat(p, v); }, 530 (s,cf,p,v) => { MaxPersistantManifoldPoolSize = cf.GetFloat(p, v); },
501 (s) => { return s.UnmanagedParams[0].maxPersistantManifoldPoolSize; }, 531 (s) => { return MaxPersistantManifoldPoolSize; },
502 (s,p,l,v) => { s.UnmanagedParams[0].maxPersistantManifoldPoolSize = v; } ), 532 (s,p,l,v) => { MaxPersistantManifoldPoolSize = v; s.UnmanagedParams[0].maxPersistantManifoldPoolSize = v; } ),
503 new ParameterDefn("MaxCollisionAlgorithmPoolSize", "Number of collisions pooled (0 means default of 4096)", 533 new ParameterDefn("MaxCollisionAlgorithmPoolSize", "Number of collisions pooled (0 means default of 4096)",
504 0f, 534 0f,
505 (s,cf,p,v) => { s.UnmanagedParams[0].maxCollisionAlgorithmPoolSize = cf.GetFloat(p, v); }, 535 (s,cf,p,v) => { MaxCollisionAlgorithmPoolSize = cf.GetFloat(p, v); },
506 (s) => { return s.UnmanagedParams[0].maxCollisionAlgorithmPoolSize; }, 536 (s) => { return MaxCollisionAlgorithmPoolSize; },
507 (s,p,l,v) => { s.UnmanagedParams[0].maxCollisionAlgorithmPoolSize = v; } ), 537 (s,p,l,v) => { MaxCollisionAlgorithmPoolSize = v; s.UnmanagedParams[0].maxCollisionAlgorithmPoolSize = v; } ),
508 new ParameterDefn("ShouldDisableContactPoolDynamicAllocation", "Enable to allow large changes in object count", 538 new ParameterDefn("ShouldDisableContactPoolDynamicAllocation", "Enable to allow large changes in object count",
509 ConfigurationParameters.numericFalse, 539 ConfigurationParameters.numericFalse,
510 (s,cf,p,v) => { s.UnmanagedParams[0].shouldDisableContactPoolDynamicAllocation = BSParam.NumericBool(cf.GetBoolean(p, BSParam.BoolNumeric(v))); }, 540 (s,cf,p,v) => { ShouldDisableContactPoolDynamicAllocation = BSParam.NumericBool(cf.GetBoolean(p, BSParam.BoolNumeric(v))); },
511 (s) => { return s.UnmanagedParams[0].shouldDisableContactPoolDynamicAllocation; }, 541 (s) => { return ShouldDisableContactPoolDynamicAllocation; },
512 (s,p,l,v) => { s.UnmanagedParams[0].shouldDisableContactPoolDynamicAllocation = v; } ), 542 (s,p,l,v) => { ShouldDisableContactPoolDynamicAllocation = v; s.UnmanagedParams[0].shouldDisableContactPoolDynamicAllocation = v; } ),
513 new ParameterDefn("ShouldForceUpdateAllAabbs", "Enable to recomputer AABBs every simulator step", 543 new ParameterDefn("ShouldForceUpdateAllAabbs", "Enable to recomputer AABBs every simulator step",
514 ConfigurationParameters.numericFalse, 544 ConfigurationParameters.numericFalse,
515 (s,cf,p,v) => { s.UnmanagedParams[0].shouldForceUpdateAllAabbs = BSParam.NumericBool(cf.GetBoolean(p, BSParam.BoolNumeric(v))); }, 545 (s,cf,p,v) => { ShouldForceUpdateAllAabbs = BSParam.NumericBool(cf.GetBoolean(p, BSParam.BoolNumeric(v))); },
516 (s) => { return s.UnmanagedParams[0].shouldForceUpdateAllAabbs; }, 546 (s) => { return ShouldForceUpdateAllAabbs; },
517 (s,p,l,v) => { s.UnmanagedParams[0].shouldForceUpdateAllAabbs = v; } ), 547 (s,p,l,v) => { ShouldForceUpdateAllAabbs = v; s.UnmanagedParams[0].shouldForceUpdateAllAabbs = v; } ),
518 new ParameterDefn("ShouldRandomizeSolverOrder", "Enable for slightly better stacking interaction", 548 new ParameterDefn("ShouldRandomizeSolverOrder", "Enable for slightly better stacking interaction",
519 ConfigurationParameters.numericTrue, 549 ConfigurationParameters.numericTrue,
520 (s,cf,p,v) => { s.UnmanagedParams[0].shouldRandomizeSolverOrder = BSParam.NumericBool(cf.GetBoolean(p, BSParam.BoolNumeric(v))); }, 550 (s,cf,p,v) => { ShouldRandomizeSolverOrder = BSParam.NumericBool(cf.GetBoolean(p, BSParam.BoolNumeric(v))); },
521 (s) => { return s.UnmanagedParams[0].shouldRandomizeSolverOrder; }, 551 (s) => { return ShouldRandomizeSolverOrder; },
522 (s,p,l,v) => { s.UnmanagedParams[0].shouldRandomizeSolverOrder = v; } ), 552 (s,p,l,v) => { ShouldRandomizeSolverOrder = v; s.UnmanagedParams[0].shouldRandomizeSolverOrder = v; } ),
523 new ParameterDefn("ShouldSplitSimulationIslands", "Enable splitting active object scanning islands", 553 new ParameterDefn("ShouldSplitSimulationIslands", "Enable splitting active object scanning islands",
524 ConfigurationParameters.numericTrue, 554 ConfigurationParameters.numericTrue,
525 (s,cf,p,v) => { s.UnmanagedParams[0].shouldSplitSimulationIslands = BSParam.NumericBool(cf.GetBoolean(p, BSParam.BoolNumeric(v))); }, 555 (s,cf,p,v) => { ShouldSplitSimulationIslands = BSParam.NumericBool(cf.GetBoolean(p, BSParam.BoolNumeric(v))); },
526 (s) => { return s.UnmanagedParams[0].shouldSplitSimulationIslands; }, 556 (s) => { return ShouldSplitSimulationIslands; },
527 (s,p,l,v) => { s.UnmanagedParams[0].shouldSplitSimulationIslands = v; } ), 557 (s,p,l,v) => { ShouldSplitSimulationIslands = v; s.UnmanagedParams[0].shouldSplitSimulationIslands = v; } ),
528 new ParameterDefn("ShouldEnableFrictionCaching", "Enable friction computation caching", 558 new ParameterDefn("ShouldEnableFrictionCaching", "Enable friction computation caching",
529 ConfigurationParameters.numericTrue, 559 ConfigurationParameters.numericTrue,
530 (s,cf,p,v) => { s.UnmanagedParams[0].shouldEnableFrictionCaching = BSParam.NumericBool(cf.GetBoolean(p, BSParam.BoolNumeric(v))); }, 560 (s,cf,p,v) => { ShouldEnableFrictionCaching = BSParam.NumericBool(cf.GetBoolean(p, BSParam.BoolNumeric(v))); },
531 (s) => { return s.UnmanagedParams[0].shouldEnableFrictionCaching; }, 561 (s) => { return ShouldEnableFrictionCaching; },
532 (s,p,l,v) => { s.UnmanagedParams[0].shouldEnableFrictionCaching = v; } ), 562 (s,p,l,v) => { ShouldEnableFrictionCaching = v; s.UnmanagedParams[0].shouldEnableFrictionCaching = v; } ),
533 new ParameterDefn("NumberOfSolverIterations", "Number of internal iterations (0 means default)", 563 new ParameterDefn("NumberOfSolverIterations", "Number of internal iterations (0 means default)",
534 0f, // zero says use Bullet default 564 0f, // zero says use Bullet default
535 (s,cf,p,v) => { s.UnmanagedParams[0].numberOfSolverIterations = cf.GetFloat(p, v); }, 565 (s,cf,p,v) => { NumberOfSolverIterations = cf.GetFloat(p, v); },
536 (s) => { return s.UnmanagedParams[0].numberOfSolverIterations; }, 566 (s) => { return NumberOfSolverIterations; },
537 (s,p,l,v) => { s.UnmanagedParams[0].numberOfSolverIterations = v; } ), 567 (s,p,l,v) => { NumberOfSolverIterations = v; s.UnmanagedParams[0].numberOfSolverIterations = v; } ),
568 new ParameterDefn("UseSingleSidedMeshes", "Whether to compute collisions based on single sided meshes.",
569 ConfigurationParameters.numericTrue,
570 (s,cf,p,v) => { UseSingleSidedMeshesF = BSParam.NumericBool(cf.GetBoolean(p, BSParam.BoolNumeric(v))); },
571 (s) => { return UseSingleSidedMeshesF; },
572 (s,p,l,v) => { UseSingleSidedMeshesF = v; s.UnmanagedParams[0].useSingleSidedMeshes = v; } ),
538 573
539 new ParameterDefn("LinksetImplementation", "Type of linkset implementation (0=Constraint, 1=Compound, 2=Manual)", 574 new ParameterDefn("LinksetImplementation", "Type of linkset implementation (0=Constraint, 1=Compound, 2=Manual)",
540 (float)BSLinkset.LinksetImplementation.Compound, 575 (float)BSLinkset.LinksetImplementation.Compound,