mirror of https://github.com/CGAL/cgal
Merge branch 'gsoc2013-Point_set_processing_3-point_set_consolidation-swu' of ssh://scm.cgal.org/var/git/cgal-gsoc into gsoc2013-Point_set_processing_3-point_set_consolidation-swu
This commit is contained in:
commit
6c4d0a65ee
|
|
@ -123,6 +123,8 @@ compute_denoise_projection(
|
|||
// basic geometric types
|
||||
typedef typename Kernel::FT FT;
|
||||
typedef CGAL::Point_with_normal_3<Kernel> Pwn;
|
||||
typedef typename Kernel::Vector_3 Vector;
|
||||
typedef typename Kernel::Point_3 Point;
|
||||
|
||||
FT radius2 = radius * radius;
|
||||
|
||||
|
|
@ -135,7 +137,7 @@ compute_denoise_projection(
|
|||
FT cos_sigma = cos(sharpness_angle / 180.0 * 3.1415926);
|
||||
FT sharpness_bandwidth = std::pow((CGAL::max)(1e-8, 1 - cos_sigma), 2);
|
||||
|
||||
std::vector<Pwn,tbb::scalable_allocator<Pwn>>::const_iterator
|
||||
typename std::vector<Pwn,tbb::scalable_allocator<Pwn> >::const_iterator
|
||||
pwn_iter = neighbor_pwns.begin();
|
||||
for (; pwn_iter != neighbor_pwns.end(); ++pwn_iter)
|
||||
{
|
||||
|
|
@ -278,19 +280,19 @@ template <typename Kernel>
|
|||
class Pwn_updater
|
||||
{
|
||||
typedef typename CGAL::Point_with_normal_3<Kernel> Pwn;
|
||||
typedef typename std::vector<Pwn,tbb::scalable_allocator<Pwn>> Pwns;
|
||||
typedef typename std::vector<Pwn,tbb::scalable_allocator<Pwn> > Pwns;
|
||||
typedef typename Kernel::FT FT;
|
||||
|
||||
FT sharpness_angle;
|
||||
Pwns* pwns;
|
||||
Pwns* update_pwns;
|
||||
std::vector<Pwns,tbb::scalable_allocator<Pwns>>* pwns_neighbors;
|
||||
std::vector<Pwns,tbb::scalable_allocator<Pwns> >* pwns_neighbors;
|
||||
|
||||
public:
|
||||
Pwn_updater(FT s,
|
||||
Pwns *in,
|
||||
Pwns *out,
|
||||
std::vector<Pwns,tbb::scalable_allocator<Pwns>>* neighbors):
|
||||
std::vector<Pwns,tbb::scalable_allocator<Pwns> >* neighbors):
|
||||
sharpness_angle(s),
|
||||
pwns(in),
|
||||
update_pwns(out),
|
||||
|
|
@ -374,7 +376,7 @@ bilateral_smooth_point_set(
|
|||
// basic geometric types
|
||||
typedef typename Kernel::Point_3 Point;
|
||||
typedef typename CGAL::Point_with_normal_3<Kernel> Pwn;
|
||||
typedef typename std::vector<Pwn,tbb::scalable_allocator<Pwn>> Pwns;
|
||||
typedef typename std::vector<Pwn,tbb::scalable_allocator<Pwn> > Pwns;
|
||||
typedef typename Kernel::Vector_3 Vector;
|
||||
typedef typename Kernel::FT FT;
|
||||
|
||||
|
|
@ -410,9 +412,9 @@ bilateral_smooth_point_set(
|
|||
#endif
|
||||
// initiate a KD-tree search for points
|
||||
std::vector<Kd_tree_element,
|
||||
tbb::scalable_allocator<Kd_tree_element>> treeElements;
|
||||
tbb::scalable_allocator<Kd_tree_element> > treeElements;
|
||||
treeElements.reserve(pwns.size());
|
||||
std::vector<Pwn,tbb::scalable_allocator<Pwn>>::iterator
|
||||
typename std::vector<Pwn,tbb::scalable_allocator<Pwn> >::iterator
|
||||
pwn_iter = pwns.begin();
|
||||
for (unsigned int i = 0; pwn_iter != pwns.end(); ++pwn_iter)
|
||||
{
|
||||
|
|
@ -476,7 +478,7 @@ bilateral_smooth_point_set(
|
|||
task_timer.start();
|
||||
#endif
|
||||
// compute all neighbors
|
||||
std::vector<Pwns,tbb::scalable_allocator<Pwns>> pwns_neighbors;
|
||||
std::vector<Pwns,tbb::scalable_allocator<Pwns> > pwns_neighbors;
|
||||
pwns_neighbors.resize(nb_points);
|
||||
|
||||
#ifdef CGAL_LINKED_WITH_TBB
|
||||
|
|
@ -496,7 +498,7 @@ bilateral_smooth_point_set(
|
|||
else
|
||||
#endif
|
||||
{
|
||||
std::vector<Pwns,tbb::scalable_allocator<Pwns>>::iterator
|
||||
typename std::vector<Pwns,tbb::scalable_allocator<Pwns> >::iterator
|
||||
pwns_iter = pwns_neighbors.begin();
|
||||
|
||||
for(pwn_iter = pwns.begin(); pwn_iter != pwns.end(); ++pwn_iter, ++pwns_iter)
|
||||
|
|
@ -533,9 +535,9 @@ bilateral_smooth_point_set(
|
|||
else
|
||||
#endif // CGAL_LINKED_WITH_TBB
|
||||
{
|
||||
std::vector<Pwn,tbb::scalable_allocator<Pwn>>::iterator
|
||||
typename std::vector<Pwn,tbb::scalable_allocator<Pwn> >::iterator
|
||||
update_iter = update_pwns.begin();
|
||||
std::vector<Pwns,tbb::scalable_allocator<Pwns>>::iterator
|
||||
typename std::vector<Pwns,tbb::scalable_allocator<Pwns> >::iterator
|
||||
neighbor_iter = pwns_neighbors.begin();
|
||||
for(pwn_iter = pwns.begin(); pwn_iter != pwns.end();
|
||||
++pwn_iter, ++update_iter, ++neighbor_iter)
|
||||
|
|
|
|||
|
|
@ -76,7 +76,7 @@ base_point_selection(
|
|||
|
||||
FT best_dist2 = -10.0;
|
||||
const Rich_point& v = query;
|
||||
std::vector<Rich_point>::const_iterator iter = neighbor_points.begin();
|
||||
typename std::vector<Rich_point>::const_iterator iter = neighbor_points.begin();
|
||||
for (; iter != neighbor_points.end(); ++iter)
|
||||
{
|
||||
const Point& t = iter->pt;
|
||||
|
|
@ -93,7 +93,7 @@ base_point_selection(
|
|||
FT project_t = diff_t_mid * tm;
|
||||
FT min_dist2 = diff_t_mid.squared_length() - project_t * project_t;
|
||||
|
||||
std::vector<Rich_point>::const_iterator iter_in = neighbor_points.begin();
|
||||
typename std::vector<Rich_point>::const_iterator iter_in = neighbor_points.begin();
|
||||
for (; iter_in != neighbor_points.end(); ++iter_in)
|
||||
{
|
||||
Vector diff_s_mid = mid_point - iter_in->pt;
|
||||
|
|
|
|||
|
|
@ -135,7 +135,7 @@ compute_update_sample_point(
|
|||
FT weight = (FT)0.0, average_weight_sum = (FT)0.0;
|
||||
FT iradius16 = -(FT)4.0 / radius2;
|
||||
|
||||
std::vector<Kd_tree_point>::iterator iter;
|
||||
typename std::vector<Kd_tree_point>::iterator iter;
|
||||
iter = neighbor_original_points.begin();
|
||||
for (; iter != neighbor_original_points.end(); ++iter)
|
||||
{
|
||||
|
|
@ -259,7 +259,7 @@ compute_density_weight_for_original_point(
|
|||
FT density_weight = (FT)1.0;
|
||||
FT iradius16 = -(FT)4.0 / radius2;
|
||||
|
||||
std::vector<Kd_tree_point>::iterator iter;
|
||||
typename std::vector<Kd_tree_point>::iterator iter;
|
||||
iter = neighbor_original_points.begin();
|
||||
|
||||
for (; iter != neighbor_original_points.end(); iter++)
|
||||
|
|
@ -314,7 +314,7 @@ compute_density_weight_for_sample_point(
|
|||
FT density_weight = (FT)1.0;
|
||||
FT iradius16 = -(FT)4.0 / radius2;
|
||||
|
||||
std::vector<Kd_tree_point>::iterator iter;
|
||||
typename std::vector<Kd_tree_point>::iterator iter;
|
||||
iter = neighbor_sample_points.begin();
|
||||
|
||||
for (; iter != neighbor_sample_points.end(); iter++)
|
||||
|
|
@ -484,7 +484,7 @@ wlop_simplify_and_regularize_point_set(
|
|||
|
||||
|
||||
std::vector<Point> update_sample_points(number_of_sample);
|
||||
std::vector<Point>::iterator sample_iter;
|
||||
typename std::vector<Point>::iterator sample_iter;
|
||||
|
||||
// Compute original density weight for original points if user needed
|
||||
std::vector<FT> original_density_weights;
|
||||
|
|
@ -569,7 +569,7 @@ wlop_simplify_and_regularize_point_set(
|
|||
}
|
||||
|
||||
|
||||
std::vector<Point>::iterator update_iter = update_sample_points.begin();
|
||||
typename std::vector<Point>::iterator update_iter = update_sample_points.begin();
|
||||
//parallel
|
||||
#ifdef CGAL_LINKED_WITH_TBB
|
||||
if (boost::is_convertible<Concurrency_tag, Parallel_tag>::value)
|
||||
|
|
|
|||
Loading…
Reference in New Issue