BulletSim: Add DumpActivationInfo2 function. Change static objects from DISABLE_SIMULATION to ISLAND_SLEEPING. Update DLLs and SOs to add DumpActivationInfo2 function.

0.7.5-pf-bulletsim
Robert Adams 2012-12-01 15:39:13 -08:00
parent ec63e4ff29
commit b124aae05e
8 changed files with 15 additions and 10 deletions

View File

@ -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;
// ==================================================================

View File

@ -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;

View File

@ -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

View File

@ -1006,14 +1006,17 @@ public static extern void DumpRigidBody2(IntPtr sim, IntPtr collisionObject);
[DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
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);

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.