I’ve got some problems with using glClipPlanes(GL_CLIP_PLANEi, GLdouble* equation):
All the docs I found say equation is a GLdouble quadruple specifiying the clipping plane’s equation…
I only know two equations for planes:
Specify a vektor which points to a vertex on the planes and specify two non-parallel vectors that lie within the plane.
Specify a vector which points to a vertex on the plane an which is a the same time a normal of that plane.
glClipPlane cannot use the first way and the second one doesn’t semm to work either:
I interpreted the 4 coordinates as the normal vector starting at the origin *and starting at the eye position… Both ways didn’t produce the expected results.
Help me please, until know I spent WAY to much time on this topic.
In my red book, 3rd Ed. (OpenGL 1.2) p140 under glClipPlane() it says that " … equation argument points to the four coefficients of the plane equation, Ax + By + Cz + D = 0 … " just like Michael Steinberg says. I like to think of it (like Michael) as a normal vector (A, B, C) and a point on the plane gives you D.
For example, if the normal vector is (3, 4, 5) and a point on the plane is (1, 1, 1), then substituting in gives 31 + 41 + 5*1 + D = 0 => D = -12.