diff options
author | Robert Adams | 2013-08-07 11:18:23 -0700 |
---|---|---|
committer | Robert Adams | 2013-09-11 09:11:46 -0700 |
commit | dff0fb56902f62b070ec6fd05769babfad32ed2e (patch) | |
tree | badef88245dcc6ee3b8bf7d9373da31396e1aa44 /OpenSim/Region/Physics/BulletSPlugin/BSLinksetCompound.cs | |
parent | BulletSim: initial implementation of physChangeLinkFixed that resets a linkse... (diff) | |
download | opensim-SC_OLD-dff0fb56902f62b070ec6fd05769babfad32ed2e.zip opensim-SC_OLD-dff0fb56902f62b070ec6fd05769babfad32ed2e.tar.gz opensim-SC_OLD-dff0fb56902f62b070ec6fd05769babfad32ed2e.tar.bz2 opensim-SC_OLD-dff0fb56902f62b070ec6fd05769babfad32ed2e.tar.xz |
BulletSim: Linkset.Refresh() calls internal ScheduleRebuild() to recreate the linkset physics at next PostTaint time. Replace the existing calls to ScheduleRebuild to be calls to Refresh(). This allows external routines to make changes to parameters and then cause the linkset to rebuild.
Diffstat (limited to 'OpenSim/Region/Physics/BulletSPlugin/BSLinksetCompound.cs')
-rwxr-xr-x | OpenSim/Region/Physics/BulletSPlugin/BSLinksetCompound.cs | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSLinksetCompound.cs b/OpenSim/Region/Physics/BulletSPlugin/BSLinksetCompound.cs index 47ab842..8f12189 100755 --- a/OpenSim/Region/Physics/BulletSPlugin/BSLinksetCompound.cs +++ b/OpenSim/Region/Physics/BulletSPlugin/BSLinksetCompound.cs | |||
@@ -90,10 +90,9 @@ public sealed class BSLinksetCompound : BSLinkset | |||
90 | // its internal properties. | 90 | // its internal properties. |
91 | public override void Refresh(BSPrimLinkable requestor) | 91 | public override void Refresh(BSPrimLinkable requestor) |
92 | { | 92 | { |
93 | base.Refresh(requestor); | ||
94 | |||
95 | // Something changed so do the rebuilding thing | 93 | // Something changed so do the rebuilding thing |
96 | // ScheduleRebuild(); | 94 | ScheduleRebuild(requestor); |
95 | base.Refresh(requestor); | ||
97 | } | 96 | } |
98 | 97 | ||
99 | // Schedule a refresh to happen after all the other taint processing. | 98 | // Schedule a refresh to happen after all the other taint processing. |
@@ -127,7 +126,7 @@ public sealed class BSLinksetCompound : BSLinkset | |||
127 | if (IsRoot(child)) | 126 | if (IsRoot(child)) |
128 | { | 127 | { |
129 | // The root is going dynamic. Rebuild the linkset so parts and mass get computed properly. | 128 | // The root is going dynamic. Rebuild the linkset so parts and mass get computed properly. |
130 | ScheduleRebuild(LinksetRoot); | 129 | Refresh(LinksetRoot); |
131 | } | 130 | } |
132 | return ret; | 131 | return ret; |
133 | } | 132 | } |
@@ -144,7 +143,7 @@ public sealed class BSLinksetCompound : BSLinkset | |||
144 | if (IsRoot(child)) | 143 | if (IsRoot(child)) |
145 | { | 144 | { |
146 | // Schedule a rebuild to verify that the root shape is set to the real shape. | 145 | // Schedule a rebuild to verify that the root shape is set to the real shape. |
147 | ScheduleRebuild(LinksetRoot); | 146 | Refresh(LinksetRoot); |
148 | } | 147 | } |
149 | return ret; | 148 | return ret; |
150 | } | 149 | } |
@@ -227,7 +226,7 @@ public sealed class BSLinksetCompound : BSLinkset | |||
227 | // there will already be a rebuild scheduled. | 226 | // there will already be a rebuild scheduled. |
228 | DetailLog("{0},BSLinksetCompound.UpdateProperties,couldNotUpdateChild.schedulingRebuild,whichUpdated={1}", | 227 | DetailLog("{0},BSLinksetCompound.UpdateProperties,couldNotUpdateChild.schedulingRebuild,whichUpdated={1}", |
229 | updated.LocalID, whichUpdated); | 228 | updated.LocalID, whichUpdated); |
230 | ScheduleRebuild(updated); | 229 | Refresh(updated); |
231 | } | 230 | } |
232 | } | 231 | } |
233 | } | 232 | } |
@@ -245,7 +244,7 @@ public sealed class BSLinksetCompound : BSLinkset | |||
245 | DetailLog("{0},BSLinksetCompound.RemoveDependencies,refreshIfChild,rID={1},rBody={2},isRoot={3}", | 244 | DetailLog("{0},BSLinksetCompound.RemoveDependencies,refreshIfChild,rID={1},rBody={2},isRoot={3}", |
246 | child.LocalID, LinksetRoot.LocalID, LinksetRoot.PhysBody, IsRoot(child)); | 245 | child.LocalID, LinksetRoot.LocalID, LinksetRoot.PhysBody, IsRoot(child)); |
247 | 246 | ||
248 | ScheduleRebuild(child); | 247 | Refresh(child); |
249 | 248 | ||
250 | return ret; | 249 | return ret; |
251 | } | 250 | } |
@@ -263,7 +262,7 @@ public sealed class BSLinksetCompound : BSLinkset | |||
263 | DetailLog("{0},BSLinksetCompound.AddChildToLinkset,call,child={1}", LinksetRoot.LocalID, child.LocalID); | 262 | DetailLog("{0},BSLinksetCompound.AddChildToLinkset,call,child={1}", LinksetRoot.LocalID, child.LocalID); |
264 | 263 | ||
265 | // Rebuild the compound shape with the new child shape included | 264 | // Rebuild the compound shape with the new child shape included |
266 | ScheduleRebuild(child); | 265 | Refresh(child); |
267 | } | 266 | } |
268 | return; | 267 | return; |
269 | } | 268 | } |
@@ -292,7 +291,7 @@ public sealed class BSLinksetCompound : BSLinkset | |||
292 | else | 291 | else |
293 | { | 292 | { |
294 | // Rebuild the compound shape with the child removed | 293 | // Rebuild the compound shape with the child removed |
295 | ScheduleRebuild(LinksetRoot); | 294 | Refresh(LinksetRoot); |
296 | } | 295 | } |
297 | } | 296 | } |
298 | return; | 297 | return; |