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


Confused about transformation order...

Recommended Posts

Hi all! I''m trying to learn GL and quite confused with how transformations are performed in the reverse order, hopefully someone can clear things up Firstly this code: glMatrixMode(GL_MODELVIEW); glLoadIdentity(); glTranslatef(4.0,5.0,6.0); glRotatef(45.0,1.0,2.0,3.0); glTranslatef(-4.0,-5.0,-6.0); in the above code, which translate is performed first? which moves the object back to the origin? the negative translate? However if this is the case ( look the book says) shouldn''t LoadIdentity be called last? How is this possible? Also how does this correspond to the expression C = T(4.0,5.0,6.0)R(45.0,1.0,2.0,3.0)T(-4.0,-5.0,-6.0)? I think there is confusion about the frames whether its the object frame or the world frame... all too confusing. Thanks! Silverbolt

Share this post

Link to post
Share on other sites