# OpenGL Need help with OpenGL clip plane equation...

This topic is 3074 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

I'm trying to use glClipPlane( GL_CLIP_PLANE0, clipPlaneEquation ) to create a clip plane that cuts off anything above y = -0.95 (to cut off reflected geometry)

But I can't find enough info on this clip plane equation... just that it's a vector of 4 doubles.

I guessed that the first 3 were the normal, and the last was a translation along the normal, but neither [0, -1, 0, 0.95] nor [0, -1, 0, -0.95] worked.
Erm.... help?

##### Share on other sites
Have you tried flipping your normal (ie: specifying 0, 1, 0, -0.95)?

##### Share on other sites
The first three parameters define the normal of the plane. I usually leave the fourth parameter as 0.

Try these two exercises to see if it makes a difference:

Exercise 1:
- Set the clip plane equation to <0, 1, 0, 0>. Enable the clip plane.
- Draw a sphere using gluSphere or gluSolidSphere, radius = 1.

Exercise 2:
- glPushMatrix();
- glTranslate(0, 0.5, 0)
- Set the clip plane equation to <0, 1, 0, 0>. Enable the clip plane.
- glPopMatrix();
- Draw a sphere using gluSphere or gluSolidSphere, radius = 1.

If I'm not mistaken, the first exercise should clip off the top half of the sphere, and the second exercise should clip off the top 1/4th of the sphere.

1. 1
2. 2
3. 3
Rutin
15
4. 4
5. 5

• 9
• 9
• 11
• 11
• 23
• ### Forum Statistics

• Total Topics
633678
• Total Posts
3013290
×