# fix global orientation for IFC models

git-svn-id: https://assimp.svn.sourceforge.net/svnroot/assimp/trunk@983 67173fc5-114c-0410-ac8e-9d2fd5bffc1f
pull/1/head
aramis_acg 2011-05-07 13:14:56 +00:00
parent 36d3a60c40
commit 4116ec7a6a
1 changed files with 5 additions and 3 deletions

View File

@ -287,10 +287,12 @@ void IFCImporter::InternReadFile( const std::string& pFile,
conv.materials.clear();
}
// apply world coordinate system (which includes the scaling to convert to metres)
aiMatrix4x4 scale;
// apply world coordinate system (which includes the scaling to convert to metres and a -90 degrees rotation around x)
aiMatrix4x4 scale, rot;
aiMatrix4x4::Scaling(aiVector3D(conv.len_scale,conv.len_scale,conv.len_scale),scale);
pScene->mRootNode->mTransformation = scale * conv.wcs * pScene->mRootNode->mTransformation;
aiMatrix4x4::RotationX(-AI_MATH_HALF_PI_F,rot);
pScene->mRootNode->mTransformation = rot * scale * conv.wcs * pScene->mRootNode->mTransformation;
// this must be last because objects are evaluated lazily as we process them
if ( !DefaultLogger::isNullLogger() ){