Confused about transformation order...
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
I suggest you read this page:
http://fly.cc.fer.hr/~unreal/theredbook/chapter03.html
Look under "Thinking about Transformations" on this page.
http://fly.cc.fer.hr/~unreal/theredbook/chapter03.html
Look under "Thinking about Transformations" on this page.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement