Calculate model BoundingBox in osgEarth

87 views Asked by At

I want draw a model BoundingBox in osgEarth, but position is not suitable.

osg::ComputeBoundsVisitor boundVisitor;

node->accept(boundVisitor);

osg::BoundingBox boundingBox = boundVisitor.getBoundingBox();

osg::Matrixd localToWorld = osg::computeLocalToWorld(paath);

Now the bounding box model is perpendicular to the ground, but the direction is wrong.

1

There are 1 answers

0
Glenn Waldron On

It will be helpful if you:

  • Post the rest of the code used to position your box
  • Include a screenshot of the problem
  • Explain what you are expecting to see

Thanks!