remove optional parameter

This commit is contained in:
Sébastien Loriot 2022-01-03 18:31:57 +01:00
parent 7bd0579f31
commit 047ddad86c
9 changed files with 25 additions and 31 deletions

View File

@ -25,7 +25,7 @@ void test_halfedge_around_vertex_iterator(const Graph& g)
typedef CGAL::Face_filtered_graph<Graph> Adapter; typedef CGAL::Face_filtered_graph<Graph> Adapter;
CGAL_GRAPH_TRAITS_MEMBERS(Adapter); CGAL_GRAPH_TRAITS_MEMBERS(Adapter);
boost::unordered_map<g_face_descriptor, std::size_t> map(num_faces(g)); boost::unordered_map<g_face_descriptor, std::size_t> map(num_faces(g));
PMP::connected_components(g, boost::make_assoc_property_map(map), CGAL::parameters::all_default()); PMP::connected_components(g, boost::make_assoc_property_map(map));
Adapter fg(g, 0, boost::make_assoc_property_map(map)); Adapter fg(g, 0, boost::make_assoc_property_map(map));
typename boost::graph_traits<Adapter >::vertex_iterator vit, vend; typename boost::graph_traits<Adapter >::vertex_iterator vit, vend;
@ -52,7 +52,7 @@ void test_halfedge_around_face_iterator(const Graph& g)
typedef CGAL::Face_filtered_graph<Graph> Adapter; typedef CGAL::Face_filtered_graph<Graph> Adapter;
CGAL_GRAPH_TRAITS_MEMBERS(Adapter); CGAL_GRAPH_TRAITS_MEMBERS(Adapter);
std::map<g_face_descriptor, std::size_t> map; std::map<g_face_descriptor, std::size_t> map;
PMP::connected_components(g, boost::make_assoc_property_map(map), CGAL::parameters::all_default()); PMP::connected_components(g, boost::make_assoc_property_map(map));
Adapter fg(g, 0, boost::make_assoc_property_map(map)); Adapter fg(g, 0, boost::make_assoc_property_map(map));
face_iterator fit, fend; face_iterator fit, fend;
@ -73,7 +73,7 @@ void test_edge_iterators(const Graph& g)
typedef CGAL::Face_filtered_graph<Graph> Adapter; typedef CGAL::Face_filtered_graph<Graph> Adapter;
CGAL_GRAPH_TRAITS_MEMBERS(Adapter); CGAL_GRAPH_TRAITS_MEMBERS(Adapter);
std::map<g_face_descriptor, std::size_t> map; std::map<g_face_descriptor, std::size_t> map;
PMP::connected_components(g, boost::make_assoc_property_map(map), CGAL::parameters::all_default()); PMP::connected_components(g, boost::make_assoc_property_map(map));
Adapter fg(g, 0, boost::make_assoc_property_map(map)); Adapter fg(g, 0, boost::make_assoc_property_map(map));
// do we iterate as many as that? // do we iterate as many as that?
@ -99,7 +99,7 @@ void test_vertex_iterators(Graph& g)
typedef CGAL::Face_filtered_graph<Graph> Adapter; typedef CGAL::Face_filtered_graph<Graph> Adapter;
CGAL_GRAPH_TRAITS_MEMBERS(Adapter); CGAL_GRAPH_TRAITS_MEMBERS(Adapter);
std::map<g_face_descriptor, std::size_t> map; std::map<g_face_descriptor, std::size_t> map;
PMP::connected_components(g, boost::make_assoc_property_map(map), CGAL::parameters::all_default()); PMP::connected_components(g, boost::make_assoc_property_map(map));
Adapter fg(g, 0, boost::make_assoc_property_map(map)); Adapter fg(g, 0, boost::make_assoc_property_map(map));
vertex_iterator vb, ve; vertex_iterator vb, ve;
std::size_t count = 0; std::size_t count = 0;
@ -129,7 +129,7 @@ void test_out_edges(const Graph& g)
typedef CGAL::Face_filtered_graph<Graph> Adapter; typedef CGAL::Face_filtered_graph<Graph> Adapter;
CGAL_GRAPH_TRAITS_MEMBERS(Adapter); CGAL_GRAPH_TRAITS_MEMBERS(Adapter);
std::map<g_face_descriptor, std::size_t> map; std::map<g_face_descriptor, std::size_t> map;
PMP::connected_components(g, boost::make_assoc_property_map(map), CGAL::parameters::all_default()); PMP::connected_components(g, boost::make_assoc_property_map(map));
Adapter fg(g, 0, boost::make_assoc_property_map(map)); Adapter fg(g, 0, boost::make_assoc_property_map(map));
vertex_iterator vb, ve; vertex_iterator vb, ve;
@ -158,7 +158,7 @@ void test_in_edges(const Graph& g)
typedef CGAL::Face_filtered_graph<Graph> Adapter; typedef CGAL::Face_filtered_graph<Graph> Adapter;
CGAL_GRAPH_TRAITS_MEMBERS(Adapter); CGAL_GRAPH_TRAITS_MEMBERS(Adapter);
std::map<g_face_descriptor, std::size_t> map; std::map<g_face_descriptor, std::size_t> map;
PMP::connected_components(g, boost::make_assoc_property_map(map), CGAL::parameters::all_default()); PMP::connected_components(g, boost::make_assoc_property_map(map));
Adapter fg(g, 0, boost::make_assoc_property_map(map)); Adapter fg(g, 0, boost::make_assoc_property_map(map));
vertex_iterator vb, ve; vertex_iterator vb, ve;
@ -185,7 +185,7 @@ void test_in_out_edges(const Graph& g)
typedef CGAL::Face_filtered_graph<Graph> Adapter; typedef CGAL::Face_filtered_graph<Graph> Adapter;
CGAL_GRAPH_TRAITS_MEMBERS(Adapter); CGAL_GRAPH_TRAITS_MEMBERS(Adapter);
std::map<g_face_descriptor, std::size_t> map; std::map<g_face_descriptor, std::size_t> map;
PMP::connected_components(g, boost::make_assoc_property_map(map), CGAL::parameters::all_default()); PMP::connected_components(g, boost::make_assoc_property_map(map));
Adapter fg(g, 0, boost::make_assoc_property_map(map)); Adapter fg(g, 0, boost::make_assoc_property_map(map));
// check that the sets of in out edges are the same // check that the sets of in out edges are the same
@ -227,7 +227,7 @@ void test_edge_find(const Graph& g)
typedef CGAL::Face_filtered_graph<Graph> Adapter; typedef CGAL::Face_filtered_graph<Graph> Adapter;
CGAL_GRAPH_TRAITS_MEMBERS(Adapter); CGAL_GRAPH_TRAITS_MEMBERS(Adapter);
std::map<g_face_descriptor, std::size_t> map; std::map<g_face_descriptor, std::size_t> map;
PMP::connected_components(g, boost::make_assoc_property_map(map), CGAL::parameters::all_default()); PMP::connected_components(g, boost::make_assoc_property_map(map));
Adapter fg(g, 0, boost::make_assoc_property_map(map)); Adapter fg(g, 0, boost::make_assoc_property_map(map));
typedef std::pair<edge_descriptor, bool> ret; typedef std::pair<edge_descriptor, bool> ret;
@ -251,7 +251,7 @@ void test_faces(const Graph& g)
typedef CGAL::Face_filtered_graph<Graph> Adapter; typedef CGAL::Face_filtered_graph<Graph> Adapter;
CGAL_GRAPH_TRAITS_MEMBERS(Adapter); CGAL_GRAPH_TRAITS_MEMBERS(Adapter);
std::map<g_face_descriptor, std::size_t> map; std::map<g_face_descriptor, std::size_t> map;
PMP::connected_components(g, boost::make_assoc_property_map(map), CGAL::parameters::all_default()); PMP::connected_components(g, boost::make_assoc_property_map(map));
Adapter fg(g, 0, boost::make_assoc_property_map(map)); Adapter fg(g, 0, boost::make_assoc_property_map(map));
unsigned int count = 0; unsigned int count = 0;
@ -325,7 +325,7 @@ void test_read(const Graph& g)
CGAL_GRAPH_TRAITS_MEMBERS(Adapter); CGAL_GRAPH_TRAITS_MEMBERS(Adapter);
std::map<g_face_descriptor, std::size_t> map; std::map<g_face_descriptor, std::size_t> map;
PMP::connected_components(g, boost::make_assoc_property_map(map), CGAL::parameters::all_default()); PMP::connected_components(g, boost::make_assoc_property_map(map));
Adapter fg(g, 0, boost::make_assoc_property_map(map)); Adapter fg(g, 0, boost::make_assoc_property_map(map));
assert(fg.is_selection_valid()); assert(fg.is_selection_valid());
assert(CGAL::is_valid_polygon_mesh(fg)); assert(CGAL::is_valid_polygon_mesh(fg));

View File

@ -119,14 +119,14 @@ int main()
{ {
std::ofstream os("tmp2.las", std::ios_base::binary); std::ofstream os("tmp2.las", std::ios_base::binary);
CGAL::write_las_points(os, ps, CGAL::parameters::all_default()); CGAL::write_las_points(os, ps);
assert(ok); assert(ok);
} }
{ {
ps.clear(); ps.clear();
std::ifstream is("tmp2.las", std::ios::binary); std::ifstream is("tmp2.las", std::ios::binary);
ok = CGAL::read_las_points(is, std::back_inserter (ps),CGAL::parameters::all_default()); ok = CGAL::read_las_points(is, std::back_inserter (ps));
assert(ok); assert(ok);
assert(ps.size() == 3); assert(ps.size() == 3);
} }
@ -168,7 +168,7 @@ int main()
{ {
std::ofstream os("tmp2.ply"); std::ofstream os("tmp2.ply");
assert(os.good()); assert(os.good());
ok = CGAL::write_ply_points(os, ps, CGAL::parameters::all_default()); ok = CGAL::write_ply_points(os, ps);
assert(! os.fail()); assert(! os.fail());
assert(ok); assert(ok);
} }
@ -177,8 +177,7 @@ int main()
std::ifstream is("tmp2.ply"); std::ifstream is("tmp2.ply");
assert(is.good()); assert(is.good());
ps.clear(); ps.clear();
ok = CGAL::read_ply_points(is, std::back_inserter (ps), ok = CGAL::read_ply_points(is, std::back_inserter (ps));
CGAL::parameters::all_default());
assert(! is.fail()); assert(! is.fail());
assert(ok); assert(ok);
assert(ps.size() == 3); assert(ps.size() == 3);
@ -188,7 +187,7 @@ int main()
{ {
std::ofstream os("tmp.off"); std::ofstream os("tmp.off");
assert(os.good()); assert(os.good());
ok = CGAL::write_off_points(os, ps, CGAL::parameters::all_default()); ok = CGAL::write_off_points(os, ps);
assert(! os.fail()); assert(! os.fail());
assert(ok); assert(ok);
} }
@ -197,8 +196,7 @@ int main()
std::ifstream is("tmp.off"); std::ifstream is("tmp.off");
assert(is.good()); assert(is.good());
ps.clear(); ps.clear();
ok = CGAL::read_off_points(is, std::back_inserter (ps), ok = CGAL::read_off_points(is, std::back_inserter (ps));
CGAL::parameters::all_default());
assert(! is.fail()); assert(! is.fail());
assert(ok); assert(ok);
assert(ps.size() == 3); assert(ps.size() == 3);
@ -208,7 +206,7 @@ int main()
{ {
std::ofstream os("tmp.xyz"); std::ofstream os("tmp.xyz");
assert(os.good()); assert(os.good());
ok = CGAL::write_xyz_points(os, ps, CGAL::parameters::all_default()); ok = CGAL::write_xyz_points(os, ps);
assert(! os.fail()); assert(! os.fail());
assert(ok); assert(ok);
} }
@ -217,8 +215,7 @@ int main()
std::ifstream is("tmp.xyz"); std::ifstream is("tmp.xyz");
assert(is.good()); assert(is.good());
ps.clear(); ps.clear();
ok = CGAL::read_xyz_points(is, std::back_inserter (ps), ok = CGAL::read_xyz_points(is, std::back_inserter (ps));
CGAL::parameters::all_default());
assert(! is.fail()); assert(! is.fail());
assert(ok); assert(ok);
assert(ps.size() == 3); assert(ps.size() == 3);

