Bullet physics 4x4 matrix problem July 21, 2011 01:15AM | Registered: 15 years ago Posts: 54 |
btRigidBody-> getWorldTransform ().getOpenGLMatrix(Matrix);
Re: Bullet physics 4x4 matrix problem July 21, 2011 07:35PM | Registered: 13 years ago Posts: 99 |
Re: Bullet physics 4x4 matrix problem July 21, 2011 08:41PM | Registered: 15 years ago Posts: 54 |
f32 worldMat[16]; //the 4x4 matrix Mtx m; // 3x4 matrix obj->_btRigidBody->getWorldTransform().getOpenGLMatrix(worldMat); //Then copy all the values ??to the 3x4 array in this order m[0][0]=worldMat[0]; m[1][0]=worldMat[1]; m[2][0]=worldMat[2]; m[0][1]=worldMat[4]; m[1][1]=worldMat[5]; m[2][1]=worldMat[6]; m[0][2]=worldMat[8]; m[1][2]=worldMat[9]; m[2][2]=worldMat[10]; m[0][3]=worldMat[12]; m[1][3]=worldMat[13]; m[2][3]=worldMat[14];