Hello Josef,

Josef Grunig wrote:
> Hi,
> 
> I'm computing bounding boxes on nodes in this way:
> 
>       Pnt3f min, max;
>       DynamicVolume volume;
>       node->getWorldVolume(volume);
>         volume.getBounds( min, max );
> 
> then building 6 planes using min and max; The resulting BoundingBox
> geometry is attached to the root node (I've a valid reason for not
> attaching it as a child of the bounded node)

the BoxVolume (which is inside the DynamicVolume) returned by 
getWorldVolume is axis aligned in world coordinates; it is not just the 
local box transformed to world coordinates, which seems to be what you 
are looking for, right ?

> Boxes are OK as long as I set translations and scaling. when applying
> a rotation boxes stretch and look like as they get scaled... any
> reason for that? Am I computing the box volume correctly?

The volume you compute has to accommodate the rotated object and still 
be axis aligned, therefore it has to grow when the rotates.
To transform the local volume to world coordinates, construct your 
planes with the bounds of the getVolume() volume and then transform them 
to world coordinates by applying the getToWorld() matrix.

        Hope it helps,
                Carsten

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Opensg-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-users

Reply via email to