PDA

View Full Version : How to tell if a point is in view?



Structural
12-02-2002, 11:07 PM
How would I tell if a point in 3D space is in my current view?
I don't have a clue since I don't know the perspective, nor would I know where to find it.
Also can't I really think of a way to solve this mathematically.
Is there perhaps something in the GLU library that can help me?

titan
12-02-2002, 11:21 PM
http://www.sjbaker.org/steve/omniv/
Do a search for frustum culling or frustum slipping on google.

You'll find an explanation of how to get the six planes that define the projection. Then you just have to check which side of the plane the point is on (after tranforming it into the correct space), if it is on the wrong side of any of the 6 planes it isn't in view.

ppinter1
12-04-2002, 01:35 PM
Mark Morley has an excellent article at his web site (http://www.markmorley.com/opengl/frustumculling.html) .