intersecting plane with object

Is there any way in opengl of finding whether a given plane intersects an object in a scene (without doing explicitly the math). Maybe with opengl in selection mode?

yoo could probably do it faster yourself with polygon/plane intersection routines.

b

Yes but it would be a (math) nightmare. It should be possible to have opengl find which polygons intersect a given polygon. But how???

OpenGL is a black box. You put data in. Out come pixels on the screen. If you’re trying to do anything other than that, you really shouldn’t be using OpenGL, because either it’s not supported at all, or it’s only poorly supported.

Try this link for information on collission/penetration detection:
http://www.magic-software.com/

If you are just trying to find out if the plane intersects the object, and don’t care about where the intersection happens, it’s easy to do. Just check if the plane divides the set of points that correspond with the vertices of the object. To do this, go through the list of points. Record which side of the plane the first point is on, and if any of the other points are on the other side of the plane, the plane intersects the object. The algorithm is O(n) in the worst case, and O(2) in the best case.

j

Originally posted by mikemor:
Yes but it would be a (math) nightmare. It should be possible to have opengl find which polygons intersect a given polygon. But how???

I like to think of this way: Why would OpenGL care to know which two polygons are intersecting?