[osg-users] ComputeBoundsVisitor does not consider Billboards

Guy Volckaert guy.volckaert at meggitt.com
Fri Oct 20 07:34:32 PDT 2017


Hi,

I'm having problem with the osg::ComputeBoundsVisitor and osg::Billboards. In essence, the osg::ComputeBoundsVisitor does not consider the pivot position of the facing billboard. For example, let say I have a simple model that contains a single facing quad billboard (like a tree) located at (20, 20, 0) with a dimension of (10, 0, 10). I would expect the osg::ComputeBoundsVisitor to calculate a scene bounding box of min(15, 20, 0) max(25, 20, 10). However, what I seem to get instead is min(-5, 0, 0 ) max( 5, 0, 10 ). 

My investigation led me to review osg::ComputeBoundsVisitor and I found that it does not consider billboards - i.e. the osg::ComputeBoundsVisitor::apply(osg::Billboard& billboard) is missing. In effect, the osg::ComputeBoundsVisitor does not consider the pivot position stored in osg::Billboard::_positionList.

Is this design intentional? If not, then how would you propose fixing this issue?

Thank you!

Cheers,
Guy

------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=72214#72214







More information about the osg-users mailing list