Original Post
Hi, I had a small question about rotating a vector by a quaternion. The quaternion/matrix FAQ on this site in the articles section (at the very end) has the following:
Q63. How do I use quaternions to rotate a vector?
A rather elegant way to rotate a vector using a quaternion directly is the following (qr being the rotation quaternion):
-1
v' = qr * v * qr
This can easily be realised and is most likely faster then the transformation using a rotation matrix.
So we define v' the rotated vector, qr is the orientation, v is the source vector, and qr^-1 is qr's inverse. From here, I am lost. Do the *'s represent cross product? or multiplication? And B) quaternions have four elements, vectors three. Doesn't this complicate doing a cross product or even multiplication? And does this imply that v is a four-vector? Previously in my game, I was converting quaternions into matrices to transform vectors. I could see how this would be a lot faster! I've done lots of googling, including looking through mathworld's quat section. I haven't seen this particular method anywhere. Thanks for your time Adam