const getFovFromFocal in shot.h
This commit is contained in:
parent
fdabe1aead
commit
cfe0511f35
|
@ -127,7 +127,7 @@ public:
|
|||
void SetViewPoint(const vcg::Point3<S> & viewpoint);
|
||||
|
||||
/// GET fov from focal
|
||||
float GetFovFromFocal();
|
||||
float GetFovFromFocal() const;
|
||||
|
||||
/// look at (point+up)
|
||||
void LookAt(const vcg::Point3<S> & point,const vcg::Point3<S> & up);
|
||||
|
@ -256,7 +256,7 @@ void Shot<S,RotationType>::SetViewPoint(const vcg::Point3<S> & viewpoint)
|
|||
|
||||
/// GET fov from focal
|
||||
template <class S, class RotationType>
|
||||
float Shot<S,RotationType>::GetFovFromFocal()
|
||||
float Shot<S,RotationType>::GetFovFromFocal() const
|
||||
{
|
||||
double viewportYMm= Intrinsics.PixelSizeMm[1]* Intrinsics.ViewportPx[1];
|
||||
return 2*(vcg::math::ToDeg(atanf(viewportYMm/(2*Intrinsics.FocalMm))));
|
||||
|
|
Loading…
Reference in New Issue