PDA

View Full Version : GLM math library and quaternion multiplication



lobbel
06-29-2010, 04:25 PM
I tried the GLM math library (http://glm.g-truc.net/).
Please, can anyone tell me how to do quaternion multiplication with this library ? -> q3 = q1 * q2.
There is no operator overloaded that takes a quaternion for multiplication and there is no fucntion glm::mul that takes
two quaternions for multiplications.

regards,
lobbel

lobbel
06-29-2010, 05:13 PM
solved.
It seems, the cross product of two quaternion is the same
, respectivly, represents the multiplication of two quaternions.
I thought there is a different.

regards,
lobbel

Groovounet
06-30-2010, 02:21 AM
I should definitely add this topic to the FAQ...

Quaternions, just like vectors have a dot and a cross product. To avoid a confusion with what the product defined by *, cross and dot functions are used. * Is actually a component wise operator... just like GLSL vectors.

lobbel
06-30-2010, 03:24 AM
Thanks,
nevertheless GLM is a great library.

regards,
lobbel

Groovounet
06-30-2010, 03:29 AM
:)