PDA

View Full Version : view-frustum culling



zen
05-02-2001, 02:33 PM
I'm trying to implement view-frustum culling in my roam engine and need a way of finding wether a certain points lies inside or outside the halfspace defined by a specific frustum plane(in english: wether this point will be clipped by a specific clipping plane or not).Assuming I have the values I passed to glFrustum in order to create the view-frustum and the coordinates of the plane,how can I do that?

Brent Fogarty
05-02-2001, 03:04 PM
This code works quite well and is easy to understand.
http://www.markmorley.com/opengl/frustumculling.html

zen
05-02-2001, 03:20 PM
Thanks for the link Brent.I was thinking though,isn't the a better,faster way to get the the six clipping planes?The one in that link has quite a lot of square roots and divisions.

zed
05-02-2001, 04:35 PM
theres also code in the faq. though i dont know if it differs from the code in the above link.

zen
05-02-2001, 05:33 PM
I should remember to take a look at the FAQ every now and then.Thanks Zed.I only looked through the code quickly but it does look quite like the one in the link above but I didn't notice that many sqrt's and divs.

Heaven
05-03-2001, 02:07 AM
I believe the FAQ code said that since the projection and modelview matrices are already normalized, you don't need to normalize the results. Thus, you can take out all the "normalize the result" code segments from that first link.

Care,
Heaven