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

Method WriteNode

code/AssetLib/X/XFileExporter.cpp:303–329  ·  view source on GitHub ↗

------------------------------------------------------------------------------------------------ Recursively writes the given node

Source from the content-addressed store, hash-verified

301// ------------------------------------------------------------------------------------------------
302// Recursively writes the given node
303void XFileExporter::WriteNode( aiNode* pNode)
304{
305 if (pNode->mName.length==0)
306 {
307 std::stringstream ss;
308 ss << "Node_" << pNode;
309 pNode->mName.Set(ss.str());
310 }
311 mOutput << startstr << "Frame " << toXFileString(pNode->mName) << " {" << endstr;
312
313 PushTag();
314
315 aiMatrix4x4 m = pNode->mTransformation;
316
317 WriteFrameTransform(m);
318
319 for (size_t i = 0; i < pNode->mNumMeshes; ++i)
320 WriteMesh(mScene->mMeshes[pNode->mMeshes[i]]);
321
322 // recursive call the Nodes
323 for (size_t i = 0; i < pNode->mNumChildren; ++i)
324 WriteNode(pNode->mChildren[i]);
325
326 PopTag();
327
328 mOutput << startstr << "}" << endstr << endstr;
329}
330
331void XFileExporter::WriteMesh(aiMesh* mesh)
332{

Callers

nothing calls this directly

Calls 3

WriteNodeFunction · 0.85
strMethod · 0.80
SetMethod · 0.45

Tested by

no test coverage detected