To display the scene graph, sample program ImportScene displays the root node, then visits and displays each of the children. More precisely, it recursively visits and displays all the children, grandchildren, etc. of each of the root node’s children:
// Non-recursive DisplayContent() is called once
void DisplayContent(KFbxScene* pScene)
{
int i;
KFbxNode* lNode = pScene->GetRootNode();
if(lNode)
{
for(i = 0; i < lNode->GetChildCount(); i++)
{
// Call recursive DisplayContent() once for each child of the root node
DisplayContent(lNode->GetChild(i));
}
}
}
// Recursive DisplayContent() is called for each node below the root node
void DisplayContent(KFbxNode* pNode)
{
...
for(i = 0; i < pNode->GetChildCount(); i++)
{
DisplayContent(pNode->GetChild(i));
}
}