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

Malcolm Pigott osg.malcolm at hydrogenrocks.me.uk
Thu Jan 19 00:58:12 PST 2017


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








More information about the osg-users mailing list