码迷,mamicode.com
首页 > 其他好文 > 详细

osg fbx 模型树结构

时间:2019-07-14 11:31:36      阅读:86      评论:0      收藏:0      [点我收藏+]

标签:set   app   信息   结构   dex   head   rom   name   ade   

 

void Test::printOsgGroup(osg::ref_ptr<osg::Group> &groupParam)
{
    qDebug() <<groupParam->getNumChildren();
    //std::cout << groupParam->getNumChildren() << std::endl;
    for (int k = 0; k<groupParam->getNumChildren(); k++)
    {
        osg::ref_ptr<osg::Group> group_index = groupParam->getChild(k)->asGroup();
        if (group_index->getNumChildren()>1)
        {
            printOsgGroup(group_index);
        }
        //转换编
        //std::string name = w2m1(m2w1(groupParam->getChild(k)->getName(), CP_UTF8));
        //std::cout << k << "=" << name << std::endl;
        qDebug() <<QString::fromStdString(groupParam->getChild(k)->getName());
        QString item1 = QString::fromStdString(groupParam->getChild(k)->getName());
        QStandardItem* itemProject = new QStandardItem(item1);
        qStandardItemModel->appendRow(itemProject);
        //qStandardItemModel->setItem(qStandardItemModel->indexFromItem(itemProject).row(), 1, new QStandardItem(QStringLiteral("项目信息说明")));
        //sg->getChild(k)->setNodeMask(1);
        //std::cout << k << "  " << sg->getChild(k)->getName() << "  " << sg->getNodeMask() << std::endl;
    }
}

 

QStandardItemModel* Test::showTreeView()
{
    qStandardItemModel = new QStandardItemModel(this->tesla_manage_ui.treeView);
    qStandardItemModel->setHorizontalHeaderLabels(QStringList() << QStringLiteral("名称") << QStringLiteral("信息"));

    return qStandardItemModel;
}

技术图片

技术图片

 

osg fbx 模型树结构

标签:set   app   信息   结构   dex   head   rom   name   ade   

原文地址:https://www.cnblogs.com/herd/p/11183283.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!