Jump to content
  • Advertisement
Sign in to follow this  

Axis Align Bounding Box problem

This topic is 4528 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

I have great abit of trouble what the variables are. That is about the View Frustum culling at the site from: http://www.lighthouse3d.com/opengl/viewfrustum/index.php?remarks How to find the fb_xmin / fb_xmax and how to find ob_xmin / ob_xmax..... //////////////////////////////////////////////////// Axis-Aligned Boxes everywhere Computing an AAB as a bounding volume for an object (or frustum) is extremely easy, just compute the minima and maxima for each axis. Testing if something is inside of an AAB is also very simple and it doesn't involve distance computations. Just check if there are overlaps on each axis. Consider an AAB bounding volume, or just AABB, for the frustum, fb and an AABB for an object ob. The following algorithm performs the intersection test: if (fb_xmin > ob_xmax || fb_xmax < ob_xmin || fb_ymin > ob_ymax || fb_ymax < ob_ymin || fb_zmin > ob_zmax || fb_zmax < ob_zmin) return (OUTSIDE); else if (fb_xmin < ob_xmin && fb_xmax > ob_xmax && fb_ymin < ob_ymin && fb_ymax > ob_ymax && fb_zmin < ob_zmin && fb_zmax > ob_zmax) return (INSIDE); else return(INTERSECT); If the result is OUTSIDE the case is closed. Otherwise, when the result is INTERSECT or INSIDE, then further testing is required. As for the case when a sphere was proposed as a bounding volume for the view frustum, some care must be taken to check if a bounding box is an appropriate bounding volume for the view frustum. Oblique, long and skinny frusta are not particularly suited.

Share this post

Link to post
Share on other sites
Sign in to follow this  

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!