aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rwxr-xr-xOpenSim/Region/Physics/BulletSPlugin/BSAPIUnman.cs8
1 files changed, 8 insertions, 0 deletions
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSAPIUnman.cs b/OpenSim/Region/Physics/BulletSPlugin/BSAPIUnman.cs
index 45ecf56..14de2eb 100755
--- a/OpenSim/Region/Physics/BulletSPlugin/BSAPIUnman.cs
+++ b/OpenSim/Region/Physics/BulletSPlugin/BSAPIUnman.cs
@@ -921,6 +921,7 @@ public override void SetCenterOfMassByPosRot(BulletBody obj, Vector3 pos, Quater
921} 921}
922 922
923// Add a force to the object as if its mass is one. 923// Add a force to the object as if its mass is one.
924// Deep down in Bullet: m_totalForce += force*m_linearFactor;
924public override void ApplyCentralForce(BulletBody obj, Vector3 force) 925public override void ApplyCentralForce(BulletBody obj, Vector3 force)
925{ 926{
926 BulletBodyUnman bodyu = obj as BulletBodyUnman; 927 BulletBodyUnman bodyu = obj as BulletBodyUnman;
@@ -964,6 +965,7 @@ public override void SetSleepingThresholds(BulletBody obj, float lin_threshold,
964 BSAPICPP.SetSleepingThresholds2(bodyu.ptr, lin_threshold, ang_threshold); 965 BSAPICPP.SetSleepingThresholds2(bodyu.ptr, lin_threshold, ang_threshold);
965} 966}
966 967
968// Deep down in Bullet: m_totalTorque += torque*m_angularFactor;
967public override void ApplyTorque(BulletBody obj, Vector3 torque) 969public override void ApplyTorque(BulletBody obj, Vector3 torque)
968{ 970{
969 BulletBodyUnman bodyu = obj as BulletBodyUnman; 971 BulletBodyUnman bodyu = obj as BulletBodyUnman;
@@ -971,6 +973,8 @@ public override void ApplyTorque(BulletBody obj, Vector3 torque)
971} 973}
972 974
973// Apply force at the given point. Will add torque to the object. 975// Apply force at the given point. Will add torque to the object.
976// Deep down in Bullet: applyCentralForce(force);
977// applyTorque(rel_pos.cross(force*m_linearFactor));
974public override void ApplyForce(BulletBody obj, Vector3 force, Vector3 pos) 978public override void ApplyForce(BulletBody obj, Vector3 force, Vector3 pos)
975{ 979{
976 BulletBodyUnman bodyu = obj as BulletBodyUnman; 980 BulletBodyUnman bodyu = obj as BulletBodyUnman;
@@ -978,6 +982,7 @@ public override void ApplyForce(BulletBody obj, Vector3 force, Vector3 pos)
978} 982}
979 983
980// Apply impulse to the object. Same as "ApplycentralForce" but force scaled by object's mass. 984// Apply impulse to the object. Same as "ApplycentralForce" but force scaled by object's mass.
985// Deep down in Bullet: m_linearVelocity += impulse *m_linearFactor * m_inverseMass;
981public override void ApplyCentralImpulse(BulletBody obj, Vector3 imp) 986public override void ApplyCentralImpulse(BulletBody obj, Vector3 imp)
982{ 987{
983 BulletBodyUnman bodyu = obj as BulletBodyUnman; 988 BulletBodyUnman bodyu = obj as BulletBodyUnman;
@@ -985,6 +990,7 @@ public override void ApplyCentralImpulse(BulletBody obj, Vector3 imp)
985} 990}
986 991
987// Apply impulse to the object's torque. Force is scaled by object's mass. 992// Apply impulse to the object's torque. Force is scaled by object's mass.
993// Deep down in Bullet: m_angularVelocity += m_invInertiaTensorWorld * torque * m_angularFactor;
988public override void ApplyTorqueImpulse(BulletBody obj, Vector3 imp) 994public override void ApplyTorqueImpulse(BulletBody obj, Vector3 imp)
989{ 995{
990 BulletBodyUnman bodyu = obj as BulletBodyUnman; 996 BulletBodyUnman bodyu = obj as BulletBodyUnman;
@@ -992,6 +998,8 @@ public override void ApplyTorqueImpulse(BulletBody obj, Vector3 imp)
992} 998}
993 999
994// Apply impulse at the point given. For is scaled by object's mass and effects both linear and angular forces. 1000// Apply impulse at the point given. For is scaled by object's mass and effects both linear and angular forces.
1001// Deep down in Bullet: applyCentralImpulse(impulse);
1002// applyTorqueImpulse(rel_pos.cross(impulse*m_linearFactor));
995public override void ApplyImpulse(BulletBody obj, Vector3 imp, Vector3 pos) 1003public override void ApplyImpulse(BulletBody obj, Vector3 imp, Vector3 pos)
996{ 1004{
997 BulletBodyUnman bodyu = obj as BulletBodyUnman; 1005 BulletBodyUnman bodyu = obj as BulletBodyUnman;