From 5e4d6cab00cb29cd088ab7b62ab13aff103b64cb Mon Sep 17 00:00:00 2001 From: onefang Date: Sun, 19 May 2019 21:24:15 +1000 Subject: Dump OpenSim 0.9.0.1 into it's own branch. --- OpenSim/Region/PhysicsModules/BulletS/BSParam.cs | 238 +++++++++++++---------- 1 file changed, 130 insertions(+), 108 deletions(-) mode change 100644 => 100755 OpenSim/Region/PhysicsModules/BulletS/BSParam.cs (limited to 'OpenSim/Region/PhysicsModules/BulletS/BSParam.cs') diff --git a/OpenSim/Region/PhysicsModules/BulletS/BSParam.cs b/OpenSim/Region/PhysicsModules/BulletS/BSParam.cs old mode 100644 new mode 100755 index c296008..495f752 --- a/OpenSim/Region/PhysicsModules/BulletS/BSParam.cs +++ b/OpenSim/Region/PhysicsModules/BulletS/BSParam.cs @@ -90,8 +90,8 @@ public static class BSParam public static float DeactivationTime { get; private set; } public static float LinearSleepingThreshold { get; private set; } public static float AngularSleepingThreshold { get; private set; } - public static float CcdMotionThreshold { get; private set; } - public static float CcdSweptSphereRadius { get; private set; } + public static float CcdMotionThreshold { get; private set; } + public static float CcdSweptSphereRadius { get; private set; } public static float ContactProcessingThreshold { get; private set; } public static bool ShouldMeshSculptedPrim { get; private set; } // cause scuplted prims to get meshed @@ -119,14 +119,14 @@ public static class BSParam public static float Gravity { get; private set; } // Physics Engine operation - public static float MaxPersistantManifoldPoolSize { get; private set; } - public static float MaxCollisionAlgorithmPoolSize { get; private set; } - public static bool ShouldDisableContactPoolDynamicAllocation { get; private set; } - public static bool ShouldForceUpdateAllAabbs { get; private set; } - public static bool ShouldRandomizeSolverOrder { get; private set; } - public static bool ShouldSplitSimulationIslands { get; private set; } - public static bool ShouldEnableFrictionCaching { get; private set; } - public static float NumberOfSolverIterations { get; private set; } + public static float MaxPersistantManifoldPoolSize { get; private set; } + public static float MaxCollisionAlgorithmPoolSize { get; private set; } + public static bool ShouldDisableContactPoolDynamicAllocation { get; private set; } + public static bool ShouldForceUpdateAllAabbs { get; private set; } + public static bool ShouldRandomizeSolverOrder { get; private set; } + public static bool ShouldSplitSimulationIslands { get; private set; } + public static bool ShouldEnableFrictionCaching { get; private set; } + public static float NumberOfSolverIterations { get; private set; } public static bool UseSingleSidedMeshes { get; private set; } public static float GlobalContactBreakingThreshold { get; private set; } public static float PhysicsUnmanLoggingFrames { get; private set; } @@ -135,6 +135,7 @@ public static class BSParam public static bool AvatarToAvatarCollisionsByDefault { get; private set; } public static float AvatarFriction { get; private set; } public static float AvatarStandingFriction { get; private set; } + public static float AvatarWalkVelocityFactor { get; private set; } public static float AvatarAlwaysRunFactor { get; private set; } public static float AvatarDensity { get; private set; } public static float AvatarRestitution { get; private set; } @@ -142,23 +143,26 @@ public static class BSParam public static float AvatarCapsuleWidth { get; private set; } public static float AvatarCapsuleDepth { get; private set; } public static float AvatarCapsuleHeight { get; private set; } + public static bool AvatarUseBefore09SizeComputation { get; private set; } public static float AvatarHeightLowFudge { get; private set; } public static float AvatarHeightMidFudge { get; private set; } public static float AvatarHeightHighFudge { get; private set; } public static float AvatarFlyingGroundMargin { get; private set; } public static float AvatarFlyingGroundUpForce { get; private set; } public static float AvatarTerminalVelocity { get; private set; } - public static float AvatarContactProcessingThreshold { get; private set; } + public static float AvatarContactProcessingThreshold { get; private set; } + public static float AvatarAddForcePushFactor { get; private set; } public static float AvatarStopZeroThreshold { get; private set; } - public static int AvatarJumpFrames { get; private set; } - public static float AvatarBelowGroundUpCorrectionMeters { get; private set; } - public static float AvatarStepHeight { get; private set; } - public static float AvatarStepAngle { get; private set; } - public static float AvatarStepGroundFudge { get; private set; } - public static float AvatarStepApproachFactor { get; private set; } - public static float AvatarStepForceFactor { get; private set; } - public static float AvatarStepUpCorrectionFactor { get; private set; } - public static int AvatarStepSmoothingSteps { get; private set; } + public static float AvatarStopZeroThresholdSquared { get; private set; } + public static int AvatarJumpFrames { get; private set; } + public static float AvatarBelowGroundUpCorrectionMeters { get; private set; } + public static float AvatarStepHeight { get; private set; } + public static float AvatarStepAngle { get; private set; } + public static float AvatarStepGroundFudge { get; private set; } + public static float AvatarStepApproachFactor { get; private set; } + public static float AvatarStepForceFactor { get; private set; } + public static float AvatarStepUpCorrectionFactor { get; private set; } + public static int AvatarStepSmoothingSteps { get; private set; } // Vehicle parameters public static float VehicleMaxLinearVelocity { get; private set; } @@ -190,31 +194,31 @@ public static class BSParam public static float CSHullVolumeConservationThresholdPercent { get; private set; } public static int CSHullMaxVertices { get; private set; } public static float CSHullMaxSkinWidth { get; private set; } - public static float BHullMaxVerticesPerHull { get; private set; } // 100 - public static float BHullMinClusters { get; private set; } // 2 - public static float BHullCompacityWeight { get; private set; } // 0.1 - public static float BHullVolumeWeight { get; private set; } // 0.0 - public static float BHullConcavity { get; private set; } // 100 - public static bool BHullAddExtraDistPoints { get; private set; } // false - public static bool BHullAddNeighboursDistPoints { get; private set; } // false - public static bool BHullAddFacesPoints { get; private set; } // false - public static bool BHullShouldAdjustCollisionMargin { get; private set; } // false - public static float WhichHACD { get; private set; } // zero if Bullet HACD, non-zero says VHACD + public static float BHullMaxVerticesPerHull { get; private set; } // 100 + public static float BHullMinClusters { get; private set; } // 2 + public static float BHullCompacityWeight { get; private set; } // 0.1 + public static float BHullVolumeWeight { get; private set; } // 0.0 + public static float BHullConcavity { get; private set; } // 100 + public static bool BHullAddExtraDistPoints { get; private set; } // false + public static bool BHullAddNeighboursDistPoints { get; private set; } // false + public static bool BHullAddFacesPoints { get; private set; } // false + public static bool BHullShouldAdjustCollisionMargin { get; private set; } // false + public static float WhichHACD { get; private set; } // zero if Bullet HACD, non-zero says VHACD // Parameters for VHACD 2.0: http://code.google.com/p/v-hacd // To enable, set both ShouldUseBulletHACD=true and WhichHACD=1 - // http://kmamou.blogspot.ca/2014/12/v-hacd-20-parameters-description.html - public static float VHACDresolution { get; private set; } // 100,000 max number of voxels generated during voxelization stage - public static float VHACDdepth { get; private set; } // 20 max number of clipping stages - public static float VHACDconcavity { get; private set; } // 0.0025 maximum concavity - public static float VHACDplaneDownsampling { get; private set; } // 4 granularity of search for best clipping plane - public static float VHACDconvexHullDownsampling { get; private set; } // 4 precision of hull gen process - public static float VHACDalpha { get; private set; } // 0.05 bias toward clipping along symmetry planes - public static float VHACDbeta { get; private set; } // 0.05 bias toward clipping along revolution axis - public static float VHACDgamma { get; private set; } // 0.00125 max concavity when merging - public static float VHACDpca { get; private set; } // 0 on/off normalizing mesh before decomp - public static float VHACDmode { get; private set; } // 0 0:voxel based, 1: tetrahedron based - public static float VHACDmaxNumVerticesPerCH { get; private set; } // 64 max triangles per convex hull - public static float VHACDminVolumePerCH { get; private set; } // 0.0001 sampling of generated convex hulls + // http://kmamou.blogspot.ca/2014/12/v-hacd-20-parameters-description.html + public static float VHACDresolution { get; private set; } // 100,000 max number of voxels generated during voxelization stage + public static float VHACDdepth { get; private set; } // 20 max number of clipping stages + public static float VHACDconcavity { get; private set; } // 0.0025 maximum concavity + public static float VHACDplaneDownsampling { get; private set; } // 4 granularity of search for best clipping plane + public static float VHACDconvexHullDownsampling { get; private set; } // 4 precision of hull gen process + public static float VHACDalpha { get; private set; } // 0.05 bias toward clipping along symmetry planes + public static float VHACDbeta { get; private set; } // 0.05 bias toward clipping along revolution axis + public static float VHACDgamma { get; private set; } // 0.00125 max concavity when merging + public static float VHACDpca { get; private set; } // 0 on/off normalizing mesh before decomp + public static float VHACDmode { get; private set; } // 0 0:voxel based, 1: tetrahedron based + public static float VHACDmaxNumVerticesPerCH { get; private set; } // 64 max triangles per convex hull + public static float VHACDminVolumePerCH { get; private set; } // 0.0001 sampling of generated convex hulls // Linkset implementation parameters public static float LinksetImplementation { get; private set; } @@ -227,9 +231,13 @@ public static class BSParam public static float LinkConstraintCFM { get; private set; } public static float LinkConstraintSolverIterations { get; private set; } + public static bool UseBulletRaycast { get; private set; } + public static float PID_D { get; private set; } // derivative public static float PID_P { get; private set; } // proportional + public static float DebugNumber { get; private set; } // A console setable number used for debugging + // Various constants that come from that other virtual world that shall not be named. public const float MinGravityZ = -1f; public const float MaxGravityZ = 28f; @@ -574,7 +582,7 @@ public static class BSParam (s,v) => { ContactProcessingThreshold = v;}, (s,o) => { s.PE.SetContactProcessingThreshold(o.PhysBody, ContactProcessingThreshold); } ), - new ParameterDefn("TerrainImplementation", "Type of shape to use for terrain (0=heightmap, 1=mesh)", + new ParameterDefn("TerrainImplementation", "Type of shape to use for terrain (0=heightmap, 1=mesh)", (float)BSTerrainPhys.TerrainImplementation.Heightmap ), new ParameterDefn("TerrainMeshMagnification", "Number of times the 256x256 heightmap is multiplied to create the terrain mesh" , 2 ), @@ -597,11 +605,13 @@ public static class BSParam 0.2f ), new ParameterDefn("AvatarStandingFriction", "Avatar friction when standing. Changed on avatar recreation.", 0.95f ), + new ParameterDefn("AvatarWalkVelocityFactor", "Speed multiplier if avatar is walking", + 1.0f ), new ParameterDefn("AvatarAlwaysRunFactor", "Speed multiplier if avatar is set to always run", 1.3f ), // For historical reasons, density is reported * 100 new ParameterDefn("AvatarDensity", "Density of an avatar. Changed on avatar recreation. Scaled times 100.", - 3500f) , // 3.5 * 100 + 350f) , // 3.5 * 100 new ParameterDefn("AvatarRestitution", "Bouncyness. Changed on avatar recreation.", 0f ), new ParameterDefn("AvatarShape", "Code for avatar physical shape: 0:capsule, 1:cube, 2:ovoid, 2:mesh", @@ -612,6 +622,8 @@ public static class BSParam 0.45f ), new ParameterDefn("AvatarCapsuleHeight", "Default height of space around avatar", 1.5f ), + new ParameterDefn("AvatarUseBefore09SizeComputation", "Use the old fudge method of computing avatar capsule size", + true ), new ParameterDefn("AvatarHeightLowFudge", "A fudge factor to make small avatars stand on the ground", 0f ), new ParameterDefn("AvatarHeightMidFudge", "A fudge distance to adjust average sized avatars to be standing on ground", @@ -624,27 +636,31 @@ public static class BSParam 2.0f ), new ParameterDefn("AvatarTerminalVelocity", "Terminal Velocity of falling avatar", -54.0f ), - new ParameterDefn("AvatarContactProcessingThreshold", "Distance from capsule to check for collisions", - 0.1f ), - new ParameterDefn("AvatarStopZeroThreshold", "Movement velocity below which avatar is assumed to be stopped", + new ParameterDefn("AvatarContactProcessingThreshold", "Distance from capsule to check for collisions", 0.1f ), - new ParameterDefn("AvatarBelowGroundUpCorrectionMeters", "Meters to move avatar up if it seems to be below ground", + new ParameterDefn("AvatarAddForcePushFactor", "BSCharacter.AddForce is multiplied by this and mass to be like other physics engines", + 0.315f ), + new ParameterDefn("AvatarStopZeroThreshold", "Movement velocity below which avatar is assumed to be stopped", + 0.45f, + (s) => { return (float)AvatarStopZeroThreshold; }, + (s,v) => { AvatarStopZeroThreshold = v; AvatarStopZeroThresholdSquared = v * v; } ), + new ParameterDefn("AvatarBelowGroundUpCorrectionMeters", "Meters to move avatar up if it seems to be below ground", 1.0f ), - new ParameterDefn("AvatarJumpFrames", "Number of frames to allow jump forces. Changes jump height.", + new ParameterDefn("AvatarJumpFrames", "Number of frames to allow jump forces. Changes jump height.", 4 ), - new ParameterDefn("AvatarStepHeight", "Height of a step obstacle to consider step correction", + new ParameterDefn("AvatarStepHeight", "Height of a step obstacle to consider step correction", 0.999f ) , - new ParameterDefn("AvatarStepAngle", "The angle (in radians) for a vertical surface to be considered a step", + new ParameterDefn("AvatarStepAngle", "The angle (in radians) for a vertical surface to be considered a step", 0.3f ) , - new ParameterDefn("AvatarStepGroundFudge", "Fudge factor subtracted from avatar base when comparing collision height", + new ParameterDefn("AvatarStepGroundFudge", "Fudge factor subtracted from avatar base when comparing collision height", 0.1f ) , - new ParameterDefn("AvatarStepApproachFactor", "Factor to control angle of approach to step (0=straight on)", + new ParameterDefn("AvatarStepApproachFactor", "Factor to control angle of approach to step (0=straight on)", 2f ), - new ParameterDefn("AvatarStepForceFactor", "Controls the amount of force up applied to step up onto a step", + new ParameterDefn("AvatarStepForceFactor", "Controls the amount of force up applied to step up onto a step", 0f ), - new ParameterDefn("AvatarStepUpCorrectionFactor", "Multiplied by height of step collision to create up movement at step", + new ParameterDefn("AvatarStepUpCorrectionFactor", "Multiplied by height of step collision to create up movement at step", 0.8f ), - new ParameterDefn("AvatarStepSmoothingSteps", "Number of frames after a step collision that we continue walking up stairs", + new ParameterDefn("AvatarStepSmoothingSteps", "Number of frames after a step collision that we continue walking up stairs", 1 ), new ParameterDefn("VehicleMaxLinearVelocity", "Maximum velocity magnitude that can be assigned to a vehicle", @@ -688,130 +704,136 @@ public static class BSParam new ParameterDefn("VehicleEnableAngularBanking", "Turn on/off vehicle angular banking effect", true ), - new ParameterDefn("MaxPersistantManifoldPoolSize", "Number of manifolds pooled (0 means default of 4096)", + new ParameterDefn("MaxPersistantManifoldPoolSize", "Number of manifolds pooled (0 means default of 4096)", 0f, (s) => { return MaxPersistantManifoldPoolSize; }, (s,v) => { MaxPersistantManifoldPoolSize = v; s.UnmanagedParams[0].maxPersistantManifoldPoolSize = v; } ), - new ParameterDefn("MaxCollisionAlgorithmPoolSize", "Number of collisions pooled (0 means default of 4096)", + new ParameterDefn("MaxCollisionAlgorithmPoolSize", "Number of collisions pooled (0 means default of 4096)", 0f, (s) => { return MaxCollisionAlgorithmPoolSize; }, (s,v) => { MaxCollisionAlgorithmPoolSize = v; s.UnmanagedParams[0].maxCollisionAlgorithmPoolSize = v; } ), - new ParameterDefn("ShouldDisableContactPoolDynamicAllocation", "Enable to allow large changes in object count", + new ParameterDefn("ShouldDisableContactPoolDynamicAllocation", "Enable to allow large changes in object count", false, (s) => { return ShouldDisableContactPoolDynamicAllocation; }, (s,v) => { ShouldDisableContactPoolDynamicAllocation = v; s.UnmanagedParams[0].shouldDisableContactPoolDynamicAllocation = NumericBool(v); } ), - new ParameterDefn("ShouldForceUpdateAllAabbs", "Enable to recomputer AABBs every simulator step", + new ParameterDefn("ShouldForceUpdateAllAabbs", "Enable to recomputer AABBs every simulator step", false, (s) => { return ShouldForceUpdateAllAabbs; }, (s,v) => { ShouldForceUpdateAllAabbs = v; s.UnmanagedParams[0].shouldForceUpdateAllAabbs = NumericBool(v); } ), - new ParameterDefn("ShouldRandomizeSolverOrder", "Enable for slightly better stacking interaction", + new ParameterDefn("ShouldRandomizeSolverOrder", "Enable for slightly better stacking interaction", true, (s) => { return ShouldRandomizeSolverOrder; }, (s,v) => { ShouldRandomizeSolverOrder = v; s.UnmanagedParams[0].shouldRandomizeSolverOrder = NumericBool(v); } ), - new ParameterDefn("ShouldSplitSimulationIslands", "Enable splitting active object scanning islands", + new ParameterDefn("ShouldSplitSimulationIslands", "Enable splitting active object scanning islands", true, (s) => { return ShouldSplitSimulationIslands; }, (s,v) => { ShouldSplitSimulationIslands = v; s.UnmanagedParams[0].shouldSplitSimulationIslands = NumericBool(v); } ), - new ParameterDefn("ShouldEnableFrictionCaching", "Enable friction computation caching", + new ParameterDefn("ShouldEnableFrictionCaching", "Enable friction computation caching", true, (s) => { return ShouldEnableFrictionCaching; }, (s,v) => { ShouldEnableFrictionCaching = v; s.UnmanagedParams[0].shouldEnableFrictionCaching = NumericBool(v); } ), - new ParameterDefn("NumberOfSolverIterations", "Number of internal iterations (0 means default)", + new ParameterDefn("NumberOfSolverIterations", "Number of internal iterations (0 means default)", 0f, // zero says use Bullet default (s) => { return NumberOfSolverIterations; }, (s,v) => { NumberOfSolverIterations = v; s.UnmanagedParams[0].numberOfSolverIterations = v; } ), - new ParameterDefn("UseSingleSidedMeshes", "Whether to compute collisions based on single sided meshes.", + new ParameterDefn("UseSingleSidedMeshes", "Whether to compute collisions based on single sided meshes.", true, (s) => { return UseSingleSidedMeshes; }, (s,v) => { UseSingleSidedMeshes = v; s.UnmanagedParams[0].useSingleSidedMeshes = NumericBool(v); } ), - new ParameterDefn("GlobalContactBreakingThreshold", "Amount of shape radius before breaking a collision contact (0 says Bullet default (0.2))", + new ParameterDefn("GlobalContactBreakingThreshold", "Amount of shape radius before breaking a collision contact (0 says Bullet default (0.2))", 0f, (s) => { return GlobalContactBreakingThreshold; }, (s,v) => { GlobalContactBreakingThreshold = v; s.UnmanagedParams[0].globalContactBreakingThreshold = v; } ), - new ParameterDefn("PhysicsUnmanLoggingFrames", "If non-zero, frames between output of detailed unmanaged physics statistics", + new ParameterDefn("PhysicsUnmanLoggingFrames", "If non-zero, frames between output of detailed unmanaged physics statistics", 0f, (s) => { return PhysicsUnmanLoggingFrames; }, (s,v) => { PhysicsUnmanLoggingFrames = v; s.UnmanagedParams[0].physicsLoggingFrames = v; } ), - new ParameterDefn("CSHullMaxDepthSplit", "CS impl: max depth to split for hull. 1-10 but > 7 is iffy", + new ParameterDefn("CSHullMaxDepthSplit", "CS impl: max depth to split for hull. 1-10 but > 7 is iffy", 7 ), - new ParameterDefn("CSHullMaxDepthSplitForSimpleShapes", "CS impl: max depth setting for simple prim shapes", + new ParameterDefn("CSHullMaxDepthSplitForSimpleShapes", "CS impl: max depth setting for simple prim shapes", 2 ), - new ParameterDefn("CSHullConcavityThresholdPercent", "CS impl: concavity threshold percent (0-20)", + new ParameterDefn("CSHullConcavityThresholdPercent", "CS impl: concavity threshold percent (0-20)", 5f ), - new ParameterDefn("CSHullVolumeConservationThresholdPercent", "percent volume conservation to collapse hulls (0-30)", + new ParameterDefn("CSHullVolumeConservationThresholdPercent", "percent volume conservation to collapse hulls (0-30)", 5f ), - new ParameterDefn("CSHullMaxVertices", "CS impl: maximum number of vertices in output hulls. Keep < 50.", + new ParameterDefn("CSHullMaxVertices", "CS impl: maximum number of vertices in output hulls. Keep < 50.", 32 ), - new ParameterDefn("CSHullMaxSkinWidth", "CS impl: skin width to apply to output hulls.", + new ParameterDefn("CSHullMaxSkinWidth", "CS impl: skin width to apply to output hulls.", 0f ), - new ParameterDefn("BHullMaxVerticesPerHull", "Bullet impl: max number of vertices per created hull", + new ParameterDefn("BHullMaxVerticesPerHull", "Bullet impl: max number of vertices per created hull", 200f ), - new ParameterDefn("BHullMinClusters", "Bullet impl: minimum number of hulls to create per mesh", + new ParameterDefn("BHullMinClusters", "Bullet impl: minimum number of hulls to create per mesh", 10f ), - new ParameterDefn("BHullCompacityWeight", "Bullet impl: weight factor for how compact to make hulls", + new ParameterDefn("BHullCompacityWeight", "Bullet impl: weight factor for how compact to make hulls", 20f ), - new ParameterDefn("BHullVolumeWeight", "Bullet impl: weight factor for volume in created hull", + new ParameterDefn("BHullVolumeWeight", "Bullet impl: weight factor for volume in created hull", 0.1f ), - new ParameterDefn("BHullConcavity", "Bullet impl: weight factor for how convex a created hull can be", + new ParameterDefn("BHullConcavity", "Bullet impl: weight factor for how convex a created hull can be", 10f ), - new ParameterDefn("BHullAddExtraDistPoints", "Bullet impl: whether to add extra vertices for long distance vectors", + new ParameterDefn("BHullAddExtraDistPoints", "Bullet impl: whether to add extra vertices for long distance vectors", true ), - new ParameterDefn("BHullAddNeighboursDistPoints", "Bullet impl: whether to add extra vertices between neighbor hulls", + new ParameterDefn("BHullAddNeighboursDistPoints", "Bullet impl: whether to add extra vertices between neighbor hulls", true ), - new ParameterDefn("BHullAddFacesPoints", "Bullet impl: whether to add extra vertices to break up hull faces", + new ParameterDefn("BHullAddFacesPoints", "Bullet impl: whether to add extra vertices to break up hull faces", true ), - new ParameterDefn("BHullShouldAdjustCollisionMargin", "Bullet impl: whether to shrink resulting hulls to account for collision margin", + new ParameterDefn("BHullShouldAdjustCollisionMargin", "Bullet impl: whether to shrink resulting hulls to account for collision margin", false ), - new ParameterDefn("WhichHACD", "zero if Bullet HACD, non-zero says VHACD", + new ParameterDefn("WhichHACD", "zero if Bullet HACD, non-zero says VHACD", 0f ), - new ParameterDefn("VHACDresolution", "max number of voxels generated during voxelization stage", + new ParameterDefn("VHACDresolution", "max number of voxels generated during voxelization stage", 100000f ), - new ParameterDefn("VHACDdepth", "max number of clipping stages", + new ParameterDefn("VHACDdepth", "max number of clipping stages", 20f ), - new ParameterDefn("VHACDconcavity", "maximum concavity", + new ParameterDefn("VHACDconcavity", "maximum concavity", 0.0025f ), - new ParameterDefn("VHACDplaneDownsampling", "granularity of search for best clipping plane", + new ParameterDefn("VHACDplaneDownsampling", "granularity of search for best clipping plane", 4f ), - new ParameterDefn("VHACDconvexHullDownsampling", "precision of hull gen process", + new ParameterDefn("VHACDconvexHullDownsampling", "precision of hull gen process", 4f ), - new ParameterDefn("VHACDalpha", "bias toward clipping along symmetry planes", + new ParameterDefn("VHACDalpha", "bias toward clipping along symmetry planes", 0.05f ), - new ParameterDefn("VHACDbeta", "bias toward clipping along revolution axis", + new ParameterDefn("VHACDbeta", "bias toward clipping along revolution axis", 0.05f ), - new ParameterDefn("VHACDgamma", "max concavity when merging", + new ParameterDefn("VHACDgamma", "max concavity when merging", 0.00125f ), - new ParameterDefn("VHACDpca", "on/off normalizing mesh before decomp", + new ParameterDefn("VHACDpca", "on/off normalizing mesh before decomp", 0f ), - new ParameterDefn("VHACDmode", "0:voxel based, 1: tetrahedron based", + new ParameterDefn("VHACDmode", "0:voxel based, 1: tetrahedron based", 0f ), - new ParameterDefn("VHACDmaxNumVerticesPerCH", "max triangles per convex hull", + new ParameterDefn("VHACDmaxNumVerticesPerCH", "max triangles per convex hull", 64f ), - new ParameterDefn("VHACDminVolumePerCH", "sampling of generated convex hulls", + new ParameterDefn("VHACDminVolumePerCH", "sampling of generated convex hulls", 0.0001f ), - new ParameterDefn("LinksetImplementation", "Type of linkset implementation (0=Constraint, 1=Compound, 2=Manual)", + new ParameterDefn("LinksetImplementation", "Type of linkset implementation (0=Constraint, 1=Compound, 2=Manual)", (float)BSLinkset.LinksetImplementation.Compound ), - new ParameterDefn("LinksetOffsetCenterOfMass", "If 'true', compute linkset center-of-mass and offset linkset position to account for same", + new ParameterDefn("LinksetOffsetCenterOfMass", "If 'true', compute linkset center-of-mass and offset linkset position to account for same", true ), - new ParameterDefn("LinkConstraintUseFrameOffset", "For linksets built with constraints, enable frame offsetFor linksets built with constraints, enable frame offset.", + new ParameterDefn("LinkConstraintUseFrameOffset", "For linksets built with constraints, enable frame offsetFor linksets built with constraints, enable frame offset.", false ), - new ParameterDefn("LinkConstraintEnableTransMotor", "Whether to enable translational motor on linkset constraints", + new ParameterDefn("LinkConstraintEnableTransMotor", "Whether to enable translational motor on linkset constraints", true ), - new ParameterDefn("LinkConstraintTransMotorMaxVel", "Maximum velocity to be applied by translational motor in linkset constraints", + new ParameterDefn("LinkConstraintTransMotorMaxVel", "Maximum velocity to be applied by translational motor in linkset constraints", 5.0f ), - new ParameterDefn("LinkConstraintTransMotorMaxForce", "Maximum force to be applied by translational motor in linkset constraints", + new ParameterDefn("LinkConstraintTransMotorMaxForce", "Maximum force to be applied by translational motor in linkset constraints", 0.1f ), - new ParameterDefn("LinkConstraintCFM", "Amount constraint can be violated. 0=no violation, 1=infinite. Default=0.1", + new ParameterDefn("LinkConstraintCFM", "Amount constraint can be violated. 0=no violation, 1=infinite. Default=0.1", 0.1f ), - new ParameterDefn("LinkConstraintERP", "Amount constraint is corrected each tick. 0=none, 1=all. Default = 0.2", + new ParameterDefn("LinkConstraintERP", "Amount constraint is corrected each tick. 0=none, 1=all. Default = 0.2", 0.1f ), - new ParameterDefn("LinkConstraintSolverIterations", "Number of solver iterations when computing constraint. (0 = Bullet default)", + new ParameterDefn("LinkConstraintSolverIterations", "Number of solver iterations when computing constraint. (0 = Bullet default)", 40 ), + new ParameterDefn("UseBulletRaycast", "If 'true', use the raycast function of the Bullet physics engine", + true ), + + new ParameterDefn("DebugNumber", "A console setable number sometimes used for debugging", + 1.0f ), + new ParameterDefn("PhysicsMetricFrames", "Frames between outputting detailed phys metrics. (0 is off)", 0, (s) => { return s.PhysicsMetricDumpFrames; }, @@ -819,7 +841,7 @@ public static class BSParam new ParameterDefn("ResetBroadphasePool", "Setting this is any value resets the broadphase collision pool", 0f, (s) => { return 0f; }, - (s,v) => { BSParam.ResetBroadphasePoolTainted(s, v, false /* inTaintTime */); } ), + (s,v) => { BSParam.ResetBroadphasePoolTainted(s, v); } ), new ParameterDefn("ResetConstraintSolver", "Setting this is any value resets the constraint solver", 0f, (s) => { return 0f; }, @@ -905,10 +927,10 @@ public static class BSParam // ===================================================================== // There are parameters that, when set, cause things to happen in the physics engine. // This causes the broadphase collision cache to be cleared. - private static void ResetBroadphasePoolTainted(BSScene pPhysScene, float v, bool inTaintTime) + private static void ResetBroadphasePoolTainted(BSScene pPhysScene, float v) { BSScene physScene = pPhysScene; - physScene.TaintedObject(inTaintTime, "BSParam.ResetBroadphasePoolTainted", delegate() + physScene.TaintedObject(BSScene.DetailLogZero, "BSParam.ResetBroadphasePoolTainted", delegate() { physScene.PE.ResetBroadphasePool(physScene.World); }); -- cgit v1.1