Convert btMatrix3x3/BtTransform to Ogre?

amerthebest
Posts: 2
Joined: Sat Aug 15, 2009 10:34 am

Convert btMatrix3x3/BtTransform to Ogre?

Post by amerthebest »

Anyone knows how to convert Bullet Matrix3x3 to Ogre Matrix3x3?
And how to convert btTransform to OgreMatrix4 ?

p.s: I know ogre uses a left-right matrix system (as OpenGL) and Bullet?

Thanks
B_old
Posts: 79
Joined: Tue Sep 26, 2006 1:10 pm

Re: Convert btMatrix3x3/BtTransform to Ogre?

Post by B_old »

I am not at all familiar with Ogre, but it can't be that hard. There exists for example a btTransform::getOpenGLMatrix(); which fills an array of floats which you then should be able to feed into an OgreMatrix4. For btMatrix3x3 you can always get the rows via getRow() and than assign those values to the OgreMatrix4.

Depending on what you want to do, this might not even be necessary. Have you seen this http://bulletphysics.com/Bullet/BulletP ... c223854860?