]> SALOME platform Git repositories - modules/gui.git/commitdiff
Salome HOME
Fix field of view in perspective mode
authorimn <imn@opencascade.com>
Tue, 25 Aug 2015 11:20:13 +0000 (14:20 +0300)
committerimn <imn@opencascade.com>
Tue, 25 Aug 2015 11:20:13 +0000 (14:20 +0300)
src/OCCViewer/OCCViewer_ViewWindow.cxx

index 215d09dae8883d8b5319d50d206e13749e8cea4b..19203799f55cf7100573ffd2f560d2e9837d8abf 100755 (executable)
@@ -1652,14 +1652,18 @@ void OCCViewer_ViewWindow::onProjectionType( QAction* theAction )
     if (theAction == toolMgr()->action( OrthographicId )) {
       myModel->setProjectionType(Orthographic);
       aCamera->SetProjectionType ( Graphic3d_Camera::Projection_Orthographic );
+      aCamera->SetFOVy(45.0);
     }
     else if (theAction == toolMgr()->action( PerspectiveId )) {
       myModel->setProjectionType(Perspective);
       aCamera->SetProjectionType ( Graphic3d_Camera::Projection_Perspective );
+      aCamera->SetFOVy(30.0);
     }
 #if OCC_VERSION_LARGE > 0x06090000
-    if (toolMgr()->action( StereoId )->isChecked())
+    if (toolMgr()->action( StereoId )->isChecked()) {
       aCamera->SetProjectionType ( Graphic3d_Camera::Projection_Stereo );
+      aCamera->SetFOVy(30.0);
+    }
 #endif
     aView3d->Redraw();
     onViewFitAll();