diff --git a/Polyhedron/demo/Polyhedron/MainWindow.cpp b/Polyhedron/demo/Polyhedron/MainWindow.cpp index cb6dd563d77..dd00a60560f 100644 --- a/Polyhedron/demo/Polyhedron/MainWindow.cpp +++ b/Polyhedron/demo/Polyhedron/MainWindow.cpp @@ -124,7 +124,7 @@ MainWindow::MainWindow(QWidget* parent) menu_map[ui->menuOperations->title()] = ui->menuOperations; // remove the Load Script menu entry, when the demo has not been compiled with QT_SCRIPT_LIB #if !defined(QT_SCRIPT_LIB) - ui->menuBar->removeAction(ui->actionLoad_Script); + ui->menuBar->removeAction(ui->actionloadScript); #endif // Save some pointers from ui, for latter use. @@ -348,7 +348,7 @@ MainWindow::MainWindow(QWidget* parent) if(actionAddToGroup) { connect(actionAddToGroup, SIGNAL(triggered()), - this, SLOT(make_new_group())); + this, SLOT(makeNewGroup())); } QMenu* menuFile = findChild("menuFile"); @@ -844,7 +844,7 @@ void MainWindow::updateViewerBBox() viewer->camera()->showEntireScene(); } -void MainWindow::reload_item() { +void MainWindow::reloadItem() { QAction* sender_action = qobject_cast(sender()); if(!sender_action) return; @@ -871,10 +871,10 @@ void MainWindow::reload_item() { return; } - CGAL::Three::Polyhedron_demo_io_plugin_interface* fileloader = find_loader(loader_name); + CGAL::Three::Polyhedron_demo_io_plugin_interface* fileloader = findLoader(loader_name); QFileInfo fileinfo(filename); - CGAL::Three::Scene_item* new_item = load_item(fileinfo, fileloader); + CGAL::Three::Scene_item* new_item = loadItem(fileinfo, fileloader); new_item->setName(item->name()); new_item->setColor(item->color()); @@ -885,7 +885,7 @@ void MainWindow::reload_item() { item->deleteLater(); } -CGAL::Three::Polyhedron_demo_io_plugin_interface* MainWindow::find_loader(const QString& loader_name) const { +CGAL::Three::Polyhedron_demo_io_plugin_interface* MainWindow::findLoader(const QString& loader_name) const { Q_FOREACH(CGAL::Three::Polyhedron_demo_io_plugin_interface* io_plugin, io_plugins) { if(io_plugin->name() == loader_name) { @@ -937,7 +937,7 @@ void MainWindow::open(QString filename) program=filename.right(filename.size() - 9); } if(filename.endsWith(".js")) { - load_script(fileinfo); + loadScript(fileinfo); return; } if(!program.isEmpty()) @@ -1009,9 +1009,7 @@ void MainWindow::open(QString filename) QSettings settings; settings.setValue("OFF open directory", fileinfo.absoluteDir().absolutePath()); - CGAL::Three::Scene_item* scene_item = load_item(fileinfo, find_loader(load_pair.first)); - if(scene_item != 0) { this->addToRecentFiles(fileinfo.absoluteFilePath()); } @@ -1022,7 +1020,7 @@ bool MainWindow::open(QString filename, QString loader_name) { QFileInfo fileinfo(filename); CGAL::Three::Scene_item* item; try { - item = load_item(fileinfo, find_loader(loader_name)); + item = loadItem(fileinfo, findLoader(loader_name)); } catch(std::logic_error e) { std::cerr << e.what() << std::endl; @@ -1033,7 +1031,7 @@ bool MainWindow::open(QString filename, QString loader_name) { } -CGAL::Three::Scene_item* MainWindow::load_item(QFileInfo fileinfo, CGAL::Three::Polyhedron_demo_io_plugin_interface* loader) { +CGAL::Three::Scene_item* MainWindow::loadItem(QFileInfo fileinfo, CGAL::Three::Polyhedron_demo_io_plugin_interface* loader) { CGAL::Three::Scene_item* item = NULL; if(!fileinfo.isFile() || !fileinfo.isReadable()) { throw std::invalid_argument(QString("File %1 is not a readable file.") @@ -1206,7 +1204,7 @@ void MainWindow::showSceneContextMenu(int selectedItemIndex, QAction* reload = menu->addAction(tr("&Reload Item from File")); reload->setData(qVariantFromValue(selectedItemIndex)); connect(reload, SIGNAL(triggered()), - this, SLOT(reload_item())); + this, SLOT(reloadItem())); } QAction* saveas = menu->addAction(tr("&Save as...")); saveas->setData(qVariantFromValue(selectedItemIndex)); @@ -1339,13 +1337,13 @@ void MainWindow::closeEvent(QCloseEvent *event) event->accept(); } -bool MainWindow::load_script(QString filename) +bool MainWindow::loadScript(QString filename) { QFileInfo fileinfo(filename); - return load_script(fileinfo); + return loadScript(fileinfo); } -bool MainWindow::load_script(QFileInfo info) +bool MainWindow::loadScript(QFileInfo info) { #if defined(QT_SCRIPT_LIB) QString program; @@ -1365,7 +1363,7 @@ bool MainWindow::load_script(QFileInfo info) return false; } -void MainWindow::on_actionLoad_Script_triggered() +void MainWindow::on_actionloadScript_triggered() { #if defined(QT_SCRIPT_LIB) QString filename = QFileDialog::getOpenFileName( @@ -1374,7 +1372,7 @@ void MainWindow::on_actionLoad_Script_triggered() ".", "QTScripts (*.js);;All Files (*)"); - load_script(QFileInfo(filename)); + loadScript(QFileInfo(filename)); #endif } @@ -1426,7 +1424,7 @@ void MainWindow::on_actionLoad_triggered() CGAL::Three::Scene_item* item = NULL; if(selectedPlugin) { QFileInfo info(filename); - item = load_item(info, selectedPlugin); + item = loadItem(info, selectedPlugin); Scene::Item_id index = scene->addItem(item); selectSceneItem(index); this->addToRecentFiles(filename); @@ -1638,7 +1636,7 @@ void MainWindow::viewerShowObject() } } -QString MainWindow::camera_string() const +QString MainWindow::cameraString() const { return viewer->dumpCameraCoordinates(); } @@ -1646,12 +1644,12 @@ QString MainWindow::camera_string() const void MainWindow::on_actionDumpCamera_triggered() { information(QString("Camera: %1") - .arg(camera_string())); + .arg(cameraString())); } void MainWindow::on_action_Copy_camera_triggered() { - qApp->clipboard()->setText(this->camera_string()); + qApp->clipboard()->setText(this->cameraString()); } void MainWindow::on_action_Paste_camera_triggered() @@ -1716,7 +1714,7 @@ void MainWindow::restoreCollapseState() if(modelIndex.isValid()) recurseExpand(modelIndex); } -void MainWindow::make_new_group() +void MainWindow::makeNewGroup() { Scene_group_item * group = new Scene_group_item("New group"); scene->addItem(group); @@ -1743,7 +1741,7 @@ void MainWindow::recenterSceneView(const QModelIndex &id) } } -void MainWindow::statistics_on_item() +void MainWindow::statisticsOnItem() { QApplication::setOverrideCursor(Qt::WaitCursor); @@ -1754,7 +1752,7 @@ void MainWindow::statistics_on_item() connect(statistics_ui->okButtonBox, SIGNAL(accepted()), statistics_dlg, SLOT(accept())); connect(statistics_ui->updateButton, SIGNAL(clicked()), - this, SLOT(statistics_on_item())); + this, SLOT(statisticsOnItem())); } statistics_ui->label_htmltab->setText(get_item_stats()); @@ -1816,7 +1814,7 @@ QString MainWindow::get_item_stats() str.append(QString(" %1 ").arg(data.titles.at(title))); Q_FOREACH(Scene_item* sit, items[i]) { - str.append(QString("%1").arg(sit->compute_stats(title))); + str.append(QString("%1").arg(sit->computeStats(title))); } title++; for(;title %1 ").arg(data.titles.at(title))); Q_FOREACH(Scene_item* sit, items[i]) { - str.append(QString("%1").arg(sit->compute_stats(title))); + str.append(QString("%1").arg(sit->computeStats(title))); } } diff --git a/Polyhedron/demo/Polyhedron/MainWindow.h b/Polyhedron/demo/Polyhedron/MainWindow.h index 1be8536e4e2..c106635557e 100644 --- a/Polyhedron/demo/Polyhedron/MainWindow.h +++ b/Polyhedron/demo/Polyhedron/MainWindow.h @@ -62,12 +62,12 @@ public: /*! Find an IO plugin. * throws std::invalid_argument if no loader with that argument can be found @returns the IO plugin associated with `loader_name`*/ - CGAL::Three::Polyhedron_demo_io_plugin_interface* find_loader(const QString& loader_name) const; + CGAL::Three::Polyhedron_demo_io_plugin_interface* findLoader(const QString& loader_name) const; /*! \brief Load an item with a given loader. * throws `std::logic_error` if loading does not succeed or * `std::invalid_argument` if `fileinfo` specifies an invalid file*/ - CGAL::Three::Scene_item* load_item(QFileInfo fileinfo, CGAL::Three::Polyhedron_demo_io_plugin_interface*); + CGAL::Three::Scene_item* loadItem(QFileInfo fileinfo, CGAL::Three::Polyhedron_demo_io_plugin_interface*); Q_SIGNALS: void on_closure(); @@ -77,7 +77,7 @@ Q_SIGNALS: public Q_SLOTS: //!Creates a new group and adds it to the scene. - void make_new_group(); + void makeNewGroup(); void updateViewerBBox(); void open(QString); void on_upButton_pressed(); @@ -87,7 +87,7 @@ public Q_SLOTS: void setCollapsed(QModelIndex); bool file_matches_filter(const QString& filters, const QString& filename); //!Prints a dialog containing statistics on the selected polyhedrons. - void statistics_on_item(); + void statisticsOnItem(); /*! Open a file with a given loader, and return true if it was successful. This slot is for use by scripts.*/ bool open(QString filename, QString loader_name); @@ -95,19 +95,19 @@ public Q_SLOTS: /*! Reloads an item. Expects to be called by a QAction with the index of the item to be reloaded as data attached to the action. The index must identify a valid `Scene_item`.*/ - void reload_item(); + void reloadItem(); /*! * This is an overloaded function. * If QT_SCRIPT_LIB is defined, returns true if the script is valid. * If not, returns false. */ - bool load_script(QString filename); + bool loadScript(QString filename); /*! If QT_SCRIPT_LIB is defined, returns true if the script is valid. * If not, returns false. */ - bool load_script(QFileInfo); + bool loadScript(QFileInfo); /*! * Gives the keyboard input focus to the widget searchEdit. @@ -268,7 +268,7 @@ protected Q_SLOTS: //!Duplicates the selected item and selects the new item. void on_actionDuplicate_triggered(); //!If QT_SCRIPT_LIB is defined, opens a dialog to choose a script. - void on_actionLoad_Script_triggered(); + void on_actionloadScript_triggered(); //!Loads a plugin from a specified directory void on_actionLoad_plugin_triggered(); // Show/Hide @@ -299,9 +299,9 @@ protected Q_SLOTS: */ void on_action_Look_at_triggered(); //!Returns the position and orientation of the current camera frame. - QString camera_string() const; + QString cameraString() const; /*! Prints the position and orientation of the current camera frame. - * @see camera_string() + * @see cameraString() */ void on_actionDumpCamera_triggered(); //!Sets the coordinates of the camera in the clipboard text. diff --git a/Polyhedron/demo/Polyhedron/Plugins/AABB_tree/Cut_plugin.cpp b/Polyhedron/demo/Polyhedron/Plugins/AABB_tree/Cut_plugin.cpp index 4d6aa21f2a3..f37284232c6 100644 --- a/Polyhedron/demo/Polyhedron/Plugins/AABB_tree/Cut_plugin.cpp +++ b/Polyhedron/demo/Polyhedron/Plugins/AABB_tree/Cut_plugin.cpp @@ -84,7 +84,7 @@ public: // Wireframe OpenGL drawing in a display list void invalidateOpenGLBuffers() { - compute_elements(); + computeElements(); are_buffers_filled = false; compute_bbox(); } @@ -95,8 +95,8 @@ private: mutable QOpenGLShaderProgram *program; - using CGAL::Three::Scene_item::initialize_buffers; - void initialize_buffers(CGAL::Three::Viewer_interface *viewer)const + using CGAL::Three::Scene_item::initializeBuffers; + void initializeBuffers(CGAL::Three::Viewer_interface *viewer)const { program = getShaderProgram(PROGRAM_NO_SELECTION, viewer); program->bind(); @@ -114,7 +114,7 @@ private: are_buffers_filled = true; } - void compute_elements() const + void computeElements() const { positions_lines.clear(); @@ -123,13 +123,13 @@ private: tree.traversal(0, traits); } - void draw_edges(CGAL::Three::Viewer_interface* viewer) const + void drawEdges(CGAL::Three::Viewer_interface* viewer) const { if(!are_buffers_filled) - initialize_buffers(viewer); + initializeBuffers(viewer); vaos[0]->bind(); program = getShaderProgram(PROGRAM_NO_SELECTION); - attrib_buffers(viewer, PROGRAM_NO_SELECTION); + attribBuffers(viewer, PROGRAM_NO_SELECTION); program->bind(); program->setAttributeValue("colors",this->color()); viewer->glDrawArrays(GL_LINES, 0, static_cast(positions_lines.size()/3)); @@ -168,7 +168,7 @@ public: } void invalidateOpenGLBuffers() { - compute_elements(); + computeElements(); are_buffers_filled = false; compute_bbox(); } @@ -213,8 +213,8 @@ private: mutable QOpenGLShaderProgram *program; - using CGAL::Three::Scene_item::initialize_buffers; - void initialize_buffers(CGAL::Three::Viewer_interface *viewer)const + using CGAL::Three::Scene_item::initializeBuffers; + void initializeBuffers(CGAL::Three::Viewer_interface *viewer)const { program = getShaderProgram(PROGRAM_NO_SELECTION, viewer); program->bind(); @@ -231,7 +231,7 @@ private: vaos[0]->release(); are_buffers_filled = true; } - void compute_elements() const + void computeElements() const { positions_lines.clear(); @@ -244,13 +244,13 @@ private: positions_lines.push_back(b.x()); positions_lines.push_back(b.y()); positions_lines.push_back(b.z()); } } - void draw_edges(CGAL::Three::Viewer_interface* viewer) const + void drawEdges(CGAL::Three::Viewer_interface* viewer) const { if(!are_buffers_filled) - initialize_buffers(viewer); + initializeBuffers(viewer); vaos[0]->bind(); program = getShaderProgram(PROGRAM_NO_SELECTION); - attrib_buffers(viewer, PROGRAM_NO_SELECTION); + attribBuffers(viewer, PROGRAM_NO_SELECTION); program->bind(); program->setAttributeValue("colors",this->color()); viewer->glDrawArrays(GL_LINES, 0, static_cast(positions_lines.size()/3)); diff --git a/Polyhedron/demo/Polyhedron/Plugins/Mesh_3/Volume_plane_intersection.cpp b/Polyhedron/demo/Polyhedron/Plugins/Mesh_3/Volume_plane_intersection.cpp index de4edc8232f..0949f90fc26 100644 --- a/Polyhedron/demo/Polyhedron/Plugins/Mesh_3/Volume_plane_intersection.cpp +++ b/Polyhedron/demo/Polyhedron/Plugins/Mesh_3/Volume_plane_intersection.cpp @@ -60,7 +60,7 @@ void Volume_plane_intersection::compile_shaders() } } -void Volume_plane_intersection::compute_elements() +void Volume_plane_intersection::computeElements() { a_vertex.resize(0); b_vertex.resize(0); @@ -113,7 +113,7 @@ void Volume_plane_intersection::init_buffers() } -void Volume_plane_intersection::attrib_buffers(Viewer_interface* viewer) const +void Volume_plane_intersection::attribBuffers(Viewer_interface* viewer) const { QMatrix4x4 mvpMatrix; double mat[16]; @@ -131,7 +131,7 @@ void Volume_plane_intersection::attrib_buffers(Viewer_interface* viewer) const void Volume_plane_intersection::draw(Viewer_interface* viewer) const { viewer->glLineWidth(4.0f); - attrib_buffers(viewer); + attribBuffers(viewer); glDepthRange(0.0,0.9999); if(b && c) { diff --git a/Polyhedron/demo/Polyhedron/Plugins/Mesh_3/Volume_plane_intersection.h b/Polyhedron/demo/Polyhedron/Plugins/Mesh_3/Volume_plane_intersection.h index bfd013f24fe..37ef3d4c42b 100644 --- a/Polyhedron/demo/Polyhedron/Plugins/Mesh_3/Volume_plane_intersection.h +++ b/Polyhedron/demo/Polyhedron/Plugins/Mesh_3/Volume_plane_intersection.h @@ -23,7 +23,7 @@ public: setColor(QColor(255, 0, 0)); setName("Volume plane intersection"); compile_shaders(); - compute_elements(); + computeElements(); init_buffers(); } @@ -68,9 +68,9 @@ private: mutable QOpenGLBuffer buffers[vboSize]; mutable QOpenGLVertexArrayObject vao[vaoSize]; mutable QOpenGLShaderProgram rendering_program; - void compute_elements(); + void computeElements(); void init_buffers(); - void attrib_buffers(Viewer_interface*) const; + void attribBuffers(Viewer_interface*) const; void compile_shaders(); }; diff --git a/Polyhedron/demo/Polyhedron/Plugins/Operations_on_polyhedra/Clip_polyhedron_plugin.cpp b/Polyhedron/demo/Polyhedron/Plugins/Operations_on_polyhedra/Clip_polyhedron_plugin.cpp index 272b3523ec5..2e9a0876def 100644 --- a/Polyhedron/demo/Polyhedron/Plugins/Operations_on_polyhedra/Clip_polyhedron_plugin.cpp +++ b/Polyhedron/demo/Polyhedron/Plugins/Operations_on_polyhedra/Clip_polyhedron_plugin.cpp @@ -27,10 +27,10 @@ public: void draw(CGAL::Three::Viewer_interface* viewer)const { if(!are_buffers_filled) - initialize_buffers(viewer); + initializeBuffers(viewer); vaos[Facets]->bind(); program = getShaderProgram(PROGRAM_PLANE_TWO_FACES); - attrib_buffers(viewer, PROGRAM_PLANE_TWO_FACES); + attribBuffers(viewer, PROGRAM_PLANE_TWO_FACES); QMatrix4x4 f_matrix; for(int i=0; i<16; i++) f_matrix.data()[i] = (float)frame->matrix()[i]; @@ -54,7 +54,7 @@ public: void selection_changed(bool b){is_selected = b;} private: - void initialize_buffers(CGAL::Three::Viewer_interface *viewer) const + void initializeBuffers(CGAL::Three::Viewer_interface *viewer) const { program = getShaderProgram(PROGRAM_PLANE_TWO_FACES, viewer); program->bind(); diff --git a/Polyhedron/demo/Polyhedron/Plugins/Operations_on_polyhedra/Scene_combinatorial_map_item.cpp b/Polyhedron/demo/Polyhedron/Plugins/Operations_on_polyhedra/Scene_combinatorial_map_item.cpp index 6780b157d03..85fea11272e 100644 --- a/Polyhedron/demo/Polyhedron/Plugins/Operations_on_polyhedra/Scene_combinatorial_map_item.cpp +++ b/Polyhedron/demo/Polyhedron/Plugins/Operations_on_polyhedra/Scene_combinatorial_map_item.cpp @@ -226,7 +226,7 @@ bool Scene_combinatorial_map_item::keyPressEvent(QKeyEvent* e){ return false; } -void Scene_combinatorial_map_item::compute_elements(void) const{ +void Scene_combinatorial_map_item::computeElements(void) const{ positions_facets.resize(0); normals.resize(0); @@ -339,7 +339,7 @@ void Scene_combinatorial_map_item::compute_elements(void) const{ } -void Scene_combinatorial_map_item::initialize_buffers(CGAL::Three::Viewer_interface *viewer) const +void Scene_combinatorial_map_item::initializeBuffers(CGAL::Three::Viewer_interface *viewer) const { //vao for the edges { @@ -473,12 +473,12 @@ void Scene_combinatorial_map_item::draw(CGAL::Three::Viewer_interface* viewer) c { if(!are_buffers_filled) { - compute_elements(); - initialize_buffers(viewer); + computeElements(); + initializeBuffers(viewer); } vaos[Facets]->bind(); program=getShaderProgram(PROGRAM_WITH_LIGHT); - attrib_buffers(viewer,PROGRAM_WITH_LIGHT); + attribBuffers(viewer,PROGRAM_WITH_LIGHT); program->bind(); program->setAttributeValue("colors", this->color()); viewer->glDrawArrays(GL_TRIANGLES, 0, static_cast(nb_facets/3)); @@ -486,16 +486,16 @@ void Scene_combinatorial_map_item::draw(CGAL::Three::Viewer_interface* viewer) c program->release(); } - void Scene_combinatorial_map_item::draw_edges(CGAL::Three::Viewer_interface* viewer) const + void Scene_combinatorial_map_item::drawEdges(CGAL::Three::Viewer_interface* viewer) const { if(!are_buffers_filled) { - compute_elements(); - initialize_buffers(viewer); + computeElements(); + initializeBuffers(viewer); } vaos[Edges]->bind(); program=getShaderProgram(PROGRAM_WITHOUT_LIGHT); - attrib_buffers(viewer,PROGRAM_WITHOUT_LIGHT); + attribBuffers(viewer,PROGRAM_WITHOUT_LIGHT); program->bind(); program->setAttributeValue("colors", this->color()); viewer->glDrawArrays(GL_LINES, 0, static_cast(nb_lines/3)); @@ -503,16 +503,16 @@ void Scene_combinatorial_map_item::draw(CGAL::Three::Viewer_interface* viewer) c program->release(); } - void Scene_combinatorial_map_item::draw_points(CGAL::Three::Viewer_interface* viewer) const + void Scene_combinatorial_map_item::drawPoints(CGAL::Three::Viewer_interface* viewer) const { if(!are_buffers_filled) { - compute_elements(); - initialize_buffers(viewer); + computeElements(); + initializeBuffers(viewer); } vaos[Points]->bind(); program=getShaderProgram(PROGRAM_WITHOUT_LIGHT); - attrib_buffers(viewer,PROGRAM_WITHOUT_LIGHT); + attribBuffers(viewer,PROGRAM_WITHOUT_LIGHT); program->bind(); program->setAttributeValue("colors", this->color()); viewer->glDrawArrays(GL_POINTS, 0, static_cast(nb_points/3)); diff --git a/Polyhedron/demo/Polyhedron/Plugins/Operations_on_polyhedra/Scene_combinatorial_map_item.h b/Polyhedron/demo/Polyhedron/Plugins/Operations_on_polyhedra/Scene_combinatorial_map_item.h index a5f1abc53ec..b3d1eedade6 100644 --- a/Polyhedron/demo/Polyhedron/Plugins/Operations_on_polyhedra/Scene_combinatorial_map_item.h +++ b/Polyhedron/demo/Polyhedron/Plugins/Operations_on_polyhedra/Scene_combinatorial_map_item.h @@ -45,8 +45,8 @@ public: //Event handling virtual bool keyPressEvent(QKeyEvent*); //drawing of the scene - virtual void draw_edges(CGAL::Three::Viewer_interface* viewer) const; - virtual void draw_points(CGAL::Three::Viewer_interface*) const; + virtual void drawEdges(CGAL::Three::Viewer_interface* viewer) const; + virtual void drawPoints(CGAL::Three::Viewer_interface*) const; virtual void draw(CGAL::Three::Viewer_interface*) const; bool isFinite() const { return true; } @@ -98,11 +98,11 @@ private: mutable QOpenGLShaderProgram *program; - using CGAL::Three::Scene_item::initialize_buffers; - void initialize_buffers(CGAL::Three::Viewer_interface *viewer) const; + using CGAL::Three::Scene_item::initializeBuffers; + void initializeBuffers(CGAL::Three::Viewer_interface *viewer) const; - using CGAL::Three::Scene_item::compute_elements; - void compute_elements(void) const; + using CGAL::Three::Scene_item::computeElements; + void computeElements(void) const; public Q_SLOTS: void set_next_volume(); diff --git a/Polyhedron/demo/Polyhedron/Plugins/PCA/Scene_polyhedron_transform_item.cpp b/Polyhedron/demo/Polyhedron/Plugins/PCA/Scene_polyhedron_transform_item.cpp index eed9c151034..e2bf74a2f7f 100644 --- a/Polyhedron/demo/Polyhedron/Plugins/PCA/Scene_polyhedron_transform_item.cpp +++ b/Polyhedron/demo/Polyhedron/Plugins/PCA/Scene_polyhedron_transform_item.cpp @@ -17,7 +17,7 @@ Scene_polyhedron_transform_item::Scene_polyhedron_transform_item(const qglviewer invalidateOpenGLBuffers(); } -void Scene_polyhedron_transform_item::initialize_buffers(CGAL::Three::Viewer_interface *viewer =0) const +void Scene_polyhedron_transform_item::initializeBuffers(CGAL::Three::Viewer_interface *viewer =0) const { //vao for the edges { @@ -42,7 +42,7 @@ void Scene_polyhedron_transform_item::initialize_buffers(CGAL::Three::Viewer_int are_buffers_filled = true; } -void Scene_polyhedron_transform_item::compute_elements() const +void Scene_polyhedron_transform_item::computeElements() const { positions_lines.resize(0); typedef Kernel::Point_3 Point; @@ -66,13 +66,13 @@ void Scene_polyhedron_transform_item::compute_elements() const } } -void Scene_polyhedron_transform_item::draw_edges(CGAL::Three::Viewer_interface* viewer) const +void Scene_polyhedron_transform_item::drawEdges(CGAL::Three::Viewer_interface* viewer) const { if(!are_buffers_filled) - initialize_buffers(viewer); + initializeBuffers(viewer); vaos[Edges]->bind(); program = getShaderProgram(PROGRAM_WITHOUT_LIGHT); - attrib_buffers(viewer,PROGRAM_WITHOUT_LIGHT); + attribBuffers(viewer,PROGRAM_WITHOUT_LIGHT); program->bind(); QMatrix4x4 f_matrix; for (int i=0; i<16; ++i){ @@ -118,7 +118,7 @@ Scene_polyhedron_transform_item::compute_bbox() const { void Scene_polyhedron_transform_item::invalidateOpenGLBuffers() { - compute_elements(); + computeElements(); are_buffers_filled = false; compute_bbox(); } diff --git a/Polyhedron/demo/Polyhedron/Plugins/PCA/Scene_polyhedron_transform_item.h b/Polyhedron/demo/Polyhedron/Plugins/PCA/Scene_polyhedron_transform_item.h index bc21640169c..89037d18e03 100644 --- a/Polyhedron/demo/Polyhedron/Plugins/PCA/Scene_polyhedron_transform_item.h +++ b/Polyhedron/demo/Polyhedron/Plugins/PCA/Scene_polyhedron_transform_item.h @@ -18,7 +18,7 @@ public: Scene_polyhedron_transform_item(const qglviewer::Vec& pos,const Scene_polyhedron_item* poly_item,const CGAL::Three::Scene_interface* scene_interface); Scene_item* clone() const{return NULL;} QString toolTip() const; - void draw_edges(CGAL::Three::Viewer_interface*) const; + void drawEdges(CGAL::Three::Viewer_interface*) const; void compute_bbox() const; ~Scene_polyhedron_transform_item() {delete frame; Q_EMIT killed();} bool manipulatable() const { return manipulable; } @@ -49,9 +49,9 @@ private: mutable QOpenGLShaderProgram *program; mutable std::vector positions_lines; mutable std::size_t nb_lines; - using CGAL::Three::Scene_item::initialize_buffers; - void initialize_buffers(CGAL::Three::Viewer_interface *viewer) const; - void compute_elements() const; + using CGAL::Three::Scene_item::initializeBuffers; + void initializeBuffers(CGAL::Three::Viewer_interface *viewer) const; + void computeElements() const; Q_SIGNALS: void stop(); diff --git a/Polyhedron/demo/Polyhedron/Plugins/PCA/Trivial_plugin.cpp b/Polyhedron/demo/Polyhedron/Plugins/PCA/Trivial_plugin.cpp index 9a868448a53..ee8d6f399ca 100644 --- a/Polyhedron/demo/Polyhedron/Plugins/PCA/Trivial_plugin.cpp +++ b/Polyhedron/demo/Polyhedron/Plugins/PCA/Trivial_plugin.cpp @@ -47,13 +47,13 @@ public: return (m == Wireframe); } - void draw_edges(CGAL::Three::Viewer_interface* viewer) const + void drawEdges(CGAL::Three::Viewer_interface* viewer) const { if(!are_buffers_filled) - initialize_buffers(viewer); + initializeBuffers(viewer); vaos[0]->bind(); program = getShaderProgram(PROGRAM_WITHOUT_LIGHT); - attrib_buffers(viewer, PROGRAM_WITHOUT_LIGHT); + attribBuffers(viewer, PROGRAM_WITHOUT_LIGHT); program->bind(); program->setAttributeValue("colors", this->color()); viewer->glDrawArrays(GL_LINES, 0, static_cast(positions_lines.size()/3)); @@ -64,7 +64,7 @@ public: void invalidateOpenGLBuffers() { - compute_elements(); + computeElements(); are_buffers_filled = false; compute_bbox(); } @@ -73,8 +73,8 @@ private: mutable std::vector positions_lines; mutable QOpenGLShaderProgram *program; - using CGAL::Three::Scene_item::initialize_buffers; - void initialize_buffers(CGAL::Three::Viewer_interface *viewer)const + using CGAL::Three::Scene_item::initializeBuffers; + void initializeBuffers(CGAL::Three::Viewer_interface *viewer)const { //vao containing the data for the lines @@ -97,7 +97,7 @@ private: are_buffers_filled = true; } - void compute_elements() const + void computeElements() const { positions_lines.clear(); const Bbox& bb = scene->bbox(); diff --git a/Polyhedron/demo/Polyhedron/Plugins/PMP/Fairing_plugin.cpp b/Polyhedron/demo/Polyhedron/Plugins/PMP/Fairing_plugin.cpp index 564157b7af7..bf108aad90a 100644 --- a/Polyhedron/demo/Polyhedron/Plugins/PMP/Fairing_plugin.cpp +++ b/Polyhedron/demo/Polyhedron/Plugins/PMP/Fairing_plugin.cpp @@ -56,7 +56,7 @@ public: dock_widget->setVisible(false); ui_widget.setupUi(dock_widget); - add_dock_widget(dock_widget); + addDockWidget(dock_widget); connect(ui_widget.Fair_button, SIGNAL(clicked()), this, SLOT(on_Fair_button_clicked())); connect(ui_widget.Refine_button, SIGNAL(clicked()), this, SLOT(on_Refine_button_clicked())); @@ -73,7 +73,7 @@ public Q_SLOTS: } void on_Fair_button_clicked() { - Scene_polyhedron_selection_item* selection_item = get_selected_item(); + Scene_polyhedron_selection_item* selection_item = getSelectedItem(); if(!selection_item) { return; } if(selection_item->selected_vertices.empty()) { @@ -98,7 +98,7 @@ public Q_SLOTS: } void on_Refine_button_clicked() { - Scene_polyhedron_selection_item* selection_item = get_selected_item(); + Scene_polyhedron_selection_item* selection_item = getSelectedItem(); if(!selection_item) { return; } if(selection_item->selected_facets.empty()) { diff --git a/Polyhedron/demo/Polyhedron/Plugins/PMP/Hole_filling_plugin.cpp b/Polyhedron/demo/Polyhedron/Plugins/PMP/Hole_filling_plugin.cpp index eb0495085c6..212534f811d 100644 --- a/Polyhedron/demo/Polyhedron/Plugins/PMP/Hole_filling_plugin.cpp +++ b/Polyhedron/demo/Polyhedron/Plugins/PMP/Hole_filling_plugin.cpp @@ -98,7 +98,7 @@ public: return (m == Wireframe); } void draw() const {} - void draw_edges(CGAL::Three::Viewer_interface* viewer) const { + void drawEdges(CGAL::Three::Viewer_interface* viewer) const { for(Polyline_data_list::const_iterator it = polyline_data_list.begin(); it != polyline_data_list.end(); ++it) { if(it == active_hole) { viewer->glLineWidth(7.f); } @@ -109,7 +109,7 @@ public: else { it->polyline->setRbgColor(0, 0, 255); } - it->polyline->draw_edges(viewer); + it->polyline->drawEdges(viewer); } } @@ -411,7 +411,7 @@ void Polyhedron_demo_hole_filling_plugin::init(QMainWindow* mainWindow, ui_widget.Accept_button->setVisible(false); ui_widget.Reject_button->setVisible(false); - add_dock_widget(dock_widget); + addDockWidget(dock_widget); connect(ui_widget.Visualize_holes_button, SIGNAL(clicked()), this, SLOT(on_Visualize_holes_button())); connect(ui_widget.Fill_selected_holes_button, SIGNAL(clicked()), this, SLOT(on_Fill_selected_holes_button())); @@ -460,7 +460,7 @@ void Polyhedron_demo_hole_filling_plugin::dock_widget_closed() { } // creates a Scene_hole_visualizer and associate it with active Scene_polyhedron_item void Polyhedron_demo_hole_filling_plugin::on_Visualize_holes_button() { - Scene_polyhedron_item* poly_item = get_selected_item(); + Scene_polyhedron_item* poly_item = getSelectedItem(); if(!poly_item) { print_message("Error: please select a polyhedron item from Geometric Objects list!"); return; @@ -491,7 +491,7 @@ void Polyhedron_demo_hole_filling_plugin::on_Visualize_holes_button() { // fills selected holes on active Scene_hole_visualizer void Polyhedron_demo_hole_filling_plugin::on_Fill_selected_holes_button() { // get active polylines item - Scene_hole_visualizer* hole_visualizer = get_selected_item(); + Scene_hole_visualizer* hole_visualizer = getSelectedItem(); if(!hole_visualizer) { print_message(no_selected_hole_visualizer_error_message()); return; @@ -522,7 +522,7 @@ void Polyhedron_demo_hole_filling_plugin::on_Fill_selected_holes_button() { // fills all holes and removes associated Scene_hole_visualizer if any void Polyhedron_demo_hole_filling_plugin::on_Select_all_holes_button() { - Scene_hole_visualizer* hole_visualizer = get_selected_item(); + Scene_hole_visualizer* hole_visualizer = getSelectedItem(); if(!hole_visualizer) { print_message(no_selected_hole_visualizer_error_message()); return; @@ -531,7 +531,7 @@ void Polyhedron_demo_hole_filling_plugin::on_Select_all_holes_button() { } void Polyhedron_demo_hole_filling_plugin::on_Select_small_holes_button() { - Scene_hole_visualizer* hole_visualizer = get_selected_item(); + Scene_hole_visualizer* hole_visualizer = getSelectedItem(); if(!hole_visualizer) { print_message(no_selected_hole_visualizer_error_message()); return; @@ -549,7 +549,7 @@ void Polyhedron_demo_hole_filling_plugin::on_Select_small_holes_button() { } void Polyhedron_demo_hole_filling_plugin::on_Deselect_all_holes_button() { - Scene_hole_visualizer* hole_visualizer = get_selected_item(); + Scene_hole_visualizer* hole_visualizer = getSelectedItem(); if(!hole_visualizer) { print_message(no_selected_hole_visualizer_error_message()); return; @@ -559,7 +559,7 @@ void Polyhedron_demo_hole_filling_plugin::on_Deselect_all_holes_button() { // Simply create polyline items and put them into scene - nothing related with other parts of the plugin void Polyhedron_demo_hole_filling_plugin::on_Create_polyline_items_button(){ - Scene_hole_visualizer* hole_visualizer = get_selected_item(); + Scene_hole_visualizer* hole_visualizer = getSelectedItem(); if(!hole_visualizer) { print_message(no_selected_hole_visualizer_error_message()); return; diff --git a/Polyhedron/demo/Polyhedron/Plugins/PMP/Mean_curvature_flow_skeleton_plugin.cpp b/Polyhedron/demo/Polyhedron/Plugins/PMP/Mean_curvature_flow_skeleton_plugin.cpp index 32d4935bd02..998f87d5c60 100644 --- a/Polyhedron/demo/Polyhedron/Plugins/PMP/Mean_curvature_flow_skeleton_plugin.cpp +++ b/Polyhedron/demo/Polyhedron/Plugins/PMP/Mean_curvature_flow_skeleton_plugin.cpp @@ -127,7 +127,7 @@ public: | QDockWidget::DockWidgetFloatable | QDockWidget::DockWidgetClosable); dockWidget->setWindowTitle("Mean Curvature Flow Skeleton"); - add_dock_widget(dockWidget); + addDockWidget(dockWidget); connect(ui->pushButton_contract, SIGNAL(clicked()), this, SLOT(on_actionContract())); diff --git a/Polyhedron/demo/Polyhedron/Plugins/PMP/Point_inside_polyhedron_plugin.cpp b/Polyhedron/demo/Polyhedron/Plugins/PMP/Point_inside_polyhedron_plugin.cpp index e58c2f163bb..c0f99068bb8 100644 --- a/Polyhedron/demo/Polyhedron/Plugins/PMP/Point_inside_polyhedron_plugin.cpp +++ b/Polyhedron/demo/Polyhedron/Plugins/PMP/Point_inside_polyhedron_plugin.cpp @@ -71,7 +71,7 @@ public: dock_widget->setVisible(false); ui_widget.setupUi(dock_widget); - add_dock_widget(dock_widget); + addDockWidget(dock_widget); connect(ui_widget.Select_button, SIGNAL(clicked()), this, SLOT(on_Select_button())); connect(ui_widget.Sample_random_points_from_bbox, SIGNAL(clicked()), this, SLOT(on_Sample_random_points_from_bbox())); diff --git a/Polyhedron/demo/Polyhedron/Plugins/PMP/Polyhedron_slicer_plugin.cpp b/Polyhedron/demo/Polyhedron/Plugins/PMP/Polyhedron_slicer_plugin.cpp index f5344be4903..16c20f2b71f 100644 --- a/Polyhedron/demo/Polyhedron/Plugins/PMP/Polyhedron_slicer_plugin.cpp +++ b/Polyhedron/demo/Polyhedron/Plugins/PMP/Polyhedron_slicer_plugin.cpp @@ -109,7 +109,7 @@ void Polyhedron_demo_polyhedron_slicer_plugin::init(QMainWindow* mainWindow, dock_widget->installEventFilter(this); ui_widget.setupUi(dock_widget); - add_dock_widget(dock_widget); + addDockWidget(dock_widget); connect(ui_widget.Generate_button, SIGNAL(clicked()), this, SLOT(on_Generate_button_clicked())); connect(ui_widget.Update_plane_button, SIGNAL(clicked()), this, SLOT(on_Update_plane_button_clicked())); @@ -213,7 +213,7 @@ bool Polyhedron_demo_polyhedron_slicer_plugin::on_Update_plane_button_clicked() // generate multiple cuts, until any cut does not intersect with bbox void Polyhedron_demo_polyhedron_slicer_plugin::on_Generate_button_clicked() { - Scene_polyhedron_item* item = get_selected_item(); + Scene_polyhedron_item* item = getSelectedItem(); if(!item) { print_message("Error: There is no selected Scene_polyhedron_item!"); return; diff --git a/Polyhedron/demo/Polyhedron/Plugins/PMP/Selection_plugin.cpp b/Polyhedron/demo/Polyhedron/Plugins/PMP/Selection_plugin.cpp index 96a6760d501..2e3c65a4dae 100644 --- a/Polyhedron/demo/Polyhedron/Plugins/PMP/Selection_plugin.cpp +++ b/Polyhedron/demo/Polyhedron/Plugins/PMP/Selection_plugin.cpp @@ -81,7 +81,7 @@ public: dock_widget->setVisible(false); ui_widget.setupUi(dock_widget); - add_dock_widget(dock_widget); + addDockWidget(dock_widget); connect(ui_widget.Select_all_button, SIGNAL(clicked()), this, SLOT(on_Select_all_button_clicked())); connect(ui_widget.Clear_button, SIGNAL(clicked()), this, SLOT(on_Clear_button_clicked())); @@ -117,7 +117,7 @@ public Q_SLOTS: dock_widget->show(); dock_widget->raise(); if(scene->numberOfEntries() < 2) { - Scene_polyhedron_item* poly_item = get_selected_item(); + Scene_polyhedron_item* poly_item = getSelectedItem(); if(!poly_item || selection_item_map.find(poly_item) != selection_item_map.end()) { return; } Scene_polyhedron_selection_item* new_item = new Scene_polyhedron_selection_item(poly_item, mw); int item_id = scene->addItem(new_item); @@ -129,7 +129,7 @@ public Q_SLOTS: } // Select all void on_Select_all_button_clicked() { - Scene_polyhedron_selection_item* selection_item = get_selected_item(); + Scene_polyhedron_selection_item* selection_item = getSelectedItem(); if(!selection_item) { print_message("Error: there is no selected polyhedron selection item!"); return; @@ -139,7 +139,7 @@ public Q_SLOTS: } // Clear selection void on_Clear_button_clicked() { - Scene_polyhedron_selection_item* selection_item = get_selected_item(); + Scene_polyhedron_selection_item* selection_item = getSelectedItem(); if(!selection_item) { print_message("Error: there is no selected polyhedron selection item!"); return; @@ -167,7 +167,7 @@ public Q_SLOTS: } // Isolated component related functions void on_Select_isolated_components_button_clicked() { - Scene_polyhedron_selection_item* selection_item = get_selected_item(); + Scene_polyhedron_selection_item* selection_item = getSelectedItem(); if(!selection_item) { print_message("Error: there is no selected polyhedron selection item!"); return; @@ -180,7 +180,7 @@ public Q_SLOTS: } } void on_Get_minimum_button_clicked() { - Scene_polyhedron_selection_item* selection_item = get_selected_item(); + Scene_polyhedron_selection_item* selection_item = getSelectedItem(); if(!selection_item) { print_message("Error: there is no selected polyhedron selection item!"); return; @@ -192,7 +192,7 @@ public Q_SLOTS: } // Create selection item for selected polyhedron item void on_Create_selection_item_button_clicked() { - Scene_polyhedron_item* poly_item = get_selected_item(); + Scene_polyhedron_item* poly_item = getSelectedItem(); if(!poly_item) { print_message("Error: there is no selected polyhedron item!"); return; @@ -224,7 +224,7 @@ public Q_SLOTS: } void on_Create_point_set_item_button_clicked() { - Scene_polyhedron_selection_item* selection_item = get_selected_item(); + Scene_polyhedron_selection_item* selection_item = getSelectedItem(); if(!selection_item) { print_message("Error: there is no selected polyhedron selection item!"); return; @@ -244,7 +244,7 @@ public Q_SLOTS: } void on_Create_polyline_item_button_clicked(){ - Scene_polyhedron_selection_item* selection_item = get_selected_item(); + Scene_polyhedron_selection_item* selection_item = getSelectedItem(); if(!selection_item) { print_message("Error: there is no selected polyhedron selection item!"); return; @@ -300,7 +300,7 @@ public Q_SLOTS: } void on_Erase_selected_facets_button_clicked() { - Scene_polyhedron_selection_item* selection_item = get_selected_item(); + Scene_polyhedron_selection_item* selection_item = getSelectedItem(); if(!selection_item) { print_message("Error: there is no selected polyhedron selection item!"); return; @@ -309,7 +309,7 @@ public Q_SLOTS: selection_item->erase_selected_facets(); } void on_Keep_connected_components_button_clicked() { - Scene_polyhedron_selection_item* selection_item = get_selected_item(); + Scene_polyhedron_selection_item* selection_item = getSelectedItem(); if (!selection_item) { print_message("Error: there is no selected polyhedron selection item!"); return; @@ -317,7 +317,7 @@ public Q_SLOTS: selection_item->keep_connected_components(); } void on_Create_polyhedron_item_button_clicked() { - Scene_polyhedron_selection_item* selection_item = get_selected_item(); + Scene_polyhedron_selection_item* selection_item = getSelectedItem(); if(!selection_item) { print_message("Error: there is no selected polyhedron selection item!"); return; @@ -337,7 +337,7 @@ public Q_SLOTS: } void on_Select_sharp_edges_button_clicked() { - Scene_polyhedron_selection_item* selection_item = get_selected_item(); + Scene_polyhedron_selection_item* selection_item = getSelectedItem(); if (!selection_item) { print_message("Error: there is no selected polyhedron selection item!"); return; @@ -349,7 +349,7 @@ public Q_SLOTS: } void on_Expand_reduce_button_clicked() { - Scene_polyhedron_selection_item* selection_item = get_selected_item(); + Scene_polyhedron_selection_item* selection_item = getSelectedItem(); if(!selection_item) { print_message("Error: there is no selected polyhedron selection item!"); return; @@ -365,7 +365,7 @@ public Q_SLOTS: qobject_cast(scene->item(item_id)); if(!selection_item) { return; } - Scene_polyhedron_item* poly_item = get_selected_item(); + Scene_polyhedron_item* poly_item = getSelectedItem(); if(!poly_item) { CGAL_assertion(selection_item->polyhedron_item() == NULL); // which means it is coming from selection_io loader print_message("Error: please select corresponding polyhedron item from Geometric Objects list."); diff --git a/Polyhedron/demo/Polyhedron/Plugins/Point_set/Point_set_selection_plugin.cpp b/Polyhedron/demo/Polyhedron/Plugins/Point_set/Point_set_selection_plugin.cpp index 869ba4bbb8a..721695b5de5 100644 --- a/Polyhedron/demo/Polyhedron/Plugins/Point_set/Point_set_selection_plugin.cpp +++ b/Polyhedron/demo/Polyhedron/Plugins/Point_set/Point_set_selection_plugin.cpp @@ -73,7 +73,7 @@ public: return (m == Wireframe); } - void draw_edges(CGAL::Three::Viewer_interface* viewer) const { + void drawEdges(CGAL::Three::Viewer_interface* viewer) const { viewer->glLineWidth(3.f); polyline->setRbgColor(0, 255, 0); polyline->draw_edges(viewer); @@ -204,7 +204,7 @@ public: dock_widget->setVisible(false); ui_widget.setupUi(dock_widget); - add_dock_widget(dock_widget); + addDockWidget(dock_widget); connect(ui_widget.Selection_tool_combo_box, SIGNAL(currentIndexChanged(int)), this, SLOT(on_Selection_tool_combo_box_changed(int))); @@ -312,7 +312,7 @@ protected: void select_points() { - Scene_points_with_normal_item* point_set_item = get_selected_item(); + Scene_points_with_normal_item* point_set_item = getSelectedItem(); if(!point_set_item) { print_message("Error: no point set selected!"); @@ -405,7 +405,7 @@ public Q_SLOTS: // Select all void on_Select_all_button_clicked() { - Scene_points_with_normal_item* point_set_item = get_selected_item(); + Scene_points_with_normal_item* point_set_item = getSelectedItem(); if(!point_set_item) { print_message("Error: no point set selected!"); diff --git a/Polyhedron/demo/Polyhedron/Plugins/Surface_mesh/Scene_polyhedron_shortest_path_item.cpp b/Polyhedron/demo/Polyhedron/Plugins/Surface_mesh/Scene_polyhedron_shortest_path_item.cpp index b52c54c515e..6fce10d7a11 100644 --- a/Polyhedron/demo/Polyhedron/Plugins/Surface_mesh/Scene_polyhedron_shortest_path_item.cpp +++ b/Polyhedron/demo/Polyhedron/Plugins/Surface_mesh/Scene_polyhedron_shortest_path_item.cpp @@ -31,7 +31,7 @@ Scene_polyhedron_shortest_path_item::~Scene_polyhedron_shortest_path_item() deinitialize(); } -void Scene_polyhedron_shortest_path_item::compute_elements() const +void Scene_polyhedron_shortest_path_item::computeElements() const { vertices.resize(0); @@ -48,7 +48,7 @@ void Scene_polyhedron_shortest_path_item::compute_elements() const } -void Scene_polyhedron_shortest_path_item::initialize_buffers(CGAL::Three::Viewer_interface* viewer)const +void Scene_polyhedron_shortest_path_item::initializeBuffers(CGAL::Three::Viewer_interface* viewer)const { //vao containing the data for the selected lines { @@ -89,20 +89,20 @@ void Scene_polyhedron_shortest_path_item::draw(CGAL::Three::Viewer_interface* vi { if (supportsRenderingMode(renderingMode())) { - draw_points(viewer); + drawPoints(viewer); } } -void Scene_polyhedron_shortest_path_item::draw_points(CGAL::Three::Viewer_interface* viewer) const +void Scene_polyhedron_shortest_path_item::drawPoints(CGAL::Three::Viewer_interface* viewer) const { if(!are_buffers_filled) { - initialize_buffers(viewer); + initializeBuffers(viewer); } glPointSize(4.0f); program = getShaderProgram(PROGRAM_WITHOUT_LIGHT); - attrib_buffers(viewer, PROGRAM_WITHOUT_LIGHT); + attribBuffers(viewer, PROGRAM_WITHOUT_LIGHT); vaos[Selected_Edges]->bind(); program->bind(); program->setAttributeValue("colors", QColor(Qt::green)); @@ -183,7 +183,7 @@ void Scene_polyhedron_shortest_path_item::poly_item_changed() void Scene_polyhedron_shortest_path_item::invalidateOpenGLBuffers() { - compute_elements(); + computeElements(); compute_bbox(); are_buffers_filled = false; diff --git a/Polyhedron/demo/Polyhedron/Plugins/Surface_mesh/Scene_polyhedron_shortest_path_item.h b/Polyhedron/demo/Polyhedron/Plugins/Surface_mesh/Scene_polyhedron_shortest_path_item.h index 0bff4db678c..1eeb0b7ed06 100644 --- a/Polyhedron/demo/Polyhedron/Plugins/Surface_mesh/Scene_polyhedron_shortest_path_item.h +++ b/Polyhedron/demo/Polyhedron/Plugins/Surface_mesh/Scene_polyhedron_shortest_path_item.h @@ -111,9 +111,9 @@ private: mutable std::vector vertices; mutable QOpenGLShaderProgram *program; - using Scene_polyhedron_item_decorator::initialize_buffers; - void initialize_buffers(CGAL::Three::Viewer_interface *viewer = 0) const; - void compute_elements(void) const; + using Scene_polyhedron_item_decorator::initializeBuffers; + void initializeBuffers(CGAL::Three::Viewer_interface *viewer = 0) const; + void computeElements(void) const; public: @@ -131,7 +131,7 @@ public: using Scene_polyhedron_item_decorator::draw; virtual void draw(CGAL::Three::Viewer_interface*) const; // Points OpenGL drawing - virtual void draw_points(CGAL::Three::Viewer_interface*) const; + virtual void drawPoints(CGAL::Three::Viewer_interface*) const; virtual Scene_polyhedron_shortest_path_item* clone() const; diff --git a/Polyhedron/demo/Polyhedron/Plugins/Surface_mesh/Shortest_path_plugin.cpp b/Polyhedron/demo/Polyhedron/Plugins/Surface_mesh/Shortest_path_plugin.cpp index 54aac28dd39..064bc742a68 100644 --- a/Polyhedron/demo/Polyhedron/Plugins/Surface_mesh/Shortest_path_plugin.cpp +++ b/Polyhedron/demo/Polyhedron/Plugins/Surface_mesh/Shortest_path_plugin.cpp @@ -84,7 +84,7 @@ public: dock_widget->setVisible(false); ui_widget.setupUi(dock_widget); - add_dock_widget(dock_widget); + addDockWidget(dock_widget); connect(ui_widget.Selection_type_combo_box, SIGNAL(currentIndexChanged(int)), this, SLOT(on_Selection_type_combo_box_changed(int))); connect(ui_widget.Primitives_type_combo_box, SIGNAL(currentIndexChanged(int)), this, SLOT(on_Primitives_type_combo_box_changed(int))); @@ -180,7 +180,7 @@ void Polyhedron_demo_shortest_path_plugin::new_item(int itemIndex) if(item->polyhedron_item() == NULL) { - Scene_polyhedron_item* polyhedronItem = get_selected_item(); + Scene_polyhedron_item* polyhedronItem = getSelectedItem(); if(!polyhedronItem) { @@ -224,7 +224,7 @@ void Polyhedron_demo_shortest_path_plugin::new_item(int itemIndex) void Polyhedron_demo_shortest_path_plugin::on_actionMakeShortestPaths_triggered() { - Scene_polyhedron_item* polyhedronItem = get_selected_item(); + Scene_polyhedron_item* polyhedronItem = getSelectedItem(); if (polyhedronItem) { if (m_shortestPathsMap.find(polyhedronItem) == m_shortestPathsMap.end()) diff --git a/Polyhedron/demo/Polyhedron/Plugins/Surface_mesh_deformation/Scene_edit_polyhedron_item.cpp b/Polyhedron/demo/Polyhedron/Plugins/Surface_mesh_deformation/Scene_edit_polyhedron_item.cpp index a2bef3e2430..d0e1ca6b10c 100644 --- a/Polyhedron/demo/Polyhedron/Plugins/Surface_mesh_deformation/Scene_edit_polyhedron_item.cpp +++ b/Polyhedron/demo/Polyhedron/Plugins/Surface_mesh_deformation/Scene_edit_polyhedron_item.cpp @@ -110,7 +110,7 @@ Scene_edit_polyhedron_item::~Scene_edit_polyhedron_item() } ///////////////////////////// /// For the Shader gestion/// -void Scene_edit_polyhedron_item::initialize_buffers(CGAL::Three::Viewer_interface *viewer =0) const +void Scene_edit_polyhedron_item::initializeBuffers(CGAL::Three::Viewer_interface *viewer =0) const { //vao for the facets { @@ -580,12 +580,12 @@ bool Scene_edit_polyhedron_item::eventFilter(QObject* /*target*/, QEvent *event) } #include "opengl_tools.h" -void Scene_edit_polyhedron_item::draw_edges(CGAL::Three::Viewer_interface* viewer) const { +void Scene_edit_polyhedron_item::drawEdges(CGAL::Three::Viewer_interface* viewer) const { if(!are_buffers_filled) - initialize_buffers(viewer); + initializeBuffers(viewer); vaos[Edges]->bind(); program = getShaderProgram(PROGRAM_NO_SELECTION); - attrib_buffers(viewer,PROGRAM_NO_SELECTION); + attribBuffers(viewer,PROGRAM_NO_SELECTION); program->bind(); program->setAttributeValue("colors", QColor(0,0,0)); viewer->glDrawElements(GL_LINES, (GLsizei) edges.size(), GL_UNSIGNED_INT, edges.data()); @@ -595,7 +595,7 @@ void Scene_edit_polyhedron_item::draw_edges(CGAL::Three::Viewer_interface* viewe vaos[Frame_plane]->bind(); program = getShaderProgram(PROGRAM_NO_SELECTION); - attrib_buffers(viewer,PROGRAM_NO_SELECTION); + attribBuffers(viewer,PROGRAM_NO_SELECTION); program->bind(); program->setAttributeValue("colors", QColor(0,0,0)); viewer->glDrawArrays(GL_LINE_LOOP, 0, (GLsizei)pos_frame_plane.size()/3); @@ -609,17 +609,17 @@ void Scene_edit_polyhedron_item::draw_edges(CGAL::Three::Viewer_interface* viewe } void Scene_edit_polyhedron_item::draw(CGAL::Three::Viewer_interface* viewer) const { if(!are_buffers_filled) - initialize_buffers(viewer); + initializeBuffers(viewer); vaos[Facets]->bind(); program = getShaderProgram(PROGRAM_WITH_LIGHT); - attrib_buffers(viewer,PROGRAM_WITH_LIGHT); + attribBuffers(viewer,PROGRAM_WITH_LIGHT); program->bind(); QColor color = this->color(); program->setAttributeValue("colors", color); viewer->glDrawElements(GL_TRIANGLES, (GLsizei) tris.size(), GL_UNSIGNED_INT, tris.data()); program->release(); vaos[Facets]->release(); - draw_edges(viewer); + drawEdges(viewer); draw_ROI_and_control_vertices(viewer); } @@ -661,7 +661,7 @@ void Scene_edit_polyhedron_item::draw_ROI_and_control_vertices(CGAL::Three::View vaos[Roi_points]->bind(); program = getShaderProgram(PROGRAM_NO_SELECTION); - attrib_buffers(viewer,PROGRAM_NO_SELECTION); + attribBuffers(viewer,PROGRAM_NO_SELECTION); program->bind(); program->setAttributeValue("colors", QColor(0,255,0)); viewer->glDrawArrays(GL_POINTS, 0, static_cast(nb_ROI/3)); @@ -676,13 +676,25 @@ void Scene_edit_polyhedron_item::draw_ROI_and_control_vertices(CGAL::Three::View if(!ui_widget->ShowAsSphereCheckBox->isChecked() || !viewer->extension_is_found) { vaos[Control_points]->bind(); program = getShaderProgram(PROGRAM_NO_SELECTION); - attrib_buffers(viewer,PROGRAM_NO_SELECTION); + attribBuffers(viewer,PROGRAM_NO_SELECTION); program->bind(); program->setAttributeValue("colors", QColor(255,0,0)); viewer->glDrawArrays(GL_POINTS, 0, static_cast(nb_control/3)); program->release(); vaos[Control_points]->release(); } + else{ + vaos[Control_spheres]->bind(); + program = getShaderProgram(PROGRAM_INSTANCED); + attribBuffers(viewer,PROGRAM_INSTANCED); + program->bind(); + program->setAttributeValue("colors", QColor(255,0,0)); + viewer->glDrawArraysInstanced(GL_TRIANGLES, 0, + static_cast(nb_sphere/3), + static_cast(nb_control/3)); + program->release(); + vaos[Control_spheres]->release(); + } QGLViewer* viewerB = *QGLViewer::QGLViewerPool().begin(); for(Ctrl_vertices_group_data_list::const_iterator hgb_data = ctrl_vertex_frame_map.begin(); hgb_data != ctrl_vertex_frame_map.end(); ++hgb_data) @@ -697,7 +709,7 @@ void Scene_edit_polyhedron_item::draw_ROI_and_control_vertices(CGAL::Three::View f_mat.data()[i] = (float)f_matrix[i]; vaos[Axis]->bind(); program = getShaderProgram(PROGRAM_NO_SELECTION); - attrib_buffers(viewer, PROGRAM_NO_SELECTION); + attribBuffers(viewer, PROGRAM_NO_SELECTION); program->bind(); program->setUniformValue("f_matrix", f_mat); viewer->glDrawArrays(GL_LINES, 0, static_cast(nb_axis/3)); diff --git a/Polyhedron/demo/Polyhedron/Plugins/Surface_mesh_deformation/Scene_edit_polyhedron_item.h b/Polyhedron/demo/Polyhedron/Plugins/Surface_mesh_deformation/Scene_edit_polyhedron_item.h index c7ff34949f7..50879e3877d 100644 --- a/Polyhedron/demo/Polyhedron/Plugins/Surface_mesh_deformation/Scene_edit_polyhedron_item.h +++ b/Polyhedron/demo/Polyhedron/Plugins/Surface_mesh_deformation/Scene_edit_polyhedron_item.h @@ -222,7 +222,7 @@ public: // Points/Wireframe/Flat/Gouraud OpenGL drawing in a display list void draw() const{} void draw(CGAL::Three::Viewer_interface*) const; - void draw_edges(CGAL::Three::Viewer_interface*) const; + void drawEdges(CGAL::Three::Viewer_interface*) const; void draw_bbox(const CGAL::Three::Scene_interface::Bbox&) const; void draw_ROI_and_control_vertices(CGAL::Three::Viewer_interface *viewer) const; void draw_frame_plane(QGLViewer *) const; @@ -342,8 +342,8 @@ private: NumberOfVaos }; mutable QOpenGLBuffer *in_bu; - using CGAL::Three::Scene_item::initialize_buffers; - void initialize_buffers(CGAL::Three::Viewer_interface *viewer) const; + using CGAL::Three::Scene_item::initializeBuffers; + void initializeBuffers(CGAL::Three::Viewer_interface *viewer) const; void compute_normals_and_vertices(void); void compute_bbox(const CGAL::Three::Scene_interface::Bbox&); void reset_drawing_data(); diff --git a/Polyhedron/demo/Polyhedron/Polyhedron_demo.cpp b/Polyhedron/demo/Polyhedron/Polyhedron_demo.cpp index f15f6bd0998..625dc68f381 100644 --- a/Polyhedron/demo/Polyhedron/Polyhedron_demo.cpp +++ b/Polyhedron/demo/Polyhedron/Polyhedron_demo.cpp @@ -76,7 +76,7 @@ Polyhedron_demo::Polyhedron_demo(int& argc, char **argv, } QFileInfo autostart_js("autostart.js"); if(!parser.isSet(no_autostart) && autostart_js.exists()) { - mainWindow.load_script(autostart_js); + mainWindow.loadScript(autostart_js); } #endif Q_FOREACH(QString filename, parser.positionalArguments()) { diff --git a/Polyhedron/demo/Polyhedron/Polyhedron_demo_plugin_helper.cpp b/Polyhedron/demo/Polyhedron/Polyhedron_demo_plugin_helper.cpp index b6213fcecab..fe776221b97 100644 --- a/Polyhedron/demo/Polyhedron/Polyhedron_demo_plugin_helper.cpp +++ b/Polyhedron/demo/Polyhedron/Polyhedron_demo_plugin_helper.cpp @@ -3,7 +3,7 @@ #include -void CGAL::Three::Polyhedron_demo_plugin_helper::add_dock_widget(QDockWidget* dock_widget) +void CGAL::Three::Polyhedron_demo_plugin_helper::addDockWidget(QDockWidget* dock_widget) { mw->addDockWidget(::Qt::LeftDockWidgetArea, dock_widget); diff --git a/Polyhedron/demo/Polyhedron/Scene.cpp b/Polyhedron/demo/Polyhedron/Scene.cpp index 0233e325f72..22f14caaf3f 100644 --- a/Polyhedron/demo/Polyhedron/Scene.cpp +++ b/Polyhedron/demo/Polyhedron/Scene.cpp @@ -444,9 +444,9 @@ Scene::draw_aux(bool with_names, CGAL::Three::Viewer_interface* viewer) if(viewer) - item.draw_edges(viewer); + item.drawEdges(viewer); else - item.draw_edges(); + item.drawEdges(); } else{ if( item.renderingMode() == PointsPlusNormals ){ @@ -464,9 +464,9 @@ Scene::draw_aux(bool with_names, CGAL::Three::Viewer_interface* viewer) item.selection_changed(false); } if(viewer) - item.draw_edges(viewer); + item.drawEdges(viewer); else - item.draw_edges(); + item.drawEdges(); } } if((item.renderingMode() == Wireframe || item.renderingMode() == PointsPlusNormals ) @@ -503,9 +503,9 @@ Scene::draw_aux(bool with_names, CGAL::Three::Viewer_interface* viewer) viewer->glLineWidth(1.0f); if(viewer) - item.draw_points(viewer); + item.drawPoints(viewer); else - item.draw_points(); + item.drawPoints(); } if(item.renderingMode() == Points && with_names) { // read depth buffer at pick location; @@ -547,12 +547,10 @@ Scene::draw_aux(bool with_names, CGAL::Three::Viewer_interface* viewer) { CGAL::Three::Scene_item& item = *m_entries[index]; if(item.visible() && item.renderingMode() == Splatting) { - viewer->glColor4d(item.color().redF(), item.color().greenF(), item.color().blueF(), item.color().alphaF()); - if(viewer) - item.draw_splats(viewer); - else - item.draw_splats(); + item.drawSplats(viewer); } + else + item.drawSplats(); } ms_splatting->finalize(); @@ -1210,7 +1208,7 @@ QList Scene::getModelIndexFromId(int id) const return index_map.keys(id); } -void Scene::add_group(Scene_group_item* group) +void Scene::addGroup(Scene_group_item* group) { //Find the indices of the selected items QList indices; diff --git a/Polyhedron/demo/Polyhedron/Scene_c3t3_item.cpp b/Polyhedron/demo/Polyhedron/Scene_c3t3_item.cpp index fc6e70d877c..6ad230e63ce 100644 --- a/Polyhedron/demo/Polyhedron/Scene_c3t3_item.cpp +++ b/Polyhedron/demo/Polyhedron/Scene_c3t3_item.cpp @@ -235,7 +235,7 @@ struct Scene_c3t3_item_priv { is_aabb_tree_built = false; } - void compute_intersection(const Primitive& facet); + void computeIntersection(const Primitive& facet); void fill_aabb_tree() { if(item->isEmpty()) return; @@ -684,13 +684,13 @@ void Scene_c3t3_item::draw(CGAL::Three::Viewer_interface* viewer) const { if (!are_buffers_filled) { - ncthis->compute_elements(); - ncthis->initialize_buffers(viewer); + ncthis->computeElements(); + ncthis->initializeBuffers(viewer); } vaos[Grid]->bind(); - program = getShaderProgram(PROGRAM_NO_SELECTION); - attrib_buffers(viewer, PROGRAM_NO_SELECTION); + program = getShaderProgram(PROGRAM_WITHOUT_LIGHT); + attribBuffers(viewer, PROGRAM_WITHOUT_LIGHT); program->bind(); program->setAttributeValue("colors", QColor(Qt::black)); QMatrix4x4 f_mat; @@ -703,7 +703,7 @@ void Scene_c3t3_item::draw(CGAL::Three::Viewer_interface* viewer) const { vaos[Facets]->bind(); program = getShaderProgram(PROGRAM_C3T3); - attrib_buffers(viewer, PROGRAM_C3T3); + attribBuffers(viewer, PROGRAM_C3T3); program->bind(); QVector4D cp(this->plane().a(),this->plane().b(),this->plane().c(),this->plane().d()); program->setUniformValue("cutplane", cp); @@ -718,7 +718,7 @@ void Scene_c3t3_item::draw(CGAL::Three::Viewer_interface* viewer) const { { if(!intersection->visible()) intersection->setVisible(true); - ncthis->compute_intersections(); + ncthis->computeIntersections(); intersection->initialize_buffers(viewer); are_intersection_buffers_filled = true; } @@ -733,7 +733,7 @@ void Scene_c3t3_item::draw(CGAL::Three::Viewer_interface* viewer) const { Scene_group_item::draw(viewer); } -void Scene_c3t3_item::draw_edges(CGAL::Three::Viewer_interface* viewer) const { +void Scene_c3t3_item::drawEdges(CGAL::Three::Viewer_interface* viewer) const { if(renderingMode() == FlatPlusEdges) { GLint renderMode; @@ -743,8 +743,8 @@ void Scene_c3t3_item::draw_edges(CGAL::Three::Viewer_interface* viewer) const { Scene_c3t3_item* ncthis = const_cast(this); if (!are_buffers_filled) { - ncthis->compute_elements(); - ncthis->initialize_buffers(viewer); + ncthis->computeElements(); + ncthis->initializeBuffers(viewer); } if(renderingMode() == Wireframe) @@ -752,6 +752,8 @@ void Scene_c3t3_item::draw_edges(CGAL::Three::Viewer_interface* viewer) const { vaos[Grid]->bind(); program = getShaderProgram(PROGRAM_NO_SELECTION); attrib_buffers(viewer, PROGRAM_NO_SELECTION); + program = getShaderProgram(PROGRAM_WITHOUT_LIGHT); + attribBuffers(viewer, PROGRAM_WITHOUT_LIGHT); program->bind(); program->setAttributeValue("colors", QColor(Qt::black)); QMatrix4x4 f_mat; @@ -764,7 +766,7 @@ void Scene_c3t3_item::draw_edges(CGAL::Three::Viewer_interface* viewer) const { } vaos[Edges]->bind(); program = getShaderProgram(PROGRAM_C3T3_EDGES); - attrib_buffers(viewer, PROGRAM_C3T3_EDGES); + attribBuffers(viewer, PROGRAM_C3T3_EDGES); program->bind(); QVector4D cp(this->plane().a(),this->plane().b(),this->plane().c(),this->plane().d()); program->setUniformValue("cutplane", cp); @@ -778,7 +780,7 @@ void Scene_c3t3_item::draw_edges(CGAL::Three::Viewer_interface* viewer) const { { if(!intersection->visible()) intersection->setVisible(true); - ncthis->compute_intersections(); + ncthis->computeIntersections(); intersection->initialize_buffers(viewer); are_intersection_buffers_filled = true; } @@ -796,26 +798,69 @@ void Scene_c3t3_item::draw_edges(CGAL::Three::Viewer_interface* viewer) const { { vaos[CNC]->bind(); program = getShaderProgram(PROGRAM_NO_SELECTION); - attrib_buffers(viewer, PROGRAM_NO_SELECTION); + attribBuffers(viewer, PROGRAM_NO_SELECTION); program->bind(); program->setAttributeValue("colors", QColor(Qt::black)); viewer->glDrawArrays(GL_LINES, 0, static_cast(positions_lines_not_in_complex_size / 3)); program->release(); vaos[Edges]->release(); } + if(spheres_are_shown) + { + vaos[Wired_spheres]->bind(); + program_sphere->bind(); + //ModelViewMatrix used for the transformation of the camera. + QMatrix4x4 mvp_mat; + // ModelView Matrix used for the lighting system + QMatrix4x4 mv_mat; + GLdouble d_mat[16]; + GLint is_both_sides = 0; + viewer->camera()->getModelViewProjectionMatrix(d_mat); + //Convert the GLdoubles matrices in GLfloats + for (int i=0; i<16; ++i){ + mvp_mat.data()[i] = GLfloat(d_mat[i]); + } + viewer->camera()->getModelViewMatrix(d_mat); + for (int i=0; i<16; ++i) + mv_mat.data()[i] = GLfloat(d_mat[i]); + QVector4D position(0.0f,0.0f,1.0f, 1.0f ); + QVector4D ambient(0.4f, 0.4f, 0.4f, 0.4f); + // Diffuse + QVector4D diffuse(1.0f, 1.0f, 1.0f, 1.0f); + // Specular + QVector4D specular(0.0f, 0.0f, 0.0f, 1.0f); + viewer->glGetIntegerv(GL_LIGHT_MODEL_TWO_SIDE, &is_both_sides); + + + program_sphere->setUniformValue("mvp_matrix", mvp_mat); + program_sphere->setUniformValue("mv_matrix", mv_mat); + program_sphere->setUniformValue("light_pos", position); + program_sphere->setUniformValue("light_diff",diffuse); + program_sphere->setUniformValue("light_spec", specular); + program_sphere->setUniformValue("light_amb", ambient); + program_sphere->setUniformValue("spec_power", 51.8f); + program_sphere->setUniformValue("is_two_side", is_both_sides); + + viewer->glDrawArraysInstanced(GL_TRIANGLES, 0, + static_cast(ws_vertex.size()/3), + static_cast(s_radius.size())); + program_sphere->release(); + vaos[Wired_spheres]->release(); +>>>>>>> Plugin API made in CamelCase + } } -void Scene_c3t3_item::draw_points(CGAL::Three::Viewer_interface * viewer) const +void Scene_c3t3_item::drawPoints(CGAL::Three::Viewer_interface * viewer) const { Scene_c3t3_item* ncthis = const_cast(this); if (!are_buffers_filled) { - ncthis->compute_elements(); - ncthis-> initialize_buffers(viewer); + ncthis->computeElements(); + ncthis-> initializeBuffers(viewer); } vaos[Edges]->bind(); program = getShaderProgram(PROGRAM_C3T3_EDGES); - attrib_buffers(viewer, PROGRAM_C3T3_EDGES); + attribBuffers(viewer, PROGRAM_C3T3_EDGES); program->bind(); QVector4D cp(this->plane().a(),this->plane().b(),this->plane().c(),this->plane().d()); program->setUniformValue("cutplane", cp); @@ -1127,7 +1172,7 @@ void Scene_c3t3_item::initialize_buffers(CGAL::Three::Viewer_interface *viewer) -void Scene_c3t3_item_priv::compute_intersection(const Primitive& facet) +void Scene_c3t3_item_priv::computeIntersection(const Primitive& facet) { const Kernel::Point_3& pa = facet.id().first->vertex(0)->point(); const Kernel::Point_3& pb = facet.id().first->vertex(1)->point(); @@ -1160,20 +1205,20 @@ void Scene_c3t3_item_priv::compute_intersection(const Primitive& facet) } -struct Compute_intersection { +struct ComputeIntersection { Scene_c3t3_item_priv& item_priv; - Compute_intersection(Scene_c3t3_item_priv& item_priv) + ComputeIntersection(Scene_c3t3_item_priv& item_priv) : item_priv(item_priv) {} void operator()(const Primitive& facet) const { - item_priv.compute_intersection(facet); + item_priv.computeIntersection(facet); } }; -void Scene_c3t3_item::compute_intersections() +void Scene_c3t3_item::computeIntersections() { if(!d->is_aabb_tree_built) d->fill_aabb_tree(); @@ -1183,10 +1228,10 @@ void Scene_c3t3_item::compute_intersections() positions_lines.clear(); const Kernel::Plane_3& plane = this->plane(); d->tree.all_intersected_primitives(plane, - boost::make_function_output_iterator(Compute_intersection(*this->d))); + boost::make_function_output_iterator(ComputeIntersection(*this->d))); } -void Scene_c3t3_item::compute_spheres() +void Scene_c3t3_item::computeSpheres() { if(!spheres) return; @@ -1225,7 +1270,7 @@ void Scene_c3t3_item::compute_spheres() spheres->invalidateOpenGLBuffers(); } -void Scene_c3t3_item::compute_elements() +void Scene_c3t3_item::computeElements() { positions_poly.clear(); normals.clear(); @@ -1372,7 +1417,7 @@ void Scene_c3t3_item::show_spheres(bool b) scene->addItem(spheres); scene->changeGroup(spheres, this); lockChild(spheres); - compute_spheres(); + computeSpheres(); } else if (!b && spheres!=NULL) { diff --git a/Polyhedron/demo/Polyhedron/Scene_c3t3_item.h b/Polyhedron/demo/Polyhedron/Scene_c3t3_item.h index 10850d93c2f..2b51dcfb8e6 100644 --- a/Polyhedron/demo/Polyhedron/Scene_c3t3_item.h +++ b/Polyhedron/demo/Polyhedron/Scene_c3t3_item.h @@ -110,8 +110,8 @@ public: } void draw(CGAL::Three::Viewer_interface* viewer) const; - void draw_edges(CGAL::Three::Viewer_interface* viewer) const; - void draw_points(CGAL::Three::Viewer_interface * viewer) const; + void drawEdges(CGAL::Three::Viewer_interface* viewer) const; + void drawPoints(CGAL::Three::Viewer_interface * viewer) const; private: bool need_changed; @@ -244,12 +244,12 @@ private: mutable std::vector s_center; mutable QOpenGLShaderProgram *program; - using Scene_item::initialize_buffers; - void initialize_buffers(CGAL::Three::Viewer_interface *viewer); + using Scene_item::initializeBuffers; + void initializeBuffers(CGAL::Three::Viewer_interface *viewer); void initialize_intersection_buffers(CGAL::Three::Viewer_interface *viewer); - void compute_spheres(); - void compute_elements(); - void compute_intersections(); + void computeSpheres(); + void computeElements(); + void computeIntersections(); bool cnc_are_shown; }; diff --git a/Polyhedron/demo/Polyhedron/Scene_implicit_function_item.cpp b/Polyhedron/demo/Polyhedron/Scene_implicit_function_item.cpp index 7fa0045780f..3ea81860b24 100644 --- a/Polyhedron/demo/Polyhedron/Scene_implicit_function_item.cpp +++ b/Polyhedron/demo/Polyhedron/Scene_implicit_function_item.cpp @@ -16,7 +16,7 @@ bool is_nan(double d) return !CGAL::Is_valid()( d ); } -void Scene_implicit_function_item::initialize_buffers(CGAL::Three::Viewer_interface *viewer = 0) const +void Scene_implicit_function_item::initializeBuffers(CGAL::Three::Viewer_interface *viewer = 0) const { if(GLuint(-1) == textureId) { viewer->glGenTextures(1, &textureId); @@ -385,7 +385,7 @@ void Scene_implicit_function_item::draw(CGAL::Three::Viewer_interface* viewer) const { if(!are_buffers_filled) - initialize_buffers(viewer); + initializeBuffers(viewer); if(frame_->isManipulated()) { if(need_update_) { @@ -396,7 +396,7 @@ Scene_implicit_function_item::draw(CGAL::Three::Viewer_interface* viewer) const vaos[Plane]->bind(); viewer->glActiveTexture(GL_TEXTURE0); viewer->glBindTexture(GL_TEXTURE_2D, textureId); - attrib_buffers(viewer, PROGRAM_WITH_TEXTURE); + attribBuffers(viewer, PROGRAM_WITH_TEXTURE); QMatrix4x4 f_mat; GLdouble d_mat[16]; frame_->getMatrix(d_mat); @@ -416,13 +416,13 @@ Scene_implicit_function_item::draw(CGAL::Three::Viewer_interface* viewer) const } void -Scene_implicit_function_item::draw_edges(CGAL::Three::Viewer_interface* viewer) const +Scene_implicit_function_item::drawEdges(CGAL::Three::Viewer_interface* viewer) const { if(!are_buffers_filled) - initialize_buffers(viewer); + initializeBuffers(viewer); // draw_aux(viewer, true); vaos[BBox]->bind(); - attrib_buffers(viewer, PROGRAM_WITHOUT_LIGHT); + attribBuffers(viewer, PROGRAM_WITHOUT_LIGHT); program = getShaderProgram(PROGRAM_WITHOUT_LIGHT); program->bind(); program->setAttributeValue("colors", QVector3D(0.f,0.f,0.f)); diff --git a/Polyhedron/demo/Polyhedron/Scene_implicit_function_item.h b/Polyhedron/demo/Polyhedron/Scene_implicit_function_item.h index ba163a5cbf1..b5114ae6276 100644 --- a/Polyhedron/demo/Polyhedron/Scene_implicit_function_item.h +++ b/Polyhedron/demo/Polyhedron/Scene_implicit_function_item.h @@ -66,7 +66,7 @@ public: // actually draw() is also overloaded to detect when the cut plane is moved virtual void draw()const {} virtual void draw(CGAL::Three::Viewer_interface*) const; - virtual void draw_edges(CGAL::Three::Viewer_interface*) const; + virtual void drawEdges(CGAL::Three::Viewer_interface*) const; virtual QString toolTip() const; virtual void invalidateOpenGLBuffers(); @@ -121,8 +121,8 @@ private: GLuint vao; GLuint buffer[4]; - using CGAL::Three::Scene_item::initialize_buffers; - void initialize_buffers(CGAL::Three::Viewer_interface *viewer) const; + using CGAL::Three::Scene_item::initializeBuffers; + void initializeBuffers(CGAL::Three::Viewer_interface *viewer) const; void compute_vertices_and_texmap(void); void compute_texture(int, int); }; diff --git a/Polyhedron/demo/Polyhedron/Scene_item.cpp b/Polyhedron/demo/Polyhedron/Scene_item.cpp index a28868a94f8..cc12b959aea 100644 --- a/Polyhedron/demo/Polyhedron/Scene_item.cpp +++ b/Polyhedron/demo/Polyhedron/Scene_item.cpp @@ -167,10 +167,10 @@ void CGAL::Three::Scene_item::select(double /*orig_x*/, } // set-up the uniform attributes of the shader programs. -void CGAL::Three::Scene_item::attrib_buffers(CGAL::Three::Viewer_interface* viewer, +void CGAL::Three::Scene_item::attribBuffers(CGAL::Three::Viewer_interface* viewer, int program_name) const { - viewer->attrib_buffers(program_name); + viewer->attribBuffers(program_name); viewer->getShaderProgram(program_name)->bind(); if(is_selected) viewer->getShaderProgram(program_name)->setUniformValue("is_selected", true); @@ -210,7 +210,7 @@ CGAL::Three::Scene_item::Header_data CGAL::Three::Scene_item::header() const return data; } -QString CGAL::Three::Scene_item::compute_stats(int ) +QString CGAL::Three::Scene_item::computeStats(int ) { return QString(); } diff --git a/Polyhedron/demo/Polyhedron/Scene_nef_polyhedron_item.cpp b/Polyhedron/demo/Polyhedron/Scene_nef_polyhedron_item.cpp index 880b05183a7..c3898da231b 100644 --- a/Polyhedron/demo/Polyhedron/Scene_nef_polyhedron_item.cpp +++ b/Polyhedron/demo/Polyhedron/Scene_nef_polyhedron_item.cpp @@ -83,7 +83,7 @@ Scene_nef_polyhedron_item::~Scene_nef_polyhedron_item() delete nef_poly; } -void Scene_nef_polyhedron_item::initialize_buffers(CGAL::Three::Viewer_interface *viewer) const +void Scene_nef_polyhedron_item::initializeBuffers(CGAL::Three::Viewer_interface *viewer) const { //vao for the facets { @@ -405,13 +405,13 @@ void Scene_nef_polyhedron_item::draw(CGAL::Three::Viewer_interface* viewer) cons if(!are_buffers_filled) { compute_normals_and_vertices(); - initialize_buffers(viewer); + initializeBuffers(viewer); } vaos[Facets]->bind(); // tells the GPU to use the program just created program=getShaderProgram(PROGRAM_WITH_LIGHT); - attrib_buffers(viewer,PROGRAM_WITH_LIGHT); + attribBuffers(viewer,PROGRAM_WITH_LIGHT); program->bind(); program->setUniformValue("is_two_side", 1); viewer->glDrawArrays(GL_TRIANGLES, 0, static_cast(nb_facets/3)); @@ -421,21 +421,21 @@ void Scene_nef_polyhedron_item::draw(CGAL::Three::Viewer_interface* viewer) cons viewer->glGetFloatv(GL_POINT_SIZE, &point_size); viewer->glPointSize(10.f); - draw_points(viewer); + drawPoints(viewer); viewer->glPointSize(point_size); } -void Scene_nef_polyhedron_item::draw_edges(CGAL::Three::Viewer_interface* viewer) const +void Scene_nef_polyhedron_item::drawEdges(CGAL::Three::Viewer_interface* viewer) const { if(!are_buffers_filled) { compute_normals_and_vertices(); - initialize_buffers(viewer); + initializeBuffers(viewer); } vaos[Edges]->bind(); program = getShaderProgram(PROGRAM_WITHOUT_LIGHT); - attrib_buffers(viewer ,PROGRAM_WITHOUT_LIGHT); + attribBuffers(viewer ,PROGRAM_WITHOUT_LIGHT); program->bind(); viewer->glDrawArrays(GL_LINES,0,static_cast(nb_lines/3)); vaos[Edges]->release(); @@ -446,20 +446,20 @@ void Scene_nef_polyhedron_item::draw_edges(CGAL::Three::Viewer_interface* viewer viewer->glGetFloatv(GL_POINT_SIZE, &point_size); viewer->glPointSize(10.f); - draw_points(viewer); + drawPoints(viewer); viewer->glPointSize(point_size); } } -void Scene_nef_polyhedron_item::draw_points(CGAL::Three::Viewer_interface* viewer) const +void Scene_nef_polyhedron_item::drawPoints(CGAL::Three::Viewer_interface* viewer) const { if(!are_buffers_filled) { compute_normals_and_vertices(); - initialize_buffers(viewer); + initializeBuffers(viewer); } vaos[Points]->bind(); program=getShaderProgram(PROGRAM_WITHOUT_LIGHT); - attrib_buffers(viewer ,PROGRAM_WITHOUT_LIGHT); + attribBuffers(viewer ,PROGRAM_WITHOUT_LIGHT); program->bind(); program->setAttributeValue("colors", this->color()); viewer->glDrawArrays(GL_POINTS,0,static_cast(nb_points/3)); diff --git a/Polyhedron/demo/Polyhedron/Scene_nef_polyhedron_item.h b/Polyhedron/demo/Polyhedron/Scene_nef_polyhedron_item.h index 7cf33a959d7..f641db61b86 100644 --- a/Polyhedron/demo/Polyhedron/Scene_nef_polyhedron_item.h +++ b/Polyhedron/demo/Polyhedron/Scene_nef_polyhedron_item.h @@ -34,9 +34,9 @@ public: void direct_draw() const; virtual void draw(CGAL::Three::Viewer_interface*) const; - virtual void draw_edges() const {} - virtual void draw_edges(CGAL::Three::Viewer_interface* viewer) const; - virtual void draw_points(CGAL::Three::Viewer_interface*) const; + virtual void drawEdges() const {} + virtual void drawEdges(CGAL::Three::Viewer_interface* viewer) const; + virtual void drawPoints(CGAL::Three::Viewer_interface*) const; // Wireframe OpenGL drawing bool isFinite() const { return true; } @@ -101,8 +101,8 @@ private: mutable QOpenGLShaderProgram *program; - using CGAL::Three::Scene_item::initialize_buffers; - void initialize_buffers(CGAL::Three::Viewer_interface *viewer) const; + using CGAL::Three::Scene_item::initializeBuffers; + void initializeBuffers(CGAL::Three::Viewer_interface *viewer) const; void compute_normals_and_vertices(void) const; void triangulate_facet(); diff --git a/Polyhedron/demo/Polyhedron/Scene_plane_item.cpp b/Polyhedron/demo/Polyhedron/Scene_plane_item.cpp index 6dd327713bd..8a4b7ded91e 100644 --- a/Polyhedron/demo/Polyhedron/Scene_plane_item.cpp +++ b/Polyhedron/demo/Polyhedron/Scene_plane_item.cpp @@ -2,7 +2,7 @@ -void Scene_plane_item::initialize_buffers(CGAL::Three::Viewer_interface *viewer) const +void Scene_plane_item::initializeBuffers(CGAL::Three::Viewer_interface *viewer) const { program = getShaderProgram(PROGRAM_WITHOUT_LIGHT, viewer); program->bind(); @@ -94,10 +94,10 @@ void Scene_plane_item::compute_normals_and_vertices(void) void Scene_plane_item::draw(CGAL::Three::Viewer_interface* viewer)const { if(!are_buffers_filled) - initialize_buffers(viewer); + initializeBuffers(viewer); vaos[Facets]->bind(); program = getShaderProgram(PROGRAM_WITHOUT_LIGHT); - attrib_buffers(viewer, PROGRAM_WITHOUT_LIGHT); + attribBuffers(viewer, PROGRAM_WITHOUT_LIGHT); QMatrix4x4 f_matrix; for(int i=0; i<16; i++) f_matrix.data()[i] = (float)frame->matrix()[i]; @@ -111,13 +111,13 @@ void Scene_plane_item::draw(CGAL::Three::Viewer_interface* viewer)const } -void Scene_plane_item::draw_edges(CGAL::Three::Viewer_interface* viewer)const +void Scene_plane_item::drawEdges(CGAL::Three::Viewer_interface* viewer)const { if(!are_buffers_filled) - initialize_buffers(viewer); + initializeBuffers(viewer); vaos[Edges]->bind(); program = getShaderProgram(PROGRAM_WITHOUT_LIGHT); - attrib_buffers(viewer, PROGRAM_WITHOUT_LIGHT); + attribBuffers(viewer, PROGRAM_WITHOUT_LIGHT); QMatrix4x4 f_matrix; for(int i=0; i<16; i++) f_matrix.data()[i] = (float)frame->matrix()[i]; diff --git a/Polyhedron/demo/Polyhedron/Scene_plane_item.h b/Polyhedron/demo/Polyhedron/Scene_plane_item.h index 7d19a7e4134..4fc4a6f837f 100644 --- a/Polyhedron/demo/Polyhedron/Scene_plane_item.h +++ b/Polyhedron/demo/Polyhedron/Scene_plane_item.h @@ -95,7 +95,7 @@ public: return (m == Wireframe || m == Flat || m == FlatPlusEdges); } virtual void draw(CGAL::Three::Viewer_interface*) const; - virtual void draw_edges(CGAL::Three::Viewer_interface* viewer)const; + virtual void drawEdges(CGAL::Three::Viewer_interface* viewer)const; Plane_3 plane() const { const qglviewer::Vec& pos = frame->position(); const qglviewer::Vec& n = @@ -189,8 +189,8 @@ protected: mutable bool smooth_shading; mutable QOpenGLShaderProgram *program; - using CGAL::Three::Scene_item::initialize_buffers; - void initialize_buffers(CGAL::Three::Viewer_interface*)const; + using CGAL::Three::Scene_item::initializeBuffers; + void initializeBuffers(CGAL::Three::Viewer_interface*)const; void compute_normals_and_vertices(void); }; diff --git a/Polyhedron/demo/Polyhedron/Scene_points_with_normal_item.cpp b/Polyhedron/demo/Polyhedron/Scene_points_with_normal_item.cpp index 648c44a4711..9166d249104 100644 --- a/Polyhedron/demo/Polyhedron/Scene_points_with_normal_item.cpp +++ b/Polyhedron/demo/Polyhedron/Scene_points_with_normal_item.cpp @@ -94,7 +94,7 @@ Scene_points_with_normal_item::~Scene_points_with_normal_item() -void Scene_points_with_normal_item::initialize_buffers(CGAL::Three::Viewer_interface *viewer) const +void Scene_points_with_normal_item::initializeBuffers(CGAL::Three::Viewer_interface *viewer) const { compute_normals_and_vertices(); //vao for the edges @@ -404,7 +404,7 @@ bool Scene_points_with_normal_item::supportsRenderingMode(RenderingMode m) const ( m==PointsPlusNormals || m==Splatting ) ); } -void Scene_points_with_normal_item::draw_splats(CGAL::Three::Viewer_interface* viewer) const +void Scene_points_with_normal_item::drawSplats(CGAL::Three::Viewer_interface* viewer) const { // TODO add support for selection viewer->glBegin(GL_POINTS); @@ -422,7 +422,7 @@ void Scene_points_with_normal_item::draw_splats(CGAL::Three::Viewer_interface* v } -void Scene_points_with_normal_item::draw_edges(CGAL::Three::Viewer_interface* viewer) const +void Scene_points_with_normal_item::drawEdges(CGAL::Three::Viewer_interface* viewer) const { double ratio_displayed = 1.0; if (viewer->inFastDrawing () && @@ -430,10 +430,10 @@ void Scene_points_with_normal_item::draw_edges(CGAL::Three::Viewer_interface* vi ratio_displayed = 6 * 300000. / (double)(nb_lines); if(!are_buffers_filled) - initialize_buffers(viewer); + initializeBuffers(viewer); vaos[Edges]->bind(); program=getShaderProgram(PROGRAM_NO_SELECTION); - attrib_buffers(viewer,PROGRAM_NO_SELECTION); + attribBuffers(viewer,PROGRAM_NO_SELECTION); program->bind(); program->setAttributeValue("colors", this->color()); viewer->glDrawArrays(GL_LINES, 0, @@ -441,10 +441,10 @@ void Scene_points_with_normal_item::draw_edges(CGAL::Three::Viewer_interface* vi vaos[Edges]->release(); program->release(); } -void Scene_points_with_normal_item::draw_points(CGAL::Three::Viewer_interface* viewer) const +void Scene_points_with_normal_item::drawPoints(CGAL::Three::Viewer_interface* viewer) const { if(!are_buffers_filled) - initialize_buffers(viewer); + initializeBuffers(viewer); double ratio_displayed = 1.0; if (viewer->inFastDrawing () && @@ -453,7 +453,7 @@ void Scene_points_with_normal_item::draw_points(CGAL::Three::Viewer_interface* v vaos[ThePoints]->bind(); program=getShaderProgram(PROGRAM_NO_SELECTION); - attrib_buffers(viewer,PROGRAM_NO_SELECTION); + attribBuffers(viewer,PROGRAM_NO_SELECTION); program->bind(); program->setAttributeValue("colors", this->color()); viewer->glDrawArrays(GL_POINTS, 0, @@ -466,7 +466,7 @@ void Scene_points_with_normal_item::draw_points(CGAL::Three::Viewer_interface* v vaos[Selected_points]->bind(); program=getShaderProgram(PROGRAM_NO_SELECTION); - attrib_buffers(viewer,PROGRAM_NO_SELECTION); + attribBuffers(viewer,PROGRAM_NO_SELECTION); program->bind(); program->setAttributeValue("colors", QColor(255,0,0)); viewer->glDrawArrays(GL_POINTS, 0, diff --git a/Polyhedron/demo/Polyhedron/Scene_points_with_normal_item.h b/Polyhedron/demo/Polyhedron/Scene_points_with_normal_item.h index ea74b7ecd93..df830d95e2e 100644 --- a/Polyhedron/demo/Polyhedron/Scene_points_with_normal_item.h +++ b/Polyhedron/demo/Polyhedron/Scene_points_with_normal_item.h @@ -51,10 +51,10 @@ public: // Indicate if rendering mode is supported virtual bool supportsRenderingMode(RenderingMode m) const; - virtual void draw_edges(CGAL::Three::Viewer_interface* viewer) const; - virtual void draw_points(CGAL::Three::Viewer_interface*) const; + virtual void drawEdges(CGAL::Three::Viewer_interface* viewer) const; + virtual void drawPoints(CGAL::Three::Viewer_interface*) const; - virtual void draw_splats(CGAL::Three::Viewer_interface*) const; + virtual void drawSplats(CGAL::Three::Viewer_interface*) const; // Gets wrapped point set Point_set* point_set(); @@ -116,8 +116,8 @@ private: mutable QOpenGLShaderProgram *program; - using CGAL::Three::Scene_item::initialize_buffers; - void initialize_buffers(CGAL::Three::Viewer_interface *viewer) const; + using CGAL::Three::Scene_item::initializeBuffers; + void initializeBuffers(CGAL::Three::Viewer_interface *viewer) const; void compute_normals_and_vertices() const; diff --git a/Polyhedron/demo/Polyhedron/Scene_polygon_soup_item.cpp b/Polyhedron/demo/Polyhedron/Scene_polygon_soup_item.cpp index 45bce7a90ed..e232c8cfb29 100644 --- a/Polyhedron/demo/Polyhedron/Scene_polygon_soup_item.cpp +++ b/Polyhedron/demo/Polyhedron/Scene_polygon_soup_item.cpp @@ -79,7 +79,7 @@ struct Polyhedron_to_polygon_soup_writer { }; // end struct Polyhedron_to_soup_writer void -Scene_polygon_soup_item::initialize_buffers(CGAL::Three::Viewer_interface* viewer) const +Scene_polygon_soup_item::initializeBuffers(CGAL::Three::Viewer_interface* viewer) const { //vao containing the data for the facets { @@ -576,13 +576,13 @@ Scene_polygon_soup_item::draw(CGAL::Three::Viewer_interface* viewer) const { if(!are_buffers_filled) { compute_normals_and_vertices(); - initialize_buffers(viewer); + initializeBuffers(viewer); } if(soup == 0) return; //Calls the buffer info again so that it's the right one used even if //there are several objects drawn vaos[Facets]->bind(); - attrib_buffers(viewer,PROGRAM_WITH_LIGHT); + attribBuffers(viewer,PROGRAM_WITH_LIGHT); //fills the arraw of colors with the current color QColor v_colors = this->color(); @@ -599,15 +599,15 @@ Scene_polygon_soup_item::draw(CGAL::Three::Viewer_interface* viewer) const { } void -Scene_polygon_soup_item::draw_points(CGAL::Three::Viewer_interface* viewer) const { +Scene_polygon_soup_item::drawPoints(CGAL::Three::Viewer_interface* viewer) const { if(!are_buffers_filled) { compute_normals_and_vertices(); - initialize_buffers(viewer); + initializeBuffers(viewer); } if(soup == 0) return; vaos[Edges]->bind(); - attrib_buffers(viewer,PROGRAM_WITHOUT_LIGHT); + attribBuffers(viewer,PROGRAM_WITHOUT_LIGHT); program = getShaderProgram(PROGRAM_WITHOUT_LIGHT); program->bind(); QColor color = this->color(); @@ -620,15 +620,15 @@ Scene_polygon_soup_item::draw_points(CGAL::Three::Viewer_interface* viewer) cons } void -Scene_polygon_soup_item::draw_edges(CGAL::Three::Viewer_interface* viewer) const { +Scene_polygon_soup_item::drawEdges(CGAL::Three::Viewer_interface* viewer) const { if(!are_buffers_filled) { compute_normals_and_vertices(); - initialize_buffers(viewer); + initializeBuffers(viewer); } if(soup == 0) return; vaos[Edges]->bind(); - attrib_buffers(viewer,PROGRAM_WITHOUT_LIGHT); + attribBuffers(viewer,PROGRAM_WITHOUT_LIGHT); program = getShaderProgram(PROGRAM_WITHOUT_LIGHT); program->bind(); QColor color = this->color().lighter(120); @@ -642,7 +642,7 @@ Scene_polygon_soup_item::draw_edges(CGAL::Three::Viewer_interface* viewer) const if(displayNonManifoldEdges()) { vaos[NM_Edges]->bind(); - attrib_buffers(viewer,PROGRAM_WITHOUT_LIGHT); + attribBuffers(viewer,PROGRAM_WITHOUT_LIGHT); program = getShaderProgram(PROGRAM_WITHOUT_LIGHT); program->bind(); QColor c = QColor(255,0,0,255); diff --git a/Polyhedron/demo/Polyhedron/Scene_polygon_soup_item.h b/Polyhedron/demo/Polyhedron/Scene_polygon_soup_item.h index 3339204a0d2..d693986643e 100644 --- a/Polyhedron/demo/Polyhedron/Scene_polygon_soup_item.h +++ b/Polyhedron/demo/Polyhedron/Scene_polygon_soup_item.h @@ -144,8 +144,8 @@ public: // OpenGL drawing in a display list virtual void draw() const {} virtual void draw(CGAL::Three::Viewer_interface*) const; - virtual void draw_points(CGAL::Three::Viewer_interface*) const; - virtual void draw_edges(CGAL::Three::Viewer_interface* viewer) const; + virtual void drawPoints(CGAL::Three::Viewer_interface*) const; + virtual void drawEdges(CGAL::Three::Viewer_interface* viewer) const; void invalidateOpenGLBuffers(); bool isFinite() const { return true; } bool isEmpty() const; @@ -192,8 +192,8 @@ private: mutable std::size_t nb_nm_edges; mutable std::size_t nb_polys; mutable std::size_t nb_lines; - using CGAL::Three::Scene_item::initialize_buffers; - void initialize_buffers(CGAL::Three::Viewer_interface *viewer) const; + using CGAL::Three::Scene_item::initializeBuffers; + void initializeBuffers(CGAL::Three::Viewer_interface *viewer) const; void compute_normals_and_vertices(void) const; void triangulate_polygon(Polygons_iterator ) const; mutable QOpenGLShaderProgram *program; diff --git a/Polyhedron/demo/Polyhedron/Scene_polyhedron_item.cpp b/Polyhedron/demo/Polyhedron/Scene_polyhedron_item.cpp index 15e91ffc96d..14c481bf919 100644 --- a/Polyhedron/demo/Polyhedron/Scene_polyhedron_item.cpp +++ b/Polyhedron/demo/Polyhedron/Scene_polyhedron_item.cpp @@ -234,7 +234,7 @@ Scene_polyhedron_item::triangulate_facet(Facet_iterator fit, void -Scene_polyhedron_item::initialize_buffers(CGAL::Three::Viewer_interface* viewer) const +Scene_polyhedron_item::initializeBuffers(CGAL::Three::Viewer_interface* viewer) const { //vao containing the data for the facets { @@ -846,7 +846,7 @@ void Scene_polyhedron_item::draw(CGAL::Three::Viewer_interface* viewer) const { if(!are_buffers_filled) { compute_normals_and_vertices(); - initialize_buffers(viewer); + initializeBuffers(viewer); compute_bbox(); } @@ -856,7 +856,7 @@ void Scene_polyhedron_item::draw(CGAL::Three::Viewer_interface* viewer) const { { vaos[Gouraud_Facets]->bind(); } - attrib_buffers(viewer, PROGRAM_WITH_LIGHT); + attribBuffers(viewer, PROGRAM_WITH_LIGHT); program = getShaderProgram(PROGRAM_WITH_LIGHT); program->bind(); if(is_monochrome) @@ -876,12 +876,12 @@ void Scene_polyhedron_item::draw(CGAL::Three::Viewer_interface* viewer) const { } // Points/Wireframe/Flat/Gouraud OpenGL drawing in a display list -void Scene_polyhedron_item::draw_edges(CGAL::Three::Viewer_interface* viewer) const +void Scene_polyhedron_item::drawEdges(CGAL::Three::Viewer_interface* viewer) const { if (!are_buffers_filled) { compute_normals_and_vertices(); - initialize_buffers(viewer); + initializeBuffers(viewer); compute_bbox(); } @@ -889,7 +889,7 @@ void Scene_polyhedron_item::draw_edges(CGAL::Three::Viewer_interface* viewer) co { vaos[Edges]->bind(); - attrib_buffers(viewer, PROGRAM_WITHOUT_LIGHT); + attribBuffers(viewer, PROGRAM_WITHOUT_LIGHT); program = getShaderProgram(PROGRAM_WITHOUT_LIGHT); program->bind(); //draw the edges @@ -908,7 +908,7 @@ void Scene_polyhedron_item::draw_edges(CGAL::Three::Viewer_interface* viewer) co //draw the feature edges vaos[Feature_edges]->bind(); - attrib_buffers(viewer, PROGRAM_NO_SELECTION); + attribBuffers(viewer, PROGRAM_NO_SELECTION); program = getShaderProgram(PROGRAM_NO_SELECTION); program->bind(); if(show_feature_edges_m || show_only_feature_edges_m) @@ -926,16 +926,16 @@ void Scene_polyhedron_item::draw_edges(CGAL::Three::Viewer_interface* viewer) co } void -Scene_polyhedron_item::draw_points(CGAL::Three::Viewer_interface* viewer) const { +Scene_polyhedron_item::drawPoints(CGAL::Three::Viewer_interface* viewer) const { if(!are_buffers_filled) { compute_normals_and_vertices(); - initialize_buffers(viewer); + initializeBuffers(viewer); compute_bbox(); } vaos[Edges]->bind(); - attrib_buffers(viewer, PROGRAM_WITHOUT_LIGHT); + attribBuffers(viewer, PROGRAM_WITHOUT_LIGHT); program = getShaderProgram(PROGRAM_WITHOUT_LIGHT); program->bind(); //draw the points @@ -1145,7 +1145,7 @@ void Scene_polyhedron_item::invalidate_aabb_tree() { delete_aabb_tree(this); } -QString Scene_polyhedron_item::compute_stats(int type) +QString Scene_polyhedron_item::computeStats(int type) { double minl, maxl, meanl, midl; switch (type) diff --git a/Polyhedron/demo/Polyhedron/Scene_polyhedron_item.h b/Polyhedron/demo/Polyhedron/Scene_polyhedron_item.h index aa16ea0ed20..76fa43ea0c6 100644 --- a/Polyhedron/demo/Polyhedron/Scene_polyhedron_item.h +++ b/Polyhedron/demo/Polyhedron/Scene_polyhedron_item.h @@ -43,8 +43,9 @@ public: MAX_ANGLE, MEAN_ANGLE }; - QString compute_stats(int type); - bool has_stats()const {return true;} + + bool has_stats()const {return true;} + QString computeStats(int type); CGAL::Three::Scene_item::Header_data header() const; Scene_polyhedron_item(); // Scene_polyhedron_item(const Scene_polyhedron_item&); @@ -71,9 +72,9 @@ public: // Points/Wireframe/Flat/Gouraud OpenGL drawing in a display list void draw() const {} virtual void draw(CGAL::Three::Viewer_interface*) const; - virtual void draw_edges() const {} - virtual void draw_edges(CGAL::Three::Viewer_interface* viewer) const; - virtual void draw_points(CGAL::Three::Viewer_interface*) const; + virtual void drawEdges() const {} + virtual void drawEdges(CGAL::Three::Viewer_interface* viewer) const; + virtual void drawPoints(CGAL::Three::Viewer_interface*) const; // Get wrapped polyhedron Polyhedron* polyhedron(); @@ -173,8 +174,8 @@ private: mutable unsigned int number_of_degenerated_faces; mutable bool self_intersect; - using CGAL::Three::Scene_item::initialize_buffers; - void initialize_buffers(CGAL::Three::Viewer_interface *viewer = 0) const; + using CGAL::Three::Scene_item::initializeBuffers; + void initializeBuffers(CGAL::Three::Viewer_interface *viewer = 0) const; void compute_normals_and_vertices(const bool colors_only = false) const; template void triangulate_facet(Facet_iterator, diff --git a/Polyhedron/demo/Polyhedron/Scene_polyhedron_item_decorator.cpp b/Polyhedron/demo/Polyhedron/Scene_polyhedron_item_decorator.cpp index 3172020a1e2..04cce7d8c2b 100644 --- a/Polyhedron/demo/Polyhedron/Scene_polyhedron_item_decorator.cpp +++ b/Polyhedron/demo/Polyhedron/Scene_polyhedron_item_decorator.cpp @@ -38,8 +38,8 @@ void Scene_polyhedron_item_decorator::draw() const { poly_item->draw(); } -void Scene_polyhedron_item_decorator::draw_edges() const { - poly_item->draw_edges(); +void Scene_polyhedron_item_decorator::drawEdges() const { + poly_item->drawEdges(); } Polyhedron* diff --git a/Polyhedron/demo/Polyhedron/Scene_polyhedron_item_decorator.h b/Polyhedron/demo/Polyhedron/Scene_polyhedron_item_decorator.h index 37668909dc6..93fda64a442 100644 --- a/Polyhedron/demo/Polyhedron/Scene_polyhedron_item_decorator.h +++ b/Polyhedron/demo/Polyhedron/Scene_polyhedron_item_decorator.h @@ -29,9 +29,9 @@ public: // Indicate if rendering mode is supported bool supportsRenderingMode(RenderingMode m) const { return (m!=PointsPlusNormals && m!=Splatting); } // Points/Wireframe/Flat/Gouraud OpenGL drawing in a display list - // dispatch to poly_item direct_draw and direct_draw_edges + // dispatch to poly_item direct_draw and direct_drawEdges void draw() const; - void draw_edges() const; + void drawEdges() const; // Get wrapped polyhedron Polyhedron* polyhedron(); diff --git a/Polyhedron/demo/Polyhedron/Scene_polyhedron_selection_item.cpp b/Polyhedron/demo/Polyhedron/Scene_polyhedron_selection_item.cpp index 8fc14cfd1ac..b7fa5e5147c 100644 --- a/Polyhedron/demo/Polyhedron/Scene_polyhedron_selection_item.cpp +++ b/Polyhedron/demo/Polyhedron/Scene_polyhedron_selection_item.cpp @@ -2,7 +2,7 @@ #include -void Scene_polyhedron_selection_item::initialize_buffers(CGAL::Three::Viewer_interface *viewer)const +void Scene_polyhedron_selection_item::initializeBuffers(CGAL::Three::Viewer_interface *viewer)const { //vao containing the data for the unselected facets { @@ -84,7 +84,7 @@ void Scene_polyhedron_selection_item::initialize_buffers(CGAL::Three::Viewer_int are_buffers_filled = true; } -void Scene_polyhedron_selection_item::compute_elements()const +void Scene_polyhedron_selection_item::computeElements()const { positions_facets.clear(); positions_lines.clear(); @@ -166,11 +166,11 @@ void Scene_polyhedron_selection_item::draw(CGAL::Three::Viewer_interface* viewer if(!are_buffers_filled) { - compute_elements(); - initialize_buffers(viewer); + computeElements(); + initializeBuffers(viewer); } - draw_points(viewer); + drawPoints(viewer); GLfloat offset_factor; GLfloat offset_units; viewer->glGetFloatv( GL_POLYGON_OFFSET_FACTOR, &offset_factor); @@ -179,30 +179,30 @@ void Scene_polyhedron_selection_item::draw(CGAL::Three::Viewer_interface* viewer vaos[0]->bind(); program = getShaderProgram(PROGRAM_WITH_LIGHT); - attrib_buffers(viewer,PROGRAM_WITH_LIGHT); + attribBuffers(viewer,PROGRAM_WITH_LIGHT); program->bind(); program->setAttributeValue("colors",this->color()); viewer->glDrawArrays(GL_TRIANGLES, 0, static_cast(nb_facets/3)); program->release(); vaos[0]->release(); glPolygonOffset(offset_factor, offset_units); - draw_edges(viewer); + drawEdges(viewer); } -void Scene_polyhedron_selection_item::draw_edges(CGAL::Three::Viewer_interface* viewer) const +void Scene_polyhedron_selection_item::drawEdges(CGAL::Three::Viewer_interface* viewer) const { if(!are_buffers_filled) { - compute_elements(); - initialize_buffers(viewer); + computeElements(); + initializeBuffers(viewer); } viewer->glLineWidth(3.f); vaos[1]->bind(); program = getShaderProgram(PROGRAM_NO_SELECTION); - attrib_buffers(viewer,PROGRAM_NO_SELECTION); + attribBuffers(viewer,PROGRAM_NO_SELECTION); program->bind(); program->setAttributeValue("colors",edge_color); @@ -212,17 +212,17 @@ void Scene_polyhedron_selection_item::draw_edges(CGAL::Three::Viewer_interface* viewer->glLineWidth(1.f); } -void Scene_polyhedron_selection_item::draw_points(CGAL::Three::Viewer_interface* viewer) const +void Scene_polyhedron_selection_item::drawPoints(CGAL::Three::Viewer_interface* viewer) const { if(!are_buffers_filled) { - compute_elements(); - initialize_buffers(viewer); + computeElements(); + initializeBuffers(viewer); } viewer->glPointSize(5.f); vaos[2]->bind(); program = getShaderProgram(PROGRAM_NO_SELECTION); - attrib_buffers(viewer,PROGRAM_NO_SELECTION); + attribBuffers(viewer,PROGRAM_NO_SELECTION); program->bind(); program->setAttributeValue("colors",vertex_color); viewer->glDrawArrays(GL_POINTS, 0, static_cast(nb_points/3)); diff --git a/Polyhedron/demo/Polyhedron/Scene_polyhedron_selection_item.h b/Polyhedron/demo/Polyhedron/Scene_polyhedron_selection_item.h index 930e061d625..5502a83bd92 100644 --- a/Polyhedron/demo/Polyhedron/Scene_polyhedron_selection_item.h +++ b/Polyhedron/demo/Polyhedron/Scene_polyhedron_selection_item.h @@ -278,9 +278,9 @@ public: using Scene_polyhedron_item_decorator::draw; virtual void draw(CGAL::Three::Viewer_interface*) const; - virtual void draw_edges() const { } - virtual void draw_edges(CGAL::Three::Viewer_interface*) const; - virtual void draw_points(CGAL::Three::Viewer_interface*) const; + virtual void drawEdges() const { } + virtual void drawEdges(CGAL::Three::Viewer_interface*) const; + virtual void drawPoints(CGAL::Three::Viewer_interface*) const; bool supportsRenderingMode(RenderingMode m) const { return (m==Flat); } @@ -947,9 +947,9 @@ private: mutable std::size_t nb_points; mutable std::size_t nb_lines; mutable QOpenGLShaderProgram *program; - using CGAL::Three::Scene_item::initialize_buffers; - void initialize_buffers(CGAL::Three::Viewer_interface *viewer) const; - void compute_elements() const; + using CGAL::Three::Scene_item::initializeBuffers; + void initializeBuffers(CGAL::Three::Viewer_interface *viewer) const; + void computeElements() const; }; diff --git a/Polyhedron/demo/Polyhedron/Scene_polylines_item.cpp b/Polyhedron/demo/Polyhedron/Scene_polylines_item.cpp index b09423c2d9c..f7cf6c7523a 100644 --- a/Polyhedron/demo/Polyhedron/Scene_polylines_item.cpp +++ b/Polyhedron/demo/Polyhedron/Scene_polylines_item.cpp @@ -23,7 +23,7 @@ public: void -Scene_polylines_item::initialize_buffers(CGAL::Three::Viewer_interface *viewer = 0) const +Scene_polylines_item::initializeBuffers(CGAL::Three::Viewer_interface *viewer = 0) const { QOpenGLShaderProgram *program; //vao for the lines @@ -48,7 +48,7 @@ Scene_polylines_item::initialize_buffers(CGAL::Three::Viewer_interface *viewer = are_buffers_filled = true; } void -Scene_polylines_item::compute_elements() const +Scene_polylines_item::computeElements() const { positions_lines.resize(0); //Fills the VBO with the lines @@ -76,7 +76,7 @@ Scene_polylines_item::compute_elements() const } void -Scene_polylines_item::compute_spheres() +Scene_polylines_item::compute_Spheres() { // FIRST, count the number of incident cycles and polylines // for all extremities. @@ -273,8 +273,8 @@ Scene_polylines_item::draw(CGAL::Three::Viewer_interface* viewer) const { if(!are_buffers_filled) { - compute_elements(); - initialize_buffers(viewer); + computeElements(); + initializeBuffers(viewer); } if(d->draw_extremities) { @@ -284,15 +284,15 @@ Scene_polylines_item::draw(CGAL::Three::Viewer_interface* viewer) const { // Wireframe OpenGL drawing void -Scene_polylines_item::draw_edges(CGAL::Three::Viewer_interface* viewer) const { +Scene_polylines_item::drawEdges(CGAL::Three::Viewer_interface* viewer) const { if(!are_buffers_filled) { - compute_elements(); - initialize_buffers(viewer); + computeElements(); + initializeBuffers(viewer); } vaos[Edges]->bind(); - attrib_buffers(viewer, PROGRAM_NO_SELECTION); + attribBuffers(viewer, PROGRAM_NO_SELECTION); QOpenGLShaderProgram *program = getShaderProgram(PROGRAM_NO_SELECTION); program->bind(); program->setAttributeValue("colors", this->color()); @@ -307,15 +307,15 @@ Scene_polylines_item::draw_edges(CGAL::Three::Viewer_interface* viewer) const { } void -Scene_polylines_item::draw_points(CGAL::Three::Viewer_interface* viewer) const { +Scene_polylines_item::drawPoints(CGAL::Three::Viewer_interface* viewer) const { if(!are_buffers_filled) { - compute_elements(); - initialize_buffers(viewer); + computeElements(); + initializeBuffers(viewer); } vaos[Edges]->bind(); - attrib_buffers(viewer, PROGRAM_NO_SELECTION); + attribBuffers(viewer, PROGRAM_NO_SELECTION); QOpenGLShaderProgram *program = getShaderProgram(PROGRAM_NO_SELECTION); program->bind(); QColor temp = this->color(); @@ -403,7 +403,7 @@ void Scene_polylines_item::change_corner_radii(double r) { scene->addItem(spheres); scene->changeGroup(spheres, this); lockChild(spheres); - compute_spheres(); + compute_Spheres(); spheres->invalidateOpenGLBuffers(); } else if (r<=0 && spheres!=NULL) diff --git a/Polyhedron/demo/Polyhedron/Scene_polylines_item.h b/Polyhedron/demo/Polyhedron/Scene_polylines_item.h index 90ca654e33a..35495b09629 100644 --- a/Polyhedron/demo/Polyhedron/Scene_polylines_item.h +++ b/Polyhedron/demo/Polyhedron/Scene_polylines_item.h @@ -44,11 +44,11 @@ public: void draw(CGAL::Three::Viewer_interface*) const; // Wireframe OpenGL drawing - void draw_edges() const{} - void draw_edges(CGAL::Three::Viewer_interface*) const; + void drawEdges() const{} + void drawEdges(CGAL::Three::Viewer_interface*) const; - void draw_points() const{} - void draw_points(CGAL::Three::Viewer_interface*) const; + void drawPoints() const{} + void drawPoints(CGAL::Three::Viewer_interface*) const; void smooth(std::vector& polyline){ @@ -111,12 +111,11 @@ private: mutable std::size_t nb_lines; typedef std::map Point_to_int_map; typedef Point_to_int_map::iterator iterator; - using CGAL::Three::Scene_item::initialize_buffers; - void initialize_buffers(CGAL::Three::Viewer_interface *viewer) const; - using CGAL::Three::Scene_item::compute_elements; - void compute_elements() const; - void compute_spheres(); - + void computeSpheres(); + using CGAL::Three::Scene_item::initializeBuffers; + void initializeBuffers(CGAL::Three::Viewer_interface *viewer) const; + using CGAL::Three::Scene_item::computeElements; + void computeElements() const; diff --git a/Polyhedron/demo/Polyhedron/Scene_segmented_image_item.cpp b/Polyhedron/demo/Polyhedron/Scene_segmented_image_item.cpp index 176e5dce5be..9128674da6e 100644 --- a/Polyhedron/demo/Polyhedron/Scene_segmented_image_item.cpp +++ b/Polyhedron/demo/Polyhedron/Scene_segmented_image_item.cpp @@ -413,7 +413,7 @@ Scene_segmented_image_item::Scene_segmented_image_item(Image* im, v_box = new std::vector(); compile_shaders(); - initialize_buffers(); + initializeBuffers(); setRenderingMode(Flat); } @@ -524,7 +524,7 @@ void Scene_segmented_image_item::compile_shaders() } } -void Scene_segmented_image_item::attrib_buffers(Viewer_interface* viewer) const +void Scene_segmented_image_item::attribBuffers(Viewer_interface* viewer) const { QMatrix4x4 mvpMatrix; QMatrix4x4 mvMatrix; @@ -653,7 +653,7 @@ Scene_segmented_image_item::supportsRenderingMode(RenderingMode m) const } void -Scene_segmented_image_item::initialize_buffers() +Scene_segmented_image_item::initializeBuffers() { internal::Image_accessor image_data_accessor (*m_image, m_voxel_scale, @@ -732,7 +732,7 @@ Scene_segmented_image_item::initialize_buffers() void Scene_segmented_image_item::draw_gl(Viewer_interface* viewer) const { - attrib_buffers(viewer); + attribBuffers(viewer); rendering_program.bind(); vao[0].bind(); viewer->glDrawElements(GL_TRIANGLES, m_ibo->size()/sizeof(GLuint), GL_UNSIGNED_INT, 0); @@ -759,7 +759,7 @@ Scene_segmented_image_item::ibo_size() const void Scene_segmented_image_item::changed() { - initialize_buffers(); + initializeBuffers(); } void Scene_segmented_image_item::draw_Bbox(Bbox bbox, std::vector *vertices) diff --git a/Polyhedron/demo/Polyhedron/Scene_segmented_image_item.h b/Polyhedron/demo/Polyhedron/Scene_segmented_image_item.h index e1e9a649c25..2cfc4a7508e 100644 --- a/Polyhedron/demo/Polyhedron/Scene_segmented_image_item.h +++ b/Polyhedron/demo/Polyhedron/Scene_segmented_image_item.h @@ -36,10 +36,10 @@ public: // draw virtual void direct_draw(CGAL::Three::Viewer_interface* viewer) const { draw(viewer); } - virtual void direct_draw_edges(CGAL::Three::Viewer_interface* viewer) const - { draw_edges(viewer); } + virtual void direct_drawEdges(CGAL::Three::Viewer_interface* viewer) const + { drawEdges(viewer); } virtual void draw(CGAL::Three::Viewer_interface*) const; - virtual void draw_edges(CGAL::Three::Viewer_interface* viewer) const + virtual void drawEdges(CGAL::Three::Viewer_interface* viewer) const { draw_gl(viewer); } virtual QString toolTip() const; @@ -49,7 +49,7 @@ public: private: void draw_gl(CGAL::Three::Viewer_interface* viewer) const; - void initialize_buffers(); + void initializeBuffers(); GLint ibo_size() const; public: @@ -78,7 +78,7 @@ private: mutable QOpenGLVertexArrayObject vao[vaoSize]; mutable QOpenGLShaderProgram rendering_program; void draw_bbox(); - void attrib_buffers(CGAL::Three::Viewer_interface*) const; + void attribBuffers(CGAL::Three::Viewer_interface*) const; void compile_shaders(); void draw_Bbox(Bbox bbox, std::vector *vertices); public Q_SLOTS: diff --git a/Polyhedron/demo/Polyhedron/Scene_textured_polyhedron_item.cpp b/Polyhedron/demo/Polyhedron/Scene_textured_polyhedron_item.cpp index 3ef414c1786..528d6096a10 100644 --- a/Polyhedron/demo/Polyhedron/Scene_textured_polyhedron_item.cpp +++ b/Polyhedron/demo/Polyhedron/Scene_textured_polyhedron_item.cpp @@ -9,7 +9,7 @@ typedef EPIC_kernel::Point_3 Point; -void Scene_textured_polyhedron_item::initialize_buffers(CGAL::Three::Viewer_interface *viewer = 0) const +void Scene_textured_polyhedron_item::initializeBuffers(CGAL::Three::Viewer_interface *viewer = 0) const { if(GLuint(-1) == textureId) { viewer->glGenTextures(1, &textureId); @@ -293,13 +293,13 @@ void Scene_textured_polyhedron_item::draw(CGAL::Three::Viewer_interface* viewer) if(!are_buffers_filled) { compute_normals_and_vertices(); - initialize_buffers(viewer); + initializeBuffers(viewer); } vaos[Facets]->bind(); viewer->glActiveTexture(GL_TEXTURE0); viewer->glBindTexture(GL_TEXTURE_2D, textureId); - attrib_buffers(viewer, PROGRAM_WITH_TEXTURE); + attribBuffers(viewer, PROGRAM_WITH_TEXTURE); program=getShaderProgram(PROGRAM_WITH_TEXTURE); program->bind(); viewer->glDrawArrays(GL_TRIANGLES, 0, static_cast(nb_facets/4)); @@ -307,14 +307,14 @@ void Scene_textured_polyhedron_item::draw(CGAL::Three::Viewer_interface* viewer) program->release(); vaos[Facets]->release(); } -void Scene_textured_polyhedron_item::draw_edges(CGAL::Three::Viewer_interface* viewer) const { +void Scene_textured_polyhedron_item::drawEdges(CGAL::Three::Viewer_interface* viewer) const { if(!are_buffers_filled) - initialize_buffers(viewer); + initializeBuffers(viewer); vaos[Edges]->bind(); viewer->glActiveTexture(GL_TEXTURE0); viewer->glBindTexture(GL_TEXTURE_2D, textureId); - attrib_buffers(viewer, PROGRAM_WITH_TEXTURED_EDGES); + attribBuffers(viewer, PROGRAM_WITH_TEXTURED_EDGES); program=getShaderProgram(PROGRAM_WITH_TEXTURED_EDGES); program->bind(); @@ -358,7 +358,7 @@ Scene_textured_polyhedron_item::selection_changed(bool p_is_selected) if(p_is_selected != is_selected) { is_selected = p_is_selected; - initialize_buffers(); + initializeBuffers(); } else is_selected = p_is_selected; diff --git a/Polyhedron/demo/Polyhedron/Scene_textured_polyhedron_item.h b/Polyhedron/demo/Polyhedron/Scene_textured_polyhedron_item.h index dbddb4983b6..524ee82fdd4 100644 --- a/Polyhedron/demo/Polyhedron/Scene_textured_polyhedron_item.h +++ b/Polyhedron/demo/Polyhedron/Scene_textured_polyhedron_item.h @@ -32,8 +32,8 @@ public: // Points/Wireframe/Flat/Gouraud OpenGL drawing in a display list void draw() const {} virtual void draw(CGAL::Three::Viewer_interface*) const; - virtual void draw_edges() const {} - virtual void draw_edges(CGAL::Three::Viewer_interface* viewer) const; + virtual void drawEdges() const {} + virtual void drawEdges(CGAL::Three::Viewer_interface* viewer) const; // Get wrapped textured_polyhedron Textured_polyhedron* textured_polyhedron(); @@ -78,8 +78,8 @@ private: bool smooth_shading; - using CGAL::Three::Scene_item::initialize_buffers; - void initialize_buffers(CGAL::Three::Viewer_interface *viewer) const; + using CGAL::Three::Scene_item::initializeBuffers; + void initializeBuffers(CGAL::Three::Viewer_interface *viewer) const; void compute_normals_and_vertices(void) const; diff --git a/Polyhedron/demo/Polyhedron/Viewer.cpp b/Polyhedron/demo/Polyhedron/Viewer.cpp index 96b92cfb79e..3fa20171d2b 100644 --- a/Polyhedron/demo/Polyhedron/Viewer.cpp +++ b/Polyhedron/demo/Polyhedron/Viewer.cpp @@ -426,7 +426,7 @@ QString Viewer::dumpCameraCoordinates() } } -void Viewer::attrib_buffers(int program_name) const { +void Viewer::attribBuffers(int program_name) const { GLint is_both_sides = 0; //ModelViewMatrix used for the transformation of the camera. QMatrix4x4 mvp_mat; diff --git a/Polyhedron/demo/Polyhedron/Viewer.h b/Polyhedron/demo/Polyhedron/Viewer.h index 080dfd03531..3215913d666 100644 --- a/Polyhedron/demo/Polyhedron/Viewer.h +++ b/Polyhedron/demo/Polyhedron/Viewer.h @@ -61,8 +61,8 @@ public: bool inFastDrawing() const; //! Implementation of `Viewer_interface::inDrawWithNames()` bool inDrawWithNames() const; - //! Implementation of `Viewer_interface::attrib_buffers()` - void attrib_buffers(int program_name) const; + //! Implementation of `Viewer_interface::attribBuffers()` + void attribBuffers(int program_name) const; //! Implementation of `Viewer_interface::getShaderProgram()` QOpenGLShaderProgram* getShaderProgram(int name) const; @@ -112,6 +112,7 @@ protected: void keyPressEvent(QKeyEvent*); //!Deal with context menu events void contextMenuEvent(QContextMenuEvent*); + /*! * \brief makeArrow creates an arrow and stores it in a struct of vectors. * \param R the radius of the arrow. diff --git a/Three/demo/Three/Example_plugin/Basic_item_plugin.cpp b/Three/demo/Three/Example_plugin/Basic_item_plugin.cpp index 3de16fa20f4..de1ee6ec9ed 100644 --- a/Three/demo/Three/Example_plugin/Basic_item_plugin.cpp +++ b/Three/demo/Three/Example_plugin/Basic_item_plugin.cpp @@ -80,7 +80,7 @@ private Q_SLOTS: scene->changeGroup(item, group); scene->changeGroup(new_item,group); //adds it to the scene - scene->add_group(group); + scene->addGroup(group); //! [group] } diff --git a/Three/demo/Three/Example_plugin/Dock_widget_plugin.cpp b/Three/demo/Three/Example_plugin/Dock_widget_plugin.cpp index 8164e377599..b47978705aa 100644 --- a/Three/demo/Three/Example_plugin/Dock_widget_plugin.cpp +++ b/Three/demo/Three/Example_plugin/Dock_widget_plugin.cpp @@ -1,5 +1,5 @@ #include "ui_Basic_dock_widget.h" -#include +#include #include #include #include @@ -22,7 +22,7 @@ public: //This plugin crates an action in Operations that displays "Hello World" in the 'console' dockwidet. class BasicPlugin : public QObject, - public CGAL::Three::Polyhedron_demo_plugin_interface + public CGAL::Three::Polyhedron_demo_plugin_helper { Q_OBJECT Q_INTERFACES(CGAL::Three::Polyhedron_demo_plugin_interface) @@ -60,7 +60,7 @@ public: dock_widget = new DockWidget("Print a number", mw); dock_widget->setVisible(false); // do not show at the beginning - mw->addDockWidget(Qt::LeftDockWidgetArea, dock_widget); + add_dock_widget(dock_widget); connect(dock_widget->pushButton, SIGNAL(clicked(bool)), this, SLOT(on_dock_button_clicked())); @@ -99,10 +99,6 @@ private: QList _actions; Messages_interface* messageInterface; DockWidget* dock_widget; - //The reference to the scene - CGAL::Three::Scene_interface* scene; - //The reference to the main window - QMainWindow* mw; }; #include "Dock_widget_plugin.moc" diff --git a/Three/demo/Three/Example_plugin/Example_plugin.cpp b/Three/demo/Three/Example_plugin/Example_plugin.cpp index e52dbae471c..cf0655ede4d 100644 --- a/Three/demo/Three/Example_plugin/Example_plugin.cpp +++ b/Three/demo/Three/Example_plugin/Example_plugin.cpp @@ -32,7 +32,7 @@ public : void invalidateOpenGLBuffers(); //fills the std::vector - void compute_elements(double ax,double ay, double az, + void computeElements(double ax,double ay, double az, double bx,double by, double bz, double cx,double cy, double cz) const; @@ -45,9 +45,9 @@ private: mutable std::vector vertices; mutable int nb_pos; mutable QOpenGLShaderProgram *program; - using CGAL::Three::Scene_item::initialize_buffers; + using CGAL::Three::Scene_item::initializeBuffers; //Fills the buffers with data. The buffers allow us to give data to the shaders. - void initialize_buffers(CGAL::Three::Viewer_interface *viewer)const; + void initializeBuffers(CGAL::Three::Viewer_interface *viewer)const; }; //end of class Scene_triangle_item //! [itemdeclaration] Scene_triangle_item::Scene_triangle_item(double ax,double ay, double az, @@ -60,7 +60,7 @@ Scene_triangle_item::Scene_triangle_item(double ax,double ay, double az, is_monochrome = true; nb_pos = 0; are_buffers_filled = false; - compute_elements(ax, ay, az, + computeElements(ax, ay, az, bx, by, bz, cx, cy, cz); invalidateOpenGLBuffers(); @@ -68,7 +68,7 @@ Scene_triangle_item::Scene_triangle_item(double ax,double ay, double az, //! [computeelements] //Fills the position vector with data. -void Scene_triangle_item::compute_elements(double ax, double ay, double az, +void Scene_triangle_item::computeElements(double ax, double ay, double az, double bx, double by, double bz, double cx, double cy, double cz)const { @@ -86,10 +86,10 @@ void Scene_triangle_item::draw(CGAL::Three::Viewer_interface* viewer) const //The filling of the buffers should be performed in this function, because it needs a valid openGL context, and we are certain to have one in this function. if(!are_buffers_filled) { - compute_elements(0, 0, 0, + computeElements(0, 0, 0, 1, 0, 0, 0.5, 0.5, 0); - initialize_buffers(viewer); + initializeBuffers(viewer); } //Binds the vao corresponding to the type of data we are drawing. vaos[0]->bind(); @@ -97,7 +97,7 @@ void Scene_triangle_item::draw(CGAL::Three::Viewer_interface* viewer) const //Here we want triangles with light effects. program = getShaderProgram(PROGRAM_WITH_LIGHT); //Gives most of the uniform values to the shaders. - attrib_buffers(viewer, PROGRAM_WITH_LIGHT); + attribBuffers(viewer, PROGRAM_WITH_LIGHT); //Binds the program chosen before to use the right shaders. program->bind(); //Gives the wanted color to the fragment shader as uniform value. @@ -119,7 +119,7 @@ void Scene_triangle_item::invalidateOpenGLBuffers() //! [fillbuffers] -void Scene_triangle_item::initialize_buffers(CGAL::Three::Viewer_interface *viewer)const +void Scene_triangle_item::initializeBuffers(CGAL::Three::Viewer_interface *viewer)const { //vao containing the data for the facets diff --git a/Three/demo/Three/Example_plugin/Group_item_plugin.cpp b/Three/demo/Three/Example_plugin/Group_item_plugin.cpp index e4cf22a4c12..73730d4371c 100644 --- a/Three/demo/Three/Example_plugin/Group_item_plugin.cpp +++ b/Three/demo/Three/Example_plugin/Group_item_plugin.cpp @@ -70,7 +70,7 @@ private Q_SLOTS: //Then gives it its children scene->changeGroup(child, group); //adds it to the scene - scene->add_group(group); + scene->addGroup(group); } diff --git a/Three/demo/Three/Example_plugin/dock_example.ui b/Three/demo/Three/Example_plugin/dock_example.ui deleted file mode 100644 index 9e96390c77b..00000000000 --- a/Three/demo/Three/Example_plugin/dock_example.ui +++ /dev/null @@ -1,156 +0,0 @@ - - - Dock_example - - - - 0 - 0 - 275 - 222 - - - - - 0 - 0 - - - - - 58 - 200 - - - - DockWidget - - - - - - 0 - 150 - 261 - 32 - - - - Qt::Horizontal - - - QDialogButtonBox::Cancel|QDialogButtonBox::Ok - - - - - - 0 - 10 - 261 - 121 - - - - - - - - - - - - - - - - - - - - - - Qt::Vertical - - - - 20 - 40 - - - - - - - - Point C - - - - - - - Point A - - - - - - - - - - - - - Point B - - - - - - - - - - - - - X - - - - - - - Y - - - - - - - Z - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - - - - diff --git a/Three/doc/Three/Three.txt b/Three/doc/Three/Three.txt index 04a0b818de8..9b5187ab88b 100644 --- a/Three/doc/Three/Three.txt +++ b/Three/doc/Three/Three.txt @@ -6,9 +6,9 @@ namespace CGAL { \cgalAutoToc \author Laurent Rineau, Sebastien Loriot, Andreas Fabri, Maxime Gimeno +This package regroups the files making the API for creating and adding a new plugin to the Polyhedron_demo. \n \section intro Understanding the Polyhedron Demo -These pages are not documenting the whole Polyhedron demo but only the API that is useful to create and add a new plugin. There are several levels in this demo. @@ -16,15 +16,15 @@ There are several levels in this demo. - Among these elements is the `Viewer`, which is the drawable surface that handles all the drawing and all the keyboard and mouse events. -- The `Viewer` has a reference to the `Scene`, which contains the `Scene_item` list, which is a list of the drawn elements. +- The `Viewer` has a reference to a `CGAL::Three::Scene_interface`, which contains a list of all the items (the drawn elements). -A plugin usually defines an object that inherits from `Scene_item` or uses some of them to demonstrate a \cgal feature, so it might have to deal with the above elements. +A plugin usually defines an object that inherits from `CGAL::Three::Scene_item` or uses some of them to demonstrate a \cgal feature, so it might have to deal with the above elements. \section examplePlugin Creating a Simple Plugin \subsection examplePluginItself The Plugin Itself -A basic plugin will inherit from `Polyhedron_demo_plugin_interface`. It must be created in a folder named Xxxx_yyyy_plugin containing all the files created for it, and a CMakeLists.txt file. +A basic plugin will inherit from `CGAL::Three::Polyhedron_demo_plugin_interface`. It must be created in a folder named Xxxx_yyyy_plugin containing all the files created for it, and a CMakeLists.txt file. Its name must be of the form Xxxx_yyyy_plugin. \n [init]: @ref CGAL::Three::Polyhedron_demo_plugin_interface#init(QMainWindow *, Scene_interface *) @@ -32,9 +32,11 @@ Its name must be of the form Xxxx_yyyy_plugin. \n [actions]: @ref CGAL::Three::Polyhedron_demo_plugin_interface#actions() The class must contain the following lines :\n - Q_OBJECT\n - Q_INTERFACES(CGAL::Three::Polyhedron_demo_plugin_interface)\n - Q_PLUGIN_METADATA(IID "com.geometryfactory.PolyhedronDemo.PluginInterface/1.0")\n +~~~~~~~~~~~~~{.cpp} + Q_OBJECT + Q_INTERFACES(CGAL::Three::Polyhedron_demo_plugin_interface) + Q_PLUGIN_METADATA(IID "com.geometryfactory.PolyhedronDemo.PluginInterface/1.0") +~~~~~~~~~~~~~ Your plugin must override the three pure virtual functions inherited from Polyhedron_demo_plugin_interface : \n - [actions] that will hold the actions of the plugin @@ -94,7 +96,7 @@ then add the following line to your plugin file: #include "ui_Xxxx_yyyy_plugin.h" ~~~~~~~~~~~~~ -You can then add a new class to your cpp file, inheriting from `QDialog` and your own dialog, accessible with "Ui::". +You can then add a new class to your cpp file, inheriting from `QDialog` and your own dialog, accessible with "Ui::". \n Add the macro `Q_OBJECT` and the line `setupUi(this)` in your constructor. @@ -111,7 +113,9 @@ It is really simple to add a pop-up box with Qt. Use a QMessageBox and give it s \subsection examplePluginDockWidget Adding a Dock Widget -This section describes how to add a dock widget to the application. +This section describes how to add a dock widget to the application.\n +You can make your plugin inherit from CGAL::Three::Polyhedron_demo_plugin_helper, which gives acces to the function CGAL::Three::Polyhedron_demo_plugin_helper#addDockWidget. +This will manage automatically the position and tabification of a dock widget. \n Just like with the Dialog, create a new Qt Designer form (file->New file or Project->Qt->Qt Designer Form), choose `QDockWidget in Widgets * \image html menu_6.png Add it to the project in the CMakeLists.txt : @@ -164,7 +168,9 @@ This Scene_interface will give you access to the following functions : - [item] - [item_id] -that give you access to any item in the scene. Example of use : +that give you access to any item in the scene. + +Example of use : \snippet Three/Example_plugin/Basic_item_plugin.cpp use Don't forget to adapt your [applicable] function : @@ -202,13 +208,14 @@ An item is simply a graphic representation of a geometric data set. You need to \snippet Three/Example_plugin/Example_plugin.cpp itemdeclaration The minimalist item above is designed to draw a simple triangle. There are several steps that need to be followed when creating an item : + - Computing the data -One way to store the data you computed is to use member std::vectors. It must be done every time a change occurs in the item's geometry, using the function invalidateOpenGLBuffers. +One way to store the data you computed is to use member std::vectors. It must be done every time a change occurs in the item's geometry (usually done in a function called invalidateOpenGLBuffers). \snippet Three/Example_plugin/Example_plugin.cpp computeelements - - Filling the openGL buffers + - Filling the OpenGL buffers The application uses OpenGL VBOs to display the geometry. Those are buffers that will stream their data to the GPU. This step consists to put the data stored in the std::vectors in those buffers. In this exemple, we only need one VBO and one VAO, as we are only storing one kind of data. But if we wanted to store normals and colors, for instance, we would need as much VBOs, and if there were @@ -222,14 +229,14 @@ The code above gets a ShaderProgram, that holds the characteristics of the displ - Displaying the data [draw]: @ref CGAL::Three::Scene_item#draw -[draw_points]: @ref CGAL::Three::Scene_item#draw_points -[draw_edges]: @ref CGAL::Three::Scene_item#draw_edges -Originally, it's the viewer that requires displaying. It calls the scene, that calls each visible item's [draw],[draw_edges] and [draw_points] functions individually. +[drawPoints]: @ref CGAL::Three::Scene_item#drawPoints +[drawEdges]: @ref CGAL::Three::Scene_item#drawEdges +Originally, it's the viewer that requires displaying. It calls the scene, that calls each visible item's [draw],[drawEdges] and [drawPoints] functions individually. Therefore, this is in those functions that the display of the data must be handled : \snippet Three/Example_plugin/Example_plugin.cpp draw -to display, you need to call the same program that got configured previously, and to bind it before you call the OpenGL drawing function. +To display, you need to call the same program that got configured previously, and to bind it before you call the OpenGL drawing function. \subsection exampleUsingAGroupItem Using a Scene_group_item @@ -329,7 +336,7 @@ Configure CMake as you desire and fetch the right Qt5 packages : COMPONENTS OpenGL Script Svg Xml OPTIONAL_COMPONENTS ScriptTools) -You will probably have to fetch the libraries exported by the polyhedron_demo, like the scene_items. +You will probably have to fetch the libraries exported by the Polyhedron_demo, like the Scene_items. find_package(CGAL_polyhedron_demo HINTS "${CGAL_DIR}" "${CGAL_DIR}/Polyhedron/demo/Polyhedron-build" @@ -342,7 +349,7 @@ Finally, you can declare your plugin Notice that an external plugin will not be automatically loaded in the Polyhedron demo. It must be built in its own project. - Complete CMakeLists + Complete CMakeLists : diff --git a/Three/doc/Three/fig/menu_4.png b/Three/doc/Three/fig/menu_4.png index 826d35e999d..ea8d354446c 100644 Binary files a/Three/doc/Three/fig/menu_4.png and b/Three/doc/Three/fig/menu_4.png differ diff --git a/Three/doc/Three/fig/menu_5.png b/Three/doc/Three/fig/menu_5.png index 112ed1207f6..2c62e5825a7 100644 Binary files a/Three/doc/Three/fig/menu_5.png and b/Three/doc/Three/fig/menu_5.png differ diff --git a/Three/include/CGAL/Three/Polyhedron_demo_plugin_helper.h b/Three/include/CGAL/Three/Polyhedron_demo_plugin_helper.h index 28179cdb844..302f96abd0f 100644 --- a/Three/include/CGAL/Three/Polyhedron_demo_plugin_helper.h +++ b/Three/include/CGAL/Three/Polyhedron_demo_plugin_helper.h @@ -54,7 +54,7 @@ public: * \return NULL if none is found */ template - SceneType* get_selected_item() const{ + SceneType* getSelectedItem() const{ int item_id = scene->mainSelectionIndex(); SceneType* scene_item = qobject_cast(scene->item(item_id)); if(!scene_item) { @@ -78,7 +78,7 @@ public: * * Adds a dock widget in the left section of the MainWindow. If the slot is already taken, the dock widgets will be tabified. */ - void add_dock_widget(QDockWidget* dock); + void addDockWidget(QDockWidget* dock); protected: //!The reference to the scene diff --git a/Three/include/CGAL/Three/Scene_interface.h b/Three/include/CGAL/Three/Scene_interface.h index 03576694a96..b4231f22398 100644 --- a/Three/include/CGAL/Three/Scene_interface.h +++ b/Three/include/CGAL/Three/Scene_interface.h @@ -185,7 +185,7 @@ public: * moment this function is called, they are added to the group. * If all the selected items were in the same group, the new group * is added as a sub-group of this group.*/ - virtual void add_group(Scene_group_item* group) = 0; + virtual void addGroup(Scene_group_item* group) = 0; }; // end interface Scene_interface } diff --git a/Three/include/CGAL/Three/Scene_item.h b/Three/include/CGAL/Three/Scene_item.h index 98cae64bc32..9cd0480ddb6 100644 --- a/Three/include/CGAL/Three/Scene_item.h +++ b/Three/include/CGAL/Three/Scene_item.h @@ -57,9 +57,9 @@ class SCENE_ITEM_EXPORT Scene_item : public QObject { public: /*! * \brief The OpenGL_program_IDs enum - * This enum holds the OpenGL programs IDs that are given to getShaderProgram() and attrib_buffers(). + * This enum holds the OpenGL programs IDs that are given to getShaderProgram() and attribBuffers(). *@see getShaderProgram - * @see attrib_buffers + * @see attribBuffers */ enum OpenGL_program_IDs { @@ -103,37 +103,37 @@ public: virtual void draw() const {} /*! \brief The drawing function. * Draws the facets of the item in the viewer using OpenGL functions. The data - * for the drawing is gathered in compute_elements(), and is sent - * to buffers in initialize_buffers(). - * @see compute_elements() - * @see initialize_buffers() + * for the drawing is gathered in computeElements(), and is sent + * to buffers in initializeBuffers(). + * @see computeElements() + * @see initializeBuffers() */ virtual void draw(CGAL::Three::Viewer_interface*) const { draw(); } //! Deprecated. Does nothing. - virtual void draw_edges() const { draw(); } + virtual void drawEdges() const { draw(); } /*! \brief The drawing function. * Draws the edges and lines of the item in the viewer using OpenGL functions. The data - * for the drawing is gathered in compute_elements(), and is sent - * to buffers in initialize_buffers(). - * @see compute_elements() - * @see initialize_buffers() + * for the drawing is gathered in computeElements(), and is sent + * to buffers in initializeBuffers(). + * @see computeElements() + * @see initializeBuffers() */ - virtual void draw_edges(CGAL::Three::Viewer_interface* viewer) const { draw(viewer); } + virtual void drawEdges(CGAL::Three::Viewer_interface* viewer) const { draw(viewer); } //! Deprecated. Does nothing. - virtual void draw_points() const { draw(); } + virtual void drawPoints() const { draw(); } /*! \brief The drawing function. * Draws the points of the item in the viewer using OpenGL functions. The data - * for the drawing is gathered in compute_elements(), and is sent - * to buffers in initialize_buffers(). - * @see compute_elements() - * @see initialize_buffers() + * for the drawing is gathered in computeElements(), and is sent + * to buffers in initializeBuffers(). + * @see computeElements() + * @see initializeBuffers() */ - virtual void draw_points(CGAL::Three::Viewer_interface*) const { draw_points(); } + virtual void drawPoints(CGAL::Three::Viewer_interface*) const { drawPoints(); } //! Draws the splats of the item in the viewer using GLSplat functions. - virtual void draw_splats() const {} + virtual void drawSplats() const {} //! Draws the splats of the item in the viewer using GLSplat functions. - virtual void draw_splats(CGAL::Three::Viewer_interface*) const {draw_splats();} + virtual void drawSplats(CGAL::Three::Viewer_interface*) const {drawSplats();} //! Called by the scene. If b is true, then this item is currently selected. virtual void selection_changed(bool b); @@ -230,12 +230,12 @@ public: * | |_______|_____| * |General Info | #Edges|12 | * |_____________|_______|_____| - * compute stats(0) should return "Cube" and compute_stats(1) should return QString::number(12); + * compute stats(0) should return "Cube" and computeStats(1) should return QString::number(12); * The numbers must be coherent with the order of declaration of the titles in the header. * \endverbatim * */ - virtual QString compute_stats(int i); + virtual QString computeStats(int i); //!Contains the number of group and subgroups containing this item. int has_group; @@ -345,11 +345,11 @@ protected: //! Holds the number of vertices that are not linked to the polyhedron from the OFF //! file. std::size_t nb_isolated_vertices; - /*! Decides if the draw function must call initialize_buffers() or not. It is set - * to true in the end of initialize_buffers() and to false in invalidateOpenGLBuffers(). The need of + /*! Decides if the draw function must call initializeBuffers() or not. It is set + * to true in the end of initializeBuffers() and to false in invalidateOpenGLBuffers(). The need of * this boolean comes from the need of a context from the OpenGLFunctions used in - * initialize_buffers(). - * @see initialize_buffers() + * initializeBuffers(). + * @see initializeBuffers() * @see invalidateOpenGLBuffers() */ mutable bool are_buffers_filled; @@ -386,20 +386,27 @@ protected: vaos[i] = n_vao; } - /*! Fills the VBOs with data. Must be called after each call to #compute_elements(). * @see compute_elements() + //! Used pass data to the shader. + int vertexLoc; + //! Used pass data to the shader. + int normalLoc; + //! Used pass data to the shader. + int colorLoc; + /*! Fills the VBOs with data. Must be called after each call to #computeElements(). + * @see computeElements() */ - void initialize_buffers(){} + void initializeBuffers(){} /*! Collects all the data for the shaders. Must be called in #invalidateOpenGLBuffers(). * @see invalidateOpenGLBuffers(). */ - void compute_elements(){} + void computeElements(){} /*! Passes all the uniform data to the shaders. * According to program_name, this data may change. */ - void attrib_buffers(CGAL::Three::Viewer_interface*, int program_name) const; + void attribBuffers(CGAL::Three::Viewer_interface*, int program_name) const; /*! Compatibility function. Calls `viewer->getShaderProgram()`. */ virtual QOpenGLShaderProgram* getShaderProgram(int name , CGAL::Three::Viewer_interface *viewer = 0) const; diff --git a/Three/include/CGAL/Three/Viewer_interface.h b/Three/include/CGAL/Three/Viewer_interface.h index bf9e49e495d..5e3a0f57ac2 100644 --- a/Three/include/CGAL/Three/Viewer_interface.h +++ b/Three/include/CGAL/Three/Viewer_interface.h @@ -45,9 +45,9 @@ class VIEWER_EXPORT Viewer_interface : public QGLViewer, public QOpenGLFunctions public: /*! * \brief The OpenGL_program_IDs enum - * This enum holds the OpenGL programs IDs that are given to getShaderProgram() and attrib_buffers(). + * This enum holds the OpenGL programs IDs that are given to getShaderProgram() and attribBuffers(). *@see getShaderProgram - * @see attrib_buffers + * @see attribBuffers */ enum OpenGL_program_IDs { @@ -89,7 +89,7 @@ public: * According to program_name, this data may change. * @see OpenGL_program_IDs */ - virtual void attrib_buffers(int program_name) const = 0; + virtual void attribBuffers(int program_name) const = 0; /*! Returns a program according to name. * If the program does not exist yet, it is created and stored in shader_programs.