wir33658

04-02-2003, 04:15 AM

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.

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.