diff options
author | Melanie | 2013-05-04 01:22:12 +0100 |
---|---|---|
committer | Melanie | 2013-05-04 01:22:12 +0100 |
commit | 3aa83738e2a845d05bb25ab81634d0540971c0bf (patch) | |
tree | 411d946b817b020c72f3d9a35926215e28bf2d95 /OpenSim/Region/Physics/BulletSPlugin/BSLinksetConstraints.cs | |
parent | Merge branch 'master' into careminster (diff) | |
parent | Merge branch 'master' into bulletsim4 (diff) | |
download | opensim-SC-3aa83738e2a845d05bb25ab81634d0540971c0bf.zip opensim-SC-3aa83738e2a845d05bb25ab81634d0540971c0bf.tar.gz opensim-SC-3aa83738e2a845d05bb25ab81634d0540971c0bf.tar.bz2 opensim-SC-3aa83738e2a845d05bb25ab81634d0540971c0bf.tar.xz |
Merge branch 'master' into careminster
Conflicts:
OpenSim/Region/Application/OpenSimBase.cs
OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs
OpenSim/Region/Physics/BulletSPlugin/BSShapeCollection.cs
Diffstat (limited to 'OpenSim/Region/Physics/BulletSPlugin/BSLinksetConstraints.cs')
-rwxr-xr-x | OpenSim/Region/Physics/BulletSPlugin/BSLinksetConstraints.cs | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSLinksetConstraints.cs b/OpenSim/Region/Physics/BulletSPlugin/BSLinksetConstraints.cs index 6d252ca..a06a44d 100755 --- a/OpenSim/Region/Physics/BulletSPlugin/BSLinksetConstraints.cs +++ b/OpenSim/Region/Physics/BulletSPlugin/BSLinksetConstraints.cs | |||
@@ -51,7 +51,7 @@ public sealed class BSLinksetConstraints : BSLinkset | |||
51 | if (HasAnyChildren && IsRoot(requestor)) | 51 | if (HasAnyChildren && IsRoot(requestor)) |
52 | { | 52 | { |
53 | // Queue to happen after all the other taint processing | 53 | // Queue to happen after all the other taint processing |
54 | PhysicsScene.PostTaintObject("BSLinksetContraints.Refresh", requestor.LocalID, delegate() | 54 | m_physicsScene.PostTaintObject("BSLinksetContraints.Refresh", requestor.LocalID, delegate() |
55 | { | 55 | { |
56 | if (HasAnyChildren && IsRoot(requestor)) | 56 | if (HasAnyChildren && IsRoot(requestor)) |
57 | RecomputeLinksetConstraints(); | 57 | RecomputeLinksetConstraints(); |
@@ -93,11 +93,11 @@ public sealed class BSLinksetConstraints : BSLinkset | |||
93 | // up to rebuild the constraints before the next simulation step. | 93 | // up to rebuild the constraints before the next simulation step. |
94 | // Returns 'true' of something was actually removed and would need restoring | 94 | // Returns 'true' of something was actually removed and would need restoring |
95 | // Called at taint-time!! | 95 | // Called at taint-time!! |
96 | public override bool RemoveBodyDependencies(BSPrimLinkable child) | 96 | public override bool RemoveDependencies(BSPrimLinkable child) |
97 | { | 97 | { |
98 | bool ret = false; | 98 | bool ret = false; |
99 | 99 | ||
100 | DetailLog("{0},BSLinksetConstraint.RemoveBodyDependencies,removeChildrenForRoot,rID={1},rBody={2}", | 100 | DetailLog("{0},BSLinksetConstraint.RemoveDependencies,removeChildrenForRoot,rID={1},rBody={2}", |
101 | child.LocalID, LinksetRoot.LocalID, LinksetRoot.PhysBody.AddrString); | 101 | child.LocalID, LinksetRoot.LocalID, LinksetRoot.PhysBody.AddrString); |
102 | 102 | ||
103 | lock (m_linksetActivityLock) | 103 | lock (m_linksetActivityLock) |
@@ -142,7 +142,7 @@ public sealed class BSLinksetConstraints : BSLinkset | |||
142 | rootx.LocalID, rootx.PhysBody.AddrString, | 142 | rootx.LocalID, rootx.PhysBody.AddrString, |
143 | childx.LocalID, childx.PhysBody.AddrString); | 143 | childx.LocalID, childx.PhysBody.AddrString); |
144 | 144 | ||
145 | PhysicsScene.TaintedObject("BSLinksetConstraints.RemoveChildFromLinkset", delegate() | 145 | m_physicsScene.TaintedObject("BSLinksetConstraints.RemoveChildFromLinkset", delegate() |
146 | { | 146 | { |
147 | PhysicallyUnlinkAChildFromRoot(rootx, childx); | 147 | PhysicallyUnlinkAChildFromRoot(rootx, childx); |
148 | }); | 148 | }); |
@@ -187,7 +187,7 @@ public sealed class BSLinksetConstraints : BSLinkset | |||
187 | // http://bulletphysics.org/Bullet/phpBB3/viewtopic.php?t=4818 | 187 | // http://bulletphysics.org/Bullet/phpBB3/viewtopic.php?t=4818 |
188 | 188 | ||
189 | BSConstraint6Dof constrain = new BSConstraint6Dof( | 189 | BSConstraint6Dof constrain = new BSConstraint6Dof( |
190 | PhysicsScene.World, rootPrim.PhysBody, childPrim.PhysBody, midPoint, true, true ); | 190 | m_physicsScene.World, rootPrim.PhysBody, childPrim.PhysBody, midPoint, true, true ); |
191 | // PhysicsScene.World, childPrim.BSBody, rootPrim.BSBody, midPoint, true, true ); | 191 | // PhysicsScene.World, childPrim.BSBody, rootPrim.BSBody, midPoint, true, true ); |
192 | 192 | ||
193 | /* NOTE: below is an attempt to build constraint with full frame computation, etc. | 193 | /* NOTE: below is an attempt to build constraint with full frame computation, etc. |
@@ -216,7 +216,7 @@ public sealed class BSLinksetConstraints : BSLinkset | |||
216 | // ================================================================================== | 216 | // ================================================================================== |
217 | */ | 217 | */ |
218 | 218 | ||
219 | PhysicsScene.Constraints.AddConstraint(constrain); | 219 | m_physicsScene.Constraints.AddConstraint(constrain); |
220 | 220 | ||
221 | // zero linear and angular limits makes the objects unable to move in relation to each other | 221 | // zero linear and angular limits makes the objects unable to move in relation to each other |
222 | constrain.SetLinearLimits(OMV.Vector3.Zero, OMV.Vector3.Zero); | 222 | constrain.SetLinearLimits(OMV.Vector3.Zero, OMV.Vector3.Zero); |
@@ -248,10 +248,10 @@ public sealed class BSLinksetConstraints : BSLinkset | |||
248 | childPrim.LocalID, childPrim.PhysBody.AddrString); | 248 | childPrim.LocalID, childPrim.PhysBody.AddrString); |
249 | 249 | ||
250 | // Find the constraint for this link and get rid of it from the overall collection and from my list | 250 | // Find the constraint for this link and get rid of it from the overall collection and from my list |
251 | if (PhysicsScene.Constraints.RemoveAndDestroyConstraint(rootPrim.PhysBody, childPrim.PhysBody)) | 251 | if (m_physicsScene.Constraints.RemoveAndDestroyConstraint(rootPrim.PhysBody, childPrim.PhysBody)) |
252 | { | 252 | { |
253 | // Make the child refresh its location | 253 | // Make the child refresh its location |
254 | PhysicsScene.PE.PushUpdate(childPrim.PhysBody); | 254 | m_physicsScene.PE.PushUpdate(childPrim.PhysBody); |
255 | ret = true; | 255 | ret = true; |
256 | } | 256 | } |
257 | 257 | ||
@@ -265,7 +265,7 @@ public sealed class BSLinksetConstraints : BSLinkset | |||
265 | { | 265 | { |
266 | DetailLog("{0},BSLinksetConstraint.PhysicallyUnlinkAllChildren,taint", rootPrim.LocalID); | 266 | DetailLog("{0},BSLinksetConstraint.PhysicallyUnlinkAllChildren,taint", rootPrim.LocalID); |
267 | 267 | ||
268 | return PhysicsScene.Constraints.RemoveAndDestroyConstraint(rootPrim.PhysBody); | 268 | return m_physicsScene.Constraints.RemoveAndDestroyConstraint(rootPrim.PhysBody); |
269 | } | 269 | } |
270 | 270 | ||
271 | // Call each of the constraints that make up this linkset and recompute the | 271 | // Call each of the constraints that make up this linkset and recompute the |
@@ -289,7 +289,7 @@ public sealed class BSLinksetConstraints : BSLinkset | |||
289 | child.UpdatePhysicalMassProperties(linksetMass, true); | 289 | child.UpdatePhysicalMassProperties(linksetMass, true); |
290 | 290 | ||
291 | BSConstraint constrain; | 291 | BSConstraint constrain; |
292 | if (!PhysicsScene.Constraints.TryGetConstraint(LinksetRoot.PhysBody, child.PhysBody, out constrain)) | 292 | if (!m_physicsScene.Constraints.TryGetConstraint(LinksetRoot.PhysBody, child.PhysBody, out constrain)) |
293 | { | 293 | { |
294 | // If constraint doesn't exist yet, create it. | 294 | // If constraint doesn't exist yet, create it. |
295 | constrain = BuildConstraint(LinksetRoot, child); | 295 | constrain = BuildConstraint(LinksetRoot, child); |