Jump to content
  • Advertisement
Sign in to follow this  
HollyMatrix

About World Matrix

This topic is 3959 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

Hi How Can i retrive the : - rotaion Quaternion - rotation Angles - translation vector - scale from a matrix (World Matrix, View Matrix) ??? any help appreciated, Thank you.

Share this post


Link to post
Share on other sites
Advertisement
The method you are looking for is named "matrix decomposition". While the overall translation can be extracted simply (since directly given by 3 values of the matrix), the rotation and scaling are mixed together (and furthurmore are the rotation angles gone through periodic functions), and hence need more work to do.

One possible method is the "polar decomposition" introduced by Ken Shoemake and Tom Duff: "Matrix Animation and Polar Decomposition", Proceedings of Graphics Interface, 1992. Other methods exist as well.

(I don't know whether D3D provides such a function already.)

[Edited by - haegarr on February 7, 2008 2:47:17 AM]

Share this post


Link to post
Share on other sites
Quote:
Original post by A A
Will D3DXMatrixDecompose help?
If the original poster wants a pre-rolled D3DX function then, yes, D3DXMatrixDecompose() is the answer. Anything more and you'll have to go back to first principles and follow something like haegarr suggests.

hth
Jack

Share this post


Link to post
Share on other sites
Thanks all of you.

but one more question

what is the equivalent of D3DXMatrixDecompose in the C# language
(the Class, the function name, the assembly file) ????

Thanks.

Share this post


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

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!