From 4e1b617289ccb541c3ebce89d641378208791193 Mon Sep 17 00:00:00 2001 From: vsr Date: Fri, 15 May 2009 12:47:01 +0000 Subject: [PATCH] Issue 0020356: [windows] a fix for VTKViewer_Trihedron.cxx --- src/VTKViewer/VTKViewer_Trihedron.cxx | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/VTKViewer/VTKViewer_Trihedron.cxx b/src/VTKViewer/VTKViewer_Trihedron.cxx index 90e832a70..0cd2f1f22 100755 --- a/src/VTKViewer/VTKViewer_Trihedron.cxx +++ b/src/VTKViewer/VTKViewer_Trihedron.cxx @@ -37,6 +37,9 @@ #include #include +// QT includes +#include + vtkStandardNewMacro(VTKViewer_UnScaledActor); /*!Constructor*/ @@ -85,10 +88,10 @@ void VTKViewer_UnScaledActor::Render(vtkRenderer *theRenderer) vtkFloatingPointType aZeroTol = 1.0E-12; vtkFloatingPointType anOldScale = GetScale()[0]; vtkFloatingPointType aScale = anOldScale; - vtkFloatingPointType aMaxSize = (vtkFloatingPointType)fmax(aSize[1],aSize[0]); - if (fabs(aWinDiag) > aZeroTol && fabs(aLength) > aZeroTol && fabs(aMaxSize) > aZeroTol) - aScale = mySize*aWorldDiag/aWinDiag/aLength*sqrt(vtkFloatingPointType(fmin(aSize[1],aSize[0]))/aMaxSize); - if(fabs(aScale) > aZeroTol && fabs(aScale - anOldScale)/aScale > aPrecision){ + vtkFloatingPointType aMaxSize = (vtkFloatingPointType)qMax(aSize[1],aSize[0]); + if (qAbs(aWinDiag) > aZeroTol && qAbs(aLength) > aZeroTol && qAbs(aMaxSize) > aZeroTol) + aScale = mySize*aWorldDiag/aWinDiag/aLength*sqrt(vtkFloatingPointType(qMin(aSize[1],aSize[0]))/aMaxSize); + if(qAbs(aScale) > aZeroTol && qAbs(aScale - anOldScale)/aScale > aPrecision){ SetScale(aScale); } } -- 2.39.2