From 88107edef1c3df6648eb771d46b59f900e691a74 Mon Sep 17 00:00:00 2001 From: cnr-isti-vclab Date: Thu, 17 Feb 2011 09:58:16 +0000 Subject: [PATCH] Added Shot::GetViewDir() method --- vcg/math/shot.h | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) 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