Quaternion help
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
Quote:Original post by NiteLordzThe term 'column major' refers to memory layout; what you actually mean is that your matrix transforms are constructed for use with column vectors.
i have my matrix library setup as a column major, that is the 4th column contains the translation vector.
Quote:mat4 rotation = rotateXYZ( PI, PI, PI );Yes, rotation should == rotation2 (to within some reasonably tolerance, of course).
quat q = matrixToQuat( rotation );
mat4 rotation2 = quatToMatrix( q );
now rotation = rotation2; ( this should be true, correct )
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement