Houdini's matrices and extracting trans,rot,scale

Mark Story mstory at xion.org
Wed Oct 27 16:39:29 EDT 2004


Hi there,

I'm puzzled about the correct way to extract the translation, rotation 
and scale vectors from a matrix in Houdini.  I can't find any examples 
but I thought for sure this would work:


<code_snippet>
current_input_xform =(UT_DMatrix4&)foo_node->getWorldTransform(context);
int foo2 = current_input_xform.explode(xformOrder, rot, scale, trans);	 
current_input_xform.getTranslates(trans);
</code_snippet>


It appears that the translation and scale vectors return with good data, 
but the rotation is a whole 'nother story!

Would some kind soul please point out what I've missed?

Thanks!


--Mark







More information about the Sidefx-devkit-list mailing list