Hello,
You can combine bounding boxes into a single larger one, using BoundingBox::expandBy(BoundingBox&) in your node visitor. That should give you the overal bbox for all the Geode's in the graph. A radius doesn't make much sense for a bounding box.
I am getting closer and I spent all the time by checking where my last problem is. The boundingbox in red is drawn correctly, with its center at 0,0,0, so is the cow, but unfortunately the nose is too far to the right.
The same happens with the tank.The second attached pic shows where the center of the cow lies. The axis are added to the picture, cows_center has the x axis facing the viewer and y axis poining to the right.
The cessna model works perfectly but many others don't. Is this a transformation problem? Does the model itself has a transformation, which translates the model away from the idealized boundingbox position? I am looking at the cow.osg file and cannot spot a translation.
Thanks for the help
<<attachment: cow_near.gif>>
<<attachment: cows_center.gif>>
_______________________________________________ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org