Commit e3b37395 authored by hybrid's avatar hybrid

Hmm, didn't save the last files before committing. So this is the actual test...

Hmm, didn't save the last files before committing. So this is the actual test cases which runs through.

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@2030 dfc29bdd-3216-0410-991c-e03cc46cb475
parent 6f1532e2
......@@ -824,26 +824,26 @@ namespace core
/* Check orthogonality of matrix. */
template <class T>
inline bool CMatrix4<T>::isOrthogonal() const
{
T dp = M[0] * M[4 ] + M[1] * M[5 ] + M[2 ] * M[6 ] + M[3 ] * M[7 ];
inline bool CMatrix4<T>::isOrthogonal() const
{
T dp=M[0] * M[4 ] + M[1] * M[5 ] + M[2 ] * M[6 ] + M[3 ] * M[7 ];
if (!iszero(dp))
return false;
dp = M[0] * M[8 ] + M[1] * M[9 ] + M[2 ] * M[10] + M[3 ] * M[11];
dp = M[0] * M[8 ] + M[1] * M[9 ] + M[2 ] * M[10] + M[3 ] * M[11];
if (!iszero(dp))
return false;
dp = M[0] * M[12] + M[1] * M[13] + M[2 ] * M[14] + M[3 ] * M[15];
dp = M[0] * M[12] + M[1] * M[13] + M[2 ] * M[14] + M[3 ] * M[15];
if (!iszero(dp))
return false;
dp = M[4] * M[8 ] + M[5] * M[9 ] + M[6 ] * M[10] + M[7 ] * M[11];
dp = M[4] * M[8 ] + M[5] * M[9 ] + M[6 ] * M[10] + M[7 ] * M[11];
if (!iszero(dp))
return false;
dp = M[4] * M[12] + M[5] * M[13] + M[6 ] * M[14] + M[7 ] * M[15];
dp = M[4] * M[12] + M[5] * M[13] + M[6 ] * M[14] + M[7 ] * M[15];
if (!iszero(dp))
return false;
dp = M[8] * M[12] + M[9] * M[13] + M[10] * M[14] + M[11] * M[15];
dp = M[8] * M[12] + M[9] * M[13] + M[10] * M[14] + M[11] * M[15];
return (iszero(dp));
}
}
/*
......
......@@ -23,7 +23,7 @@ bool matrixOps(void)
}
rotationMatrix.setRotationDegrees(vector3df(90, 0, 0));
if (rotationMatrix.isOrthogonal())
if (!rotationMatrix.isOrthogonal())
{
logTestString("irr::core::matrix4::isOrthogonal() failed with rotation.\n");
return false;
......@@ -39,7 +39,7 @@ bool matrixOps(void)
matrix4 scaleMatrix;
scaleMatrix.setScale(vector3df(1, 2, 3));
if (scaleMatrix.isOrthogonal())
if (!scaleMatrix.isOrthogonal())
{
logTestString("irr::core::matrix4::isOrthogonal() failed with scale.\n");
return false;
......
Test suite pass at GMT Sun Jan 04 14:29:01 2009
Test suite pass at GMT Sun Jan 04 15:10:29 2009
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment