diff options
author | Robert Adams | 2012-03-23 12:12:06 -0700 |
---|---|---|
committer | Robert Adams | 2012-03-23 13:15:24 -0700 |
commit | 3f53b7bc919b8270327911c3bc8ea71640c68c81 (patch) | |
tree | d229bd9f6f726482ee5d4be4b9a2bac6f216dd53 | |
parent | BulletSim: add a bunch of internal Bullet configuration parameters to OpenSim... (diff) | |
download | opensim-SC-3f53b7bc919b8270327911c3bc8ea71640c68c81.zip opensim-SC-3f53b7bc919b8270327911c3bc8ea71640c68c81.tar.gz opensim-SC-3f53b7bc919b8270327911c3bc8ea71640c68c81.tar.bz2 opensim-SC-3f53b7bc919b8270327911c3bc8ea71640c68c81.tar.xz |
BulletSim: Add new configuration parameters to get and set console commands
-rw-r--r-- | OpenSim/Region/Physics/BulletSPlugin/BSScene.cs | 36 |
1 files changed, 32 insertions, 4 deletions
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSScene.cs b/OpenSim/Region/Physics/BulletSPlugin/BSScene.cs index 8d0f9a6..8d2e25f 100644 --- a/OpenSim/Region/Physics/BulletSPlugin/BSScene.cs +++ b/OpenSim/Region/Physics/BulletSPlugin/BSScene.cs | |||
@@ -750,9 +750,17 @@ public class BSScene : PhysicsScene, IPhysicsParameters | |||
750 | new PhysParameterEntry("DeactivationTime", "Seconds before considering an object potentially static" ), | 750 | new PhysParameterEntry("DeactivationTime", "Seconds before considering an object potentially static" ), |
751 | new PhysParameterEntry("LinearSleepingThreshold", "Seconds to measure linear movement before considering static" ), | 751 | new PhysParameterEntry("LinearSleepingThreshold", "Seconds to measure linear movement before considering static" ), |
752 | new PhysParameterEntry("AngularSleepingThreshold", "Seconds to measure angular movement before considering static" ), | 752 | new PhysParameterEntry("AngularSleepingThreshold", "Seconds to measure angular movement before considering static" ), |
753 | // new PhysParameterEntry("CcdMotionThreshold", "" ), | 753 | new PhysParameterEntry("CcdMotionThreshold", "Continuious collision detection threshold (0 means no CCD)" ), |
754 | // new PhysParameterEntry("CcdSweptSphereRadius", "" ), | 754 | new PhysParameterEntry("CcdSweptSphereRadius", "Continuious collision detection test radius" ), |
755 | new PhysParameterEntry("ContactProcessingThreshold", "Distance between contacts before doing collision check" ), | 755 | new PhysParameterEntry("ContactProcessingThreshold", "Distance between contacts before doing collision check" ), |
756 | // Can only change the following at initialization time. Change the INI file and reboot. | ||
757 | new PhysParameterEntry("MaxPersistantManifoldPoolSize", "Number of manifolds pooled (0 means default)"), | ||
758 | new PhysParameterEntry("ShouldDisableContactPoolDynamicAllocation", "Enable to allow large changes in object count"), | ||
759 | new PhysParameterEntry("ShouldForceUpdateAllAabbs", "Enable to recomputer AABBs every simulator step"), | ||
760 | new PhysParameterEntry("ShouldRandomizeSolverOrder", "Enable for slightly better stacking interaction"), | ||
761 | new PhysParameterEntry("ShouldSplitSimulationIslands", "Enable splitting active object scanning islands"), | ||
762 | new PhysParameterEntry("ShouldEnableFrictionCaching", "Enable friction computation caching"), | ||
763 | new PhysParameterEntry("NumberOfSolverIterations", "Number of internal iterations (0 means default)"), | ||
756 | 764 | ||
757 | new PhysParameterEntry("Friction", "Set friction parameter for a specific object" ), | 765 | new PhysParameterEntry("Friction", "Set friction parameter for a specific object" ), |
758 | new PhysParameterEntry("Restitution", "Set restitution parameter for a specific object" ), | 766 | new PhysParameterEntry("Restitution", "Set restitution parameter for a specific object" ), |
@@ -764,7 +772,9 @@ public class BSScene : PhysicsScene, IPhysicsParameters | |||
764 | new PhysParameterEntry("AvatarDensity", "Density of an avatar. Changed on avatar recreation." ), | 772 | new PhysParameterEntry("AvatarDensity", "Density of an avatar. Changed on avatar recreation." ), |
765 | new PhysParameterEntry("AvatarRestitution", "Bouncyness. Changed on avatar recreation." ), | 773 | new PhysParameterEntry("AvatarRestitution", "Bouncyness. Changed on avatar recreation." ), |
766 | new PhysParameterEntry("AvatarCapsuleRadius", "Radius of space around an avatar" ), | 774 | new PhysParameterEntry("AvatarCapsuleRadius", "Radius of space around an avatar" ), |
767 | new PhysParameterEntry("AvatarCapsuleHeight", "Default height of space around avatar" ) | 775 | new PhysParameterEntry("AvatarCapsuleHeight", "Default height of space around avatar" ), |
776 | new PhysParameterEntry("AvatarContactProcessingThreshold", "Distance from capsule to check for collisions") | ||
777 | |||
768 | }; | 778 | }; |
769 | 779 | ||
770 | #region IPhysicsParameters | 780 | #region IPhysicsParameters |
@@ -798,6 +808,7 @@ public class BSScene : PhysicsScene, IPhysicsParameters | |||
798 | case "defaultdensity": m_params[0].defaultDensity = val; break; | 808 | case "defaultdensity": m_params[0].defaultDensity = val; break; |
799 | case "defaultrestitution": m_params[0].defaultRestitution = val; break; | 809 | case "defaultrestitution": m_params[0].defaultRestitution = val; break; |
800 | case "collisionmargin": m_params[0].collisionMargin = val; break; | 810 | case "collisionmargin": m_params[0].collisionMargin = val; break; |
811 | |||
801 | case "gravity": m_params[0].gravity = val; TaintedUpdateParameter(lparm, localID, val); break; | 812 | case "gravity": m_params[0].gravity = val; TaintedUpdateParameter(lparm, localID, val); break; |
802 | 813 | ||
803 | case "lineardamping": UpdateParameterPrims(ref m_params[0].linearDamping, lparm, localID, val); break; | 814 | case "lineardamping": UpdateParameterPrims(ref m_params[0].linearDamping, lparm, localID, val); break; |
@@ -808,6 +819,14 @@ public class BSScene : PhysicsScene, IPhysicsParameters | |||
808 | case "ccdmotionthreshold": UpdateParameterPrims(ref m_params[0].ccdMotionThreshold, lparm, localID, val); break; | 819 | case "ccdmotionthreshold": UpdateParameterPrims(ref m_params[0].ccdMotionThreshold, lparm, localID, val); break; |
809 | case "ccdsweptsphereradius": UpdateParameterPrims(ref m_params[0].ccdSweptSphereRadius, lparm, localID, val); break; | 820 | case "ccdsweptsphereradius": UpdateParameterPrims(ref m_params[0].ccdSweptSphereRadius, lparm, localID, val); break; |
810 | case "contactprocessingthreshold": UpdateParameterPrims(ref m_params[0].contactProcessingThreshold, lparm, localID, val); break; | 821 | case "contactprocessingthreshold": UpdateParameterPrims(ref m_params[0].contactProcessingThreshold, lparm, localID, val); break; |
822 | // the following are used only at initialization time so setting them makes no sense | ||
823 | // case "maxPersistantmanifoldpoolSize": m_params[0].maxPersistantManifoldPoolSize = val; break; | ||
824 | // case "shoulddisablecontactpooldynamicallocation": m_params[0].shouldDisableContactPoolDynamicAllocation = val; break; | ||
825 | // case "shouldforceupdateallaabbs": m_params[0].shouldForceUpdateAllAabbs = val; break; | ||
826 | // case "shouldrandomizesolverorder": m_params[0].shouldRandomizeSolverOrder = val; break; | ||
827 | // case "shouldsplitsimulationislands": m_params[0].shouldSplitSimulationIslands = val; break; | ||
828 | // case "shouldenablefrictioncaching": m_params[0].shouldEnableFrictionCaching = val; break; | ||
829 | // case "numberofsolveriterations": m_params[0].numberOfSolverIterations = val; break; | ||
811 | 830 | ||
812 | case "friction": TaintedUpdateParameter(lparm, localID, val); break; | 831 | case "friction": TaintedUpdateParameter(lparm, localID, val); break; |
813 | case "restitution": TaintedUpdateParameter(lparm, localID, val); break; | 832 | case "restitution": TaintedUpdateParameter(lparm, localID, val); break; |
@@ -821,7 +840,8 @@ public class BSScene : PhysicsScene, IPhysicsParameters | |||
821 | case "avatardensity": UpdateParameterAvatars(ref m_params[0].avatarDensity, "avatar", localID, val); break; | 840 | case "avatardensity": UpdateParameterAvatars(ref m_params[0].avatarDensity, "avatar", localID, val); break; |
822 | case "avatarrestitution": UpdateParameterAvatars(ref m_params[0].avatarRestitution, "avatar", localID, val); break; | 841 | case "avatarrestitution": UpdateParameterAvatars(ref m_params[0].avatarRestitution, "avatar", localID, val); break; |
823 | case "avatarcapsuleradius": UpdateParameterAvatars(ref m_params[0].avatarCapsuleRadius, "avatar", localID, val); break; | 842 | case "avatarcapsuleradius": UpdateParameterAvatars(ref m_params[0].avatarCapsuleRadius, "avatar", localID, val); break; |
824 | case "avatarcapsuleheight": UpdateParameterAvatars(ref m_params[0].avatarCapsuleHeight, "avatar", localID, val); break; | 843 | case "avatarcapsuleheight": UpdateParameterAvatars(ref m_params[0].avatarCapsuleHeight, "avatar", localID, val); break; |
844 | case "avatarcontactprocessingthreshold": UpdateParameterAvatars(ref m_params[0].avatarContactProcessingThreshold, "avatar", localID, val); break; | ||
825 | 845 | ||
826 | default: ret = false; break; | 846 | default: ret = false; break; |
827 | } | 847 | } |
@@ -914,6 +934,13 @@ public class BSScene : PhysicsScene, IPhysicsParameters | |||
914 | case "ccdmotionthreshold": val = m_params[0].ccdMotionThreshold; break; | 934 | case "ccdmotionthreshold": val = m_params[0].ccdMotionThreshold; break; |
915 | case "ccdsweptsphereradius": val = m_params[0].ccdSweptSphereRadius; break; | 935 | case "ccdsweptsphereradius": val = m_params[0].ccdSweptSphereRadius; break; |
916 | case "contactprocessingthreshold": val = m_params[0].contactProcessingThreshold; break; | 936 | case "contactprocessingthreshold": val = m_params[0].contactProcessingThreshold; break; |
937 | case "maxPersistantmanifoldpoolSize": val = m_params[0].maxPersistantManifoldPoolSize; break; | ||
938 | case "shoulddisablecontactpooldynamicallocation": val = m_params[0].shouldDisableContactPoolDynamicAllocation; break; | ||
939 | case "shouldforceupdateallaabbs": val = m_params[0].shouldForceUpdateAllAabbs; break; | ||
940 | case "shouldrandomizesolverorder": val = m_params[0].shouldRandomizeSolverOrder; break; | ||
941 | case "shouldsplitsimulationislands": val = m_params[0].shouldSplitSimulationIslands; break; | ||
942 | case "shouldenablefrictioncaching": val = m_params[0].shouldEnableFrictionCaching; break; | ||
943 | case "numberofsolveriterations": val = m_params[0].numberOfSolverIterations; break; | ||
917 | 944 | ||
918 | case "terrainfriction": val = m_params[0].terrainFriction; break; | 945 | case "terrainfriction": val = m_params[0].terrainFriction; break; |
919 | case "terrainhitfraction": val = m_params[0].terrainHitFraction; break; | 946 | case "terrainhitfraction": val = m_params[0].terrainHitFraction; break; |
@@ -924,6 +951,7 @@ public class BSScene : PhysicsScene, IPhysicsParameters | |||
924 | case "avatarrestitution": val = m_params[0].avatarRestitution; break; | 951 | case "avatarrestitution": val = m_params[0].avatarRestitution; break; |
925 | case "avatarcapsuleradius": val = m_params[0].avatarCapsuleRadius; break; | 952 | case "avatarcapsuleradius": val = m_params[0].avatarCapsuleRadius; break; |
926 | case "avatarcapsuleheight": val = m_params[0].avatarCapsuleHeight; break; | 953 | case "avatarcapsuleheight": val = m_params[0].avatarCapsuleHeight; break; |
954 | case "avatarcontactprocessingthreshold": val = m_params[0].avatarContactProcessingThreshold; break; | ||
927 | default: ret = false; break; | 955 | default: ret = false; break; |
928 | 956 | ||
929 | } | 957 | } |