   Rotation of vector by a quaternion
  What is the best way to rotate a vector with a quaternion?As i see it, there is no dedicated way to do this within d3d(i use d3d9).There are a number of functions like:D3DXVec3TransformD3DXVec3TransformArrayD3DXVec3TransformCoordD3DXVec3TransformCoordArraythat transform a vector using a matrix, but none directly using a quaternion.So what is better to do, transform a quaternion to a matrix, and then use this matrix to transform my vector, or go "ground level" and do it myself like this:vector rotate_with_quaternion(quaternion q, vector v)  Quaternion t;  t = q*v*(~q);   //~q is conjugate quaternionreturn t.get_vector_component();but then i need to define operators for vector-quaternion multiplication, and the whole thing gets complicated...What do you think? Maybe there is a third way?thanks   
  If you want to transform more than one vector by a given quaternion then it's generally more efficient to transform the quaternion to a matrix and then transform all the vectors you want by that matrix.   