[osg-users] Boundingsphere precision question

Gordon Tomlinson gordon at gordon-tomlinson.com
Sun Jul 27 09:41:18 PDT 2008


When you collecting/drawing your bounding volume Are you taking into account
the bounding boxes are localized with respect to the geometry they contain

And NOT to the origin or any transforms

__________________________________________________________
Gordon Tomlinson 

Email   : gordon at GordonTomlinson.com
YIM/AIM : gordon3dBrit
MSN IM  : gordon3dBrit at 3dscenegraph.com
Website : www.vis-sim.com www.gordontomlinson.com 
__________________________________________________________


-----Original Message-----
From: osg-users-bounces at lists.openscenegraph.org
[mailto:osg-users-bounces at lists.openscenegraph.org] On Behalf Of Ariasgore
Sent: Sunday, July 27, 2008 12:21 PM
To: OpenSceneGraph Users
Subject: Re: [osg-users] Boundingsphere precision question

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 




More information about the osg-users mailing list