From: Kevin M. <ke...@vr...> - 2003-03-13 07:39:47
|
well, you're making some assumtions based on euler to quat conversion (that it works). try axis angle to quat, it is better tested I think. On Wed, 12 Mar 2003, Justin Hare wrote: > I think I may have found a problem with the multiplication of quaternions. > > // +90 degree rotation about the Y-axis > gmtl::Quatf quatA = gmtl::make<gmtl::Quatf>(gmtl::EulerAngleXYZf(0,gmtl::Math::deg2Rad(90.0), 0)); > > // +90 degree rotation about the X-axis > gmtl::Quatf quatB = gmtl::make<gmtl::Quatf>(gmtl::EulerAngleXYZf(gmtl::Math::deg2Rad(90.0), 0, 0)); > > // Starting with a point on the X-axis > gmtl::Point3f point( 1, 0, 0 ); > > quatA *= quatB; > > point *= quatA; > > Now the point should be pointing along the Y-axis, but it is actually (0, > -1, 0), pointing straight down. > > Is this a bug, or am I making some bad assumptions about how quaternion > multiplication should work? > > 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 \/ __ \/ \__ \_\ |