Having tried some code from Computer Graphics 3rd edit in C (foley) I have been working on, I started messing with my ModelView. My rotation and translation work, however I obtain two copies of the same display, list. My question is that (to the best of my knowledge) a linear transformation has a unique image in the range. i.e for any x,y,z there are unique x’,y’,z’ under an affine transformation. why have i ended up with two images?
Sample code I was testing
glPushMatrix(); float modelview; glGetFloatv(GL_MODELVIEW_MATRIX , modelview); //Change The Matrix for(int i=0; i<3; i++ ) for(int j=0; j<3; j++ ) modelview[i*4+j] = PlaneMatrix[i+4*j]; //Change The Translations modelview=xtrans+ PlaneMatrix; modelview=ypos + PlaneMatrix; modelview=-12.5f-ztrans+PlaneMatrix; //Reload Updated Matrix glLoadMatrixf(modelview); BuildAircraft(); glPopMatrix();
I end up with two aircraft, which seem to be reflections of each other. One of them has the desired property (following a Direction of flight)
the other is unwanted.
What is going on behind the scenes to produce a second image?