BulletSim: Add DumpActivationInfo2 function. Change static objects from DISABLE_SIMULATION to ISLAND_SLEEPING. Update DLLs and SOs to add DumpActivationInfo2 function.
parent
ec63e4ff29
commit
b124aae05e
|
@ -623,7 +623,7 @@ namespace OpenSim.Region.Physics.BulletSPlugin
|
||||||
{
|
{
|
||||||
if (!IsActive) return;
|
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;
|
m_knownTerrainHeight = m_knownWaterLevel = float.MinValue;
|
||||||
|
|
||||||
MoveLinear(pTimestep);
|
MoveLinear(pTimestep);
|
||||||
|
@ -634,8 +634,8 @@ namespace OpenSim.Region.Physics.BulletSPlugin
|
||||||
// remember the position so next step we can limit absolute movement effects
|
// remember the position so next step we can limit absolute movement effects
|
||||||
m_lastPositionVector = Prim.ForcePosition;
|
m_lastPositionVector = Prim.ForcePosition;
|
||||||
|
|
||||||
// Force the physics engine to decide whether values have updated.
|
// Force the physics engine to decide whether values were updated.
|
||||||
// TODO: this is only necessary if pos, velocity, ... were updated. Is it quicker
|
// TODO: this is only necessary if pos, velocity, etc were updated. Is it quicker
|
||||||
// to check for changes here or just push the update?
|
// to check for changes here or just push the update?
|
||||||
BulletSimAPI.PushUpdate2(Prim.PhysBody.ptr);
|
BulletSimAPI.PushUpdate2(Prim.PhysBody.ptr);
|
||||||
|
|
||||||
|
@ -643,13 +643,13 @@ namespace OpenSim.Region.Physics.BulletSPlugin
|
||||||
Prim.LocalID, Prim.ForcePosition, Prim.Force, Prim.ForceVelocity, Prim.RotationalVelocity);
|
Prim.LocalID, Prim.ForcePosition, Prim.Force, Prim.ForceVelocity, Prim.RotationalVelocity);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Apply the effect of the linear motor.
|
// Apply the effect of the linear motor and other linear motions (like hover and float).
|
||||||
// Also does hover and float.
|
|
||||||
private void MoveLinear(float pTimestep)
|
private void MoveLinear(float pTimestep)
|
||||||
{
|
{
|
||||||
Vector3 linearMotorContribution = m_linearMotor.Step(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;
|
linearMotorContribution *= Prim.ForceOrientation;
|
||||||
|
|
||||||
// ==================================================================
|
// ==================================================================
|
||||||
|
|
|
@ -687,9 +687,9 @@ public sealed class BSPrim : BSPhysObject
|
||||||
// There can be special things needed for implementing linksets
|
// There can be special things needed for implementing linksets
|
||||||
Linkset.MakeStatic(this);
|
Linkset.MakeStatic(this);
|
||||||
// The activation state is 'disabled' so Bullet will not try to act on it.
|
// 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.
|
// 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.collisionFilter = CollisionFilterGroups.StaticObjectFilter;
|
||||||
PhysBody.collisionMask = CollisionFilterGroups.StaticObjectMask;
|
PhysBody.collisionMask = CollisionFilterGroups.StaticObjectMask;
|
||||||
|
|
|
@ -971,6 +971,8 @@ public sealed class BSScene : PhysicsScene, IPhysicsParameters
|
||||||
// Should handle fetching the right type from the ini file and converting it.
|
// 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 getting the value as a float
|
||||||
// -- a delegate for setting the value from 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:
|
// The single letter parameters for the delegates are:
|
||||||
// s = BSScene
|
// s = BSScene
|
||||||
|
|
|
@ -1006,14 +1006,17 @@ public static extern void DumpRigidBody2(IntPtr sim, IntPtr collisionObject);
|
||||||
[DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
|
[DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
|
||||||
public static extern void DumpCollisionShape2(IntPtr sim, IntPtr collisionShape);
|
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]
|
[DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
|
||||||
public static extern void DumpConstraint2(IntPtr sim, IntPtr constrain);
|
public static extern void DumpConstraint2(IntPtr sim, IntPtr constrain);
|
||||||
|
|
||||||
[DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
|
[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]
|
[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]
|
[DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
|
||||||
public static extern void DumpPhysicsStatistics2(IntPtr sim);
|
public static extern void DumpPhysicsStatistics2(IntPtr sim);
|
||||||
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading…
Reference in New Issue