| 103 | } |
| 104 | |
| 105 | void D3MFImporter::InternReadFile(const std::string &filename, aiScene *pScene, IOSystem *pIOHandler) { |
| 106 | D3MFOpcPackage opcPackage(pIOHandler, filename); |
| 107 | |
| 108 | XmlParser xmlParser; |
| 109 | if (xmlParser.parse(opcPackage.RootStream())) { |
| 110 | XmlSerializer xmlSerializer(xmlParser); |
| 111 | xmlSerializer.ImportXml(pScene); |
| 112 | |
| 113 | const std::vector<aiTexture*> &tex = opcPackage.GetEmbeddedTextures(); |
| 114 | if (!tex.empty()) { |
| 115 | pScene->mNumTextures = static_cast<unsigned int>(tex.size()); |
| 116 | pScene->mTextures = new aiTexture *[pScene->mNumTextures]; |
| 117 | for (unsigned int i = 0; i < pScene->mNumTextures; ++i) { |
| 118 | pScene->mTextures[i] = tex[i]; |
| 119 | } |
| 120 | } |
| 121 | } |
| 122 | } |
| 123 | |
| 124 | } // Namespace Assimp |
| 125 |
nothing calls this directly
no test coverage detected