diff options
Diffstat (limited to 'OpenSim/Region/Physics/BulletSPlugin/BSPrim.cs')
-rw-r--r-- | OpenSim/Region/Physics/BulletSPlugin/BSPrim.cs | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSPrim.cs b/OpenSim/Region/Physics/BulletSPlugin/BSPrim.cs index b2947c6..ce4c3da 100644 --- a/OpenSim/Region/Physics/BulletSPlugin/BSPrim.cs +++ b/OpenSim/Region/Physics/BulletSPlugin/BSPrim.cs | |||
@@ -802,6 +802,7 @@ public class BSPrim : BSPhysObject | |||
802 | // isSolid: other objects bounce off of this object | 802 | // isSolid: other objects bounce off of this object |
803 | // isVolumeDetect: other objects pass through but can generate collisions | 803 | // isVolumeDetect: other objects pass through but can generate collisions |
804 | // collisionEvents: whether this object returns collision events | 804 | // collisionEvents: whether this object returns collision events |
805 | // NOTE: overloaded by BSPrimLinkable to also update linkset physical parameters. | ||
805 | public virtual void UpdatePhysicalParameters() | 806 | public virtual void UpdatePhysicalParameters() |
806 | { | 807 | { |
807 | if (!PhysBody.HasPhysicalBody) | 808 | if (!PhysBody.HasPhysicalBody) |
@@ -1125,7 +1126,9 @@ public class BSPrim : BSPhysObject | |||
1125 | OMV.Vector3 addForce = force; | 1126 | OMV.Vector3 addForce = force; |
1126 | PhysScene.TaintedObject(inTaintTime, "BSPrim.AddForce", delegate() | 1127 | PhysScene.TaintedObject(inTaintTime, "BSPrim.AddForce", delegate() |
1127 | { | 1128 | { |
1128 | // Bullet adds this central force to the total force for this tick | 1129 | // Bullet adds this central force to the total force for this tick. |
1130 | // Deep down in Bullet: | ||
1131 | // linearVelocity += totalForce / mass * timeStep; | ||
1129 | DetailLog("{0},BSPrim.addForce,taint,force={1}", LocalID, addForce); | 1132 | DetailLog("{0},BSPrim.addForce,taint,force={1}", LocalID, addForce); |
1130 | if (PhysBody.HasPhysicalBody) | 1133 | if (PhysBody.HasPhysicalBody) |
1131 | { | 1134 | { |
@@ -1493,6 +1496,8 @@ public class BSPrim : BSPhysObject | |||
1493 | 1496 | ||
1494 | returnMass = Util.Clamp(returnMass, BSParam.MinimumObjectMass, BSParam.MaximumObjectMass); | 1497 | returnMass = Util.Clamp(returnMass, BSParam.MinimumObjectMass, BSParam.MaximumObjectMass); |
1495 | // DetailLog("{0},BSPrim.CalculateMass,den={1},vol={2},mass={3}", LocalID, Density, volume, returnMass); | 1498 | // DetailLog("{0},BSPrim.CalculateMass,den={1},vol={2},mass={3}", LocalID, Density, volume, returnMass); |
1499 | DetailLog("{0},BSPrim.CalculateMass,den={1},vol={2},mass={3},pathB={4},pathE={5},profB={6},profE={7},siz={8}", | ||
1500 | LocalID, Density, volume, returnMass, pathBegin, pathEnd, profileBegin, profileEnd, _size); | ||
1496 | 1501 | ||
1497 | return returnMass; | 1502 | return returnMass; |
1498 | }// end CalculateMass | 1503 | }// end CalculateMass |
@@ -1528,6 +1533,8 @@ public class BSPrim : BSPhysObject | |||
1528 | 1533 | ||
1529 | // The physics engine says that properties have updated. Update same and inform | 1534 | // The physics engine says that properties have updated. Update same and inform |
1530 | // the world that things have changed. | 1535 | // the world that things have changed. |
1536 | // NOTE: BSPrim.UpdateProperties is overloaded by BSPrimLinkable which modifies updates from root and children prims. | ||
1537 | // NOTE: BSPrim.UpdateProperties is overloaded by BSPrimDisplaced which handles mapping physical position to simulator position. | ||
1531 | public override void UpdateProperties(EntityProperties entprop) | 1538 | public override void UpdateProperties(EntityProperties entprop) |
1532 | { | 1539 | { |
1533 | // Let anyone (like the actors) modify the updated properties before they are pushed into the object and the simulator. | 1540 | // Let anyone (like the actors) modify the updated properties before they are pushed into the object and the simulator. |
@@ -1563,8 +1570,6 @@ public class BSPrim : BSPhysObject | |||
1563 | LastEntityProperties = CurrentEntityProperties; | 1570 | LastEntityProperties = CurrentEntityProperties; |
1564 | CurrentEntityProperties = entprop; | 1571 | CurrentEntityProperties = entprop; |
1565 | 1572 | ||
1566 | // Note that BSPrim can be overloaded by BSPrimLinkable which controls updates from root and children prims. | ||
1567 | |||
1568 | PhysScene.PostUpdate(this); | 1573 | PhysScene.PostUpdate(this); |
1569 | } | 1574 | } |
1570 | } | 1575 | } |