Jump to content
  • Advertisement

Archived

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

remdul

view frustum to AABB

This topic is 5234 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 need to: -calculate the four vertices of the view frustum far-plane -calculate the four vertices of the view frustum near-plane (Basicly I need to construct an Axis Aligned Bounding Box that fits around the view frustum.) Resulting positions should be world space coordinates. All I have is: -camera x,y,z position (world coordinates) -camera viewing direction vector -camera fov angle -camera far-plane distance -camera near-plane distance How do I do this? I know how to extract the six view frustum planes from the stack using the OpenGL API functions but I''m not sure they can be of use in an efficient way. Note that my knowledge of math doesn''t go far beyond rotations and planes. All help is appreciated...

Share this post


Link to post
Share on other sites
Advertisement
i dunno if this is what you mean but there''s somethng on www.gametutorials.com about extracting the frustum clipping planes. i cant remember exactly how but you multiply the projection and modelview matrices together and extract the sides from the new matrix

Share this post


Link to post
Share on other sites
I went thru the octree tutorials code on that site, but I couldn''t find the stuff I was looking for.

Maybe this image will explain things better what I''m trying to achieve:

http://home.planet.nl/~buijs512/_temp/view.jpg

Red is the view frustum.
Blue is the bounding box I'', trying to construct.
Four red dots on the two planes are the coordinates I need.

Share this post


Link to post
Share on other sites

  • 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!