소스 검색

Bugfix: Collada loader now produces correct UP direction again.

git-svn-id: https://assimp.svn.sourceforge.net/svnroot/assimp/trunk@362 67173fc5-114c-0410-ac8e-9d2fd5bffc1f
ulfjorensen 16 년 전
부모
커밋
f57ef267bd
1개의 변경된 파일5개의 추가작업 그리고 5개의 파일을 삭제
  1. 5 5
      code/ColladaLoader.cpp

+ 5 - 5
code/ColladaLoader.cpp

@@ -132,18 +132,18 @@ void ColladaLoader::InternReadFile( const std::string& pFile, aiScene* pScene, I
 	// ... then fill the materials with the now adjusted settings
 	FillMaterials(parser, pScene);
 
-	// Convert to Z_UP, if different orientation
+	// Convert to Y_UP, if different orientation
 	if( parser.mUpDirection == ColladaParser::UP_X)
 		pScene->mRootNode->mTransformation *= aiMatrix4x4( 
 			 0, -1,  0,  0, 
-			 0,  0, -1,  0,
 			 1,  0,  0,  0,
+			 0,  0,  1,  0,
 			 0,  0,  0,  1);
-	else if( parser.mUpDirection == ColladaParser::UP_Y)
+	else if( parser.mUpDirection == ColladaParser::UP_Z)
 		pScene->mRootNode->mTransformation *= aiMatrix4x4( 
 			 1,  0,  0,  0, 
-			 0,  0, -1,  0,
-			 0,  1,  0,  0,
+			 0,  0,  1,  0,
+			 0, -1,  0,  0,
 			 0,  0,  0,  1);
 
 	// store all meshes