|
|
|
@ -29,17 +29,21 @@ class QuaternionTest: public Corrade::TestSuite::Tester { |
|
|
|
void construct(); |
|
|
|
void construct(); |
|
|
|
void constructDefault(); |
|
|
|
void constructDefault(); |
|
|
|
void constructFromVector(); |
|
|
|
void constructFromVector(); |
|
|
|
|
|
|
|
|
|
|
|
void addSubtract(); |
|
|
|
void addSubtract(); |
|
|
|
void negated(); |
|
|
|
void negated(); |
|
|
|
void multiplyDivideScalar(); |
|
|
|
void multiplyDivideScalar(); |
|
|
|
void multiply(); |
|
|
|
void multiply(); |
|
|
|
|
|
|
|
|
|
|
|
void dot(); |
|
|
|
void dot(); |
|
|
|
void dotSelf(); |
|
|
|
void dotSelf(); |
|
|
|
void length(); |
|
|
|
void length(); |
|
|
|
void normalized(); |
|
|
|
void normalized(); |
|
|
|
|
|
|
|
|
|
|
|
void conjugated(); |
|
|
|
void conjugated(); |
|
|
|
void inverted(); |
|
|
|
void inverted(); |
|
|
|
void invertedNormalized(); |
|
|
|
void invertedNormalized(); |
|
|
|
|
|
|
|
|
|
|
|
void rotation(); |
|
|
|
void rotation(); |
|
|
|
void angle(); |
|
|
|
void angle(); |
|
|
|
void matrix(); |
|
|
|
void matrix(); |
|
|
|
@ -58,17 +62,21 @@ QuaternionTest::QuaternionTest() { |
|
|
|
addTests(&QuaternionTest::construct, |
|
|
|
addTests(&QuaternionTest::construct, |
|
|
|
&QuaternionTest::constructDefault, |
|
|
|
&QuaternionTest::constructDefault, |
|
|
|
&QuaternionTest::constructFromVector, |
|
|
|
&QuaternionTest::constructFromVector, |
|
|
|
|
|
|
|
|
|
|
|
&QuaternionTest::addSubtract, |
|
|
|
&QuaternionTest::addSubtract, |
|
|
|
&QuaternionTest::negated, |
|
|
|
&QuaternionTest::negated, |
|
|
|
&QuaternionTest::multiplyDivideScalar, |
|
|
|
&QuaternionTest::multiplyDivideScalar, |
|
|
|
&QuaternionTest::multiply, |
|
|
|
&QuaternionTest::multiply, |
|
|
|
|
|
|
|
|
|
|
|
&QuaternionTest::dot, |
|
|
|
&QuaternionTest::dot, |
|
|
|
&QuaternionTest::dotSelf, |
|
|
|
&QuaternionTest::dotSelf, |
|
|
|
&QuaternionTest::length, |
|
|
|
&QuaternionTest::length, |
|
|
|
&QuaternionTest::normalized, |
|
|
|
&QuaternionTest::normalized, |
|
|
|
|
|
|
|
|
|
|
|
&QuaternionTest::conjugated, |
|
|
|
&QuaternionTest::conjugated, |
|
|
|
&QuaternionTest::inverted, |
|
|
|
&QuaternionTest::inverted, |
|
|
|
&QuaternionTest::invertedNormalized, |
|
|
|
&QuaternionTest::invertedNormalized, |
|
|
|
|
|
|
|
|
|
|
|
&QuaternionTest::rotation, |
|
|
|
&QuaternionTest::rotation, |
|
|
|
&QuaternionTest::angle, |
|
|
|
&QuaternionTest::angle, |
|
|
|
&QuaternionTest::matrix, |
|
|
|
&QuaternionTest::matrix, |
|
|
|
@ -76,6 +84,7 @@ QuaternionTest::QuaternionTest() { |
|
|
|
&QuaternionTest::slerp, |
|
|
|
&QuaternionTest::slerp, |
|
|
|
&QuaternionTest::rotateVector, |
|
|
|
&QuaternionTest::rotateVector, |
|
|
|
&QuaternionTest::rotateVectorNormalized, |
|
|
|
&QuaternionTest::rotateVectorNormalized, |
|
|
|
|
|
|
|
|
|
|
|
&QuaternionTest::debug); |
|
|
|
&QuaternionTest::debug); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@ -86,7 +95,7 @@ void QuaternionTest::construct() { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
void QuaternionTest::constructDefault() { |
|
|
|
void QuaternionTest::constructDefault() { |
|
|
|
CORRADE_COMPARE(Quaternion(), Quaternion({0.0f, 0.0f, 0.0f}, {1.0f})); |
|
|
|
CORRADE_COMPARE(Quaternion(), Quaternion({0.0f, 0.0f, 0.0f}, 1.0f)); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
void QuaternionTest::constructFromVector() { |
|
|
|
void QuaternionTest::constructFromVector() { |
|
|
|
|