MCPcopy Create free account
hub / github.com/assimp/assimp / InternReadFile

Method InternReadFile

code/AssetLib/3MF/D3MFImporter.cpp:105–122  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

103}
104
105void 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

Callers

nothing calls this directly

Calls 5

RootStreamMethod · 0.80
ImportXmlMethod · 0.80
parseMethod · 0.45
emptyMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected