aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Physics/BulletSPlugin/BSConstraint.cs
diff options
context:
space:
mode:
authorMelanie2012-08-15 22:59:31 +0100
committerMelanie2012-08-15 22:59:31 +0100
commite286a95d761334bb5781638d3bb16338a8343c71 (patch)
tree6d854f59efb4b4922654d03329c07eb7476e1cce /OpenSim/Region/Physics/BulletSPlugin/BSConstraint.cs
parentImplementing PRIM_LINK_TARGET in a non-recursive fashion (diff)
parentDon't enable the thread watchdog until all regions are ready. (diff)
downloadopensim-SC-e286a95d761334bb5781638d3bb16338a8343c71.zip
opensim-SC-e286a95d761334bb5781638d3bb16338a8343c71.tar.gz
opensim-SC-e286a95d761334bb5781638d3bb16338a8343c71.tar.bz2
opensim-SC-e286a95d761334bb5781638d3bb16338a8343c71.tar.xz
Merge branch 'master' of melanie@opensimulator.org:/var/git/opensim
Diffstat (limited to '')
-rwxr-xr-xOpenSim/Region/Physics/BulletSPlugin/BSConstraint.cs23
1 files changed, 23 insertions, 0 deletions
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSConstraint.cs b/OpenSim/Region/Physics/BulletSPlugin/BSConstraint.cs
index da26b72..25084d8 100755
--- a/OpenSim/Region/Physics/BulletSPlugin/BSConstraint.cs
+++ b/OpenSim/Region/Physics/BulletSPlugin/BSConstraint.cs
@@ -80,10 +80,33 @@ 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 // m_world.scene.PhysicsLogging.Write("{0},BSConstraint.RecomputeConstraintVariables,taint,enabling,A={1},B={2}",
101 // BSScene.DetailLogZero, Body1.ID, Body2.ID);
102 BulletSimAPI.SetConstraintEnable2(m_constraint.Ptr, m_world.scene.NumericBool(true));
103 }
104 else
105 {
106 m_world.scene.Logger.ErrorFormat("[BULLETSIM CONSTRAINT] CalculateTransforms failed. A={0}, B={1}", Body1.ID, Body2.ID);
107 }
108 }
109 return ret;
110 }
88} 111}
89} 112}