clipping polygons

hi there

just starting out with opengl … i need to find the intersecting region b/w 2 polygons and to know the area/perimeter/vertex points of that region
is there an opengl function which can do this?if so, how?

thanks in advance

There is no OpenGL function to do this.

You need to code for this type of geometry problem yourself or use another library that offers this type of functionality.

Hi

thanks for the reply
what about finding the intersection region between a polygon and a square/cube
i know that i can use glClipPlane to draw the intersecting region between a polygon and a square domain , but is it possible to retieve the coordinates of the drawn polygon also

thanks in advance
-mayank

Originally posted by dorbie:
[b]There is no OpenGL function to do this.

You need to code for this type of geometry problem yourself or use another library that offers this type of functionality.[/b]

there is no way to just recieve the coordinates from opengl but with a little math you can figure it out. Do something like this.

GLfloat mtx[4][4] = {0};
glGetFloatv(GL_MODELVIEW_MATRIX, mtx);

then you just need look at the matrix to see what your coordinates are