Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void AssimpLoader::WriteSubMeshesToJson(const aiNode* pNode, const aiScene * mScene, std::ofstream &myfile)
- {
- // if we have meshes
- if (pNode != nullptr)
- {
- // iterate over all meshes for this node
- for (unsigned int idx = 0; idx < pNode->mNumMeshes; ++idx)
- {
- if (!mQuietMode)
- {
- aiMesh *pAIMesh = mScene->mMeshes[pNode->mMeshes[idx]];
- std::string output = pAIMesh->mName.data;
- myfile << output;
- // write to disk
- Ogre::LogManager::getSingleton().logMessage("SubMesh " + std::to_string(idx) + " for mesh '" + Ogre::String(pNode->mName.data) + "'");
- }
- }
- }
- // Traverse all child nodes of the current node instance
- for (unsigned int childIdx = 0; childIdx < pNode->mNumChildren; childIdx++)
- {
- const aiNode* pChildNode = pNode->mChildren[childIdx];
- WriteSubMeshesToJson(pChildNode, mScene, myfile);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement