aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Physics/BulletSPlugin
diff options
context:
space:
mode:
authorRobert Adams2012-08-14 16:25:59 -0700
committerRobert Adams2012-08-15 12:08:01 -0700
commit77a7758cf50e14b3ed7309d0d36612d9987b987b (patch)
tree0785d21886712dd59c64e1a0394fdd1bd97ab23b /OpenSim/Region/Physics/BulletSPlugin
parentBulletSim: add BSConstraint.RecomputConstraintVariables for the recomputation... (diff)
downloadopensim-SC_OLD-77a7758cf50e14b3ed7309d0d36612d9987b987b.zip
opensim-SC_OLD-77a7758cf50e14b3ed7309d0d36612d9987b987b.tar.gz
opensim-SC_OLD-77a7758cf50e14b3ed7309d0d36612d9987b987b.tar.bz2
opensim-SC_OLD-77a7758cf50e14b3ed7309d0d36612d9987b987b.tar.xz
BulletSim: Refactor BSConstraintCollection to add a new RemoveAndDestroyConstraint(BSConstraint xx)
Diffstat (limited to '')
-rwxr-xr-xOpenSim/Region/Physics/BulletSPlugin/BSConstraintCollection.cs16
1 files changed, 12 insertions, 4 deletions
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSConstraintCollection.cs b/OpenSim/Region/Physics/BulletSPlugin/BSConstraintCollection.cs
index 3df2ddc..862b744 100755
--- a/OpenSim/Region/Physics/BulletSPlugin/BSConstraintCollection.cs
+++ b/OpenSim/Region/Physics/BulletSPlugin/BSConstraintCollection.cs
@@ -112,16 +112,24 @@ public class BSConstraintCollection : IDisposable
112 { 112 {
113 m_world.scene.DetailLog("{0},BSConstraintCollection.RemoveAndDestroyConstraint,taint,body1={1},body2={2}", BSScene.DetailLogZero, body1.ID, body2.ID); 113 m_world.scene.DetailLog("{0},BSConstraintCollection.RemoveAndDestroyConstraint,taint,body1={1},body2={2}", BSScene.DetailLogZero, body1.ID, body2.ID);
114 // remove the constraint from our collection 114 // remove the constraint from our collection
115 m_constraints.Remove(constrain); 115 RemoveAndDestroyConstraint(constrain);
116 // tell the engine that all its structures need to be freed
117 constrain.Dispose();
118 // we destroyed something
119 ret = true; 116 ret = true;
120 } 117 }
121 118
122 return ret; 119 return ret;
123 } 120 }
124 121
122 // The constraint MUST exist in the collection
123 public bool RemoveAndDestroyConstraint(BSConstraint constrain)
124 {
125 // remove the constraint from our collection
126 m_constraints.Remove(constrain);
127 // tell the engine that all its structures need to be freed
128 constrain.Dispose();
129 // we destroyed something
130 return true;
131 }
132
125 // Remove all constraints that reference the passed body. 133 // Remove all constraints that reference the passed body.
126 // Return 'true' if any constraints were destroyed. 134 // Return 'true' if any constraints were destroyed.
127 public bool RemoveAndDestroyConstraint(BulletBody body1) 135 public bool RemoveAndDestroyConstraint(BulletBody body1)