initGLWidgetAndViewer
void initGLWidgetAndViewer()
{
osgViewer::ViewerBase::ThreadingModel threadingModel = osgViewer::ViewerBase::SingleThreaded;
IfcSystem* m_system->getRootNode()->setCullingActive( false );
osg::ref_ptr<VCGraphicsWindowQt> m_graphics_window = new GraphicsWindowQt( this );
QtOSGWidget* opengl_widget = m_graphics_window->getOpenGLWidget();
opengl_widget->setMinimumSize( QSize( , ) );
osg::ref_ptr<osgViewer::View> m_main_view = opengl_widget->getView();
m_main_view->setSceneData( m_system->getRootNode() );
osg::ref_ptr<osgViewer::CompositeViewer> m_composite_viewer = opengl_widget->getViewer();
m_composite_viewer->setThreadingModel( threadingModel );
m_composite_viewer->setKeyEventSetsDone( ); // disable the default setting of viewer.done() by pressing Escape.
m_composite_viewer->addView( m_main_view ); // set up the camera
osg::ref_ptr<osg::Camera> camera = m_main_view->getCamera();
camera->setGraphicsContext( m_graphics_window );
camera->setClearColor( osg::Vec4f( 0.92, 0.93, 0.94, 1.0 ) );
camera->setComputeNearFarMode( osg::CullSettings::DO_NOT_COMPUTE_NEAR_FAR ); if( m_main_view )
{
m_main_view->setCameraManipulator( m_camera_manipulator );
m_main_view->setSceneData( m_system->getRootNode() );
}
}

initGLWidgetAndViewer的更多相关文章
随机推荐
- 用 Redis 实现延时任务
原文:https://cloud.tencent.com/developer/article/1358266 1.什么是延时任务 延时任务,顾名思义,就是延迟一段时间后才执行的任务.延时任务的使用还是 ...
- jquery基础知识2
1.js和jquery对象的转换 js==>jquery对象 $(js对象) jquery==>js jq对象[index] jq对象.get(index) <!DOCTYPE ht ...
- C# 中自定义配置
微软在ConfigurationManager类里面为我们提供了AppSetting和ConnectionStrings 两个常用配置, 但是有时候我们需要自定的配置,例如 <image lef ...
- machine learning(13) -- solving the problem of overfitting:regularization
solving the problem of overfitting:regularization 发生的在linear regression上面的overfitting问题 发生在logistic ...
- 阿里云轻量级服务器和NGINX部署Django项目
部署条件: 1.一台阿里云服务器(本人的是CentOS系统的服务器) 2.已经构建好的项目 3.服务器上安装并配置Nginx 首先第一步:在服务器上安装并配置Nginx 进入服务器 $ ssh roo ...
- Codeforces Round #597 (Div. 2) A. Good ol' Numbers Coloring
链接: https://codeforces.com/contest/1245/problem/A 题意: Consider the set of all nonnegative integers: ...
- bootstrap最简单的导航条
<nav class="navbar navbar-default navbar-static-top"> <div class="navbar-hea ...
- 微信小程序 post 请求获取不到参数原因
如果使用post 请求一定要加上 header: { "content-type": "application/x-www-form-urlencoded" } ...
- Linux操作系统常用命令合集——第二篇- 用户和组操作(15个命令)
一.前言:本篇介绍用户和组操作的15个命令,在介绍之前我们先来看看几个示例 1.先进入到etc目录下,找到passwd文件,用vi编辑器查看: # vi /etc/passwd 解释:这里面存放着Li ...
- 数据库学习之六--事务(Transaction)
一.定义 事务是指访问并可能更新数据库中各种数据项的一个程序执行单元(unit). 规则: 1. 用形如begin transaction和end transaction语句来界定 2. 由事务开始和 ...