From: Stuart T. <st...@vi...> - 2006-09-23 22:57:38
|
I got this from the GMTL FAQ: gmtl::Vec3f myVec; gmtl::AxisAngle myAA; gmtl::Quaternion myQuat; myVec = myVec * myAA; myVec = myVec * myQuat; I first tried it with an gmtl::AxisAnglef, then a gmtl::Quatf. Neither seem to have an operator* for multiplying a Vec by an AxisAngle I grep'd the src code to make sure. The only operator's I found were for: VecBase<DATA_TYPE, 3> operator*( const Quat<DATA_TYPE>& rot, const VecBase<DATA_TYPE, 3>& vector ) VecBase<DATA_TYPE, 3> operator*=(VecBase<DATA_TYPE, 3>& vector, const Quat<DATA_TYPE>& rot) so you could do myVec = myQuat * myVec; But how could I rotate a vector by a AxisAngle? Do I just have to convert it to a quaternion? Basically, I want to rotate a particle theta degrees around an arbitrary axis. Thanks. Stuart |