Quaternions globally viable?

Started by
-1 comments, last by stevenmarky 21 years, 2 months ago
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.

This topic is closed to new replies.

Advertisement