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: How to determine the render volume?

  1. #1
    Intern Newbie
    Join Date
    Aug 2001
    Location
    Almeria, Spain
    Posts
    34

    How to determine the render volume?

    Hi

    I want to draw a cube containing all the objects in my scene. How can I determine the bounds for it?.

    Of course it must be as small as posible :-)

    Thanks

  2. #2
    Advanced Member Frequent Contributor
    Join Date
    May 2000
    Location
    Oxford, England
    Posts
    547

    Re: How to determine the render volume?

    run through each vertex, store the maximum x,y & z you find as well as the minimum values. You then have two points representing the volume in which all primitives are contined.

    Add them both together and divide by two to get the centre.....

Posting Permissions

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