I need for an augmented reality application convert the finded opengl modelview (I have a find a way to have a modelview … but it’s not exact … so to understand I hopes to recover the translation and an human readable rotation list). Is there an easy way to convert my modelview to a translation vector and the rotation angles in order to replace the modelview by a translation and 3 rotations ?
Translations can be read directly out of the modelview matrix. Assuming the matrix is dimensioned [16]. It’s either the 3,7,11th elements, or the 12,13,14 elements. Don’t remember which. Just print out the matrix and it will be obvious.
For an Euler angle sequence you work with the upper 3x3 part of the modelview matrix (elements 0,1,2, 4,5,6, 8,9,10). Look at the Wikipedia article on Euler angles. Towards the bottom they give you matrices corresponding to any sequence of Euler rotations. Pick the sequence you like. The corresponding matrix shows you how to back out the 3 Euler angles.
Looks pretty straightforward, though I admit I haven’t tried it.