static void printSceneGraphBoot(int fd) { write(fd,"\n",1); auto scene = Director::getInstance()->getRunningScene(); int total = printSceneGraph(fd, scene, 0); mydprintf(fd, "Total Nodes: %d\n", total); }
static int printSceneGraph(int fd, Node* node, int level) { int total = 1; for(int i=0; i<level; ++i) write(fd, "-", 1); mydprintf(fd, " %s\n", node->getDescription().c_str()); for(const auto& child: node->getChildren()) total += printSceneGraph(fd, child, level+1); return total; }
void SceneGraph::printGraph() { printSceneGraph((AiGinEObject*)this->getRootKnot(), ""); }