本文整理汇总了C++中MapHandlerGen::get_vbo_set方法的典型用法代码示例。如果您正苦于以下问题:C++ MapHandlerGen::get_vbo_set方法的具体用法?C++ MapHandlerGen::get_vbo_set怎么用?C++ MapHandlerGen::get_vbo_set使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类MapHandlerGen
的用法示例。
在下文中一共展示了MapHandlerGen::get_vbo_set方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: refresh_ui
void SurfaceRender_DockTab::refresh_ui()
{
MapHandlerGen* map = schnapps_->get_selected_map();
View* view = schnapps_->get_selected_view();
if (!map || !view)
return;
const MapParameters& p = plugin_->get_parameters(view, map);
updating_ui_ = true;
combo_positionVBO->clear();
combo_positionVBO->addItem("- select VBO -");
combo_normalVBO->clear();
combo_normalVBO->addItem("- select VBO -");
combo_colorVBO->clear();
combo_colorVBO->addItem("- select VBO -");
uint32 i = 1;
for (const auto& vbo_it : map->get_vbo_set())
{
auto& vbo = vbo_it.second;
if (vbo->vector_dimension() == 3)
{
combo_positionVBO->addItem(QString::fromStdString(vbo->name()));
if (vbo.get() == p.get_position_vbo())
combo_positionVBO->setCurrentIndex(i);
combo_normalVBO->addItem(QString::fromStdString(vbo->name()));
if (vbo.get() == p.get_normal_vbo())
combo_normalVBO->setCurrentIndex(i);
combo_colorVBO->addItem(QString::fromStdString(vbo->name()));
if (vbo.get() == p.get_color_vbo())
combo_colorVBO->setCurrentIndex(i);
++i;
}
}
check_renderVertices->setChecked(p.get_render_vertices());
slider_vertexScaleFactor->setSliderPosition(p.get_vertex_scale_factor() * 50.0);
check_renderEdges->setChecked(p.get_render_edges());
check_renderFaces->setChecked(p.get_render_faces());
check_renderBackFaces->setChecked(p.get_render_backfaces());
radio_flatShading->setChecked(p.get_face_style() == MapParameters::FLAT);
radio_phongShading->setChecked(p.get_face_style() == MapParameters::PHONG);
check_renderBoundary->setChecked(p.get_render_boundary());
vertex_color_ = p.get_vertex_color();
vertexColorButton->setStyleSheet("QPushButton { background-color:" + vertex_color_.name() + " }");
edge_color_ = p.get_edge_color();
edgeColorButton->setStyleSheet("QPushButton { background-color:" + edge_color_.name() + " }");
front_color_ = p.get_front_color();
frontColorButton->setStyleSheet("QPushButton { background-color:" + front_color_.name() + " }");
bothColorButton->setStyleSheet("QPushButton { background-color:" + front_color_.name() + "}");
back_color_ = p.get_back_color();
backColorButton->setStyleSheet("QPushButton { background-color:" + back_color_.name() + " }");
#ifdef USE_TRANSPARENCY
check_useTransparency->setChecked(p.get_transparency_enabled());
slider_transparency->setValue(p.get_transparency_factor());
slider_transparency->setEnabled(p.get_transparency_enabled());
#endif
updating_ui_ = false;
}