+ Added joint feedback for constraints, needs testing/demo before 2.75 release.

See also http://www.bulletphysics.com/Bullet/phpBB3/viewtopic.php?f=9&t=2677
and http://code.google.com/p/bullet/issues/detail?id=227

To enable, use constraint->enableFeedback(true);
And then either use
constraint->getAppliedImpulse() for an estimated applied impulse,
or constraint-> getAppliedLinearImpulse(), or constraint->getAppliedAngularImpulseA() or constraint->getAppliedAngularImpulseB().

+removed a few warnings.
This commit is contained in:
erwin.coumans
2009-05-27 01:34:46 +00:00
parent 056659d2af
commit 258ef6e25a
5 changed files with 122 additions and 15 deletions

View File

@@ -21,7 +21,7 @@ class btIDebugDraw;
#include "btContactConstraint.h"
#include "btSolverBody.h"
#include "btSolverConstraint.h"
#include "btTypedConstraint.h"
///The btSequentialImpulseConstraintSolver is a fast SIMD implementation of the Projected Gauss Seidel (iterative LCP) method.
@@ -35,6 +35,7 @@ protected:
btConstraintArray m_tmpSolverContactFrictionConstraintPool;
btAlignedObjectArray<int> m_orderTmpConstraintPool;
btAlignedObjectArray<int> m_orderFrictionConstraintPool;
btAlignedObjectArray<btTypedConstraint::btConstraintInfo1> m_tmpConstraintSizesPool;
btSolverConstraint& addFrictionConstraint(const btVector3& normalAxis,int solverBodyIdA,int solverBodyIdB,int frictionIndex,btManifoldPoint& cp,const btVector3& rel_pos1,const btVector3& rel_pos2,btCollisionObject* colObj0,btCollisionObject* colObj1, btScalar relaxation);