diff --git a/vcg/math/matrix44.h b/vcg/math/matrix44.h index 8871e4db..8dc93f77 100644 --- a/vcg/math/matrix44.h +++ b/vcg/math/matrix44.h @@ -24,8 +24,14 @@ History $Log: not supported by cvs2svn $ +Revision 1.13 2004/04/07 10:45:54 cignoni +Added: [i][j] access, V() for the raw float values, constructor from T[16] + Revision 1.12 2004/03/25 14:57:49 ponchio Microerror. ($LOG$ -> $Log: not supported by cvs2svn $ +Microerror. ($LOG$ -> Revision 1.13 2004/04/07 10:45:54 cignoni +Microerror. ($LOG$ -> Added: [i][j] access, V() for the raw float values, constructor from T[16] +Microerror. ($LOG$ -> ****************************************************************************/ @@ -217,13 +223,13 @@ template const T *Matrix44::V() const { return _a;} template Matrix44 Matrix44::operator+(const Matrix44 &m) const { Matrix44 ret; for(int i = 0; i < 16; i++) - ret[i] = operator[](i) + m[i]; + ret[i] = V()[i] + m.V()[i]; } template Matrix44 Matrix44::operator-(const Matrix44 &m) const { Matrix44 ret; for(int i = 0; i < 16; i++) - ret[i] = operator[](i) - m[i]; + ret[i] = V()[i] - m.V()[i]; } template Matrix44 Matrix44::operator*(const Matrix44 &m) const { @@ -266,24 +272,24 @@ template bool Matrix44::operator!=(const Matrix44 &m) const { template Matrix44 Matrix44::operator-() const { Matrix44 res; for(int i = 0; i < 16; i++) - res[i] = -operator[](i); + res.V()[i] = -V()[i]; return res; } template Matrix44 Matrix44::operator*(const T k) const { Matrix44 res; for(int i = 0; i < 16; i++) - res[i] = operator[](i) * k; + res.V()[i] =V()[i] * k; return res; } template void Matrix44::operator+=(const Matrix44 &m) { for(int i = 0; i < 16; i++) - operator[](i) += m[i]; + V()[i] += m.V()[i]; } template void Matrix44::operator-=(const Matrix44 &m) { for(int i = 0; i < 16; i++) - operator[](i) -= m[i]; + V()[i] -= m.V()[i]; } template void Matrix44::operator*=( const Matrix44 & m ) { *this = *this *m;