From 9b16dc760672222779de5c4c73059c6fa165cb9d Mon Sep 17 00:00:00 2001 From: asv Date: Tue, 31 Jan 2006 13:19:50 +0000 Subject: [PATCH] further implementation of get/setVisualParameters() --- src/OCCViewer/OCCViewer_ViewWindow.cxx | 10 +--------- src/SVTK/SVTK_ViewWindow.cxx | 8 +------- src/VTKViewer/VTKViewer_ViewWindow.cxx | 8 +------- 3 files changed, 3 insertions(+), 23 deletions(-) diff --git a/src/OCCViewer/OCCViewer_ViewWindow.cxx b/src/OCCViewer/OCCViewer_ViewWindow.cxx index 24c477451..dbd2618b6 100755 --- a/src/OCCViewer/OCCViewer_ViewWindow.cxx +++ b/src/OCCViewer/OCCViewer_ViewWindow.cxx @@ -871,8 +871,6 @@ void OCCViewer_ViewWindow::performRestoring( const viewAspect& anItem ) { Handle(V3d_View) aView3d = myViewPort->getView(); - printf( "-- performRestoring, proj = %f %f %f \n", anItem.atX, anItem.atY, anItem.atZ ); - Standard_Boolean prev = aView3d->SetImmediateUpdate( Standard_False ); aView3d->SetScale( anItem.scale ); aView3d->SetCenter( anItem.centerX, anItem.centerY ); @@ -996,11 +994,9 @@ QString OCCViewer_ViewWindow::getVisualParameters() { viewAspect params = getViewParams(); QString retStr; - retStr.sprintf( "%.12f*%.12f*%.12f*%.12f*%.12f*%.12f*%.12f*%.12f*%.12f*%.12f*%.12f*%.12f*%.12f", params.scale, + retStr.sprintf( "%.12e*%.12e*%.12e*%.12e*%.12e*%.12e*%.12e*%.12e*%.12e*%.12e*%.12e*%.12e*%.12e", params.scale, params.centerX, params.centerY, params.projX, params.projY, params.projZ, params.twist, params.atX, params.atY, params.atZ, params.eyeX, params.eyeY, params.eyeZ ); - - // printf( "-- OCC::getVisualParameters() = %s \n", retStr.latin1() ); return retStr; } @@ -1010,10 +1006,6 @@ void OCCViewer_ViewWindow::setVisualParameters( const QString& parameters ) { QStringList paramsLst = QStringList::split( '*', parameters, true ); if ( paramsLst.size() == 13 ) { - // printf( "-- OCC::setVisualParameters = %f %f %f %f %f %f %f %f %f %f %f %f %f\n", paramsLst[0].toDouble(), - // paramsLst[1].toDouble(), paramsLst[2].toDouble(), paramsLst[3].toDouble(), paramsLst[4].toDouble(), - // paramsLst[5].toDouble(), paramsLst[6].toDouble(), paramsLst[7].toDouble(), paramsLst[8].toDouble(), - // paramsLst[9].toDouble(), paramsLst[10].toDouble(), paramsLst[11].toDouble(), paramsLst[12].toDouble() ); viewAspect params; params.scale = paramsLst[0].toDouble(); params.centerX = paramsLst[1].toDouble(); diff --git a/src/SVTK/SVTK_ViewWindow.cxx b/src/SVTK/SVTK_ViewWindow.cxx index 26cd656a9..c4d09f5f8 100755 --- a/src/SVTK/SVTK_ViewWindow.cxx +++ b/src/SVTK/SVTK_ViewWindow.cxx @@ -1099,10 +1099,9 @@ SVTK_ViewWindow GetScale( scale ); QString retStr; - retStr.sprintf( "%.12f*%.12f*%.12f*%.12f*%.12f*%.12f*%.12f*%.12f*%.12f*%.12f*%.12f*%.12f*%.12f", + retStr.sprintf( "%.12e*%.12e*%.12e*%.12e*%.12e*%.12e*%.12e*%.12e*%.12e*%.12e*%.12e*%.12e*%.12e", pos[0], pos[1], pos[2], focalPnt[0], focalPnt[1], focalPnt[2], viewUp[0], viewUp[1], viewUp[2], parScale, scale[0], scale[1], scale[2] ); - printf( "-- SVTK::getVisualParameters() = %s \n", retStr.latin1() ); return retStr; } @@ -1115,11 +1114,6 @@ SVTK_ViewWindow { QStringList paramsLst = QStringList::split( '*', parameters, true ); if ( paramsLst.size() == 13 ) { - printf( "-- SVTK::setVisualParameters = %f %f %f %f %f %f %f %f %f %f %f %f %f\n", paramsLst[0].toDouble(), - paramsLst[1].toDouble(), paramsLst[2].toDouble(), paramsLst[3].toDouble(), paramsLst[4].toDouble(), - paramsLst[5].toDouble(), paramsLst[6].toDouble(), paramsLst[7].toDouble(), paramsLst[8].toDouble(), - paramsLst[9].toDouble(), paramsLst[10].toDouble(), paramsLst[11].toDouble(), paramsLst[12].toDouble() ); - double pos[3], focalPnt[3], viewUp[3], parScale, scale[3]; pos[0] = paramsLst[0].toDouble(); pos[1] = paramsLst[1].toDouble(); diff --git a/src/VTKViewer/VTKViewer_ViewWindow.cxx b/src/VTKViewer/VTKViewer_ViewWindow.cxx index 2d51252fa..144590803 100755 --- a/src/VTKViewer/VTKViewer_ViewWindow.cxx +++ b/src/VTKViewer/VTKViewer_ViewWindow.cxx @@ -574,10 +574,9 @@ QString VTKViewer_ViewWindow::getVisualParameters() GetScale( scale ); QString retStr; - retStr.sprintf( "%.12f*%.12f*%.12f*%.12f*%.12f*%.12f*%.12f*%.12f*%.12f*%.12f*%.12f*%.12f*%.12f", + retStr.sprintf( "%.12e*%.12e*%.12e*%.12e*%.12e*%.12e*%.12e*%.12e*%.12e*%.12e*%.12e*%.12e*%.12e", pos[0], pos[1], pos[2], focalPnt[0], focalPnt[1], focalPnt[2], viewUp[0], viewUp[1], viewUp[2], parScale, scale[0], scale[1], scale[2] ); - printf( "-- SVTK::getVisualParameters() = %s \n", retStr.latin1() ); return retStr; } @@ -587,11 +586,6 @@ void VTKViewer_ViewWindow::setVisualParameters( const QString& parameters ) { QStringList paramsLst = QStringList::split( '*', parameters, true ); if ( paramsLst.size() == 13 ) { - printf( "-- VTK::setVisualParameters = %f %f %f %f %f %f %f %f %f %f %f %f %f\n", paramsLst[0].toDouble(), - paramsLst[1].toDouble(), paramsLst[2].toDouble(), paramsLst[3].toDouble(), paramsLst[4].toDouble(), - paramsLst[5].toDouble(), paramsLst[6].toDouble(), paramsLst[7].toDouble(), paramsLst[8].toDouble(), - paramsLst[9].toDouble(), paramsLst[10].toDouble(), paramsLst[11].toDouble(), paramsLst[12].toDouble() ); - double pos[3], focalPnt[3], viewUp[3], parScale, scale[3]; pos[0] = paramsLst[0].toDouble(); pos[1] = paramsLst[1].toDouble(); -- 2.39.2