euler angles matrix lookat right up out

euler angles from matrix

fsk's picture

Anyone ever tried to extract the euler angles needed by most render patches from a rotation matrix?

I want to align an object to a curve. So far i managed to do it by calculating the right up and out vectors then making a rotation matrix out of that, and using the matrix with the gl tools matrix multiply patch. this works fine but id like to make some stuff simpler by just using the angle inputs on the render patches. the problem is, i cant seem to manage to extract the angles from the matrix. im to dumb to derive them (they dont teach matrix math at design schools:)) and any examples i found on the web dont seem to work (probably a different convention or something). i think QC uses a right handed system and rotations in ZYX order. maybe its not even possible?.

the matrix i have is:

rightX upX outX 0

rightY upY outY 0

rightZ upZ outZ 0

0 0 0 1