From 47e0ea8008b705096b58d1309d9123f164e56d4d Mon Sep 17 00:00:00 2001 From: Matteo Dellepiane Date: Tue, 8 Nov 2016 14:29:24 +0100 Subject: [PATCH] Fixed import raster When a new raster is imported, the extrinsics of the shot are now assigned to a trackball reset --- src/meshlab/mainwindow_RunTime.cpp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/meshlab/mainwindow_RunTime.cpp b/src/meshlab/mainwindow_RunTime.cpp index b88326a16..ce40577fc 100644 --- a/src/meshlab/mainwindow_RunTime.cpp +++ b/src/meshlab/mainwindow_RunTime.cpp @@ -2545,9 +2545,10 @@ bool MainWindow::importRaster(const QString& fileImg) meshDoc()->setBusy(false); showLayerDlg(true); - /// Intrinsics extraction from EXIF + /// Intrinsics extraction from EXIF /// If no CCD Width value is provided, the intrinsics are extracted using the Equivalent 35mm focal /// If no or invalid EXIF info is found, the Intrinsics are initialized as a "plausible" 35mm sensor, with 50mm focal + ::ResetJpgfile(); FILE * pFile = fopen(qPrintable(fileName), "rb"); @@ -2585,7 +2586,13 @@ bool MainWindow::importRaster(const QString& fileImg) rm->shot.Intrinsics.FocalMm = ImageInfo.FocalLength; } - // End of EXIF reading + // End of EXIF reading + + //// Since no extrinsic are available, the current trackball is reset (except for the FOV) and assigned to the raster + GLA()->resetTrackBall(); + GLA()->fov = rm->shot.GetFovFromFocal(); + rm->shot = GLA()->shotFromTrackball().first; + // if(mdiarea->isVisible()) GLA()->mvc->showMaximized(); updateMenus();