Hi !
Does any one here has some old code that calculates the bounding box around the view frustum ?
Mikael
Hi !
Does any one here has some old code that calculates the bounding box around the view frustum ?
Mikael
Originally posted by Mikael_Aronsson:
[b]Hi !
Does any one here has some old code that calculates the bounding box around the view frustum ?
Mikael[/b]
That’s a quite easy thing to do
All you need is to retrieve the 8 points that make the frustum.
For doing this you can use the glu function gluUnProject using the corners of the Viewport as x/y position and 0/1 for the z position.
You will get 8 points that build the frustum. Search for maximums and minimums for every component and you’ve your frustums bounding box.