[osg-users] Boundingsphere precision question
Paul Melis
paul at science.uva.nl
Sun Jul 27 05:24:17 PDT 2008
Ariasgore wrote:
> Hello,
>
> I am trying to rescale models to a boundingsphere of the radius 0.5,
> so that the model is not bigger than 1. in any dimension.
> But while rescaling I found some strange detail and I don't know how
> to treat with that.
> Here is a screenshot of the NPS Tank from the tutorials
> http://img180.imageshack.us/img180/2011/tankspherefi9.gif
> the same applies to the cessna.osg and so on.
>
> The bounding sphere is much bigger than the model itself and I require
> precise boundary values. Is this something that lies within the model
> or is this an offset applied to the boundingsphere? However I would
> like to have a precise boundingsohere.
The bounding spheres in OSG are used as loose bounds to be able to
quickly do frustum culling. If you need tight bounds you should be able
to use the getBoundingBox() method on the Geode's of interest. This
method returns a bounding box that should tightly fit around the
geometry data (I haven't checked this, merely assuming it is a tight fit
based on the geometry's vertices).
Paul
More information about the osg-users
mailing list