From ca807a0787b66d916c17bf89ab0df04c31fbffa2 Mon Sep 17 00:00:00 2001 From: ponchio Date: Thu, 19 Feb 2004 15:28:01 +0000 Subject: [PATCH] *** empty log message *** --- vcg/math/base.h | 16 ++++++++++++++++ vcg/math/matrix44.h | 11 ++++------- 2 files changed, 20 insertions(+), 7 deletions(-) diff --git a/vcg/math/base.h b/vcg/math/base.h index 8e477677..b92a6a42 100644 --- a/vcg/math/base.h +++ b/vcg/math/base.h @@ -24,6 +24,9 @@ History $Log: not supported by cvs2svn $ +Revision 1.2 2004/02/13 02:18:57 cignoni +Edited Comments and GPL license + ****************************************************************************/ @@ -45,6 +48,9 @@ namespace vcg { public: static T inline Sqrt(const T v); static T inline Abs(const T v); + static T inline Cos(const T v); + static T inline Sin(const T v); + static const T MaxVal; static T ToDeg(const T &a); @@ -62,10 +68,20 @@ namespace vcg { { return sqrtf(v); } float Math::Abs(const float v) { return fabsf(v); } + float Math::Cos(const float v) + { return cosf(v); } + float Math::Sin(const float v) + { return sinf(v); } + double Math::Sqrt(const double v) { return sqrt(v); } double Math::Abs(const double v) { return fabs(v); } + double Math::Cos(const double v) + { return cos(v); } + double Math::Sin(const double v) + { return sin(v); } + const unsigned char Math::MaxVal = 255; diff --git a/vcg/math/matrix44.h b/vcg/math/matrix44.h index 96d6c261..bef6bdb7 100644 --- a/vcg/math/matrix44.h +++ b/vcg/math/matrix44.h @@ -30,12 +30,9 @@ $LOG$ #ifndef __VCGLIB_MATRIX44 #define __VCGLIB_MATRIX44 - - -#include #include -#include "../space/Point3.h" -#include "../space/Point4.h" +#include +#include namespace vcg { @@ -311,8 +308,8 @@ template void Matrix44::SetTranslate(const T sx, const T sy, const } template void Matrix44::SetRotate(T angle, const Point3 & axis) { //angle = angle*(T)3.14159265358979323846/180; e' in radianti! - T c = Cos(angle); - T s = Sin(angle); + T c = Math::Cos(angle); + T s = Math::Sin(angle); T q = 1-c; Point3 t = axis; t.Normalize();