Pseudo code below:
glPushMatrix(); glRotatef(100,1,0,0);; glRotatef(50,0,1,0); glRotatef(100,1,0,0); glTranslatef(x0,y0,z0); glCallList(dl0); glPushMatrix(); glRotatef(50,1,0,0);; glRotatef(50,0,1,0); glRotatef(50,1,0,0); glTranslatef(x1,y1,z1); glCallList(dl1); glPushMatrix(); glRotatef(50,1,0,0);; glRotatef(100,0,1,0); glRotatef(50,1,0,0); glTranslatef(x2,y2,z2); glCallList(dl2);
Relative to 0, how would I determine the translation and rotation value for the last Display List in this series, if I were exporting it like a scene? If there were no rotations, I would just add all of the translations up, but when a rotation is performed, it is a different story. Is there a quick and simple way to get that translation value relative to the origin and the rotation value that I need to use so it is also rotated the same way as when called this way? Like if I were editing the vertex data of something to be rotated and placed just like in the OpenGL window after the pushes, rotations, and translations? Thank you!