• Advertisement
Sign in to follow this  

[DX9] Quaternions

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

Hello,

I have two rotation matrices and I'd like to use quaternions in order to create a smooth animation between these two matrices. In DirectX SDK I've found the following information:

D3DXQuaternionRotationMatrix: Builds a quaternion from a rotation matrix
D3DXQuaternionSlerp: Interpolates between two quaternions, using spherical linear interpolation

I understand I can convert my matrices to quaternions using D3DXQuaternionRotationMatrix and then find interporated quaternions using D3DXQuaternionSlerp. It all works fine but I could not find a function to convert quaternions back to rotation matrices. I need matrices in order to calculate a final world matrix.

How to convert a quaternion to a matrix using DX9?

Thanks,

Leszek

Share this post


Link to post
Share on other sites
Advertisement
Thanks SiCrane

[color="#284b72"]D3DXMatrixRotationQuaternion is an answer to my question. I have no idea how I could miss this function.

Share this post


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

  • Advertisement