Archived

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

remdul

view frustum to AABB

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