Get translated/rotated coordinates?
Hi!
How can I retrieve the current coordinates after i've done a rotation or translation?
If current coordinates is: 1.0f, 1.0f, 1.0f
And when I rotate by 45 degrees in x-axis, I want to get the new coordinates.
glPushMatrix();
glRotatef(45, 1.0f, 0.0f, 0.0f);
glPopMatrix();
Sorry for my bad explanation. :)
You could retrieve the current modelview matrix from OpenGL and multiply your point by that matrix to get the new point that OpenGL will draw.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement