Hi Pjotr,
On 20 May 2014 13:22, Pjotr Svetachov <[email protected]> wrote:
> I stumbled on a little bug with the new drawables. I was distributing points
> data into different drawables that I used in a LOD later. When simplifying
> the system to not use geodes anymore I came upon the following bug:
> If Drawable::getBoundingBox would compute an invalid bounding box (if it was
> for example empty) it would make a bounding sphere with a infinite radius
> which counts as a valid sphere in osg.
>
> Attached is a small fix.
Thanks for the fix, now merged and submitted to svn/trunk.
> Btw just while writing this post I noticed that the sphere is being set
> outside the if(!_boundingSphereComputed){} statement. This means it is set
> every time you call getBoundingBox, whats the reason it needs to be outside
> this statement?
There won't be any need to reset the _boundingSphere on each call,
I've now moved the set methods up into the
if(!_boundingSphereComputed) block.
I haven't yet settled upon the cleanest way to handle the overlap
between the BoundingSphere and BoundingBox internals. My plan is to
come back to the topic once it's been exposed to testing for a while.
Robert.
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org