m.element(x, y) -> m[x][y]

This commit is contained in:
Federico Ponchio 2004-10-22 14:35:42 +00:00
parent e99cb94a03
commit 942705dd10
1 changed files with 22 additions and 16 deletions

View File

@ -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 <class S> void Quaternion<S>::ToMatrix(Matrix44<S> &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;
}