void glClipPlane(GLenum plane, const GLdouble *equation)
plane | Specifies which clipping plane is being positioned. Symbolic names of the form GL_CLIP_PLANEi, where i is an integer between 0 and GL_MAX_CLIP_PLANES -1, are accepted. |
equation | Specifies the address of an array of four double-precision floating-point values. These values are interpreted as a plane equation. |
glClipPlane specifies a half-space using a four-component plane equation. When glClipPlane is called, equation is transformed by the inverse of the modelview matrix and stored in the resulting eye coordinates. Subsequent changes to the modelview matrix have no effect on the stored plane-equation components. If the dot product of the eye coordinates of a vertex with the stored plane equation components is positive or zero, the vertex is in with respect to that clipping plane. Otherwise, it is out.
To enable and disable clipping planes, call glDisable with the argument GL_CLIP_PLANEi, where i is the plane number.
All clipping planes are initially defined as
GL_INVALID_OPERATION is generated if glClipPlane is executed between the execution of glBegin and the corresponding execution of glEnd.