I would like to extract from a given matrix the translation, the rotation, the scale, and the scale orientation:
Does somebody have source codes ? Please !!!
I use the source code of Ken Shoemake and Tom Duff. Matrix Animation and Polar Decomposition. Proceedings of Graphics Interface 1992. GEM IV http://www.acm.org/tog/GraphicsGems/ but it seems to not work properly with uniform scale like the following matrix:
[1 0 0 0]
[0 0 1 0]
[0 -2 0 0]
[0 0 0 1]
give
translation T = (0 0 0)
rotation R = ( (1,0,0) PI/2 )
scale S = (1 1 2) AND NOT (1 2 1) !!!
scaleOrient So = ( (0,0,1) 0 )
determinant sign Si = 1
The recomposed matrix M = T* (Si*R) SoS is
[1 0 0 0]
[0 0 -1 0]
[0 2 0 0]
[0 0 0 1]
I need help !
Thanks a lot for all your contributions !
David.