diff options
author | Robert Adams | 2013-01-18 12:10:03 -0800 |
---|---|---|
committer | Robert Adams | 2013-01-23 14:24:42 -0800 |
commit | a0d460e6bfa64a6c43ff327dcf19b696cc380fbb (patch) | |
tree | d27d778ecb8b44cfccf8a51b9db5852b9c5d7fdc /OpenSim/Region | |
parent | Add the Avination physics raycast glue so Core Physics can implement raycast (diff) | |
download | opensim-SC-a0d460e6bfa64a6c43ff327dcf19b696cc380fbb.zip opensim-SC-a0d460e6bfa64a6c43ff327dcf19b696cc380fbb.tar.gz opensim-SC-a0d460e6bfa64a6c43ff327dcf19b696cc380fbb.tar.bz2 opensim-SC-a0d460e6bfa64a6c43ff327dcf19b696cc380fbb.tar.xz |
BulletSim: remove the unused RestoreBodyDependencies used by linksets
and vehicles and clean up code by removing their kludgyness.
Diffstat (limited to 'OpenSim/Region')
-rwxr-xr-x | OpenSim/Region/Physics/BulletSPlugin/BSLinksetCompound.cs | 7 | ||||
-rwxr-xr-x | OpenSim/Region/Physics/BulletSPlugin/BSLinksetConstraints.cs | 8 | ||||
-rw-r--r-- | OpenSim/Region/Physics/BulletSPlugin/BSPrim.cs | 20 |
3 files changed, 2 insertions, 33 deletions
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSLinksetCompound.cs b/OpenSim/Region/Physics/BulletSPlugin/BSLinksetCompound.cs index 27d8ad0..0077da7 100755 --- a/OpenSim/Region/Physics/BulletSPlugin/BSLinksetCompound.cs +++ b/OpenSim/Region/Physics/BulletSPlugin/BSLinksetCompound.cs | |||
@@ -290,13 +290,6 @@ public sealed class BSLinksetCompound : BSLinkset | |||
290 | return ret; | 290 | return ret; |
291 | } | 291 | } |
292 | 292 | ||
293 | // Companion to RemoveBodyDependencies(). If RemoveBodyDependencies() returns 'true', | ||
294 | // this routine will restore the removed constraints. | ||
295 | // Called at taint-time!! | ||
296 | public override void RestoreBodyDependencies(BSPrim child) | ||
297 | { | ||
298 | } | ||
299 | |||
300 | // When the linkset is built, the child shape is added to the compound shape relative to the | 293 | // When the linkset is built, the child shape is added to the compound shape relative to the |
301 | // root shape. The linkset then moves around but this does not move the actual child | 294 | // root shape. The linkset then moves around but this does not move the actual child |
302 | // prim. The child prim's location must be recomputed based on the location of the root shape. | 295 | // prim. The child prim's location must be recomputed based on the location of the root shape. |
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSLinksetConstraints.cs b/OpenSim/Region/Physics/BulletSPlugin/BSLinksetConstraints.cs index 89f186c..3011465 100755 --- a/OpenSim/Region/Physics/BulletSPlugin/BSLinksetConstraints.cs +++ b/OpenSim/Region/Physics/BulletSPlugin/BSLinksetConstraints.cs | |||
@@ -110,14 +110,6 @@ public sealed class BSLinksetConstraints : BSLinkset | |||
110 | return ret; | 110 | return ret; |
111 | } | 111 | } |
112 | 112 | ||
113 | // Companion to RemoveBodyDependencies(). If RemoveBodyDependencies() returns 'true', | ||
114 | // this routine will restore the removed constraints. | ||
115 | // Called at taint-time!! | ||
116 | public override void RestoreBodyDependencies(BSPrim child) | ||
117 | { | ||
118 | // The Refresh operation queued by RemoveBodyDependencies() will build any missing constraints. | ||
119 | } | ||
120 | |||
121 | // ================================================================ | 113 | // ================================================================ |
122 | 114 | ||
123 | // Add a new child to the linkset. | 115 | // Add a new child to the linkset. |
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSPrim.cs b/OpenSim/Region/Physics/BulletSPlugin/BSPrim.cs index e6b8507..b37a1f8 100644 --- a/OpenSim/Region/Physics/BulletSPlugin/BSPrim.cs +++ b/OpenSim/Region/Physics/BulletSPlugin/BSPrim.cs | |||
@@ -1606,11 +1606,6 @@ public sealed class BSPrim : BSPhysObject | |||
1606 | // Called at taint-time!!! | 1606 | // Called at taint-time!!! |
1607 | public void CreateGeomAndObject(bool forceRebuild) | 1607 | public void CreateGeomAndObject(bool forceRebuild) |
1608 | { | 1608 | { |
1609 | // If this prim is part of a linkset, we must remove and restore the physical | ||
1610 | // links if the body is rebuilt. | ||
1611 | bool needToRestoreLinkset = false; | ||
1612 | bool needToRestoreVehicle = false; | ||
1613 | |||
1614 | // Create the correct physical representation for this type of object. | 1609 | // Create the correct physical representation for this type of object. |
1615 | // Updates PhysBody and PhysShape with the new information. | 1610 | // Updates PhysBody and PhysShape with the new information. |
1616 | // Ignore 'forceRebuild'. This routine makes the right choices and changes of necessary. | 1611 | // Ignore 'forceRebuild'. This routine makes the right choices and changes of necessary. |
@@ -1619,21 +1614,10 @@ public sealed class BSPrim : BSPhysObject | |||
1619 | // Called if the current prim body is about to be destroyed. | 1614 | // Called if the current prim body is about to be destroyed. |
1620 | // Remove all the physical dependencies on the old body. | 1615 | // Remove all the physical dependencies on the old body. |
1621 | // (Maybe someday make the changing of BSShape an event to be subscribed to by BSLinkset, ...) | 1616 | // (Maybe someday make the changing of BSShape an event to be subscribed to by BSLinkset, ...) |
1622 | needToRestoreLinkset = Linkset.RemoveBodyDependencies(this); | 1617 | Linkset.RemoveBodyDependencies(this); |
1623 | needToRestoreVehicle = _vehicle.RemoveBodyDependencies(this); | 1618 | _vehicle.RemoveBodyDependencies(this); |
1624 | }); | 1619 | }); |
1625 | 1620 | ||
1626 | if (needToRestoreLinkset) | ||
1627 | { | ||
1628 | // If physical body dependencies were removed, restore them | ||
1629 | Linkset.RestoreBodyDependencies(this); | ||
1630 | } | ||
1631 | if (needToRestoreVehicle) | ||
1632 | { | ||
1633 | // If physical body dependencies were removed, restore them | ||
1634 | _vehicle.RestoreBodyDependencies(this); | ||
1635 | } | ||
1636 | |||
1637 | // Make sure the properties are set on the new object | 1621 | // Make sure the properties are set on the new object |
1638 | UpdatePhysicalParameters(); | 1622 | UpdatePhysicalParameters(); |
1639 | return; | 1623 | return; |