[osg-users] matrix transformation order

David _ solid_davidian at hotmail.com
Wed Sep 24 05:51:28 PDT 2008


Hi, right now i have a matrix which contains N transformations. One of these is a scale, and i want to modify that scale

i call the decompose method of the matrix  

matrix.decompose(traslation, rotation_quat, scale, scale_orientation);

then i modify the scale with the new value and when i try to "compose" the matrix back i´m not sure about the order of matrix multiplying i should use to get the same transformated object than before with the new scale applied

what looks ok to me is osg::Matrix(scale_orientation) * scale * osg::Matrix(rotation_quat) * traslation, but this is not working so if anyone have any idea it will be appreciated

i´ve also tried with scale * osg::Matrix(rotation_quat) * traslation

the rotation and scale should both be around the object space origin and the original object matrix was built using scale * rotation * translate

thanks



_________________________________________________________________
Llega la nueva temporada. Consulta las nuevas tendencias en MSN Estilo
http://estilo.es.msn.com/moda/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20080924/ab454ddc/attachment-0002.htm>


More information about the osg-users mailing list