From: subatomic <ke...@su...> - 2006-09-24 05:11:26
|
try reversing the order? On 9/23/06, Stuart Tett <st...@vi...> wrote: > > 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 > > ------------------------------------------------------------------------- > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the chance to share > your > opinions on IT & business topics through brief surveys -- and earn cash > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV > _______________________________________________ > ggt-devel mailing list > ggt...@li... > https://lists.sourceforge.net/lists/listinfo/ggt-devel > -- Kevin Meinert http://www.subatomicglue.com |