diff options
author | teravus | 2012-12-18 15:00:10 -0500 |
---|---|---|
committer | teravus | 2012-12-18 15:00:10 -0500 |
commit | 29cdf0f3dd99605192f29fc83bbacdf8ecb0ea8d (patch) | |
tree | 9b8eda52bcd2022e47b0b0688eb9d548b4161f36 /OpenSim/Region/Physics/BulletSNPlugin/BSLinksetConstraints.cs | |
parent | BulletSim: scale the force for external AddForce by the simulation (diff) | |
download | opensim-SC-29cdf0f3dd99605192f29fc83bbacdf8ecb0ea8d.zip opensim-SC-29cdf0f3dd99605192f29fc83bbacdf8ecb0ea8d.tar.gz opensim-SC-29cdf0f3dd99605192f29fc83bbacdf8ecb0ea8d.tar.bz2 opensim-SC-29cdf0f3dd99605192f29fc83bbacdf8ecb0ea8d.tar.xz |
* Merges BulletSim Updates to BulletSimN(BulletSNPlugin)
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/Physics/BulletSNPlugin/BSLinksetConstraints.cs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/OpenSim/Region/Physics/BulletSNPlugin/BSLinksetConstraints.cs b/OpenSim/Region/Physics/BulletSNPlugin/BSLinksetConstraints.cs index 5757e64..46ff99f 100644 --- a/OpenSim/Region/Physics/BulletSNPlugin/BSLinksetConstraints.cs +++ b/OpenSim/Region/Physics/BulletSNPlugin/BSLinksetConstraints.cs | |||
@@ -46,6 +46,8 @@ public sealed class BSLinksetConstraints : BSLinkset | |||
46 | // refresh will happen once after all the other taints are applied. | 46 | // refresh will happen once after all the other taints are applied. |
47 | public override void Refresh(BSPhysObject requestor) | 47 | public override void Refresh(BSPhysObject requestor) |
48 | { | 48 | { |
49 | base.Refresh(requestor); | ||
50 | |||
49 | // Queue to happen after all the other taint processing | 51 | // Queue to happen after all the other taint processing |
50 | PhysicsScene.PostTaintObject("BSLinksetContraints.Refresh", requestor.LocalID, delegate() | 52 | PhysicsScene.PostTaintObject("BSLinksetContraints.Refresh", requestor.LocalID, delegate() |
51 | { | 53 | { |
@@ -279,7 +281,7 @@ public sealed class BSLinksetConstraints : BSLinkset | |||
279 | private void RecomputeLinksetConstraints() | 281 | private void RecomputeLinksetConstraints() |
280 | { | 282 | { |
281 | float linksetMass = LinksetMass; | 283 | float linksetMass = LinksetMass; |
282 | LinksetRoot.UpdatePhysicalMassProperties(linksetMass); | 284 | LinksetRoot.UpdatePhysicalMassProperties(linksetMass, true); |
283 | 285 | ||
284 | // DEBUG: see of inter-linkset collisions are causing problems | 286 | // DEBUG: see of inter-linkset collisions are causing problems |
285 | // BulletSimAPI.SetCollisionFilterMask2(LinksetRoot.BSBody.ptr, | 287 | // BulletSimAPI.SetCollisionFilterMask2(LinksetRoot.BSBody.ptr, |
@@ -292,7 +294,7 @@ public sealed class BSLinksetConstraints : BSLinkset | |||
292 | // A child in the linkset physically shows the mass of the whole linkset. | 294 | // A child in the linkset physically shows the mass of the whole linkset. |
293 | // This allows Bullet to apply enough force on the child to move the whole linkset. | 295 | // This allows Bullet to apply enough force on the child to move the whole linkset. |
294 | // (Also do the mass stuff before recomputing the constraint so mass is not zero.) | 296 | // (Also do the mass stuff before recomputing the constraint so mass is not zero.) |
295 | child.UpdatePhysicalMassProperties(linksetMass); | 297 | child.UpdatePhysicalMassProperties(linksetMass, true); |
296 | 298 | ||
297 | BSConstraint constrain; | 299 | BSConstraint constrain; |
298 | if (!PhysicsScene.Constraints.TryGetConstraint(LinksetRoot.PhysBody, child.PhysBody, out constrain)) | 300 | if (!PhysicsScene.Constraints.TryGetConstraint(LinksetRoot.PhysBody, child.PhysBody, out constrain)) |