How to get calculated values ?

Hi, I try to figure out, how to get the calculated values of an object after eg. an rotation.

For example:
double x1,y1,z1, x2,y2,z2;
x1 = 0.1;y1 = 0.1; z1 = 0.1;
x2 = 0.5;y2 = 0.5; z2 = 0.5;

// how to rotate doesn’t matter
glRotate(an_angle, xaxis, yaxis, zaxis);
glBegin (GL_LINES);
glVertex3f(x1, y1, z1);
glVertex3f(x2, y2, z2);
glEnd();

-> so, how do I figure out the new coordinates of the line ?(which I need for further calculations) After the rotation.

thanx in advance.

OpenGL does not give any information about vertex positions after transforms are applied.
So I think if you really need the transformed verticies you have to do it on your own.
You need to setup a rotation matrix and multiply your verts with this matrix to get the transformed values.

hih

you can use glGet to load current matrix and then mutliply vertex by this matrix yourself.

for complex transformations this can be
faster than builing matrix yourself, because gl can be able to compute matrices faster.

Search for OpenGL Feedback Mode. Beware, Feedback mode means software path.