TITLE: How do you rotate a vector by a unit quaternion?
QUESTION [53 upvotes]: Given a 3-variable right-handed vector v that is a translation measured in local space and a unit quaternion representing an orientation from local to world space, how do you use the quaternion to rotate the vector from local space to world space?
For ease of use, the values are:
Vector v = $[1.0, 0.0, 0.0]$
Quaternion $q = [W: 0.7071068, X: 0, Y: 0.7071068, Z: 0]$, which I understand to be a rotation $90^\circ (\frac{\pi}{2})$ around the $Y$-axis and which converts from the local space to the world space. (That is, the resulting vector is $[0.0, 0.0, 1.0]$, and if this was the nose of a spaceship, it'd be pointing to the right in world coordinates)
Thanks.

REPLY [5 votes]: I found this article and out of all the posts J Thomas's post helped guide me the most. His clearly pointed out two half rotations. 
Meaning this: resultVector = q * originalVector * q'
float4 resultVector = Multiply(q, originalVector);
resultVector = Multiply(resultVector, Inverse(q));

Helpful Site: http://www.euclideanspace.com/maths/algebra/realNormedAlgebra/quaternions/transforms/derivations/vectors/index.htm