[osg-users] ComputeBoundsVisitor does not consider Billboards

Robert Osfield robert.osfield at gmail.com
Fri Oct 20 07:52:18 PDT 2017


Hi Guy,

On 20 October 2017 at 15:34, Guy Volckaert <guy.volckaert at meggitt.com>
wrote:

> 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?
>

This is a design/implementation bug, looking that the implementation it's
clearly too simple and misses the special case of handling osg::Billboard.

To fix the bug a ComputeBoundVisitor::apply(osg::Billboard&) is required,
the implementation of this new method would need to iterator through the
_positionList and the drawables associated with each position and account
for the full rnage of potistions that are possible for each drawables
bounding box given the possible rotation and translation required.  The
easiest way to do this would be to use the diameter of each drawable
child's bounding box for the x,y and z extents.

I am not in a position to be able to write a fix right away as I have other
tasks to complete, but if you can't get to it hopefully next week I'll have
a chance to look at it.

Cheers,
Robert.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20171020/4d237e10/attachment.html>


More information about the osg-users mailing list