Jump to content
  • Advertisement

Archived

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

stevenmarky

Quaternions globally viable?

This topic is 5679 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''m making a simple game engine which uses DirectX (but In the future will be able to handle OpenGL too). It is of scenegraph design - rotate or translate a tree node and the nodes beneath it will get translated/rotated relative to their parent (I''m actually going to make a post in general programming about this tree class I have written). So because of all this rotation I looked into Quaternions, and wrote my own Quaternion class - The problem is (from my understanding) DirectX requires matrices. So I seem to have 2 viable options: 1) On change method - Only update the Matrix if the quaternion has changed when it comes to render time 2) On quaternion change - Change the matrix each time the quaternion is changed Method 1 requires an extra variable e.g. a bool, but both require a matrix..so I''m curious to how other programmers have done it, and peoples thoughts on using quaternions as the primary way of representing rotations.

Share this post


Link to post
Share on other sites
Advertisement

  • 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!