Jump to content
  • Advertisement


This topic is now archived and is closed to further replies.


Lame questions about quaternions

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

I''d like to use quaternions to my rotations in my engine. I''ve got three perpendicular vector(example view matrix), how to make from them a quaternion ? Put in a matrix ? If i want rotate around Z, i make four quaternions (1. 1/2 Pi rot., 2. Pi rot, 3. 3/2 Pi rot 4. 2Pi rot.). And if i have to rotate around z, i interpolate the precalculated quaternions for rotation. Is it worth ? Or is it a multi stupidity ?

Share this post

Link to post
Share on other sites
You can build a rotation matrix from a quaternion with the function D3DXMatrixRotationQuaternion(). Contrarywise, you can convert a rotation matrix to a quaternion with the function D3DXQuaternionRotationMatrix().

It is quite difficult to interpolate rotations using matrices so, yes, use quaternions - look up the function D3DXQuaternionSlerp().

[edited by - __Daedalus__ on June 4, 2004 4:07:44 PM]

Share this post

Link to post
Share on other sites

  • Advertisement

Important Information

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

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!