Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

My quaternion to matrix function is broken..

This topic is 6028 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

and my matrix to quaternion function is probably broken too.. I''ve looked around and can''t find much info on converting quaternions to matrices and back..I''ve got some basic functions, but they seem to fail with certain quaternions..some quaternions I can convert back and forth all day and retain accuracy, and some of them will be different everytime.. I''ve heard of some special case that must be handled when dealing with quaternions, but I don''t know what it is, and my code certainly doesn''t handle any special cases..I''ve found a few references to it, but no clear definition of what must be done to get around it.. I can post my code if anyone asks, but I''m pretty sure the problem is in this "special case" I keep hearing about, and if you''ve ever had to deal with it you''ll know exactly what I''m talking about and can enlighten me.. "Like all good things, it starts with a monkey.."

Share this post


Link to post
Share on other sites
Advertisement
Allegro contains quaternion functions (but make sure you get the WIP, not the latest official release ). Maybe you could compare yours against them. Here is the link to Allegro:

http://alleg.sf.net/

Here is a link to the source file you want on SourceForge's CVS browser:

http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/alleg/allegro/src/quat.c?rev=1.3&content-type=text/vnd.viewcvs-markup

And no, Allegro is not a "DOS blitting library" any more

Edited by - entheh on November 19, 2001 2:07:17 PM

Share this post


Link to post
Share on other sites
Aha!

I have learned that numerically dissimilar quaternions can still result in similar transformations.

My quaternions do appear to be correct, which is much worse because it means I have deeper problems in my code

btw I see allegro has REALLY expanded since the last time I played with it..have to take a deeper look when I get home..

Thanks All!!

"Like all good things, it starts with a monkey.."

Share this post


Link to post
Share on other sites

  • 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!