Compute Bounding Box for Several mesh

Started by
2 comments, last by Sc4Freak 17 years, 4 months ago
How to compute Bounding box for an object that comprises of several meshes ?how to proceed? Thankq
Advertisement
Just start with the bounding box for one of the objects and keep growing it to encompass the other meshes.
That way of proceeding will make things little bit complicate and wont work in some cases.......i think.

What i am doing is ........storing all the meshes info in a single vertex buffer. What i ve thought is that.traverse thro the buffer and find the min and max value and compute the bounding box.
is this the better solution?
or any other way to implement ?
ny Efficient way?
D3DX provides functions to concatenate meshes (D3DXConcatenateMeshes()) and to calculate a bounding box for a mesh (D3DXComputeBoundingBox()). So all you have to do is concatenate all your meshes into a temporary mesh using D3DXConcatenateMeshes(), and then compute the bounding box on that temporary mesh with D3DXComputeBoundingBox().
NextWar: The Quest for Earth available now for Windows Phone 7.

This topic is closed to new replies.

Advertisement