[osg-users] Bounding box calculations of geometry including osg::Billboard

Robert Osfield robert.osfield at gmail.com
Thu Jan 19 01:34:34 PST 2017


Hi Malcom,

The osg::Billboard computes the modelview matrix required to the
rotate the osg::Drawable attached to the billboard node, it doesn't
modify the bounding box of the Drawable children.  This is the same
way that the rest of the scene graph works, parents do not affect the
bounding volumes of their children.

Robert.

On 19 January 2017 at 08:58, Malcolm Pigott
<osg.malcolm at hydrogenrocks.me.uk> wrote:
> I have a scene where a QUAD in 3D space is rotated to face the camera using an osg::Billboard as the camera rotates and the quad is positioned directly in front of the camera (it's effectively a drag and drop operation).
>
> However, I am trying to draw geometry in an Ortho2D overlay to match up with the edges of the quad by using its bounding box. However, as the camera rotates away from the quad's original location, the bounding box geometry does not seem to take into account the rotations performed by the Billboard.
>
> I have tried replacing the Billboard with an AutoTransform but the latter flicks between states when not being "dragged". This seems to be because the scene is rotated 90degrees so the model is Z up.
>
> Whilst I'm trying to get my head around the AutoTransform problem, is there any way to get the Bounding Box calculations to be correct when a Billboard is in use?
>
> Thanks.
>
> ------------------
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=70002#70002
>
>
>
>
>
> _______________________________________________
> osg-users mailing list
> osg-users at lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org



More information about the osg-users mailing list