0

Is in opengl any function able tell me position of point[0,0,0] after using this code:

glPushMatrix();
glRotatef(1, 0, 1, 0);

compare to point[0,0,0] before transformation or do I just have to calculate it?

for example if I got transformation

glTranslatef(1, 0, 0);

I want to get[1,0,0]

Alya'a Gamal
  • 5,624
  • 19
  • 34
Eleer
  • 598
  • 3
  • 6
  • 20
  • You may want to consider using modern OpenGL and using an external matrix library. Here is a starting point: http://www.arcsynthesis.org/gltut/ – Jacob Parker Apr 11 '13 at 14:44

1 Answers1

0

Yes , You can get the coordinates for a specific vertex point after a transformation

For Example:

glMatrixMode(GL_MODELVIEW);
glLoadIdentity();
glTranslatef(100.0, 50.0, 0.0);
glRotatef(-25.0, 0.0, 1.0, 0.0);  

glGetFloatv(GL_MODELVIEW_MATRIX , *your_matrix*);
//print your matrix to check if that is the desired transformation coordinates
Community
  • 1
  • 1
Alya'a Gamal
  • 5,624
  • 19
  • 34