[osg-users] Boundingsphere precision question

Paul Melis paul at science.uva.nl
Sun Jul 27 10:23:31 PDT 2008

Ariasgore wrote:
>> 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.
I don't see why the bounding box would be centered at 0,0,0. For 
cow.osg's only Geode I get a bounding box

X (-4.4458398818969727, 5.9980897903442383)
Y (-2.1400699615478516, 1.2627500295639038)
Z (-3.1983799934387207, 3.1983799934387207)

Definitely not centered in the origin...
> 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.
If you have those axes then you have transformed the cow, because that 
is not the orientation I get here. Try "osgviewer cow.osg axes.osg" and 
switch to wireframe ("w") to be able to see the axes within the cow.

> 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
> ------------------------------------------------------------------------
> ------------------------------------------------------------------------
> ------------------------------------------------------------------------
> _______________________________________________
> osg-users mailing list
> osg-users at lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

More information about the osg-users mailing list