Original Post
hi all!
First of all Congratulations for the site, i''ve found it very useufl!
I have a little problem, i''m not very experienced with opengl, so maybe its stupid.
I am drawing a cube as descripted in nehe tutorials, i do the easy steps:
glLoadIdentity();
glTranslatef(..);
glRotatef(..);
and its ok. I apply a translation and a rotation to the cube, so that the face that is at right comes to the front. It works, the cube is drawed correctly.
Now, having defined the transformation matrix, I draw the cube with glVertex, but i need to know the TARGET coordinates of such points. In other words, i want to know witch face is IN FRONT in the cube, so if right face comes in front after a rotation of 90 degrees, i simply need to check Z coords of the vertexes. Is there a way to obtain target coords of the cube AFTER it has been rotated and translated?
I tried to have them manually by multiplying the starting coords of each vertex for the GL_MODELVIEW_MATRIX matrix, but the result isnt what i expected (the Z coords of the right face arent equal, but by the drawing i see the righ face in front!)
Can someone help me? WHat am i missing?
Thanx!
Bye!
Andrea