diff --git a/Arrangement_on_surface_2/demo/earth/Camera_manip.cpp b/Arrangement_on_surface_2/demo/earth/Camera_manip.cpp index 4b76f44e79c..cb1d6a46a77 100644 --- a/Arrangement_on_surface_2/demo/earth/Camera_manip.cpp +++ b/Arrangement_on_surface_2/demo/earth/Camera_manip.cpp @@ -14,48 +14,3 @@ Camera_manip::Camera_manip(Camera& camera) : m_camera(camera) { } - - -//void Camera_manip::set_mouse_button_pressed_flag(QMouseEvent* e, bool flag) -//{ -// switch (e->button()) -// { -// case Qt::LeftButton: -// m_left_mouse_button_down = flag; -// break; -// -// case Qt::MiddleButton: -// m_middle_mouse_button_down = flag; -// break; -// } -//} -//void Camera_manip::mousePressEvent(QMouseEvent* e) -//{ -// set_mouse_button_pressed_flag(e, true); -// m_mouse_press_pos = m_last_mouse_pos = QVector2D(e->position()); -// -// // call the function overridden by the derived class -// mouse_press_event(e); -//} -//void Camera_manip::mouseMoveEvent(QMouseEvent* e) -//{ -// m_current_mouse_pos = QVector2D(e->position()); -// m_diff = m_current_mouse_pos - m_last_mouse_pos; -// -// // call the function overridden by the derived class -// mouse_move_event(e); -// -// m_last_mouse_pos = m_current_mouse_pos; -//} -//void Camera_manip::mouseReleaseEvent(QMouseEvent* e) -//{ -// set_mouse_button_pressed_flag(e, false); -// -// // call the function overridden by the derived class -// mouse_release_event(e); -//} -//void Camera_manip::resizeGL(int w, int h) -//{ -// resize(w, h); -//} - diff --git a/Arrangement_on_surface_2/demo/earth/Main_widget.cpp b/Arrangement_on_surface_2/demo/earth/Main_widget.cpp index 551bd6d3c36..7826f835206 100644 --- a/Arrangement_on_surface_2/demo/earth/Main_widget.cpp +++ b/Arrangement_on_surface_2/demo/earth/Main_widget.cpp @@ -547,15 +547,15 @@ void Main_widget::paintGL() sp.set_uniform("u_plane", QVector4D(0,0,0,0)); //sp.set_uniform("u_color", m_sphere->get_color()); - //glPolygonMode(GL_FRONT_AND_BACK, GL_FILL); + glPolygonMode(GL_FRONT_AND_BACK, GL_FILL); m_sphere->draw(); // DRAW SOLID FACES if(1) { glDisable(GL_DEPTH_TEST); - auto face_color = QVector4D(241, 141, 0, 255) / 255; - sp.set_uniform("u_color", face_color); + //auto face_color = QVector4D(241, 141, 0, 255) / 255; + //sp.set_uniform("u_color", face_color); sp.set_uniform("u_plane", plane); //glPolygonMode(GL_FRONT_AND_BACK, GL_FILL); //m_all_triangles->draw(); @@ -602,34 +602,35 @@ void Main_widget::paintGL() m_identification_curve->draw(m_selected_arc_index); // draw all countries - float a = 0.0; - sp.set_uniform("u_color", QVector4D(a, a, a, 1)); - for(auto& country_border : m_country_borders) - country_border->draw(); + //float a = 0.0; + //sp.set_uniform("u_color", QVector4D(a, a, a, 1)); + //for(auto& country_border : m_country_borders) + // country_border->draw(); - // draw the SELECTED COUNTRY in BLUE - auto& selected_countru = m_country_borders[m_selected_country_index]; - sp.set_uniform("u_color", QVector4D(0, .6, 1, 1)); - selected_countru->draw(); + //// draw the SELECTED COUNTRY in BLUE + //auto& selected_country = m_country_borders[m_selected_country_index]; + //sp.set_uniform("u_color", QVector4D(0, .6, 1, 1)); + //selected_country->draw(); - // draw the CURRENT ARC of the selected country in YELLOW - sp.set_uniform("u_color", QVector4D(1, 1, 0, 1)); - selected_countru->draw(m_selected_arc_index); + //// draw the CURRENT ARC of the selected country in YELLOW + //sp.set_uniform("u_color", QVector4D(1, 1, 0, 1)); + //selected_country->draw(m_selected_arc_index); - const QVector4D vertex_color(1, 0, 0, 1); - sp.set_uniform("u_color", vertex_color); - glPointSize(3); - //m_vertices->draw(); + //const QVector4D vertex_color(1, 0, 0, 1); + //sp.set_uniform("u_color", vertex_color); + //glPointSize(3); + ////m_vertices->draw(); - sp.set_uniform("u_color", QVector4D(0,1,0,1)); - glPointSize(2); - //m_problematic_vertices->draw(); - draw_safe(m_problematic_vertices); + //sp.set_uniform("u_color", QVector4D(0,1,0,1)); + //glPointSize(2); + ////m_problematic_vertices->draw(); + //draw_safe(m_problematic_vertices); - // NEW FACES in RED - sp.set_uniform("u_color", QVector4D(1, 0, 0, 1)); - //m_new_faces->draw(); + //// NEW FACES in RED + //sp.set_uniform("u_color", QVector4D(1, 0, 0, 1)); + ////m_new_faces->draw(); + // MOUSE VERTEX { glPointSize(5); sp.set_uniform("u_color", QVector4D(1, 0, 0, 1));