Jump to content
  • Advertisement
Sign in to follow this  
NiteLordz

Quaternion help

This topic is 3855 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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

Share this post


Link to post
Share on other sites
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).

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!