diff options
author | Robert Adams | 2012-12-24 08:56:02 -0800 |
---|---|---|
committer | Robert Adams | 2012-12-24 08:56:02 -0800 |
commit | 80cee1b85a646045c02e2bb675056d532ce2fe27 (patch) | |
tree | dc9347a2eeb3241cdd30f50d448b630ce5d5c4f9 /OpenSim/Region/Physics/BulletSPlugin/BSLinksetConstraints.cs | |
parent | * Update BulletSimN terrain implementation to default to Heightfield, it's le... (diff) | |
download | opensim-SC_OLD-80cee1b85a646045c02e2bb675056d532ce2fe27.zip opensim-SC_OLD-80cee1b85a646045c02e2bb675056d532ce2fe27.tar.gz opensim-SC_OLD-80cee1b85a646045c02e2bb675056d532ce2fe27.tar.bz2 opensim-SC_OLD-80cee1b85a646045c02e2bb675056d532ce2fe27.tar.xz |
BulletSim: Fix single physical prim reporting its mass as zero.
Properly return root mass as mass of just the root prim rather
than the mass of the linkset. SOG has the logic to add the masses
together to get the linkset mass.
Update TODO list.
Diffstat (limited to 'OpenSim/Region/Physics/BulletSPlugin/BSLinksetConstraints.cs')
-rwxr-xr-x | OpenSim/Region/Physics/BulletSPlugin/BSLinksetConstraints.cs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSLinksetConstraints.cs b/OpenSim/Region/Physics/BulletSPlugin/BSLinksetConstraints.cs index d95f223..6b592e7 100755 --- a/OpenSim/Region/Physics/BulletSPlugin/BSLinksetConstraints.cs +++ b/OpenSim/Region/Physics/BulletSPlugin/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)) |