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

osg qt fbx

时间:2019-07-13 13:49:32      阅读:139      评论:0      收藏:0      [点我收藏+]

标签:tca   phi   contex   gdb   track   wsize   file   read   new   

 

void TeslaManage::loadModelFile(QString &filename)
{
    file_node = osgDB::readNodeFile(std::string((const char *)filename.toLocal8Bit()));
    root->addChild(file_node);
    root->addChild(createLight());
    
    viewer->setSceneData(root);
    viewer->setThreadingModel(osgViewer::Viewer::SingleThreaded);
    //_viewer->setCameraManipulator(new osgGA::TrackballManipulator);
    viewer->addEventHandler(new osgViewer::WindowSizeHandler());

    //添加操作器
    viewer->setCameraManipulator(new osgGA::TrackballManipulator());

    GraphicsWindowQt* gcQT = dynamic_cast<GraphicsWindowQt*>(graphicsContext);
    if (gcQT) {
        pWgt = gcQT->getGLWidget();
        //this->tesla_manage_ui.listWidget.addItem(pWgt);

        //this->tesla_manage_ui.listWidget->addItem(pWgt);
        //this->tesla_manage_ui.openGLWidget = gcQT->getGLWidget();
        //this->tesla_manage_ui.widget = gcQT->getGLWidget();
        //ui.horizontalLayout->addWidget(pWgt);
        //this->tesla_manage_ui.verticalLayout->addWidget(pWgt);
        this->tesla_manage_ui.horizontalLayout_3->addWidget(pWgt);
    }

    connect(_timer, SIGNAL(timeout()), this, SLOT(slotTimeUpdate()));
    _timer->start(5);
}

技术图片

 

osg qt fbx

标签:tca   phi   contex   gdb   track   wsize   file   read   new   

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

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