mirror of https://github.com/CGAL/cgal
Always use Parallel_if_available_tag in examples
This commit is contained in:
parent
1d251d57db
commit
6c91c5af1e
|
|
@ -54,7 +54,7 @@ void run_marching_cubes(const Grid& grid,
|
|||
Polygon_range triangles;
|
||||
|
||||
// run marching cubes isosurfacing
|
||||
IS::marching_cubes(domain, isovalue, points, triangles);
|
||||
IS::marching_cubes<CGAL::Parallel_if_available_tag>(domain, isovalue, points, triangles);
|
||||
|
||||
std::cout << "Output #vertices: " << points.size() << std::endl;
|
||||
std::cout << "Output #triangles: " << triangles.size() << std::endl;
|
||||
|
|
@ -95,7 +95,7 @@ void run_dual_contouring(const Grid& grid,
|
|||
Polygon_range triangles;
|
||||
|
||||
// run dual contouring isosurfacing
|
||||
IS::dual_contouring(domain, isovalue, points, triangles);
|
||||
IS::dual_contouring<CGAL::Parallel_if_available_tag>(domain, isovalue, points, triangles);
|
||||
|
||||
std::cout << "Output #vertices: " << points.size() << std::endl;
|
||||
std::cout << "Output #triangles: " << triangles.size() << std::endl;
|
||||
|
|
|
|||
|
|
@ -70,7 +70,7 @@ void run_marching_cubes(const Grid& grid,
|
|||
Polygon_range triangles;
|
||||
|
||||
// run Marching Cubes
|
||||
CGAL::Isosurfacing::marching_cubes(domain, isovalue, points, triangles);
|
||||
CGAL::Isosurfacing::marching_cubes<CGAL::Parallel_if_available_tag>(domain, isovalue, points, triangles);
|
||||
|
||||
timer.stop();
|
||||
|
||||
|
|
@ -101,8 +101,8 @@ void run_dual_contouring(const Grid& grid,
|
|||
Polygon_range triangles;
|
||||
|
||||
// run Dual Contouring
|
||||
CGAL::Isosurfacing::dual_contouring<CGAL::Sequential_tag>(domain, isovalue, points, triangles,
|
||||
CGAL::parameters::do_not_triangulate_faces(true));
|
||||
CGAL::Isosurfacing::dual_contouring<CGAL::Parallel_if_available_tag>(domain, isovalue, points, triangles,
|
||||
CGAL::parameters::do_not_triangulate_faces(true));
|
||||
|
||||
timer.stop();
|
||||
|
||||
|
|
|
|||
|
|
@ -48,7 +48,7 @@ void run_marching_cubes(const Grid& grid,
|
|||
Polygon_range triangles;
|
||||
|
||||
// execute marching cubes
|
||||
IS::marching_cubes(domain, isovalue, points, triangles);
|
||||
IS::marching_cubes<CGAL::Parallel_if_available_tag>(domain, isovalue, points, triangles);
|
||||
|
||||
std::cout << "Output #vertices: " << points.size() << std::endl;
|
||||
std::cout << "Output #triangles: " << triangles.size() << std::endl;
|
||||
|
|
@ -75,7 +75,7 @@ void run_dual_contouring(const Grid& grid,
|
|||
Polygon_range triangles;
|
||||
|
||||
// run dual contouring isosurfacing
|
||||
IS::dual_contouring(domain, isovalue, points, triangles);
|
||||
IS::dual_contouring<CGAL::Parallel_if_available_tag>(domain, isovalue, points, triangles);
|
||||
|
||||
std::cout << "Output #vertices: " << points.size() << std::endl;
|
||||
std::cout << "Output #triangles: " << triangles.size() << std::endl;
|
||||
|
|
|
|||
|
|
@ -84,7 +84,7 @@ void run_marching_cubes(const Grid& grid,
|
|||
|
||||
// run marching cubes
|
||||
std::cout << "Running Marching Cubes with isovalue = " << offset_value << std::endl;
|
||||
CGAL::Isosurfacing::marching_cubes(domain, offset_value, points, triangles);
|
||||
CGAL::Isosurfacing::marching_cubes<CGAL::Parallel_if_available_tag>(domain, offset_value, points, triangles);
|
||||
|
||||
std::cout << "Output #vertices (MC): " << points.size() << std::endl;
|
||||
std::cout << "Output #triangles (MC): " << triangles.size() << std::endl;
|
||||
|
|
@ -115,8 +115,9 @@ void run_dual_contouring(const Grid& grid,
|
|||
|
||||
// run dual contouring
|
||||
std::cout << "Running Dual Contouring with isovalue = " << offset_value << std::endl;
|
||||
CGAL::Isosurfacing::dual_contouring(domain, offset_value, points, triangles,
|
||||
CGAL::parameters::do_not_triangulate_faces(true));
|
||||
CGAL::Isosurfacing::dual_contouring<CGAL::Parallel_if_available_tag>(
|
||||
domain, offset_value, points, triangles,
|
||||
CGAL::parameters::do_not_triangulate_faces(true));
|
||||
|
||||
std::cout << "Output #vertices (DC): " << points.size() << std::endl;
|
||||
std::cout << "Output #triangles (DC): " << triangles.size() << std::endl;
|
||||
|
|
|
|||
|
|
@ -65,9 +65,9 @@ int main(int argc, char** argv)
|
|||
|
||||
// run dual contouring isosurfacing
|
||||
std::cout << "Running Dual Contouring with isovalue = " << isovalue << std::endl;
|
||||
CGAL::Isosurfacing::dual_contouring(domain, isovalue, points, triangles,
|
||||
CGAL::parameters::do_not_triangulate_faces(true)
|
||||
.constrain_to_cell(false));
|
||||
CGAL::Isosurfacing::dual_contouring<CGAL::Parallel_if_available_tag>(domain, isovalue, points, triangles,
|
||||
CGAL::parameters::do_not_triangulate_faces(true)
|
||||
.constrain_to_cell(false));
|
||||
|
||||
std::cout << "Output #vertices: " << points.size() << std::endl;
|
||||
std::cout << "Output #triangles: " << triangles.size() << std::endl;
|
||||
|
|
|
|||
|
|
@ -73,8 +73,8 @@ int main(int argc, char** argv)
|
|||
Polygon_range triangles;
|
||||
|
||||
std::cout << "--- Dual Contouring (Dichotomy)" << std::endl;
|
||||
IS::dual_contouring(domain, isovalue, points, triangles,
|
||||
CGAL::parameters::do_not_triangulate_faces(!triangulate_faces));
|
||||
IS::dual_contouring<CGAL::Parallel_if_available_tag>(domain, isovalue, points, triangles,
|
||||
CGAL::parameters::do_not_triangulate_faces(!triangulate_faces));
|
||||
|
||||
timer.stop();
|
||||
|
||||
|
|
@ -96,8 +96,8 @@ int main(int argc, char** argv)
|
|||
Polygon_range triangles;
|
||||
|
||||
std::cout << "--- Dual Contouring (Linear Interpolation)" << std::endl;
|
||||
IS::dual_contouring(domain, isovalue, points, triangles,
|
||||
CGAL::parameters::do_not_triangulate_faces(!triangulate_faces));
|
||||
IS::dual_contouring<CGAL::Parallel_if_available_tag>(domain, isovalue, points, triangles,
|
||||
CGAL::parameters::do_not_triangulate_faces(!triangulate_faces));
|
||||
|
||||
timer.stop();
|
||||
|
||||
|
|
|
|||
|
|
@ -117,8 +117,8 @@ int main(int argc, char** argv)
|
|||
Polygon_range triangles;
|
||||
|
||||
// run Dual Contouring
|
||||
CGAL::Isosurfacing::dual_contouring<CGAL::Sequential_tag>(domain, isovalue, points, triangles,
|
||||
CGAL::parameters::do_not_triangulate_faces(true));
|
||||
CGAL::Isosurfacing::dual_contouring<CGAL::Parallel_if_available_tag>(domain, isovalue, points, triangles,
|
||||
CGAL::parameters::do_not_triangulate_faces(true));
|
||||
|
||||
timer.stop();
|
||||
|
||||
|
|
|
|||
|
|
@ -69,7 +69,7 @@ int main(int argc, char** argv)
|
|||
Polygon_range triangles;
|
||||
|
||||
std::cout << "--- Dual Contouring (QEM - unconstrained)" << std::endl;
|
||||
IS::internal::Dual_contourer<CGAL::Sequential_tag, Domain,
|
||||
IS::internal::Dual_contourer<CGAL::Parallel_if_available_tag, Domain,
|
||||
IS::internal::DC_Strategy::QEM> contourer;
|
||||
contourer(domain, isovalue, points, triangles,
|
||||
CGAL::parameters::do_not_triangulate_faces(!triangulate_faces));
|
||||
|
|
@ -91,7 +91,7 @@ int main(int argc, char** argv)
|
|||
Polygon_range triangles;
|
||||
|
||||
std::cout << "--- Dual Contouring (QEM - constrained)" << std::endl;
|
||||
IS::internal::Dual_contourer<CGAL::Sequential_tag, Domain,
|
||||
IS::internal::Dual_contourer<CGAL::Parallel_if_available_tag, Domain,
|
||||
IS::internal::DC_Strategy::QEM> contourer;
|
||||
contourer(domain, isovalue, points, triangles,
|
||||
CGAL::parameters::do_not_triangulate_faces(!triangulate_faces)
|
||||
|
|
|
|||
|
|
@ -50,8 +50,8 @@ int main(int argc, char** argv)
|
|||
|
||||
// run marching cubes isosurfacing
|
||||
std::cout << "Running Marching Cubes with isovalue = " << isovalue << std::endl;
|
||||
CGAL::Isosurfacing::marching_cubes(domain, isovalue, points, triangles,
|
||||
CGAL::parameters::use_topologically_correct_marching_cubes(true));
|
||||
CGAL::Isosurfacing::marching_cubes<CGAL::Parallel_if_available_tag>(domain, isovalue, points, triangles,
|
||||
CGAL::parameters::use_topologically_correct_marching_cubes(true));
|
||||
|
||||
std::cout << "Output #vertices: " << points.size() << std::endl;
|
||||
std::cout << "Output #triangles: " << triangles.size() << std::endl;
|
||||
|
|
|
|||
|
|
@ -53,8 +53,8 @@ int main(int argc, char** argv)
|
|||
|
||||
// run marching cubes isosurfacing
|
||||
std::cout << "Running Marching Cubes with isovalue = " << isovalue << std::endl;
|
||||
CGAL::Isosurfacing::marching_cubes(domain, isovalue, points, triangles,
|
||||
CGAL::parameters::use_topologically_correct_marching_cubes(false));
|
||||
CGAL::Isosurfacing::marching_cubes<CGAL::Parallel_if_available_tag>(domain, isovalue, points, triangles,
|
||||
CGAL::parameters::use_topologically_correct_marching_cubes(false));
|
||||
|
||||
timer.stop();
|
||||
|
||||
|
|
@ -74,8 +74,8 @@ int main(int argc, char** argv)
|
|||
|
||||
// run marching cubes isosurfacing
|
||||
std::cout << "Running Marching Cubes (TMC) with isovalue = " << isovalue << std::endl;
|
||||
CGAL::Isosurfacing::marching_cubes(domain, isovalue, points, triangles,
|
||||
CGAL::parameters::use_topologically_correct_marching_cubes(true));
|
||||
CGAL::Isosurfacing::marching_cubes<CGAL::Parallel_if_available_tag>(domain, isovalue, points, triangles,
|
||||
CGAL::parameters::use_topologically_correct_marching_cubes(true));
|
||||
|
||||
timer.stop();
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue