diff --git a/simgear/canvas/elements/CanvasElement.cxx b/simgear/canvas/elements/CanvasElement.cxx index b0f84d55..e11e563b 100644 --- a/simgear/canvas/elements/CanvasElement.cxx +++ b/simgear/canvas/elements/CanvasElement.cxx @@ -405,7 +405,15 @@ namespace canvas //---------------------------------------------------------------------------- osg::BoundingBox Element::getTransformedBounds(const osg::Matrix& m) const { - return osg::BoundingBox(); + if( !_drawable ) + return osg::BoundingBox(); + + osg::BoundingBox transformed; + const osg::BoundingBox& bb = _drawable->getBound(); + for(int i = 0; i < 4; ++i) + transformed.expandBy( m * bb.corner(i) ); + + return transformed; } //----------------------------------------------------------------------------