• Advertisement
Sign in to follow this  

Angle of Rotations from World Transformation matrix

This topic is 3974 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I want to get the angle of rotation alone the 3 axis from the world matrix. Is there an api in directx8 to get these values?

Share this post


Link to post
Share on other sites
Advertisement
just combine the 3 rotation matrices (x,y,z)

and extract the information out of the sin, cosine terms in the matrix

the final rotation matrix looks like this
|R11 R12 R13|
|R21 R21 R23| = R = Rz*Ry*Rx
|R31 R32 R33|

Rx(PHI): => R32/R33 = tan(PHI)
Ry(THETA): => R31 = -sin(THETA)
Rz(OMEGA): => R21/R11 = tan(OMEGA)

take care of the special case cos(THETA)=0
remark:
tan(x) = sin(x)/cos(x)
sin(x)*sin(x) + cos(x)*cos(x) = 1

don t just pick these formulas, combine the matrix on your own otherwise you will probably fail to understand

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement