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 5 of 5

Thread: Bounding boxes. A good way to find them ¿?

  1. #1
    Junior Member Regular Contributor
    Join Date
    Aug 2000
    Posts
    106

    Bounding boxes. A good way to find them ¿?

    Having a model with a list of polygons, how can I find the bounding box for this model?

  2. #2
    Guest

    Re: Bounding boxes. A good way to find them ¿?

    just go through your list of vertices and find the 6 values which have the min & max x, y, and z values and that gives you the 2 vertices you need to define a bounding box.

    ie. furtherst upper left and closest lower right.

  3. #3
    Junior Member Regular Contributor
    Join Date
    Aug 2000
    Posts
    106

    Re: Bounding boxes. A good way to find them ¿?

    And if the model is like a cylinder? How canI get the centre of the model, to find a bounding sphere?

  4. #4
    Junior Member Newbie
    Join Date
    Oct 2000
    Location
    France
    Posts
    16

    Re: Bounding boxes. A good way to find them ¿?

    For any kind of convex objects, you can find the 'center' by calculating the barycentric point of the object. How to do it ...
    Just sum the x value of each point of your object and then divide the result by the number of points ... same for y and z and that's it you have the center.

  5. #5
    Junior Member Regular Contributor
    Join Date
    Aug 2000
    Posts
    106

    Re: Bounding boxes. A good way to find them ¿?

    True...thx...

Posting Permissions

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