Use inertia tensor in world coordinates instead of body coordinates into the solver

git-svn-id: https://reactphysics3d.googlecode.com/svn/trunk@340 92aac97c-a6ce-11dd-a772-7fcde58d38e6
This commit is contained in:
chappuis.daniel 2010-06-19 20:17:05 +00:00
parent 716081d982
commit 70e22a2dd8

View File

@ -173,7 +173,7 @@ void ConstraintSolver::fillInMatrices() {
Matrix mInv(6,6); Matrix mInv(6,6);
mInv.initWithValue(0.0); mInv.initWithValue(0.0);
mInv.fillInSubMatrix(0, 0, rigidBody->getCurrentBodyState().getMassInverse().getValue() * Matrix::identity(3)); mInv.fillInSubMatrix(0, 0, rigidBody->getCurrentBodyState().getMassInverse().getValue() * Matrix::identity(3));
mInv.fillInSubMatrix(3, 3, rigidBody->getCurrentBodyState().getInertiaTensorInverse()); mInv.fillInSubMatrix(3, 3, rigidBody->getInertiaTensorInverseWorld());
Minv_sp[bodyNumber].changeSize(6, 6); Minv_sp[bodyNumber].changeSize(6, 6);
Minv_sp[bodyNumber] = mInv; Minv_sp[bodyNumber] = mInv;
} }