From cfe0511f35a994967ac19501484b47b6d05b0fdc Mon Sep 17 00:00:00 2001 From: alemuntoni Date: Tue, 13 Jul 2021 12:36:04 +0200 Subject: [PATCH] const getFovFromFocal in shot.h --- vcg/math/shot.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vcg/math/shot.h b/vcg/math/shot.h index 0eeda9cf..6ab6def0 100644 --- a/vcg/math/shot.h +++ b/vcg/math/shot.h @@ -127,7 +127,7 @@ public: void SetViewPoint(const vcg::Point3 & viewpoint); /// GET fov from focal - float GetFovFromFocal(); + float GetFovFromFocal() const; /// look at (point+up) void LookAt(const vcg::Point3 & point,const vcg::Point3 & up); @@ -256,7 +256,7 @@ void Shot::SetViewPoint(const vcg::Point3 & viewpoint) /// GET fov from focal template -float Shot::GetFovFromFocal() +float Shot::GetFovFromFocal() const { double viewportYMm= Intrinsics.PixelSizeMm[1]* Intrinsics.ViewportPx[1]; return 2*(vcg::math::ToDeg(atanf(viewportYMm/(2*Intrinsics.FocalMm))));