[vtkusers] vtkOBBTree

Shashwath T.R. trshash at gmail.com
Fri Aug 20 08:13:35 EDT 2010


Hi Kevin,

The parameters are as follows:

corner: The corner point - the "origin" of the three vectors.
size: The relative sizes of the OBB on each of the returned axes. Size[0] is
the length of the OBB along the "max" axis, size[1] is the length along the
"mid" axis and size[2] is the length along the "min" axis.

To get the corners of the box, you should offset the corner by the
appropriate scaled vector (i.e., max * size[0], mid * size[1], min *
size[2]).

Of course, I don't know if the devs intend this function to be for public
use, but we're using it here anyway.

HTH
Shash

On Wed, Aug 18, 2010 at 5:56 PM, Kevin Chavanne
<kchavanne at 3dneovision.com>wrote:

> 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.
>
> 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 method to compute OBB of a polygonal model? I just
> need the three lengths of the OBB. Thanks in advance.
>
>
> Dest wishes,
> Kevin
>
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the VTK FAQ at:
> http://www.vtk.org/Wiki/VTK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20100820/d415b26f/attachment.htm>


More information about the vtkusers mailing list