Quaternion help

Started by
0 comments, last by Zakwayda 16 years, 5 months ago
i have my matrix library setup as a column major, that is the 4th column contains the translation vector. now i am trying to do skinned mesh rotation, therefore implementing quaternions is required, or at least essential. now my problem is when i try to slerp between two quaternions. i believe that the problem is here based on the following information. mat4 rotation = rotateXYZ( PI, PI, PI ); quat q = matrixToQuat( rotation ); mat4 rotation2 = quatToMatrix( q ); now rotation = rotation2; ( this should be true, correct ) if i render the mesh, without trying to interpolate, the model is in bind pose position, so things are lining, translating properly. thanks for any help guys
Code makes the man
Advertisement
Quote:Original post by NiteLordz
i have my matrix library setup as a column major, that is the 4th column contains the translation vector.
The term 'column major' refers to memory layout; what you actually mean is that your matrix transforms are constructed for use with column vectors.
Quote:mat4 rotation = rotateXYZ( PI, PI, PI );

quat q = matrixToQuat( rotation );

mat4 rotation2 = quatToMatrix( q );

now rotation = rotation2; ( this should be true, correct )
Yes, rotation should == rotation2 (to within some reasonably tolerance, of course).

This topic is closed to new replies.

Advertisement