Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 2 of 2

Thread: Bounding box calculation ?

  1. #1
    Senior Member OpenGL Pro
    Join Date
    May 2001
    Location
    Kristianstad,Skåne,Sweden
    Posts
    1,595

    Bounding box calculation ?

    Hi !

    Does any one here has some old code that calculates the bounding box around the view frustum ?

    Mikael

  2. #2
    Junior Member Newbie
    Join Date
    Nov 2000
    Location
    ,,Germany
    Posts
    6

    Re: Bounding box calculation ?

    Originally posted by Mikael_Aronsson:
    Hi !

    Does any one here has some old code that calculates the bounding box around the view frustum ?

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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •