//******************************************** // Det3 //******************************************** double CMatrix44::Det3(int r1, int r2, int r3, int c1, int c2, int c3) const { return (m_data[r1][c1] * Det2( r2, r3, c2, c3 ) - m_data[r1][c2] * Det2( r2, r3, c1, c3 ) + m_data[r1][c3] * Det2( r2, r3, c1, c2 )); }
cTRANSFORM3 cTRANSFORM3::Inverse() const // FIXME : construction { REAL w = 1.0/Det3(t11, t12, t13, t21, t22, t23, t31, t32, t33 ); return cTRANSFORM3(Det2( t22, t23, t32, t33)*w, // i 11 -Det2( t12, t13, t32, t33)*w, // i 12 Det2( t12, t13, t22, t23)*w, // i 13 -Det3( t12, t13, t14, t22, t23, t24, t32, t33, t34 )*w, -Det2( t21, t23, t31, t33)*w, // i 21 Det2( t11, t13, t31, t33)*w, // i 22 -Det2( t11, t13, t21, t23)*w, // i 23 Det3( t11, t13, t14, t21, t23, t24, t31, t33, t34 )*w, Det2( t21, t22, t31, t32)*w, // i 31 -Det2( t11, t12, t31, t32)*w, // i 32 Det2( t11, t12, t21, t22)*w, // i 33 -Det3( t11, t12, t14, t21, t22, t24, t31, t32, t34 )*w); //Det3( t11, t12, t13, t21, t22, t23, t31, t32, t33 )); }