-
Junior Member
Regular Contributor
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?
-
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.
-
Junior Member
Regular Contributor
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?
-
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.
-
Junior Member
Regular Contributor
Re: Bounding boxes. A good way to find them ¿?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules