diff --git a/Polyhedron/demo/Polyhedron/CGAL_demo/Scene_interface.h b/Polyhedron/demo/Polyhedron/CGAL_demo/Scene_interface.h index 9ac8df9842a..1cae5d3f22b 100644 --- a/Polyhedron/demo/Polyhedron/CGAL_demo/Scene_interface.h +++ b/Polyhedron/demo/Polyhedron/CGAL_demo/Scene_interface.h @@ -12,7 +12,6 @@ class Scene_item; // OpenGL rendering mode enum RenderingMode { Points = 0, PointsPlusNormals, - Splatting, Wireframe, Flat, FlatPlusEdges, diff --git a/Polyhedron/demo/Polyhedron/Polyhedron_demo_cut_plugin.cpp b/Polyhedron/demo/Polyhedron/Polyhedron_demo_cut_plugin.cpp index 359fd2f0ab6..1cf0186ed72 100644 --- a/Polyhedron/demo/Polyhedron/Polyhedron_demo_cut_plugin.cpp +++ b/Polyhedron/demo/Polyhedron/Polyhedron_demo_cut_plugin.cpp @@ -94,6 +94,7 @@ private: mutable QOpenGLShaderProgram *program; + using Scene_item::initialize_buffers; void initialize_buffers(Viewer_interface *viewer)const { program = getShaderProgram(PROGRAM_WITHOUT_LIGHT, viewer); @@ -211,6 +212,7 @@ private: mutable QOpenGLShaderProgram *program; + using Scene_item::initialize_buffers; void initialize_buffers(Viewer_interface *viewer)const { program = getShaderProgram(PROGRAM_WITHOUT_LIGHT, viewer); diff --git a/Polyhedron/demo/Polyhedron/Polyhedron_demo_mesh_3_plugin_cgal_code.cpp b/Polyhedron/demo/Polyhedron/Polyhedron_demo_mesh_3_plugin_cgal_code.cpp index 032839022bf..1c7d9d30dd3 100644 --- a/Polyhedron/demo/Polyhedron/Polyhedron_demo_mesh_3_plugin_cgal_code.cpp +++ b/Polyhedron/demo/Polyhedron/Polyhedron_demo_mesh_3_plugin_cgal_code.cpp @@ -151,7 +151,7 @@ public: // Indicate if rendering mode is supported bool supportsRenderingMode(RenderingMode m) const { - return (m != Gouraud && m!=PointsPlusNormals && m!=Splatting); // CHECK THIS! + return (m != Gouraud && m!=PointsPlusNormals); // CHECK THIS! } void draw(Viewer_interface* viewer) const { @@ -403,6 +403,7 @@ private: mutable QOpenGLShaderProgram *program; + using Scene_item::initialize_buffers; void initialize_buffers(Viewer_interface *viewer)const { //vao containing the data for the facets diff --git a/Polyhedron/demo/Polyhedron/Polyhedron_demo_trivial_plugin.cpp b/Polyhedron/demo/Polyhedron/Polyhedron_demo_trivial_plugin.cpp index 03d68e4c8c0..a4de4e1580f 100644 --- a/Polyhedron/demo/Polyhedron/Polyhedron_demo_trivial_plugin.cpp +++ b/Polyhedron/demo/Polyhedron/Polyhedron_demo_trivial_plugin.cpp @@ -73,6 +73,7 @@ private: std::vector positions_lines; mutable QOpenGLShaderProgram *program; + using Scene_item::initialize_buffers; void initialize_buffers(Viewer_interface *viewer)const { diff --git a/Polyhedron/demo/Polyhedron/Scene.cpp b/Polyhedron/demo/Polyhedron/Scene.cpp index 3a89027f0ca..1863ee0602e 100644 --- a/Polyhedron/demo/Polyhedron/Scene.cpp +++ b/Polyhedron/demo/Polyhedron/Scene.cpp @@ -1,8 +1,3 @@ - -//#include "GlSplat/GlSplat.h" - - - #include #include "config.h" #include "Scene.h" @@ -29,15 +24,6 @@ void CGALglcolor(QColor c) } } - -//GlSplat::SplatRenderer* Scene::ms_splatting = 0; -//int Scene::ms_splattingCounter = 0; -//GlSplat::SplatRenderer* Scene::splatting() -//{ -// assert(ms_splatting!=0 && "A Scene object must be created before requesting the splatting object"); -// return ms_splatting; -//} - Scene::Scene(QObject* parent) : QAbstractListModel(parent), selected_item(-1), @@ -49,13 +35,8 @@ Scene::Scene(QObject* parent) double, double, double)), this, SLOT(setSelectionRay(double, double, double, double, double, double))); - - /* if(ms_splatting==0) - ms_splatting = new GlSplat::SplatRenderer(); - ms_splattingCounter++; - */ - } + Scene::Item_id Scene::addItem(Scene_item* item) { @@ -170,9 +151,6 @@ Scene::~Scene() delete item_ptr; } m_entries.clear(); - - // if((--ms_splattingCounter)==0) - // delete ms_splatting; } Scene_item* @@ -216,8 +194,6 @@ Scene::duplicate(Item_id index) void Scene::initializeGL() { - // ms_splatting->init(); - //Setting the light options // Create light components @@ -406,47 +382,8 @@ Scene::draw_aux(bool with_names, Viewer_interface* viewer) ::glPopName(); } } - // Splatting - /* if(!with_names && ms_splatting->isSupported()) - { - - ms_splatting->beginVisibilityPass(); - for(int index = 0; index < m_entries.size(); ++index) - { - Scene_item& item = *m_entries[index]; - if(item.visible() && item.renderingMode() == Splatting) - { - - if(viewer) - { - item.draw_splats(viewer); - } - else - item.draw_splats(); - } - - } - ms_splatting->beginAttributePass(); - for(int index = 0; index < m_entries.size(); ++index) - { Scene_item& item = *m_entries[index]; - if(item.visible() && item.renderingMode() == Splatting) - { - - CGALglcolor(item.color()); - if(viewer) - item.draw_splats(viewer); - else - item.draw_splats(); - } - } - ms_splatting->finalize(); - - }*/ } -// workaround for Qt-4.2 (see above) -#undef lighter - int Scene::rowCount(const QModelIndex & parent) const { @@ -604,9 +541,7 @@ Scene::setData(const QModelIndex &index, { RenderingMode rendering_mode = static_cast(value.toInt()); // Find next supported rendering mode - while ( ! item->supportsRenderingMode(rendering_mode) - // || (rendering_mode==Splatting && !Scene::splatting()->isSupported()) - ) + while ( ! item->supportsRenderingMode(rendering_mode) ) { rendering_mode = static_cast( (rendering_mode+1) % NumberOfRenderingMode ); } diff --git a/Polyhedron/demo/Polyhedron/Scene.h b/Polyhedron/demo/Polyhedron/Scene.h index ba570323e69..b3d87a56813 100644 --- a/Polyhedron/demo/Polyhedron/Scene.h +++ b/Polyhedron/demo/Polyhedron/Scene.h @@ -21,7 +21,6 @@ class QEvent; class QMouseEvent; -namespace GlSplat { class SplatRenderer; } class Viewer_interface; @@ -149,12 +148,6 @@ private: QList selected_items_list; int item_A; int item_B; -#ifdef CGAL_GLEW_ENABLED - static GlSplat::SplatRenderer* ms_splatting; - static int ms_splattingCounter; -public: - static GlSplat::SplatRenderer* splatting(); -#endif }; // end class Scene class SCENE_EXPORT SceneDelegate : public QItemDelegate diff --git a/Polyhedron/demo/Polyhedron/Scene_c2t3_item.h b/Polyhedron/demo/Polyhedron/Scene_c2t3_item.h index 4d3dd5a1b0a..3e355c2819e 100644 --- a/Polyhedron/demo/Polyhedron/Scene_c2t3_item.h +++ b/Polyhedron/demo/Polyhedron/Scene_c2t3_item.h @@ -73,7 +73,7 @@ public: // Indicate if rendering mode is supported bool supportsRenderingMode(RenderingMode m) const { - return (m != Gouraud && m!=PointsPlusNormals && m!=Splatting); // CHECK THIS! + return (m != Gouraud && m!=PointsPlusNormals); // CHECK THIS! } void draw() const { diff --git a/Polyhedron/demo/Polyhedron/Scene_combinatorial_map_item.h b/Polyhedron/demo/Polyhedron/Scene_combinatorial_map_item.h index 32b135f420b..c6dbe60d799 100644 --- a/Polyhedron/demo/Polyhedron/Scene_combinatorial_map_item.h +++ b/Polyhedron/demo/Polyhedron/Scene_combinatorial_map_item.h @@ -38,7 +38,7 @@ public: QString toolTip() const; // Indicate if rendering mode is supported - virtual bool supportsRenderingMode(RenderingMode m) const { return (m != Gouraud && m!=PointsPlusNormals && m!=Splatting); } // CHECK THIS! + virtual bool supportsRenderingMode(RenderingMode m) const { return (m != Gouraud && m!=PointsPlusNormals); } // CHECK THIS! //Event handling virtual bool keyPressEvent(QKeyEvent*); // OpenGL drawing in a display list diff --git a/Polyhedron/demo/Polyhedron/Scene_edit_polyhedron_item.h b/Polyhedron/demo/Polyhedron/Scene_edit_polyhedron_item.h index 8eb12deb81f..67f30bcd0b5 100644 --- a/Polyhedron/demo/Polyhedron/Scene_edit_polyhedron_item.h +++ b/Polyhedron/demo/Polyhedron/Scene_edit_polyhedron_item.h @@ -289,6 +289,7 @@ private: mutable QOpenGLShaderProgram bbox_program; mutable QOpenGLBuffer *in_bu; + using Scene_item::initialize_buffers; void initialize_buffers(Viewer_interface *viewer) const; void compute_normals_and_vertices(void); void compute_bbox(const Scene_interface::Bbox&); diff --git a/Polyhedron/demo/Polyhedron/Scene_implicit_function_item.cpp b/Polyhedron/demo/Polyhedron/Scene_implicit_function_item.cpp index bc3210362b2..9469becb304 100644 --- a/Polyhedron/demo/Polyhedron/Scene_implicit_function_item.cpp +++ b/Polyhedron/demo/Polyhedron/Scene_implicit_function_item.cpp @@ -455,7 +455,6 @@ Scene_implicit_function_item::supportsRenderingMode(RenderingMode m) const { switch ( m ) { - case Splatting: case Gouraud: return false; @@ -477,7 +476,7 @@ void Scene_implicit_function_item::compute_texture(int i, int j) double v = (implicit_grid_[i][j]).second; if(is_nan(v)) { - texture->setData(i,j,0.2,0.2,0.2); + texture->setData(i,j,51,51,51); } else // determines grey level if ( v > 0 ) diff --git a/Polyhedron/demo/Polyhedron/Scene_implicit_function_item.h b/Polyhedron/demo/Polyhedron/Scene_implicit_function_item.h index 27caf1b0980..0e8a3700766 100644 --- a/Polyhedron/demo/Polyhedron/Scene_implicit_function_item.h +++ b/Polyhedron/demo/Polyhedron/Scene_implicit_function_item.h @@ -107,6 +107,7 @@ private: GLuint vao; GLuint buffer[4]; + using Scene_item::initialize_buffers; void initialize_buffers(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 affb772ab9c..90d8729c51b 100644 --- a/Polyhedron/demo/Polyhedron/Scene_item.cpp +++ b/Polyhedron/demo/Polyhedron/Scene_item.cpp @@ -39,8 +39,6 @@ QString modeName(RenderingMode mode) { return QObject::tr("Gouraud"); case PointsPlusNormals: return QObject::tr("pts+normals"); - case Splatting: - return QObject::tr("splats"); default: Q_ASSERT(false); return QObject::tr("unknown"); @@ -62,8 +60,6 @@ const char* slotName(RenderingMode mode) { return SLOT(setGouraudMode()); case PointsPlusNormals: return SLOT(setPointsPlusNormalsMode()); - case Splatting: - return SLOT(setSplattingMode()); default: Q_ASSERT(false); return ""; diff --git a/Polyhedron/demo/Polyhedron/Scene_item.h b/Polyhedron/demo/Polyhedron/Scene_item.h index 699d3c15187..32375082633 100644 --- a/Polyhedron/demo/Polyhedron/Scene_item.h +++ b/Polyhedron/demo/Polyhedron/Scene_item.h @@ -104,9 +104,6 @@ public: // Points OpenGL drawing virtual void draw_points() const { draw(); } virtual void draw_points(Viewer_interface*) const { draw_points(); } - // Splats OpenGL drawing - virtual void draw_splats() const {} - virtual void draw_splats(Viewer_interface*) const {draw_splats();} virtual void selection_changed(bool); // Functions for displaying meta-data of the item @@ -181,10 +178,6 @@ public Q_SLOTS: setRenderingMode(PointsPlusNormals); } - void setSplattingMode(){ - setRenderingMode(Splatting); - } - virtual void itemAboutToBeDestroyed(Scene_item*); virtual void select(double orig_x, diff --git a/Polyhedron/demo/Polyhedron/Scene_nef_polyhedron_item.cpp b/Polyhedron/demo/Polyhedron/Scene_nef_polyhedron_item.cpp index f4800d5a7b3..72c5d6d49ce 100644 --- a/Polyhedron/demo/Polyhedron/Scene_nef_polyhedron_item.cpp +++ b/Polyhedron/demo/Polyhedron/Scene_nef_polyhedron_item.cpp @@ -245,7 +245,7 @@ void Scene_nef_polyhedron_item::compute_normals_and_vertices(void) } //check if the facet is external or internal - std::queue face_queue; + std::queue face_queue; face_queue.push(cdt.infinite_vertex()->face()); while(! face_queue.empty() ) { diff --git a/Polyhedron/demo/Polyhedron/Scene_nef_polyhedron_item.h b/Polyhedron/demo/Polyhedron/Scene_nef_polyhedron_item.h index 42fef61a99a..2efed5ae4a7 100644 --- a/Polyhedron/demo/Polyhedron/Scene_nef_polyhedron_item.h +++ b/Polyhedron/demo/Polyhedron/Scene_nef_polyhedron_item.h @@ -29,7 +29,7 @@ public: virtual void changed(); virtual void selection_changed(bool); // Indicate if rendering mode is supported - virtual bool supportsRenderingMode(RenderingMode m) const { return m != Gouraud && m!=Splatting; } // CHECK THIS! + virtual bool supportsRenderingMode(RenderingMode m) const { return m != Gouraud; } // CHECK THIS! // OpenGL drawing in a display list void direct_draw() const; @@ -85,6 +85,7 @@ private: mutable QOpenGLShaderProgram *program; + using Scene_item::initialize_buffers; void initialize_buffers(Viewer_interface *viewer) const; void compute_normals_and_vertices(void); diff --git a/Polyhedron/demo/Polyhedron/Scene_plane_item.h b/Polyhedron/demo/Polyhedron/Scene_plane_item.h index 2551258365c..b9b45d28903 100644 --- a/Polyhedron/demo/Polyhedron/Scene_plane_item.h +++ b/Polyhedron/demo/Polyhedron/Scene_plane_item.h @@ -158,6 +158,7 @@ private: mutable bool smooth_shading; mutable QOpenGLShaderProgram *program; + using Scene_item::initialize_buffers; void initialize_buffers(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 aeeb9ba11b2..139596c75ec 100644 --- a/Polyhedron/demo/Polyhedron/Scene_points_with_normal_item.cpp +++ b/Polyhedron/demo/Polyhedron/Scene_points_with_normal_item.cpp @@ -365,29 +365,7 @@ Scene_points_with_normal_item::toolTip() const bool Scene_points_with_normal_item::supportsRenderingMode(RenderingMode m) const { return m==Points || - ( has_normals() && - ( m==PointsPlusNormals || m==Splatting ) ); -} - -void Scene_points_with_normal_item::draw_splats(Viewer_interface* viewer) const -{ - //Needs to be re-thinked because the GlSplat Renderer is deprecated and is a big part of the scene class. - - // TODO add support for selection -/* ::glBegin(GL_POINTS); - for ( Point_set_3::const_iterator it = m_points->begin(); it != m_points->end(); it++) - { - const UI_point& p = *it; - ::glNormal3dv(&p.normal().x()); - ::glMultiTexCoord1d(GL_TEXTURE2, p.radius()); - ::glVertex3dv(&p.x()); - - } - ::glEnd(); - - -*/ - + ( has_normals() && m==PointsPlusNormals ); } void Scene_points_with_normal_item::draw_edges(Viewer_interface* viewer) const @@ -529,10 +507,6 @@ QMenu* Scene_points_with_normal_item::contextMenu() void Scene_points_with_normal_item::setRenderingMode(RenderingMode m) { Scene_item::setRenderingMode(m); - if (rendering_mode==Splatting && (!m_points->are_radii_uptodate())) - { - computes_local_spacing(6); // default value = small - } } bool Scene_points_with_normal_item::has_normals() const { return m_has_normals; } diff --git a/Polyhedron/demo/Polyhedron/Scene_points_with_normal_item.h b/Polyhedron/demo/Polyhedron/Scene_points_with_normal_item.h index e2b2e1c9227..2b7ca2a214b 100644 --- a/Polyhedron/demo/Polyhedron/Scene_points_with_normal_item.h +++ b/Polyhedron/demo/Polyhedron/Scene_points_with_normal_item.h @@ -52,8 +52,6 @@ public: virtual void draw_edges(Viewer_interface* viewer) const; virtual void draw_points(Viewer_interface*) const; - virtual void draw_splats(Viewer_interface*) const; - // Gets wrapped point set Point_set* point_set(); const Point_set* point_set() const; @@ -95,6 +93,7 @@ private: mutable QOpenGLShaderProgram *program; + using Scene_item::initialize_buffers; void initialize_buffers(Viewer_interface *viewer) const; void compute_normals_and_vertices(void); diff --git a/Polyhedron/demo/Polyhedron/Scene_polygon_soup_item.cpp b/Polyhedron/demo/Polyhedron/Scene_polygon_soup_item.cpp index 4c819c42841..6a77d95fc74 100644 --- a/Polyhedron/demo/Polyhedron/Scene_polygon_soup_item.cpp +++ b/Polyhedron/demo/Polyhedron/Scene_polygon_soup_item.cpp @@ -188,7 +188,7 @@ Scene_polygon_soup_item::triangulate_polygon(Polygons_iterator pit) } //check if the facet is external or internal - std::queue face_queue; + std::queue face_queue; face_queue.push(cdt.infinite_vertex()->face()); while(! face_queue.empty() ) { CDT::Face_handle fh = face_queue.front(); diff --git a/Polyhedron/demo/Polyhedron/Scene_polygon_soup_item.h b/Polyhedron/demo/Polyhedron/Scene_polygon_soup_item.h index 8b9ec7ffe41..ce5b20df643 100644 --- a/Polyhedron/demo/Polyhedron/Scene_polygon_soup_item.h +++ b/Polyhedron/demo/Polyhedron/Scene_polygon_soup_item.h @@ -136,7 +136,7 @@ public: QString toolTip() const; // Indicate if rendering mode is supported - virtual bool supportsRenderingMode(RenderingMode m) const { return (m!=Gouraud && m!=PointsPlusNormals && m!=Splatting); } // CHECK THIS! + virtual bool supportsRenderingMode(RenderingMode m) const { return (m!=Gouraud && m!=PointsPlusNormals); } // CHECK THIS! // OpenGL drawing in a display list virtual void draw() const {} virtual void draw(Viewer_interface*) const; @@ -170,6 +170,7 @@ private: std::vector positions_lines; std::vector normals; + using Scene_item::initialize_buffers; void initialize_buffers(Viewer_interface *viewer) const; void compute_normals_and_vertices(void); void triangulate_polygon(Polygons_iterator ); diff --git a/Polyhedron/demo/Polyhedron/Scene_polyhedron_item.cpp b/Polyhedron/demo/Polyhedron/Scene_polyhedron_item.cpp index c813529a2de..f1cba5c3193 100644 --- a/Polyhedron/demo/Polyhedron/Scene_polyhedron_item.cpp +++ b/Polyhedron/demo/Polyhedron/Scene_polyhedron_item.cpp @@ -153,7 +153,7 @@ Scene_polyhedron_item::triangulate_facet(Facet_iterator fit) fit2->info().is_external = false; } //check if the facet is external or internal - std::queue face_queue; + std::queue face_queue; face_queue.push(cdt.infinite_vertex()->face()); while(! face_queue.empty() ) { CDT::Face_handle fh = face_queue.front(); @@ -251,7 +251,7 @@ Scene_polyhedron_item::triangulate_facet_color(Facet_iterator fit) afit->info().is_external = false; } //check if the facet is external or internal - std::queue face_queue; + std::queue face_queue; face_queue.push(cdt.infinite_vertex()->face()); while(! face_queue.empty() ) { CDT::Face_handle fh = face_queue.front(); @@ -469,7 +469,7 @@ Scene_polyhedron_item::compute_normals_and_vertices(void) else if (cur_shading == Gouraud) { - Vector n = compute_vertex_normal(*he->vertex()); + Vector n = compute_vertex_normal(*he->vertex()); normals.push_back(n.x()); normals.push_back(n.y()); normals.push_back(n.z()); diff --git a/Polyhedron/demo/Polyhedron/Scene_polyhedron_item.h b/Polyhedron/demo/Polyhedron/Scene_polyhedron_item.h index b6366754729..8b9e6c8f8b0 100644 --- a/Polyhedron/demo/Polyhedron/Scene_polyhedron_item.h +++ b/Polyhedron/demo/Polyhedron/Scene_polyhedron_item.h @@ -44,7 +44,7 @@ public: QMenu* contextMenu(); // Indicate if rendering mode is supported - virtual bool supportsRenderingMode(RenderingMode m) const { return (m!=PointsPlusNormals && m!=Splatting); } + virtual bool supportsRenderingMode(RenderingMode m) const { return (m!=PointsPlusNormals); } // Points/Wireframe/Flat/Gouraud OpenGL drawing in a display list void draw() const {} virtual void draw(Viewer_interface*) const; @@ -120,6 +120,7 @@ private: mutable QOpenGLShaderProgram *program; + using Scene_item::initialize_buffers; void initialize_buffers(Viewer_interface *viewer = 0) const; void compute_normals_and_vertices(void); void compute_colors(); diff --git a/Polyhedron/demo/Polyhedron/Scene_polyhedron_item_decorator.h b/Polyhedron/demo/Polyhedron/Scene_polyhedron_item_decorator.h index c385815b03c..2377fd00a79 100644 --- a/Polyhedron/demo/Polyhedron/Scene_polyhedron_item_decorator.h +++ b/Polyhedron/demo/Polyhedron/Scene_polyhedron_item_decorator.h @@ -27,7 +27,7 @@ public: // QMenu* contextMenu(); // Indicate if rendering mode is supported - bool supportsRenderingMode(RenderingMode m) const { return (m!=PointsPlusNormals && m!=Splatting); } + bool supportsRenderingMode(RenderingMode m) const { return m!=PointsPlusNormals; } // Points/Wireframe/Flat/Gouraud OpenGL drawing in a display list // dispatch to poly_item direct_draw and direct_draw_edges void draw() const; diff --git a/Polyhedron/demo/Polyhedron/Scene_polyhedron_selection_item.h b/Polyhedron/demo/Polyhedron/Scene_polyhedron_selection_item.h index 9838b2b7024..e137667cae1 100644 --- a/Polyhedron/demo/Polyhedron/Scene_polyhedron_selection_item.h +++ b/Polyhedron/demo/Polyhedron/Scene_polyhedron_selection_item.h @@ -240,7 +240,7 @@ public: typedef boost::unordered_set Selection_set_facet; typedef boost::unordered_set Selection_set_edge; - + using Scene_polyhedron_item_decorator::draw; virtual void draw(Viewer_interface*) const; virtual void draw_edges() const { } virtual void draw_edges(Viewer_interface*) const; @@ -704,6 +704,7 @@ private: std::vector positions_points; mutable QOpenGLShaderProgram *program; + using Scene_item::initialize_buffers; void initialize_buffers(Viewer_interface *viewer) const; void compute_elements(); diff --git a/Polyhedron/demo/Polyhedron/Scene_polyhedron_shortest_path_item.h b/Polyhedron/demo/Polyhedron/Scene_polyhedron_shortest_path_item.h index 996084333fa..6a51bbcb1f6 100644 --- a/Polyhedron/demo/Polyhedron/Scene_polyhedron_shortest_path_item.h +++ b/Polyhedron/demo/Polyhedron/Scene_polyhedron_shortest_path_item.h @@ -104,6 +104,7 @@ private: std::vector vertices; mutable QOpenGLShaderProgram *program; + using Scene_polyhedron_item_decorator::initialize_buffers; void initialize_buffers(Viewer_interface *viewer = 0) const; void compute_elements(void); @@ -120,6 +121,7 @@ public: Primitives_mode get_primitives_mode() const; virtual bool supportsRenderingMode(RenderingMode m) const; + using Scene_polyhedron_item_decorator::draw; virtual void draw(Viewer_interface*) const; // Points OpenGL drawing virtual void draw_points(Viewer_interface*) const; diff --git a/Polyhedron/demo/Polyhedron/Scene_polyhedron_transform_item.h b/Polyhedron/demo/Polyhedron/Scene_polyhedron_transform_item.h index 7b97e8977a4..274fa999d1c 100644 --- a/Polyhedron/demo/Polyhedron/Scene_polyhedron_transform_item.h +++ b/Polyhedron/demo/Polyhedron/Scene_polyhedron_transform_item.h @@ -38,6 +38,7 @@ private: qglviewer::Vec center_; mutable QOpenGLShaderProgram *program; std::vector positions_lines; + using Scene_item::initialize_buffers; void initialize_buffers(Viewer_interface *viewer) const; void compute_elements(); diff --git a/Polyhedron/demo/Polyhedron/Scene_polylines_item.cpp b/Polyhedron/demo/Polyhedron/Scene_polylines_item.cpp index 39288d669eb..a2d89050653 100644 --- a/Polyhedron/demo/Polyhedron/Scene_polylines_item.cpp +++ b/Polyhedron/demo/Polyhedron/Scene_polylines_item.cpp @@ -463,7 +463,7 @@ Scene_polylines_item::compute_elements() //Convert the triangle coordinates to lines coordinates for the //Wiremode in the spheres - for(int i=0; i< (int) positions_spheres.size(); i=i) + for(int i=0; i< (int) positions_spheres.size();) { //draw triangles if(i< (360/sectors)*12) diff --git a/Polyhedron/demo/Polyhedron/Scene_polylines_item.h b/Polyhedron/demo/Polyhedron/Scene_polylines_item.h index f17f9db7b77..bd5059f0499 100644 --- a/Polyhedron/demo/Polyhedron/Scene_polylines_item.h +++ b/Polyhedron/demo/Polyhedron/Scene_polylines_item.h @@ -109,6 +109,7 @@ private: typedef std::map Point_to_int_map; typedef Point_to_int_map::iterator iterator; void create_Sphere(double); + using Scene_item::initialize_buffers; void initialize_buffers(Viewer_interface *viewer) const; void compute_elements(); diff --git a/Polyhedron/demo/Polyhedron/Scene_textured_polyhedron_item.h b/Polyhedron/demo/Polyhedron/Scene_textured_polyhedron_item.h index 506fd8a3422..a3e4a4b26e5 100644 --- a/Polyhedron/demo/Polyhedron/Scene_textured_polyhedron_item.h +++ b/Polyhedron/demo/Polyhedron/Scene_textured_polyhedron_item.h @@ -28,7 +28,7 @@ public: virtual QString toolTip() const; // Indicate if rendering mode is supported - virtual bool supportsRenderingMode(RenderingMode m) const { return m != Splatting; } + virtual bool supportsRenderingMode(RenderingMode) const { return true; } // Points/Wireframe/Flat/Gouraud OpenGL drawing in a display list void draw() const {} virtual void draw(Viewer_interface*) const; @@ -62,6 +62,8 @@ private: mutable QOpenGLShaderProgram* program; bool smooth_shading; + + using Scene_item::initialize_buffers; void initialize_buffers(Viewer_interface *viewer) const; void compute_normals_and_vertices(void); diff --git a/Polyhedron/demo/Polyhedron/include/Point_set_3.h b/Polyhedron/demo/Polyhedron/include/Point_set_3.h index db351896c4a..bc987f60f8c 100644 --- a/Polyhedron/demo/Polyhedron/include/Point_set_3.h +++ b/Polyhedron/demo/Polyhedron/include/Point_set_3.h @@ -280,24 +280,6 @@ public: ::glEnd(); } } - - // Draw oriented points with radius using OpenGL calls. - // Preconditions: must be used inbetween calls to GlSplat library - void gl_draw_splats() const - { - // TODO add support for selection - ::glBegin(GL_POINTS); - for (const_iterator it = begin(); it != end(); it++) - { - const UI_point& p = *it; - ::glNormal3dv(&p.normal().x()); -#ifdef CGAL_GLEW_ENABLED - ::glMultiTexCoord1d(GL_TEXTURE2, p.radius()); -#endif - ::glVertex3dv(&p.x()); - } - ::glEnd(); - } bool are_radii_uptodate() const { return m_radii_are_uptodate; } void set_radii_uptodate(bool /*on*/) { m_radii_are_uptodate = false; } @@ -344,7 +326,6 @@ private: // Computes bounding sphere typedef CGAL::Min_sphere_of_points_d_traits_3 Traits; typedef CGAL::Min_sphere_of_spheres_d Min_sphere; - typedef typename Traits::Sphere Traits_sphere; Min_sphere ms(begin(),end());