From 942705dd10dbbcd22a533a21f7cb71310d517a9d Mon Sep 17 00:00:00 2001 From: ponchio Date: Fri, 22 Oct 2004 14:35:42 +0000 Subject: [PATCH] m.element(x, y) -> m[x][y] --- vcg/math/quaternion.h | 38 ++++++++++++++++++++++---------------- 1 file changed, 22 insertions(+), 16 deletions(-) diff --git a/vcg/math/quaternion.h b/vcg/math/quaternion.h index 678ab6e2..8dbc60b6 100644 --- a/vcg/math/quaternion.h +++ b/vcg/math/quaternion.h @@ -24,11 +24,17 @@ History $Log: not supported by cvs2svn $ +Revision 1.8 2004/10/07 13:54:03 ganovelli +added SetIdentity + Revision 1.7 2004/04/07 10:48:37 cignoni updated access to matrix44 elements through V() instead simple [] Revision 1.6 2004/03/25 14:57:49 ponchio Microerror. ($LOG$ -> $Log: not supported by cvs2svn $ +Microerror. ($LOG$ -> Revision 1.8 2004/10/07 13:54:03 ganovelli +Microerror. ($LOG$ -> added SetIdentity +Microerror. ($LOG$ -> Microerror. ($LOG$ -> Revision 1.7 2004/04/07 10:48:37 cignoni Microerror. ($LOG$ -> updated access to matrix44 elements through V() instead simple [] Microerror. ($LOG$ -> @@ -185,25 +191,25 @@ template void Quaternion::ToMatrix(Matrix44 &m) const { S q22 = V(3)*V(3); S q23 = V(3)*V(0); - m.element(0, 0) = (S)(1.0-(q11 + q22)*2.0); - m.element(1, 0) = (S)((q01 - q23)*2.0); - m.element(2, 0) = (S)((q02 + q13)*2.0); - m.element(3, 0) = (S)0.0; + m[0][0] = (S)(1.0-(q11 + q22)*2.0); + m[1][0] = (S)((q01 - q23)*2.0); + m[2][0] = (S)((q02 + q13)*2.0); + m[3][0] = (S)0.0; - m.element(0, 1) = (S)((q01 + q23)*2.0); - m.element(1, 1) = (S)(1.0-(q22 + q00)*2.0); - m.element(2, 1) = (S)((q12 - q03)*2.0); - m.element(3, 1) = (S)0.0; + m[0][1] = (S)((q01 + q23)*2.0); + m[1][1] = (S)(1.0-(q22 + q00)*2.0); + m[2][1] = (S)((q12 - q03)*2.0); + m[3][1] = (S)0.0; - m.element(0, 2) = (S)((q02 - q13)*2.0); - m.element(1, 2) = (S)((q12 + q03)*2.0); - m.element(2, 2) = (S)(1.0-(q11 + q00)*2.0); - m.element(3, 2) = (S)0.0; + m[0][2] = (S)((q02 - q13)*2.0); + m[1][2] = (S)((q12 + q03)*2.0); + m[2][2] = (S)(1.0-(q11 + q00)*2.0); + m[3][2] = (S)0.0; - m.element(0, 3) = (S)0.0; - m.element(1, 3) = (S)0.0; - m.element(2, 3) = (S)0.0; - m.element(3, 3) = (S)1.0; + m[0][3] = (S)0.0; + m[1][3] = (S)0.0; + m[2][3] = (S)0.0; + m[3][3] = (S)1.0; }