view frustum to AABB

Started by
1 comment, last by remdul 20 years, 1 month ago
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...
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
[~aussie]
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.

This topic is closed to new replies.

Advertisement