From: imn Date: Tue, 25 Aug 2015 11:20:13 +0000 (+0300) Subject: Fix field of view in perspective mode X-Git-Tag: V7_7_0a1~10 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=3c3e409d31ee6b3ce5b3931afc39f4d6928d073c;p=modules%2Fgui.git Fix field of view in perspective mode --- diff --git a/src/OCCViewer/OCCViewer_ViewWindow.cxx b/src/OCCViewer/OCCViewer_ViewWindow.cxx index 215d09dae..19203799f 100755 --- a/src/OCCViewer/OCCViewer_ViewWindow.cxx +++ b/src/OCCViewer/OCCViewer_ViewWindow.cxx @@ -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();