Hi Josef,
Josef Grunig wrote:
>
> This way it works great as long I create the boxes around a geometry
> Node, but if I create them on a Transform node (for example the parent
> of the previous cited geometry node) the bounding boxes are again
> wrong (bigger than what they should be...)
>
> Probably the getVolume of the transform node is computed on the
> rotated volume (and not geometry) of the child object, which is not
> what we really want.
That's correct. The BVol of a Transform Node is already transformed by
the transformation. To get the untransformed volume you would have to do
something like this (taken from OSGNode.cpp):
618 DynamicVolume vol = _sfVolume.getValue();
619
620 MFNodePtr::iterator it;
621
622 vol.getInstance().setEmpty();
623
624 for(it = _mfChildren.begin(); it != _mfChildren.end(); ++it)
625 {
626 if((*it)->getTravMask())
627 {
628 (*it)->updateVolume();
629 vol.getInstance().extendBy((*it)->getVolume());
630 }
631 }
Hope it helps
Dirk
-------------------------------------------------------------------------
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