Local axis rotation
Is it possible to rotate around local axes without having to store them (the axes) in three vectors ?
I was playing with a thought to get those vectors from the quaternion (representing current orientation of the object)... is it doable or is there a better solution ?
Quote:Original post by toriI'm not exactly sure what you're asking, but if the question is, 'Is it possible to get the local axes for an object from a quaternion representing its orientation', then the answer is yes. Specifically, the axes are the rows or columns of the 3x3 rotation matrix corresponding to the quaternion (google 'quaternion matrix conversion' if you're not sure how to construct this matrix).
Is it possible to rotate around local axes without having to store them (the axes) in three vectors ?
I was playing with a thought to get those vectors from the quaternion (representing current orientation of the object)... is it doable or is there a better solution ?
Quote:Original post by toriAlso, you can indeed apply local-axis rotations without storing (or extracting) the local axes explicitly. To do this, construct a matrix or quaternion representing the corresponding cardinal axis rotation (for example, if the y axis is considered up in local space, you'd construct a rotation about the axis [0 1 0]), and then multiply it on the right of the orientation matrix or quaternion (if you're using column-vector notation or 'standard' quaternion multiplication order), or on the left (for row-vector notation or 'reverse' quaternion multiplication order).
Is it possible to rotate around local axes without having to store them (the axes) in three vectors?
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement