diff --git a/vcg/math/camera.h b/vcg/math/camera.h index 0e767b03..edca0c19 100644 --- a/vcg/math/camera.h +++ b/vcg/math/camera.h @@ -334,14 +334,14 @@ vcg::Point2 Camera::LocalTo_neg1_1(const vcg::Point2 & p) const } /// transforms an undistorted 2D camera plane point in a distorted 2D camera plane point -template -vcg::Point2 Camera::UndistortedToDistorted(vcg::Point2 u) const +template +vcg::Point2 Camera::UndistortedToDistorted(vcg::Point2 u) const { - vcg::Point2 dis; - vcg::Point2 dc=ViewportPxTo_neg1_1(DistorCenterPx); - const S SQRT3 = S(1.732050807568877293527446341505872366943); - const S CBRT = S(0.33333333333333333333333); - S Ru,Rd,lambda,c,d,Q,R,D,S,T,sinT,cosT; + vcg::Point2 dis; + vcg::Point2 dc=ViewportPxTo_neg1_1(DistorCenterPx); + const Scalar SQRT3 = Scalar(1.732050807568877293527446341505872366943); + const Scalar CBRT = Scalar(0.33333333333333333333333); + Scalar Ru,Rd,lambda,c,d,Q,R,D,S,T,sinT,cosT; if(((u[0]-dc[0])==0 && (u[1]-dc[1])==0) || k[0] == 0) {