Quote:
In first case when I am thinking in terms of grand fixed orgin the command are issued in the reversed order, so:
1. Cube is drawn
2. Cube is rotated around OY counterclockwise by 90 degrees.
3. Cube is rotated around OX counterclockwise by 90 degrees.
4. Cube is translated -5 units in Z direction from the orgin.
Am I thinking correct?
Sounds right to me. Your second case should work equally well, and I'm not sure I really understand what is wrong.
Forgive me if I'm missing something, but how can you tell what is happening by rotating a cube by 90 degrees? If I take a cube and rotate it by 90 degrees doesn't that look exactly the same? I think you need to render some kind of object that is visually unique from all sides so you can tell what is happening. Either that you can just draw some axis on your cube:
glLoadIdentity;gluLookAt(0,0,5, 0, 0, 0, 0, 1, 0);glRotatef(90, 1, 0, 0);glRotatef(90, 0, 1, 0);glutWireCube(1);glBegin(GL_LINES);glColor3f(1,0,0);glVertex3f(0,0,0); glVertex3f(2,0,0);glColor3f(0,1,0);glVertex3f(0,0,0); glVertex3f(0,2,0); glColor3f(0,0,1);glVertex3f(0,0,0); glVertex3f(0,0,2); glEnd();
If that's still not working you can post some images and I can maybe understand better.