Archived

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

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.

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

1. 1
Rutin
23
2. 2
3. 3
JoeJ
20
4. 4
5. 5

• 29
• 40
• 23
• 13
• 13
• Forum Statistics

• Total Topics
631739
• Total Posts
3001958
×

Important Information

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!