aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorRobert Adams2012-08-14 16:24:34 -0700
committerRobert Adams2012-08-15 12:07:57 -0700
commitc1c1d48af15b4ac0ed5951816f6225a74ffa6eba (patch)
tree4ae1a3534ecee6f108126ae8ecc94c45f02d8c65
parentBulletSim: Add the class BSCharacter to the DetailLog output (diff)
downloadopensim-SC_OLD-c1c1d48af15b4ac0ed5951816f6225a74ffa6eba.zip
opensim-SC_OLD-c1c1d48af15b4ac0ed5951816f6225a74ffa6eba.tar.gz
opensim-SC_OLD-c1c1d48af15b4ac0ed5951816f6225a74ffa6eba.tar.bz2
opensim-SC_OLD-c1c1d48af15b4ac0ed5951816f6225a74ffa6eba.tar.xz
BulletSim: add BSConstraint.RecomputConstraintVariables for the recomputation after linksets changed, etc
Diffstat (limited to '')
-rwxr-xr-xOpenSim/Region/Physics/BulletSPlugin/BSConstraint.cs17
1 files changed, 17 insertions, 0 deletions
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSConstraint.cs b/OpenSim/Region/Physics/BulletSPlugin/BSConstraint.cs
index da26b72..cf8dbc5 100755
--- a/OpenSim/Region/Physics/BulletSPlugin/BSConstraint.cs
+++ b/OpenSim/Region/Physics/BulletSPlugin/BSConstraint.cs
@@ -80,10 +80,27 @@ public abstract class BSConstraint : IDisposable
80 bool ret = false; 80 bool ret = false;
81 if (m_enabled) 81 if (m_enabled)
82 { 82 {
83 // Recompute the internal transforms
83 BulletSimAPI.CalculateTransforms2(m_constraint.Ptr); 84 BulletSimAPI.CalculateTransforms2(m_constraint.Ptr);
84 ret = true; 85 ret = true;
85 } 86 }
86 return ret; 87 return ret;
87 } 88 }
89
90 // Reset this constraint making sure it has all its internal structures
91 // recomputed and is enabled and ready to go.
92 public virtual bool RecomputeConstraintVariables(float mass)
93 {
94 bool ret = false;
95 if (m_enabled)
96 {
97 ret = CalculateTransforms();
98 if (ret)
99 {
100 BulletSimAPI.SetConstraintEnable2(m_constraint.Ptr, m_world.scene.NumericBool(true));
101 }
102 }
103 return ret;
104 }
88} 105}
89} 106}