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

Function FindNode

code/AssetLib/3DS/3DSLoader.cpp:556–568  ·  view source on GitHub ↗

------------------------------------------------------------------------------------------------ Find a node with a specific name in the import hierarchy

Source from the content-addressed store, hash-verified

554// ------------------------------------------------------------------------------------------------
555// Find a node with a specific name in the import hierarchy
556Node *FindNode(Node *root, const std::string &name) {
557 if (root->mName == name) {
558 return root;
559 }
560
561 for (auto it = root->mChildren.begin(); it != root->mChildren.end(); ++it) {
562 if (auto *nd = FindNode(*it, name); nullptr != nd) {
563 return nd;
564 }
565 }
566
567 return nullptr;
568}
569
570// ------------------------------------------------------------------------------------------------
571// Binary predicate for std::unique()

Callers 5

ParseHierarchyChunkMethod · 0.70
ResolveNodeInstancesMethod · 0.50
CreateMeshMethod · 0.50
CreateAnimationMethod · 0.50
FindNodeMethod · 0.50

Calls 2

beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected