aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Physics
diff options
context:
space:
mode:
authorRobert Adams2012-12-01 15:39:13 -0800
committerRobert Adams2012-12-01 15:39:13 -0800
commitb124aae05e6aeca02f692a7a5d96569b804612bd (patch)
tree306bde2370b7c9c548957f0251c78dcc3d5344f3 /OpenSim/Region/Physics
parentBulletSim: remove time scaling of computed vehicle absolute velocity since Bu... (diff)
downloadopensim-SC_OLD-b124aae05e6aeca02f692a7a5d96569b804612bd.zip
opensim-SC_OLD-b124aae05e6aeca02f692a7a5d96569b804612bd.tar.gz
opensim-SC_OLD-b124aae05e6aeca02f692a7a5d96569b804612bd.tar.bz2
opensim-SC_OLD-b124aae05e6aeca02f692a7a5d96569b804612bd.tar.xz
BulletSim: Add DumpActivationInfo2 function. Change static objects from DISABLE_SIMULATION to ISLAND_SLEEPING. Update DLLs and SOs to add DumpActivationInfo2 function.
Diffstat (limited to 'OpenSim/Region/Physics')
-rw-r--r--OpenSim/Region/Physics/BulletSPlugin/BSDynamics.cs12
-rw-r--r--OpenSim/Region/Physics/BulletSPlugin/BSPrim.cs4
-rw-r--r--OpenSim/Region/Physics/BulletSPlugin/BSScene.cs2
-rw-r--r--OpenSim/Region/Physics/BulletSPlugin/BulletSimAPI.cs7
4 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
623 { 623 {
624 if (!IsActive) return; 624 if (!IsActive) return;
625 625
626 // zap values so they will be fetched when needed 626 // Zap values so they will be fetched if needed
627 m_knownTerrainHeight = m_knownWaterLevel = float.MinValue; 627 m_knownTerrainHeight = m_knownWaterLevel = float.MinValue;
628 628
629 MoveLinear(pTimestep); 629 MoveLinear(pTimestep);
@@ -634,8 +634,8 @@ namespace OpenSim.Region.Physics.BulletSPlugin
634 // remember the position so next step we can limit absolute movement effects 634 // remember the position so next step we can limit absolute movement effects
635 m_lastPositionVector = Prim.ForcePosition; 635 m_lastPositionVector = Prim.ForcePosition;
636 636
637 // Force the physics engine to decide whether values have updated. 637 // Force the physics engine to decide whether values were updated.
638 // TODO: this is only necessary if pos, velocity, ... were updated. Is it quicker 638 // TODO: this is only necessary if pos, velocity, etc were updated. Is it quicker
639 // to check for changes here or just push the update? 639 // to check for changes here or just push the update?
640 BulletSimAPI.PushUpdate2(Prim.PhysBody.ptr); 640 BulletSimAPI.PushUpdate2(Prim.PhysBody.ptr);
641 641
@@ -643,13 +643,13 @@ namespace OpenSim.Region.Physics.BulletSPlugin
643 Prim.LocalID, Prim.ForcePosition, Prim.Force, Prim.ForceVelocity, Prim.RotationalVelocity); 643 Prim.LocalID, Prim.ForcePosition, Prim.Force, Prim.ForceVelocity, Prim.RotationalVelocity);
644 } 644 }
645 645
646 // Apply the effect of the linear motor. 646 // Apply the effect of the linear motor and other linear motions (like hover and float).
647 // Also does hover and float.
648 private void MoveLinear(float pTimestep) 647 private void MoveLinear(float pTimestep)
649 { 648 {
650 Vector3 linearMotorContribution = m_linearMotor.Step(pTimestep); 649 Vector3 linearMotorContribution = m_linearMotor.Step(pTimestep);
651 650
652 // Rotate new object velocity from vehicle relative to world coordinates 651 // The movement computed in the linear motor is relative to the vehicle
652 // coordinates. Rotate the movement to world coordinates.
653 linearMotorContribution *= Prim.ForceOrientation; 653 linearMotorContribution *= Prim.ForceOrientation;
654 654
655 // ================================================================== 655 // ==================================================================
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
687 // There can be special things needed for implementing linksets 687 // There can be special things needed for implementing linksets
688 Linkset.MakeStatic(this); 688 Linkset.MakeStatic(this);
689 // The activation state is 'disabled' so Bullet will not try to act on it. 689 // The activation state is 'disabled' so Bullet will not try to act on it.
690 BulletSimAPI.ForceActivationState2(PhysBody.ptr, ActivationState.DISABLE_SIMULATION); 690 // BulletSimAPI.ForceActivationState2(PhysBody.ptr, ActivationState.DISABLE_SIMULATION);
691 // Start it out sleeping and physical actions could wake it up. 691 // Start it out sleeping and physical actions could wake it up.
692 // BulletSimAPI.ForceActivationState2(BSBody.ptr, ActivationState.ISLAND_SLEEPING); 692 BulletSimAPI.ForceActivationState2(PhysBody.ptr, ActivationState.ISLAND_SLEEPING);
693 693
694 PhysBody.collisionFilter = CollisionFilterGroups.StaticObjectFilter; 694 PhysBody.collisionFilter = CollisionFilterGroups.StaticObjectFilter;
695 PhysBody.collisionMask = CollisionFilterGroups.StaticObjectMask; 695 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
971 // Should handle fetching the right type from the ini file and converting it. 971 // Should handle fetching the right type from the ini file and converting it.
972 // -- a delegate for getting the value as a float 972 // -- a delegate for getting the value as a float
973 // -- a delegate for setting the value from a float 973 // -- a delegate for setting the value from a float
974 // -- an optional delegate to update the value in the world. Most often used to
975 // push the new value to an in-world object.
974 // 976 //
975 // The single letter parameters for the delegates are: 977 // The single letter parameters for the delegates are:
976 // s = BSScene 978 // 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);
1007public static extern void DumpCollisionShape2(IntPtr sim, IntPtr collisionShape); 1007public static extern void DumpCollisionShape2(IntPtr sim, IntPtr collisionShape);
1008 1008
1009[DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] 1009[DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
1010public static extern void DumpMapInfo2(IntPtr sim, IntPtr manInfo);
1011
1012[DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
1010public static extern void DumpConstraint2(IntPtr sim, IntPtr constrain); 1013public static extern void DumpConstraint2(IntPtr sim, IntPtr constrain);
1011 1014
1012[DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] 1015[DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
1013public static extern void DumpAllInfo2(IntPtr sim); 1016public static extern void DumpActivationInfo2(IntPtr sim);
1014 1017
1015[DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] 1018[DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
1016public static extern void DumpMapInfo2(IntPtr sim, IntPtr manInfo); 1019public static extern void DumpAllInfo2(IntPtr sim);
1017 1020
1018[DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] 1021[DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
1019public static extern void DumpPhysicsStatistics2(IntPtr sim); 1022public static extern void DumpPhysicsStatistics2(IntPtr sim);