Archived

This topic is now archived and is closed to further replies.

frustrum culling

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

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi. I just have a simple question about frustrum culling. I have not looked at any tutorials but i had an idea about how i might do it and i wanted to know if it would work. Here goes A variable is used to rotate the view. When this value is incramented the view is changed. If the glRotatef function works like i think, then what it does is change the view according to the vale of cos(var)*(3.14/180). So if we wanted to only draw the polygons that were in our viewing frustrum then couldn''t u do something like //var is the variable used to rotate. if(vertex+45 <=(cos(var))*(3.14/180)&&vertex-45 >=(cos(var))*(3.14/180)) //Draw Stuff and something similar for the y axis.

Share this post


Link to post
Share on other sites
I don''t know if that would work, but it seems calling COS() every frame would be a timely operation. Check out the tutorial at http://www.markmorley.com, it explains the process of frustrum culling very well. Then, checking vertices for visibility in the current frustrum is as simple as doing the "plane equation" using the vertex against all the planes in the frustrum (there''s six of them).

Share this post


Link to post
Share on other sites