Jump to content
  • Advertisement

Archived

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

Kaesebrot

how to extract rotation angles from the modelview-matrix..

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

Advertisement
Maybe I don''t understand your question correctly, but a single matrix contains no rotation information. A matrix can only be considered to contain "rotation angles" if you intend to multiply it by another matrix.

Share this post


Link to post
Share on other sites
Hmmm.. I will explain it a bit more exactly:
I start with an identity matrix. now I call

glRotatef(a, 1.0f, 0.0f, 0.0f);
glRotatef(b, 0.0f, 1.0f, 0.0f);
glRotatef(c, 0.0f, 0.0f, 1.0f);

the matrix now contains indirectly
the values a, b, c.. maybe not the same values,
because the other rotation-calls.
my question was, how can I extract these values
out of the matrix?

[edited by - Kaesebrot on July 24, 2002 4:04:09 AM]

Share this post


Link to post
Share on other sites
What you want is to look up converting a rotation matrix to Angle-Axis. It''s a bit too long to write here, there''s a good section on it in "3D Game Engine Design" though...

Death of one is a tragedy, death of a million is just a statistic.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Euler Angles? (Pronounced "Oiler", btw)

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.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!