Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Rotations



Hi,
I would like to rotate an object on "its own" local axes.
If I rotate it on a single axis, it's ok.
But if I rotate it on 2 axes, let's say firstly on the "y" then on the "x"
axes, the object doesn't rotate properly on the axis "x". The rotation on
the "x" axis happens like the "x" axes is still on its original position.
Isntead the x axis should be rotated by the y rotation.
So the object is not horizontal anymore. And this is wrong.
How can I fix this problem?

Currently I do:
---------------
    glLoadIdentity();
    glRotatef(xrot, 1.0f, 0.0f, 0.0f);
    glRotatef(yrot, 0.0f, 1.0f, 0.0f);
    glRotatef(zrot, 0.0f, 0.0f, 1.0f);


Best Regards
-- 
Lorenzo
email: email@hidden

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Mac-opengl mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/mac-opengl/email@hidden

This email sent to email@hidden



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.