Extracting values from a matrix

Started by
3 comments, last by JohnBolton 18 years, 1 month ago
This is pretty n00bish, but I just can't do matrix math. All I'm looking for is how to get scaling, rotation, and translation values back from a matrix. I mean, putting them into a matrix is pretty easy; I just use my handy-dandy D3DXMatrixXXXX() functions. But I don't know how to get them back out. Does this make sense? Help please? [smile]
Advertisement
It depends on what the matrix is. Are you talking about a view transformation matrix (world->camera) ?
See this thread. decomp_affine() will work for the general case (simpler+faster methods (as shown in the thread) will work for special cases).
Man, I had no idea it was that common of a problem.

Thanks for the linkies, and sorry for the n00bness! [imwithstupid]
Perhaps this is the function you are looking for: D3DXMATRIXDecompose
John BoltonLocomotive Games (THQ)Current Project: Destroy All Humans (Wii). IN STORES NOW!

This topic is closed to new replies.

Advertisement