diff options
author | Teravus Ovares | 2009-04-16 08:11:05 +0000 |
---|---|---|
committer | Teravus Ovares | 2009-04-16 08:11:05 +0000 |
commit | 8a7a0190e69b466217a9c4cb6eb57abc1f5629ee (patch) | |
tree | 6c5b274158af3b89620e2fcdb33513abde9f4ba4 | |
parent | * Committing more BulletDotNETPlugin work (diff) | |
download | opensim-SC-8a7a0190e69b466217a9c4cb6eb57abc1f5629ee.zip opensim-SC-8a7a0190e69b466217a9c4cb6eb57abc1f5629ee.tar.gz opensim-SC-8a7a0190e69b466217a9c4cb6eb57abc1f5629ee.tar.bz2 opensim-SC-8a7a0190e69b466217a9c4cb6eb57abc1f5629ee.tar.xz |
* Remove some super experimental stuff in BulletDotNETPlugin since it was causing issues.
* Tweak the ODEPrim PID a bit more.
3 files changed, 18 insertions, 11 deletions
diff --git a/OpenSim/Region/Physics/BulletDotNETPlugin/BulletDotNETPrim.cs b/OpenSim/Region/Physics/BulletDotNETPlugin/BulletDotNETPrim.cs index 5ff73c5..ec982c6 100644 --- a/OpenSim/Region/Physics/BulletDotNETPlugin/BulletDotNETPrim.cs +++ b/OpenSim/Region/Physics/BulletDotNETPlugin/BulletDotNETPrim.cs | |||
@@ -2140,8 +2140,8 @@ namespace OpenSim.Region.Physics.BulletDotNETPlugin | |||
2140 | ((btGImpactMeshShape) prim_geom).setLocalScaling(new btVector3(1, 1, 1)); | 2140 | ((btGImpactMeshShape) prim_geom).setLocalScaling(new btVector3(1, 1, 1)); |
2141 | ((btGImpactMeshShape) prim_geom).updateBound(); | 2141 | ((btGImpactMeshShape) prim_geom).updateBound(); |
2142 | } | 2142 | } |
2143 | Body.setCollisionFlags(Body.getCollisionFlags() | (int)ContactFlags.CF_CUSTOM_MATERIAL_CALLBACK); | 2143 | //Body.setCollisionFlags(Body.getCollisionFlags() | (int)ContactFlags.CF_CUSTOM_MATERIAL_CALLBACK); |
2144 | Body.setUserPointer((IntPtr) m_localID); | 2144 | //Body.setUserPointer((IntPtr) (int)m_localID); |
2145 | _parent_scene.AddPrimToScene(this); | 2145 | _parent_scene.AddPrimToScene(this); |
2146 | } | 2146 | } |
2147 | else | 2147 | else |
diff --git a/OpenSim/Region/Physics/BulletDotNETPlugin/BulletDotNETScene.cs b/OpenSim/Region/Physics/BulletDotNETPlugin/BulletDotNETScene.cs index fecd4a1..0a375b2 100644 --- a/OpenSim/Region/Physics/BulletDotNETPlugin/BulletDotNETScene.cs +++ b/OpenSim/Region/Physics/BulletDotNETPlugin/BulletDotNETScene.cs | |||
@@ -134,7 +134,7 @@ namespace OpenSim.Region.Physics.BulletDotNETPlugin | |||
134 | m_dispatcher = new btCollisionDispatcher(m_collisionConfiguration); | 134 | m_dispatcher = new btCollisionDispatcher(m_collisionConfiguration); |
135 | m_world = new btDiscreteDynamicsWorld(m_dispatcher, m_broadphase, m_solver, m_collisionConfiguration); | 135 | m_world = new btDiscreteDynamicsWorld(m_dispatcher, m_broadphase, m_solver, m_collisionConfiguration); |
136 | m_world.setGravity(m_gravity); | 136 | m_world.setGravity(m_gravity); |
137 | EnableCollisionInterface(); | 137 | //EnableCollisionInterface(); |
138 | 138 | ||
139 | 139 | ||
140 | } | 140 | } |
diff --git a/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs b/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs index 92373cd..391f644 100644 --- a/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs +++ b/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs | |||
@@ -2733,28 +2733,29 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
2733 | 2733 | ||
2734 | 2734 | ||
2735 | 2735 | ||
2736 | /* | 2736 | |
2737 | // Inverse Inertia Matrix, set the X, Y, and/r Z inertia to 0 then invert it again. | 2737 | // Inverse Inertia Matrix, set the X, Y, and/r Z inertia to 0 then invert it again. |
2738 | d.Mass objMass; | 2738 | d.Mass objMass; |
2739 | d.MassSetZero(out objMass); | 2739 | d.MassSetZero(out objMass); |
2740 | DMassCopy(ref pMass, ref objMass); | 2740 | DMassCopy(ref pMass, ref objMass); |
2741 | 2741 | ||
2742 | m_log.DebugFormat("1-{0}, {1}, {2}, {3}, {4}, {5}, {6}, {7}, {8}, ", objMass.I.M00, objMass.I.M01, objMass.I.M02, objMass.I.M10, objMass.I.M11, objMass.I.M12, objMass.I.M20, objMass.I.M21, objMass.I.M22); | 2742 | //m_log.DebugFormat("1-{0}, {1}, {2}, {3}, {4}, {5}, {6}, {7}, {8}, ", objMass.I.M00, objMass.I.M01, objMass.I.M02, objMass.I.M10, objMass.I.M11, objMass.I.M12, objMass.I.M20, objMass.I.M21, objMass.I.M22); |
2743 | 2743 | ||
2744 | Matrix4 dMassMat = FromDMass(objMass); | 2744 | Matrix4 dMassMat = FromDMass(objMass); |
2745 | 2745 | ||
2746 | Matrix4 mathmat = Inverse(dMassMat); | 2746 | Matrix4 mathmat = Inverse(dMassMat); |
2747 | 2747 | ||
2748 | m_log.DebugFormat("2-{0}, {1}, {2}, {3}, {4}, {5}, {6}, {7}, {8}, ", mathmat[0, 0], mathmat[0, 1], mathmat[0, 2], mathmat[1, 0], mathmat[1, 1], mathmat[1, 2], mathmat[2, 0], mathmat[2, 1], mathmat[2, 2]); | 2748 | /* |
2749 | //m_log.DebugFormat("2-{0}, {1}, {2}, {3}, {4}, {5}, {6}, {7}, {8}, ", mathmat[0, 0], mathmat[0, 1], mathmat[0, 2], mathmat[1, 0], mathmat[1, 1], mathmat[1, 2], mathmat[2, 0], mathmat[2, 1], mathmat[2, 2]); | ||
2749 | 2750 | ||
2750 | mathmat = Inverse(mathmat); | 2751 | mathmat = Inverse(mathmat); |
2751 | 2752 | ||
2752 | 2753 | ||
2753 | objMass = FromMatrix4(mathmat, ref objMass); | 2754 | objMass = FromMatrix4(mathmat, ref objMass); |
2754 | m_log.DebugFormat("3-{0}, {1}, {2}, {3}, {4}, {5}, {6}, {7}, {8}, ", objMass.I.M00, objMass.I.M01, objMass.I.M02, objMass.I.M10, objMass.I.M11, objMass.I.M12, objMass.I.M20, objMass.I.M21, objMass.I.M22); | 2755 | //m_log.DebugFormat("3-{0}, {1}, {2}, {3}, {4}, {5}, {6}, {7}, {8}, ", objMass.I.M00, objMass.I.M01, objMass.I.M02, objMass.I.M10, objMass.I.M11, objMass.I.M12, objMass.I.M20, objMass.I.M21, objMass.I.M22); |
2755 | 2756 | ||
2756 | mathmat = Inverse(mathmat); | 2757 | mathmat = Inverse(mathmat); |
2757 | 2758 | */ | |
2758 | if (axis.X == 0) | 2759 | if (axis.X == 0) |
2759 | { | 2760 | { |
2760 | mathmat.M33 = 50.0000001f; | 2761 | mathmat.M33 = 50.0000001f; |
@@ -2775,12 +2776,18 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
2775 | 2776 | ||
2776 | mathmat = Inverse(mathmat); | 2777 | mathmat = Inverse(mathmat); |
2777 | objMass = FromMatrix4(mathmat, ref objMass); | 2778 | objMass = FromMatrix4(mathmat, ref objMass); |
2778 | m_log.DebugFormat("4-{0}, {1}, {2}, {3}, {4}, {5}, {6}, {7}, {8}, ", objMass.I.M00, objMass.I.M01, objMass.I.M02, objMass.I.M10, objMass.I.M11, objMass.I.M12, objMass.I.M20, objMass.I.M21, objMass.I.M22); | 2779 | //m_log.DebugFormat("4-{0}, {1}, {2}, {3}, {4}, {5}, {6}, {7}, {8}, ", objMass.I.M00, objMass.I.M01, objMass.I.M02, objMass.I.M10, objMass.I.M11, objMass.I.M12, objMass.I.M20, objMass.I.M21, objMass.I.M22); |
2779 | 2780 | ||
2780 | //return; | 2781 | //return; |
2782 | if (d.MassCheck(ref objMass)) | ||
2783 | { | ||
2784 | d.BodySetMass(Body, ref objMass); | ||
2785 | } | ||
2786 | else | ||
2787 | { | ||
2788 | //m_log.Debug("[PHYSICS]: Mass invalid, ignoring"); | ||
2789 | } | ||
2781 | 2790 | ||
2782 | d.BodySetMass(Body, ref objMass); | ||
2783 | */ | ||
2784 | if (axisnum <= 0) | 2791 | if (axisnum <= 0) |
2785 | return; | 2792 | return; |
2786 | int dAMotorEuler = 1; | 2793 | int dAMotorEuler = 1; |