ソースを参照

Fix Issue3760

- Convert left-handed coordinate system to right-handed coordinate system
- Rescale model by 0.01
- closes https://github.com/assimp/assimp/issues/3760
Kim Kulling 4 年 前
コミット
f87550fdbc
1 ファイル変更7 行追加1 行削除
  1. 7 1
      code/AssetLib/C4D/C4DImporter.cpp

+ 7 - 1
code/AssetLib/C4D/C4DImporter.cpp

@@ -146,8 +146,14 @@ void C4DImporter::InternReadFile( const std::string& pFile, aiScene* pScene, IOS
         ThrowException("failed to read document " + pFile);
     }
 
+    // Generate the root-node
     pScene->mRootNode = new aiNode("<C4DRoot>");
-
+    
+    // convert left-handed to right-handed
+    pScene->mRootNode->mTransformation.a1 = 0.01f;
+    pScene->mRootNode->mTransformation.b2 = 0.01f;
+    pScene->mRootNode->mTransformation.c3 = -0.01f; 
+    
     // first convert all materials
     ReadMaterials(doc->GetFirstMaterial());