Add isIdentity-Test

pull/5445/head
Kim Kulling 2024-02-06 20:45:06 +01:00 committed by GitHub
parent d968562e96
commit 8726e20493
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 7 additions and 4 deletions

View File

@ -3,9 +3,7 @@
Open Asset Import Library (assimp)
---------------------------------------------------------------------------
Copyright (c) 2006-2022, assimp team
Copyright (c) 2006-2024, assimp team
All rights reserved.
@ -47,7 +45,7 @@ using namespace Assimp;
class AssimpAPITest_aiMatrix4x4 : public AssimpMathTest {
protected:
virtual void SetUp() {
void SetUp() override {
result_c = result_cpp = aiMatrix4x4();
}
@ -64,6 +62,11 @@ protected:
aiMatrix4x4 result_c, result_cpp;
};
TEST_F(AssimpAPITest_aiMatrix4x4, isIdendityTest) {
aiMatrix4x4 m = aiMatrix4x4(1.001f, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);
EXPECT_TRUE(m.IsIdentity(1e-6f));
}
TEST_F(AssimpAPITest_aiMatrix4x4, aiIdentityMatrix4Test) {
// Force a non-identity matrix.
result_c = aiMatrix4x4(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);