Houdini's matrices and extracting trans,rot,scale
Mark Story
mstory at xion.org
Fri Oct 29 17:22:47 EDT 2004
Hi Jeff,
>>91 0 0
>>rot.x: -269.000006312118 rot.y: 0 rot.z: 0
>
>
> Quite fine. A forward rotation by 91 degrees is the same as
> a backrotation by 269 degrees.
Yep, that was my first impression, 91 is the "same" as 269 ...
>>90 90 0
>>rot.x: 0 rot.y: 90.00000249272661 rot.z: -90.00000249272661
>
>
> Welcome to the wonderful world of euler angles!
Ah ha! Never even thought of that ... :-(
> There is more than one collection of euler angles that
> correspond to any given absolute orientation. crack, lacking any
> context, cannot tell which of the triplets you desire.
crack?
> If you go to the object viewport and put down two default geos
> (so they have the x,y, and z markers) and set the angles to
> 90 90 0
> and
> 0 90 -90
> You will see that they line up perfectly.
>
>
>>90 180 0
>>rot.x: 90.00000249272661 rot.y: 0 rot.z: 90.00000249272661
>
>
> This one doesn't, however?
> If you could print out the matrix you used to get this crack,
> I could investigate. Hopefully it is just a dropped sign in
> transfer..
Ah, crack as in crackin' the matrix ... I get it. I think because I
had the xformOrder wrong that may have contributed to error in the
example above.
When I looked up the OP_NODE::getXformOrder() method, so I can retrieve
the correct XformOrder, I'm not sure what to do with the second
parameter to the method, the *chp pointer:
virtual void getXformOrder (UT_XformOrder &xord, CH_Channel *chp)
Is this the right method to call to get the XformOrder? It's the only
one I found. And if so, what's your recommendation for the *chp parameter?
Would you have an example of converting the Euler angles?
Thanks Jeff! Man, I love these Houdni lists! You learn something every
single day!
--Mark
More information about the Sidefx-devkit-list
mailing list