View File

@ -355,7 +355,7 @@ public:
if(is_polygon_mesh) if(is_polygon_mesh)
{ {
FaceGraph* poly = new FaceGraph(); FaceGraph* poly = new FaceGraph();
if (CGAL::IO::internal::vtkPointSet_to_polygon_mesh(data, *poly, CGAL::parameters::all_default())) if (CGAL::IO::internal::vtkPointSet_to_polygon_mesh(data, *poly))
{ {
Scene_facegraph_item* poly_item = new Scene_facegraph_item(poly); Scene_facegraph_item* poly_item = new Scene_facegraph_item(poly);
if(group) if(group)

View File

@ -310,8 +310,7 @@ void Polyhedron_demo_intersection_plugin::intersectionSurfacePolyline()
PMP::internal::compute_face_polylines_intersection(faces(*itemA->face_graph()), PMP::internal::compute_face_polylines_intersection(faces(*itemA->face_graph()),
polylines, polylines,
*itemA->face_graph(), *itemA->face_graph(),
std::back_inserter(poly_intersections), std::back_inserter(poly_intersections));
CGAL::Polygon_mesh_processing::parameters::all_default());
Q_FOREACH(const Poly_intersection& inter, poly_intersections) Q_FOREACH(const Poly_intersection& inter, poly_intersections)
{ {

View File

@ -1937,8 +1937,7 @@ void Scene_surface_mesh_item::zoomToPosition(const QPoint &point, CGAL::Three::V
//compute new position and orientation //compute new position and orientation
EPICK::Vector_3 face_normal = CGAL::Polygon_mesh_processing:: EPICK::Vector_3 face_normal = CGAL::Polygon_mesh_processing::
compute_face_normal(selected_fh, compute_face_normal(selected_fh,
*d->smesh_, *d->smesh_);
CGAL::Polygon_mesh_processing::parameters::all_default());
double x(0), y(0), z(0), double x(0), y(0), z(0),

View File

@ -76,7 +76,7 @@ int main(int argc, char *argv[])
t0.reset(); t0.reset();
t0.start(); t0.start();
approx.extract_mesh(CGAL::parameters::all_default()); approx.extract_mesh(CGAL::parameters::use_default_values());
t0.stop(); t0.stop();
std::cout << "meshing time " << t0.time() << " sec." << std::endl; std::cout << "meshing time " << t0.time() << " sec." << std::endl;

View File

@ -76,7 +76,7 @@ int main(int argc, char** argv)
UV_pmap uv_pm = sm.add_property_map<SM_halfedge_descriptor, Point_2>("h:uv").first; UV_pmap uv_pm = sm.add_property_map<SM_halfedge_descriptor, Point_2>("h:uv").first;
// A halfedge on the (possibly virtual) border // A halfedge on the (possibly virtual) border
halfedge_descriptor bhd = CGAL::Polygon_mesh_processing::longest_border(mesh, CGAL::Polygon_mesh_processing::parameters::all_default()).first; halfedge_descriptor bhd = CGAL::Polygon_mesh_processing::longest_border(mesh).first;
typedef SMP::Two_vertices_parameterizer_3<Mesh> Border_parameterizer; typedef SMP::Two_vertices_parameterizer_3<Mesh> Border_parameterizer;
typedef SMP::LSCM_parameterizer_3<Mesh, Border_parameterizer> Parameterizer; typedef SMP::LSCM_parameterizer_3<Mesh, Border_parameterizer> Parameterizer;

View File

@ -112,8 +112,7 @@ int main(int argc, char** argv)
// a halfedge on the (possibly virtual) border // a halfedge on the (possibly virtual) border
// only used in output (will also be used to handle multiple connected components in the future) // only used in output (will also be used to handle multiple connected components in the future)
halfedge_descriptor bhd = CGAL::Polygon_mesh_processing::longest_border(mesh, halfedge_descriptor bhd = CGAL::Polygon_mesh_processing::longest_border(mesh).first;
CGAL::Polygon_mesh_processing::parameters::all_default()).first;
parameterizer.parameterize(mesh, bhd, cmap, uvmap, vimap); parameterizer.parameterize(mesh, bhd, cmap, uvmap, vimap);

View File

@ -460,7 +460,7 @@ int main(int, char**)
// a halfedge on the (possibly virtual) border // a halfedge on the (possibly virtual) border
// only used in output (will also be used to handle multiple connected components in the future) // only used in output (will also be used to handle multiple connected components in the future)
SM_SE_halfedge_descriptor hd = PMP::longest_border(mesh, PMP::parameters::all_default()).first; SM_SE_halfedge_descriptor hd = PMP::longest_border(mesh).first;
SMP::Error_code status = parameterizer.parameterize(mesh, hd, cmap, uvmap, vimap); SMP::Error_code status = parameterizer.parameterize(mesh, hd, cmap, uvmap, vimap);