From b124aae05e6aeca02f692a7a5d96569b804612bd Mon Sep 17 00:00:00 2001 From: Robert Adams Date: Sat, 1 Dec 2012 15:39:13 -0800 Subject: BulletSim: Add DumpActivationInfo2 function. Change static objects from DISABLE_SIMULATION to ISLAND_SLEEPING. Update DLLs and SOs to add DumpActivationInfo2 function. --- OpenSim/Region/Physics/BulletSPlugin/BSDynamics.cs | 12 ++++++------ OpenSim/Region/Physics/BulletSPlugin/BSPrim.cs | 4 ++-- OpenSim/Region/Physics/BulletSPlugin/BSScene.cs | 2 ++ .../Region/Physics/BulletSPlugin/BulletSimAPI.cs | 7 +++++-- bin/lib32/BulletSim.dll | Bin 551424 -> 551936 bytes bin/lib32/libBulletSim.so | Bin 1707601 -> 1708712 bytes bin/lib64/BulletSim.dll | Bin 699904 -> 700928 bytes bin/lib64/libBulletSim.so | Bin 1844572 -> 1846041 bytes 8 files changed, 15 insertions(+), 10 deletions(-) diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSDynamics.cs b/OpenSim/Region/Physics/BulletSPlugin/BSDynamics.cs index fcc1224..15a40fe 100644 --- a/OpenSim/Region/Physics/BulletSPlugin/BSDynamics.cs +++ b/OpenSim/Region/Physics/BulletSPlugin/BSDynamics.cs @@ -623,7 +623,7 @@ namespace OpenSim.Region.Physics.BulletSPlugin { if (!IsActive) return; - // zap values so they will be fetched when needed + // Zap values so they will be fetched if needed m_knownTerrainHeight = m_knownWaterLevel = float.MinValue; MoveLinear(pTimestep); @@ -634,8 +634,8 @@ namespace OpenSim.Region.Physics.BulletSPlugin // remember the position so next step we can limit absolute movement effects m_lastPositionVector = Prim.ForcePosition; - // Force the physics engine to decide whether values have updated. - // TODO: this is only necessary if pos, velocity, ... were updated. Is it quicker + // Force the physics engine to decide whether values were updated. + // TODO: this is only necessary if pos, velocity, etc were updated. Is it quicker // to check for changes here or just push the update? BulletSimAPI.PushUpdate2(Prim.PhysBody.ptr); @@ -643,13 +643,13 @@ namespace OpenSim.Region.Physics.BulletSPlugin Prim.LocalID, Prim.ForcePosition, Prim.Force, Prim.ForceVelocity, Prim.RotationalVelocity); } - // Apply the effect of the linear motor. - // Also does hover and float. + // Apply the effect of the linear motor and other linear motions (like hover and float). private void MoveLinear(float pTimestep) { Vector3 linearMotorContribution = m_linearMotor.Step(pTimestep); - // Rotate new object velocity from vehicle relative to world coordinates + // The movement computed in the linear motor is relative to the vehicle + // coordinates. Rotate the movement to world coordinates. linearMotorContribution *= Prim.ForceOrientation; // ================================================================== diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSPrim.cs b/OpenSim/Region/Physics/BulletSPlugin/BSPrim.cs index 54b4167..42a362f 100644 --- a/OpenSim/Region/Physics/BulletSPlugin/BSPrim.cs +++ b/OpenSim/Region/Physics/BulletSPlugin/BSPrim.cs @@ -687,9 +687,9 @@ public sealed class BSPrim : BSPhysObject // There can be special things needed for implementing linksets Linkset.MakeStatic(this); // The activation state is 'disabled' so Bullet will not try to act on it. - BulletSimAPI.ForceActivationState2(PhysBody.ptr, ActivationState.DISABLE_SIMULATION); + // BulletSimAPI.ForceActivationState2(PhysBody.ptr, ActivationState.DISABLE_SIMULATION); // Start it out sleeping and physical actions could wake it up. - // BulletSimAPI.ForceActivationState2(BSBody.ptr, ActivationState.ISLAND_SLEEPING); + BulletSimAPI.ForceActivationState2(PhysBody.ptr, ActivationState.ISLAND_SLEEPING); PhysBody.collisionFilter = CollisionFilterGroups.StaticObjectFilter; PhysBody.collisionMask = CollisionFilterGroups.StaticObjectMask; diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSScene.cs b/OpenSim/Region/Physics/BulletSPlugin/BSScene.cs index 0c80611..5e70a23 100644 --- a/OpenSim/Region/Physics/BulletSPlugin/BSScene.cs +++ b/OpenSim/Region/Physics/BulletSPlugin/BSScene.cs @@ -971,6 +971,8 @@ public sealed class BSScene : PhysicsScene, IPhysicsParameters // Should handle fetching the right type from the ini file and converting it. // -- a delegate for getting the value as a float // -- a delegate for setting the value from a float + // -- an optional delegate to update the value in the world. Most often used to + // push the new value to an in-world object. // // The single letter parameters for the delegates are: // s = BSScene diff --git a/OpenSim/Region/Physics/BulletSPlugin/BulletSimAPI.cs b/OpenSim/Region/Physics/BulletSPlugin/BulletSimAPI.cs index 1e003e6..21bc6a3 100644 --- a/OpenSim/Region/Physics/BulletSPlugin/BulletSimAPI.cs +++ b/OpenSim/Region/Physics/BulletSPlugin/BulletSimAPI.cs @@ -1007,13 +1007,16 @@ public static extern void DumpRigidBody2(IntPtr sim, IntPtr collisionObject); public static extern void DumpCollisionShape2(IntPtr sim, IntPtr collisionShape); [DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] +public static extern void DumpMapInfo2(IntPtr sim, IntPtr manInfo); + +[DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] public static extern void DumpConstraint2(IntPtr sim, IntPtr constrain); [DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] -public static extern void DumpAllInfo2(IntPtr sim); +public static extern void DumpActivationInfo2(IntPtr sim); [DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] -public static extern void DumpMapInfo2(IntPtr sim, IntPtr manInfo); +public static extern void DumpAllInfo2(IntPtr sim); [DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] public static extern void DumpPhysicsStatistics2(IntPtr sim); diff --git a/bin/lib32/BulletSim.dll b/bin/lib32/BulletSim.dll index 3f5011a..c3dde8e 100755 Binary files a/bin/lib32/BulletSim.dll and b/bin/lib32/BulletSim.dll differ diff --git a/bin/lib32/libBulletSim.so b/bin/lib32/libBulletSim.so index 46d40fe..98bd655 100755 Binary files a/bin/lib32/libBulletSim.so and b/bin/lib32/libBulletSim.so differ diff --git a/bin/lib64/BulletSim.dll b/bin/lib64/BulletSim.dll index 27a807c..9c90924 100755 Binary files a/bin/lib64/BulletSim.dll and b/bin/lib64/BulletSim.dll differ diff --git a/bin/lib64/libBulletSim.so b/bin/lib64/libBulletSim.so index 1e82b3d..4301d34 100755 Binary files a/bin/lib64/libBulletSim.so and b/bin/lib64/libBulletSim.so differ -- cgit v1.1