i have the following code:

{

DoTranslateRotate();

glBegin(GL_POINTS);

glVertex3f(x,y,z);

glEnd();

UndoTranslateRotate();

}

void DoTranslateRotate()

{

//Perform XYZ Translation

glTranslatef(COrigin.x,COrigin.y,COrigin.z);//Perform XYZ rotations

glRotatef(COrigin.xAngle, 1.0f,0.0f,0.0f);

glRotatef(COrigin.yAngle, 0.0f,1.0f,0.0f);

glRotatef(COrigin.zAngle, 0.0f,0.0f,1.0f);}

void UnDoTranslateRotate()

{

//Undo XYZ rotations

glRotatef(-COrigin.zAngle, 0.0f,0.0f,1.0f);

glRotatef(-COrigin.yAngle, 0.0f,1.0f,0.0f);

glRotatef(-COrigin.xAngle, 1.0f,0.0f,0.0f);

//Undo XYZ Translation

glTranslatef(-COrigin.x,-COrigin.y,-COrigin.z);

}

i want to know where the point (x,y,z) will be drawn, and i do know the Data in COrigin

is there some way i can use the OGL matrix and just multiply the matrix by my {X Y Z} values to obtain the new X, Y, Z that the point will appear at (relative to the world)

say if i had the point (1,0,0) and i rotated my y - axis 180 degrees, the point is now at (-1,0,0) correct? given the XYZ, and the rotations i want to find the new XYZ location.