[DX9] Quaternions

Started by
1 comment, last by Tar 12 years, 8 months ago
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
Advertisement
Did you try D3DXMatrixRotationQuaternion()?
Thanks SiCrane

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

This topic is closed to new replies.

Advertisement