void SceneWalker::walkEntity(Qt3DCore::QEntity *e, int depth) { Qt3DCore::QNodeVector nodes = e->childNodes(); for (int i = 0; i < nodes.count(); ++i) { Qt3DCore::QNode *node = nodes[i]; Qt3DCore::QEntity *entity = qobject_cast<Qt3DCore::QEntity *>(node); if (entity) { QString indent; indent.fill(' ', depth * 2); qDebug().noquote() << indent << "Entity:" << entity << "Components:" << entity->components(); walkEntity(entity, depth + 1); } } }
void SceneWalker::walkEntity(Qt3DCore::QEntity *e, int depth) { Qt3DCore::QNodeVector nodes = e->childNodes(); for (int i = 0; i < nodes.count(); ++i) { Qt3DCore::QNode *node = nodes[i]; Qt3DCore::QEntity *entity = qobject_cast<Qt3DCore::QEntity *>(node); if (entity) { QString indent; indent.fill(' ', depth * 2); walkEntity(entity, depth + 1); } } }