From a20902efd83b1900bed0f18ccde3aaa245128bbb Mon Sep 17 00:00:00 2001 From: cignoni Date: Sun, 13 Jul 2008 05:37:00 +0000 Subject: [PATCH] VERY IMPORTANT CHANGE - Could break the compilation of a lot of code around. SetRotate of matrix44 has gone. Now only the explicit version SetRotateDeg and SetRotateRad are available. It was too error prone having something with the OpenGL syntax but using radiant instead the OpenGL degrees --- vcg/math/matrix44.h | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/vcg/math/matrix44.h b/vcg/math/matrix44.h index 344fc937..a7ccc70f 100644 --- a/vcg/math/matrix44.h +++ b/vcg/math/matrix44.h @@ -259,7 +259,8 @@ public: Matrix44 &SetShearYZ(const T sx); ///use radiants for angle. - Matrix44 &SetRotate(T AngleRad, const Point3 & axis); + Matrix44 &SetRotateDeg(T AngleDeg, const Point3 & axis); + Matrix44 &SetRotateRad(T AngleRad, const Point3 & axis); T Determinant() const; @@ -543,7 +544,12 @@ template Matrix44 &Matrix44::SetTranslate(const T tx, const T ty ElementAt(2, 3) = tz; return *this; } -template Matrix44 &Matrix44::SetRotate(T AngleRad, const Point3 & axis) { + +template Matrix44 &Matrix44::SetRotateDeg(T AngleDeg, const Point3 & axis) { + return SetRotateRad(math::ToRad(AngleDeg),axis); +} + +template Matrix44 &Matrix44::SetRotateRad(T AngleRad, const Point3 & axis) { //angle = angle*(T)3.14159265358979323846/180; e' in radianti! T c = math::Cos(AngleRad); T s = math::Sin(AngleRad);