[osg-users] matrix transformation order

David _ solid_davidian at hotmail.com
Thu Sep 25 02:48:04 PDT 2008


up!

From: solid_davidian at hotmail.com
To: osg-users at lists.openscenegraph.org
Date: Wed, 24 Sep 2008 14:51:28 +0200
Subject: [osg-users] matrix transformation order








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



La cartera, las gafas. ¿te falta algo?   Ahora llévate Messenger en tu móvil

_________________________________________________________________
¿Sigue el calor? Consulta MSN El tiempo
http://eltiempo.es.msn.com/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20080925/6ace0ae8/attachment-0003.htm>


More information about the osg-users mailing list