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/BSLinksetConstraints.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/BSLinksetConstraints.cs')
-rwxr-xr-x | OpenSim/Region/Physics/BulletSPlugin/BSLinksetConstraints.cs | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSLinksetConstraints.cs b/OpenSim/Region/Physics/BulletSPlugin/BSLinksetConstraints.cs index f3b70c3..db323c2 100755 --- a/OpenSim/Region/Physics/BulletSPlugin/BSLinksetConstraints.cs +++ b/OpenSim/Region/Physics/BulletSPlugin/BSLinksetConstraints.cs | |||
@@ -158,6 +158,7 @@ public sealed class BSLinksetConstraints : BSLinkset | |||
158 | // refresh will happen once after all the other taints are applied. | 158 | // refresh will happen once after all the other taints are applied. |
159 | public override void Refresh(BSPrimLinkable requestor) | 159 | public override void Refresh(BSPrimLinkable requestor) |
160 | { | 160 | { |
161 | ScheduleRebuild(requestor); | ||
161 | base.Refresh(requestor); | 162 | base.Refresh(requestor); |
162 | 163 | ||
163 | } | 164 | } |
@@ -194,7 +195,7 @@ public sealed class BSLinksetConstraints : BSLinkset | |||
194 | if (IsRoot(child)) | 195 | if (IsRoot(child)) |
195 | { | 196 | { |
196 | // The root is going dynamic. Rebuild the linkset so parts and mass get computed properly. | 197 | // The root is going dynamic. Rebuild the linkset so parts and mass get computed properly. |
197 | ScheduleRebuild(LinksetRoot); | 198 | Refresh(LinksetRoot); |
198 | } | 199 | } |
199 | return ret; | 200 | return ret; |
200 | } | 201 | } |
@@ -213,7 +214,7 @@ public sealed class BSLinksetConstraints : BSLinkset | |||
213 | if (IsRoot(child)) | 214 | if (IsRoot(child)) |
214 | { | 215 | { |
215 | // Schedule a rebuild to verify that the root shape is set to the real shape. | 216 | // Schedule a rebuild to verify that the root shape is set to the real shape. |
216 | ScheduleRebuild(LinksetRoot); | 217 | Refresh(LinksetRoot); |
217 | } | 218 | } |
218 | return ret; | 219 | return ret; |
219 | } | 220 | } |
@@ -241,7 +242,7 @@ public sealed class BSLinksetConstraints : BSLinkset | |||
241 | // Just undo all the constraints for this linkset. Rebuild at the end of the step. | 242 | // Just undo all the constraints for this linkset. Rebuild at the end of the step. |
242 | ret = PhysicallyUnlinkAllChildrenFromRoot(LinksetRoot); | 243 | ret = PhysicallyUnlinkAllChildrenFromRoot(LinksetRoot); |
243 | // Cause the constraints, et al to be rebuilt before the next simulation step. | 244 | // Cause the constraints, et al to be rebuilt before the next simulation step. |
244 | ScheduleRebuild(LinksetRoot); | 245 | Refresh(LinksetRoot); |
245 | } | 246 | } |
246 | return ret; | 247 | return ret; |
247 | } | 248 | } |
@@ -259,7 +260,7 @@ public sealed class BSLinksetConstraints : BSLinkset | |||
259 | DetailLog("{0},BSLinksetConstraints.AddChildToLinkset,call,child={1}", LinksetRoot.LocalID, child.LocalID); | 260 | DetailLog("{0},BSLinksetConstraints.AddChildToLinkset,call,child={1}", LinksetRoot.LocalID, child.LocalID); |
260 | 261 | ||
261 | // Cause constraints and assorted properties to be recomputed before the next simulation step. | 262 | // Cause constraints and assorted properties to be recomputed before the next simulation step. |
262 | ScheduleRebuild(LinksetRoot); | 263 | Refresh(LinksetRoot); |
263 | } | 264 | } |
264 | return; | 265 | return; |
265 | } | 266 | } |
@@ -283,7 +284,7 @@ public sealed class BSLinksetConstraints : BSLinkset | |||
283 | PhysicallyUnlinkAChildFromRoot(rootx, childx); | 284 | PhysicallyUnlinkAChildFromRoot(rootx, childx); |
284 | }); | 285 | }); |
285 | // See that the linkset parameters are recomputed at the end of the taint time. | 286 | // See that the linkset parameters are recomputed at the end of the taint time. |
286 | ScheduleRebuild(LinksetRoot); | 287 | Refresh(LinksetRoot); |
287 | } | 288 | } |
288 | else | 289 | else |
289 | { | 290 | { |