From: Justin H. <ja...@vr...> - 2003-03-12 22:01:46
|
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 ----------------------------------------- |