From 60597f4bbb897c488db50af14f7bf7a84f1b3d2f Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Wed, 23 Mar 2005 10:46:08 +0000 Subject: [PATCH] Fixed the scaling in pixelSize computation and the autoscale usage of it. --- src/osg/AutoTransform.cpp | 2 +- src/osg/CullStack.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/osg/AutoTransform.cpp b/src/osg/AutoTransform.cpp index 440d2b1d5..1e870ce01 100644 --- a/src/osg/AutoTransform.cpp +++ b/src/osg/AutoTransform.cpp @@ -153,7 +153,7 @@ void AutoTransform::accept(NodeVisitor& nv) if (getAutoScaleToScreen()) { - float size = 1.0f/cs->pixelSize(getPosition(),1.0f); + float size = 1.0f/cs->pixelSize(getPosition(),0.48f); setScale(size); } diff --git a/src/osg/CullStack.cpp b/src/osg/CullStack.cpp index 39be0ae2c..9b1724c2f 100644 --- a/src/osg/CullStack.cpp +++ b/src/osg/CullStack.cpp @@ -106,7 +106,7 @@ void CullStack::pushCullingSet() M(2,2)*P23, M(3,2)*P23 + M(3,3)*P33); - float scaleRatio = 0.701f/sqrtf(scale_00.length2()+scale_10.length2()); + float scaleRatio = 0.7071067811f/sqrtf(scale_00.length2()+scale_10.length2()); pixelSizeVector *= scaleRatio;