From: Kevin M. <ke...@vr...> - 2003-03-13 07:48:29
|
so you're saying *= is actually a postmult for the argument when it should be a pre? it probably shouldn't be. probably an incorrect implementation, and something that wasn't compared the the matrix version (if we even had one when I implemented it?) looking at the code it says *= is defined to be: template <typename DATA_TYPE> Quat<DATA_TYPE>& operator*=( Quat<DATA_TYPE>& result, const Quat<DATA_TYPE>& q2 ) { return mult( result, result, q2 ); } if changing it to a pre mult makes more sense (i.e. if the matrix one is that way), then I'd be up for it I suppose. definately write a test case comparing matrix*=matrix, and quat*=quat yielding the same rotation. then it will keep this from getting out of sync in the future. the real question is whether the matrix one should be changed to match this one. I always thought that q1 = q1 * q2 should be the same as q1 *= q2, and I think it is that way now isn't it? kevin On Wed, 12 Mar 2003, Justin Hare wrote: > > Is this a bug, or am I making some bad assumptions about how quaternion > > multiplication should work? > > > > Okay, I've made the incorrect assumption that > > quatA *= quatB; > > makes quatA be the rotation combination of quatA and THEN quatB. But it > appears that quaternions are handled like matrix multiplication so they > are applied in reverse order. > > So to get what I want, I need > > quatA = quatB * quatA; > > Is this how people generally handle quaternions? I know it's the way > matrix multiplication works, but should reverse ordering also apply to > quats? > > justin > > ----------------------------------------- > Justin Hare <ja...@vr...> > Virtual Reality Applications Center > Iowa State University, Howe Hall > http://www.vrac.iastate.edu/~jahare > ----------------------------------------- > > > > > ------------------------------------------------------- > This SF.net email is sponsored by:Crypto Challenge is now open! > Get cracking and register here for some mind boggling fun and > the chance of winning an Apple iPod: > http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0031en > _______________________________________________ > ggt-devel mailing list > ggt...@li... > https://lists.sourceforge.net/lists/listinfo/ggt-devel > -- *--*---*---*----*-----*------*------*-----*----*---*---*--* Kevin Meinert /_/ home - http://www.vrsource.edu/~kevin \ / music - http://subatomic.vrsource.org \/ __ \/ \__ \_\ |