diff --git a/include/osg/AutoTransform b/include/osg/AutoTransform index 8bf2c0e9e..0bef0788a 100644 --- a/include/osg/AutoTransform +++ b/include/osg/AutoTransform @@ -82,6 +82,7 @@ class OSG_EXPORT AutoTransform : public Transform virtual bool computeWorldToLocalMatrix(Matrix& matrix,NodeVisitor* nv) const; + virtual BoundingSphere computeBound() const; protected : diff --git a/src/osg/AutoTransform.cpp b/src/osg/AutoTransform.cpp index a1677ad58..abac04529 100644 --- a/src/osg/AutoTransform.cpp +++ b/src/osg/AutoTransform.cpp @@ -189,3 +189,16 @@ void AutoTransform::accept(NodeVisitor& nv) // now do the proper accept Transform::accept(nv); } + +BoundingSphere AutoTransform::computeBound() const +{ + BoundingSphere bsphere; + + float scale( 1.f ); + if ( getAutoScaleToScreen() && _firstTimeToInitEyePoint ) + return bsphere; + + bsphere = Transform::computeBound(); + + return bsphere; +}