Jump to content
  • Advertisement

Archived

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

Silverbolter

Confused about transformation order...

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

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
Advertisement
I suggest you read this page:

http://fly.cc.fer.hr/~unreal/theredbook/chapter03.html

Look under "Thinking about Transformations" on this page.

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.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!