[vtkusers] How to use vtkOBBTree?

shiyuan shiyuan001 at hotmail.com
Thu Nov 29 09:03:51 EST 2007


Hi,All
I want to compute Oriented Bounding Box of a STL model(a kind of polygonal model) to get three lengths of the OBB and I find vtkOBBTree has a member function :
 
void vtkOBBTree::ComputeOBB(  vtkPoints *  pts,    double  corner[3],    double  max[3],    double  mid[3],    double  min[3],    double  size[3]  )
  
I guess this function can help me. From VTK Documentation,I got the following description:
 
Compute an OBB from the list of points given. Return the corner point and the three axes defining the orientation of the OBB. Also return a sorted list of relative "sizes" of axes for comparison purposes. 
 
After wrote a test program, I found the max[3],mid[3] and min[3] specify three vectors which is orthogonal by ones and twos and they can form a coordinate system. But I don't know the meaning of arguments "corner[3]" and "size[3]" above exactly.If argument "corner[3]" specify the "minimum" point of the OBB,but the "corner[3]" value is less than "minimum" point of AABB when I test the same model.
 
Could someone please give me some help? I want to know:1.what are the arguments mean in Function ComputeOBB()?2.Is there any other methods to compute OBB of a polygonal model? I just need the three lengths of the OBB.  Thanks in advance.
 
 
Dest wishes,
SHIYuan
 
_________________________________________________________________
Windows Live Photo gallery 数码相机的超级伴侣,轻松管理和编辑照片,还能制作全景美图!
http://get.live.cn/product/photo.html
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20071129/ccbf1536/attachment.htm>


More information about the vtkusers mailing list