osg qt fbx
Posted herd
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了osg qt fbx相关的知识,希望对你有一定的参考价值。
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的主要内容,如果未能解决你的问题,请参考以下文章
osg fbx模型删除模型中的某几个节点,实现编辑模型的功能