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))));