mirror of https://github.com/CGAL/cgal
Update newest Polyhedron demo plugin with parallelized PSP algorithm versions
This commit is contained in:
parent
935956a10f
commit
8be703a0c8
|
|
@ -16,6 +16,14 @@
|
|||
|
||||
#include "ui_Polyhedron_demo_point_set_bilateral_smoothing_plugin.h"
|
||||
|
||||
// Concurrency
|
||||
#ifdef CGAL_LINKED_WITH_TBB
|
||||
typedef CGAL::Parallel_tag Concurrency_tag;
|
||||
#else
|
||||
typedef CGAL::Sequential_tag Concurrency_tag;
|
||||
#endif
|
||||
|
||||
|
||||
class Polyhedron_demo_point_set_bilateral_smoothing_plugin :
|
||||
public QObject,
|
||||
public Polyhedron_demo_plugin_helper
|
||||
|
|
@ -91,7 +99,7 @@ void Polyhedron_demo_point_set_bilateral_smoothing_plugin::on_actionBilateralSmo
|
|||
for (unsigned int i = 0; i < dialog.iterations (); ++i)
|
||||
{
|
||||
/* double error = */
|
||||
CGAL::bilateral_smooth_point_set <CGAL::Parallel_tag>
|
||||
CGAL::bilateral_smooth_point_set<Concurrency_tag>
|
||||
(points->begin(),
|
||||
points->end(),
|
||||
CGAL::make_identity_property_map(Point_set::value_type()),
|
||||
|
|
|
|||
|
|
@ -17,6 +17,13 @@
|
|||
|
||||
#include "ui_Polyhedron_demo_point_set_upsampling_plugin.h"
|
||||
|
||||
// Concurrency
|
||||
#ifdef CGAL_LINKED_WITH_TBB
|
||||
typedef CGAL::Parallel_tag Concurrency_tag;
|
||||
#else
|
||||
typedef CGAL::Sequential_tag Concurrency_tag;
|
||||
#endif
|
||||
|
||||
class Polyhedron_demo_point_set_upsampling_plugin :
|
||||
public QObject,
|
||||
public Polyhedron_demo_plugin_helper
|
||||
|
|
@ -103,12 +110,12 @@ void Polyhedron_demo_point_set_upsampling_plugin::on_actionEdgeAwareUpsampling_t
|
|||
CGAL::Timer task_timer; task_timer.start();
|
||||
|
||||
// Computes average spacing
|
||||
double average_spacing = CGAL::compute_average_spacing(
|
||||
double average_spacing = CGAL::compute_average_spacing<Concurrency_tag>(
|
||||
points->begin(), points->end(),
|
||||
6 /* knn = 1 ring */);
|
||||
|
||||
std::vector<std::pair<Point_set::Point, Point_set::Vector> > new_points;
|
||||
CGAL::edge_aware_upsample_point_set(points->begin(),
|
||||
CGAL::edge_aware_upsample_point_set<Concurrency_tag>(points->begin(),
|
||||
points->end(),
|
||||
std::back_inserter(new_points),
|
||||
CGAL::make_identity_property_map(Point_set::value_type()),
|
||||
|
|
|
|||
|
|
@ -17,6 +17,13 @@
|
|||
|
||||
#include "ui_Polyhedron_demo_point_set_wlop_plugin.h"
|
||||
|
||||
// Concurrency
|
||||
#ifdef CGAL_LINKED_WITH_TBB
|
||||
typedef CGAL::Parallel_tag Concurrency_tag;
|
||||
#else
|
||||
typedef CGAL::Sequential_tag Concurrency_tag;
|
||||
#endif
|
||||
|
||||
class Polyhedron_demo_point_set_wlop_plugin :
|
||||
public QObject,
|
||||
public Polyhedron_demo_plugin_helper
|
||||
|
|
@ -89,7 +96,7 @@ void Polyhedron_demo_point_set_wlop_plugin::on_actionSimplifyAndRegularize_trigg
|
|||
<< dialog.neighborhoodRadius() <<" * average spacing)...\n";
|
||||
|
||||
// Computes average spacing
|
||||
double average_spacing = CGAL::compute_average_spacing(points->begin(), points->end(),
|
||||
double average_spacing = CGAL::compute_average_spacing<Concurrency_tag>(points->begin(), points->end(),
|
||||
6 /* knn = 1 ring */);
|
||||
|
||||
Scene_points_with_normal_item* new_item
|
||||
|
|
@ -98,7 +105,7 @@ void Polyhedron_demo_point_set_wlop_plugin::on_actionSimplifyAndRegularize_trigg
|
|||
new_item->setVisible(true);
|
||||
scene->addItem(new_item);
|
||||
|
||||
CGAL::wlop_simplify_and_regularize_point_set<CGAL::Parallel_tag> // parallel version
|
||||
CGAL::wlop_simplify_and_regularize_point_set<Concurrency_tag>
|
||||
(points->begin(),
|
||||
points->end(),
|
||||
std::back_inserter(*(new_item->point_set ())),
|
||||
|
|
|
|||
Loading…
Reference in New Issue