diff --git a/vcg/math/shot.h b/vcg/math/shot.h index 332225f9..3187fd2a 100644 --- a/vcg/math/shot.h +++ b/vcg/math/shot.h @@ -164,9 +164,11 @@ public: /// GET the i-th axis of the coordinate system of the camera vcg::Point3 Axis(const int & i)const; - /// GET the viewpoint - const vcg::Point3 GetViewPoint()const; - /// SET the viewpoint + /// GET the viewdir + const vcg::Point3 GetViewDir()const; + /// GET the viewpoint + const vcg::Point3 GetViewPoint()const; + /// SET the viewpoint void SetViewPoint(const vcg::Point3 & viewpoint); /// GET fov from focal @@ -252,6 +254,14 @@ public: +template +const vcg::Point3 Shot::GetViewDir() const +{ + return Extrinsics.Rot().GetRow3(2); +} + + + //--- /// GET the viewpoint template