aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Physics/BulletSPlugin/BSLinksetConstraints.cs
diff options
context:
space:
mode:
authorRobert Adams2014-10-02 18:45:36 -0700
committerRobert Adams2014-11-30 19:52:58 -0800
commitcf85ade81e38e692fe99c71386ab2c306ab77319 (patch)
treeba8dd76e62a4a989ae46f02dfe028ef0ee3d37fd /OpenSim/Region/Physics/BulletSPlugin/BSLinksetConstraints.cs
parentA little more cleaning of config files. (diff)
downloadopensim-SC-cf85ade81e38e692fe99c71386ab2c306ab77319.zip
opensim-SC-cf85ade81e38e692fe99c71386ab2c306ab77319.tar.gz
opensim-SC-cf85ade81e38e692fe99c71386ab2c306ab77319.tar.bz2
opensim-SC-cf85ade81e38e692fe99c71386ab2c306ab77319.tar.xz
BulletSim: add shape and linkset rebuild scheduled flags. Add BSPrim.Incomplete flag based on rebuild flags to say when an object is being rebuilt.
Diffstat (limited to 'OpenSim/Region/Physics/BulletSPlugin/BSLinksetConstraints.cs')
-rwxr-xr-xOpenSim/Region/Physics/BulletSPlugin/BSLinksetConstraints.cs28
1 files changed, 18 insertions, 10 deletions
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSLinksetConstraints.cs b/OpenSim/Region/Physics/BulletSPlugin/BSLinksetConstraints.cs
index b0a5ef1..4384cdc 100755
--- a/OpenSim/Region/Physics/BulletSPlugin/BSLinksetConstraints.cs
+++ b/OpenSim/Region/Physics/BulletSPlugin/BSLinksetConstraints.cs
@@ -212,20 +212,28 @@ public sealed class BSLinksetConstraints : BSLinkset
212 // When rebuilding, it is possible to set properties that would normally require a rebuild. 212 // When rebuilding, it is possible to set properties that would normally require a rebuild.
213 // If already rebuilding, don't request another rebuild. 213 // If already rebuilding, don't request another rebuild.
214 // If a linkset with just a root prim (simple non-linked prim) don't bother rebuilding. 214 // If a linkset with just a root prim (simple non-linked prim) don't bother rebuilding.
215 if (!Rebuilding && HasAnyChildren) 215 lock (this)
216 { 216 {
217 // Queue to happen after all the other taint processing 217 if (!RebuildScheduled)
218 m_physicsScene.PostTaintObject("BSLinksetContraints.Refresh", requestor.LocalID, delegate()
219 { 218 {
220 if (HasAnyChildren) 219 if (!Rebuilding && HasAnyChildren)
221 { 220 {
222 // Constraints that have not been changed are not rebuild but make sure 221 RebuildScheduled = true;
223 // the constraint of the requestor is rebuilt. 222 // Queue to happen after all the other taint processing
224 PhysicallyUnlinkAChildFromRoot(LinksetRoot, requestor); 223 m_physicsScene.PostTaintObject("BSLinksetContraints.Refresh", requestor.LocalID, delegate()
225 // Rebuild the linkset and all its constraints. 224 {
226 RecomputeLinksetConstraints(); 225 if (HasAnyChildren)
226 {
227 // Constraints that have not been changed are not rebuild but make sure
228 // the constraint of the requestor is rebuilt.
229 PhysicallyUnlinkAChildFromRoot(LinksetRoot, requestor);
230 // Rebuild the linkset and all its constraints.
231 RecomputeLinksetConstraints();
232 }
233 RebuildScheduled = false;
234 });
227 } 235 }
228 }); 236 }
229 } 237 }
230 } 238 }
231 239