diff --git a/src/osg/AutoTransform.cpp b/src/osg/AutoTransform.cpp index 01b8936d7..0f9777e74 100644 --- a/src/osg/AutoTransform.cpp +++ b/src/osg/AutoTransform.cpp @@ -153,7 +153,7 @@ osg::Matrixd AutoTransform::computeMatrix(const osg::NodeVisitor* nv) const { double size = 1.0/cs->pixelSize(getPosition(),0.48f); - //if (_autoScaleTransitionWidthRatio>0.0) + if (_autoScaleTransitionWidthRatio>0.0) { if (_minimumScale>0.0) { @@ -185,6 +185,18 @@ osg::Matrixd AutoTransform::computeMatrix(const osg::NodeVisitor* nv) const else if (size>m) size = a + b*size + c*(size*size); } } + else + { + if (_minimumScale>0.0 && size<_minimumScale) + { + size = _minimumScale; + } + + if (_maximumScale_maximumScale) + { + size = _maximumScale; + } + } // TODO setScale(size); scale.set(size, size, size);