ScaleProcess overhauled to improve compatibility with animations and unit conversion.

./assimp Added arguments --gs to assimp command line option to enable global scaling.

No scaling for mScale of 1.0.

Co-Authored-By: K. S. Ernest (iFire) Lee <ernest.lee@chibifire.com>
This commit is contained in:
Gordon MacPherson
2019-08-12 19:17:07 +01:00
parent 23e1c0cbc9
commit fbb34b1de1
5 changed files with 121 additions and 27 deletions

View File

@@ -69,18 +69,5 @@ TEST_F( utScaleProcess, accessScaleTest ) {
EXPECT_FLOAT_EQ( 2.0f, process.getScale() );
}
TEST_F( utScaleProcess, rescaleModelTest ) {
float opacity;
aiScene *testScene = TestModelFacttory::createDefaultTestModel( opacity );
ai_real v1 = testScene->mRootNode->mTransformation.a1;
ScaleProcess process;
process.setScale( 10.0f );
process.Execute( testScene );
ai_real v2 = testScene->mRootNode->mTransformation.a1;
const ai_real scale = v2 / v1;
EXPECT_FLOAT_EQ( scale, 10.0f );
TestModelFacttory::releaseDefaultTestModel( &testScene );
}
} // Namespace UnitTest
} // Namespace Assimp