//--------------------------------------------------------------------------------------- void GmoShapeSlurTie::on_handler_dragged(int iHandler, UPoint newPos) { m_points[iHandler] = newPos; compute_vertices(); compute_bounds(); make_points_and_vertices_relative_to_origin(); }
//======================================================================================= // GmoShapeSlurTie implementation //======================================================================================= GmoShapeSlurTie::GmoShapeSlurTie(ImoObj* pCreatorImo, int objtype, ShapeId idx, UPoint* points, LUnits thickness, Color color) : GmoSimpleShape(pCreatorImo, objtype, idx, color) , VertexSource() , m_thickness(thickness) { save_points(points); compute_vertices(); compute_bounds(); make_points_and_vertices_relative_to_origin(); }
void Viewer::compute_elements() { LCC &lcc = *scene->lcc; pos_facets.clear(); flat_normals.clear(); smooth_normals.clear(); colors.clear(); pos_lines.clear(); pos_points.clear(); if ( lcc.is_empty() ) { bb = LCC::Point(CGAL::ORIGIN).bbox(); bb = bb + LCC::Point(1,1,1).bbox(); // To avoid a warning from Qglviewer return; } bool empty = true; for (LCC::Attribute_range<3>::type::iterator it=lcc.attributes<3>().begin(), itend=lcc.attributes<3>().end(); it!=itend; ++it ) { if ( it->info().is_visible() ) { if (it->info().is_filled()) compute_faces(lcc.dart_of_attribute<3>(it)); compute_edges(lcc.dart_of_attribute<3>(it)); compute_vertices(lcc.dart_of_attribute<3>(it), empty); empty = false; } } if ( empty ) { bb = LCC::Point(CGAL::ORIGIN).bbox(); bb = bb + LCC::Point(1,1,1).bbox(); // To avoid a warning from Qglviewer } }