From b22d0401693dad44790d4cbf58d85c0fe3870460 Mon Sep 17 00:00:00 2001 From: Robert Adams Date: Fri, 16 Mar 2012 16:37:21 -0700 Subject: BulletSim: add some new runtime setable parameters to match the dll. --- OpenSim/Region/Physics/BulletSPlugin/BulletSimAPI.cs | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'OpenSim/Region/Physics/BulletSPlugin/BulletSimAPI.cs') diff --git a/OpenSim/Region/Physics/BulletSPlugin/BulletSimAPI.cs b/OpenSim/Region/Physics/BulletSPlugin/BulletSimAPI.cs index d12bd7d..aab0994 100644 --- a/OpenSim/Region/Physics/BulletSPlugin/BulletSimAPI.cs +++ b/OpenSim/Region/Physics/BulletSPlugin/BulletSimAPI.cs @@ -149,16 +149,16 @@ public static extern uint Initialize(Vector3 maxPosition, IntPtr parms, int maxUpdates, IntPtr updateArray); [DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] -public static extern bool UpdateParameter(uint worldID, uint localID, - [MarshalAs(UnmanagedType.LPStr)]string paramCode, float value); - -[DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] public static extern void SetHeightmap(uint worldID, [MarshalAs(UnmanagedType.LPArray)] float[] heightMap); [DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] public static extern void Shutdown(uint worldID); +[DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] +public static extern bool UpdateParameter(uint worldID, uint localID, + [MarshalAs(UnmanagedType.LPStr)]string paramCode, float value); +// =============================================================================== [DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] public static extern int PhysicsStep(uint worldID, float timeStep, int maxSubSteps, float fixedTimeStep, out int updatedEntityCount, @@ -240,6 +240,7 @@ public static extern bool HasObject(uint worldID, uint id); [DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] public static extern bool DestroyObject(uint worldID, uint id); +// =============================================================================== [DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] public static extern SweepHit ConvexSweepTest(uint worldID, uint id, Vector3 to, float extraMargin); @@ -249,6 +250,7 @@ public static extern RaycastHit RayTest(uint worldID, uint id, Vector3 from, Vec [DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] public static extern Vector3 RecoverFromPenetration(uint worldID, uint id); +// =============================================================================== [DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] public static extern void DumpBulletStatistics(); -- cgit v1.1 From 142de1d02f086c80888eb216cfd31b84ec27a79b Mon Sep 17 00:00:00 2001 From: Robert Adams Date: Fri, 23 Mar 2012 10:59:40 -0700 Subject: BulletSim: add a bunch of internal Bullet configuration parameters to OpenSimDefaults.ini and the code. --- OpenSim/Region/Physics/BulletSPlugin/BulletSimAPI.cs | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'OpenSim/Region/Physics/BulletSPlugin/BulletSimAPI.cs') diff --git a/OpenSim/Region/Physics/BulletSPlugin/BulletSimAPI.cs b/OpenSim/Region/Physics/BulletSPlugin/BulletSimAPI.cs index aab0994..086f0dc 100644 --- a/OpenSim/Region/Physics/BulletSPlugin/BulletSimAPI.cs +++ b/OpenSim/Region/Physics/BulletSPlugin/BulletSimAPI.cs @@ -132,6 +132,15 @@ public struct ConfigurationParameters public float avatarRestitution; public float avatarCapsuleRadius; public float avatarCapsuleHeight; + public float avatarContactProcessingThreshold; + + public float maxPersistantManifoldPoolSize; + public float shouldDisableContactPoolDynamicAllocation; + public float shouldForceUpdateAllAabbs; + public float shouldRandomizeSolverOrder; + public float shouldSplitSimulationIslands; + public float shouldEnableFrictionCaching; + public float numberOfSolverIterations; public const float numericTrue = 1f; public const float numericFalse = 0f; -- cgit v1.1