From 3c3e409d31ee6b3ce5b3931afc39f4d6928d073c Mon Sep 17 00:00:00 2001 From: imn Date: Tue, 25 Aug 2015 14:20:13 +0300 Subject: [PATCH] Fix field of view in perspective mode --- src/OCCViewer/OCCViewer_ViewWindow.cxx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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(); -- 2.39.2