mikethebike
01-10-2012, 07:31 AM
Maybe it's too late....I simply want to flip that triangle 180' so I can see it from behind. Now I've tried to add 180 to the rotations below (mpPsi+180 etc.)without success:
glBegin(GL_TRIANGLES); //position glTranslatef(floc3DX, floc3DY, floc3DZ);
glRotatef( mpPsi, 0.0f, -1.0f, 0.0f ); //heading?
glRotatef( mpTheta, 1.0f, 0.0f, 0.0f); //pitch?
glRotatef( mpPhi, 0.0f, 0.0f, -1.0f); //roll
glColor3f(0.0, 0.0, 1.0); /* blue */
glVertex3f(floc3DX, floc3DY, floc3DZ-2);
glColor3f(0.0, 1.0, 0.0); /* green */
glVertex3f(floc3DX+1, floc3DY+1, floc3DZ-2);
glColor3f(1.0, 0.0, 0.0); /* red */
glVertex3f(floc3DX-1, floc3DY+1, floc3DZ-1);
glEnd();
Many thanks
glBegin(GL_TRIANGLES); //position glTranslatef(floc3DX, floc3DY, floc3DZ);
glRotatef( mpPsi, 0.0f, -1.0f, 0.0f ); //heading?
glRotatef( mpTheta, 1.0f, 0.0f, 0.0f); //pitch?
glRotatef( mpPhi, 0.0f, 0.0f, -1.0f); //roll
glColor3f(0.0, 0.0, 1.0); /* blue */
glVertex3f(floc3DX, floc3DY, floc3DZ-2);
glColor3f(0.0, 1.0, 0.0); /* green */
glVertex3f(floc3DX+1, floc3DY+1, floc3DZ-2);
glColor3f(1.0, 0.0, 0.0); /* red */
glVertex3f(floc3DX-1, floc3DY+1, floc3DZ-1);
glEnd();
Many thanks