Krip
asked on
Another quaternion question
How do I figure out the 'heading' vector given a certain quaternion representing the object's orientation.
Using directX I can get the rotation matrix. is there a way to do the invesre of the D3DXMatrixLookAt for the 3 vectors (or 1 of them for that matter)?
Cheers,
Krip
Using directX I can get the rotation matrix. is there a way to do the invesre of the D3DXMatrixLookAt for the 3 vectors (or 1 of them for that matter)?
Cheers,
Krip
ASKER
Maybe I wasn't clear...
I have the rotation matrix, what I'm looking for is the LookAt vector i.e. the vector in the same direction as my object's 'heading'
D3DXLookAtLH takes 3 vectors lookAt, eye and up and builds a rotation matrix from them. Is There a way to do the opposite?
Cheers,
Krip
I have the rotation matrix, what I'm looking for is the LookAt vector i.e. the vector in the same direction as my object's 'heading'
D3DXLookAtLH takes 3 vectors lookAt, eye and up and builds a rotation matrix from them. Is There a way to do the opposite?
Cheers,
Krip
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Naturally....
Thanks
Thanks
D3DXMatrixRotationQuaterni
You can also try this
D3DXQuaternionToAxisAngle
Hope this helps