[osg-users] Getting the height of a 3DS node

Robert Osfield robert.osfield at gmail.com
Tue Mar 13 01:58:49 PDT 2018

HI Adrian,

On 13 March 2018 at 02:13, Adrian Jelffs <adrian.jelffs at makai.com> wrote:
> Awesome, this works great! Thank you for steering me in the right direction.
> osg::BoundingSphere bs = _myNode->getBound();
> Is there anything that can get just the height of the node? In my case the node is quite long but not very tall so using a sphere places my text much further away than necessary.

A generic subgraph/node doesn't have a "height".  The various
polygons/lines/points within the subgraph will have various heights,
all depending upon the model you have.

If you scene is axis aligned then potentially you could use the
osg::ComputeBoundsVisitor that computes a tightly bound bounding box
around a subgraph, this will have small extents than the bounding


More information about the osg-users mailing list