Archived

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

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

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

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