mirror of https://github.com/CGAL/cgal
changes in Demo
This commit is contained in:
parent
0ca7f319e0
commit
d72b7d20a6
|
|
@ -127,7 +127,12 @@ void PS_demo_normal_estimation_plugin::on_actionNormalEstimation_triggered()
|
|||
|
||||
// Estimates normals direction.
|
||||
CGAL::pca_estimate_normals(points->begin(), points->end(),
|
||||
CGAL::make_normal_of_point_with_normal_pmap(points->begin()),
|
||||
#ifdef CGAL_USE_OLD_PAIR_PROPERTY_MAPS
|
||||
CGAL::make_normal_of_point_with_normal_pmap(points->begin()),
|
||||
#else
|
||||
CGAL::make_normal_of_point_with_normal_pmap(Point_set::value_type()),
|
||||
#endif
|
||||
|
||||
dialog.directionNbNeighbors());
|
||||
|
||||
// Mark all normals as unoriented
|
||||
|
|
@ -145,7 +150,11 @@ void PS_demo_normal_estimation_plugin::on_actionNormalEstimation_triggered()
|
|||
|
||||
// Estimates normals direction.
|
||||
CGAL::jet_estimate_normals(points->begin(), points->end(),
|
||||
CGAL::make_normal_of_point_with_normal_pmap(points->begin()),
|
||||
#ifdef CGAL_USE_OLD_PAIR_PROPERTY_MAPS
|
||||
CGAL::make_normal_of_point_with_normal_pmap(points->begin()),
|
||||
#else
|
||||
CGAL::make_normal_of_point_with_normal_pmap(Point_set::value_type()),
|
||||
#endif
|
||||
dialog.directionNbNeighbors());
|
||||
|
||||
// Mark all normals as unoriented
|
||||
|
|
@ -167,7 +176,11 @@ void PS_demo_normal_estimation_plugin::on_actionNormalEstimation_triggered()
|
|||
// Tries to orient normals
|
||||
first_unoriented_point =
|
||||
CGAL::mst_orient_normals(points->begin(), points->end(),
|
||||
CGAL::make_normal_of_point_with_normal_pmap(points->begin()),
|
||||
#ifdef CGAL_USE_OLD_PAIR_PROPERTY_MAPS
|
||||
CGAL::make_normal_of_point_with_normal_pmap(points->begin()),
|
||||
#else
|
||||
CGAL::make_normal_of_point_with_normal_pmap(Point_set::value_type()),
|
||||
#endif
|
||||
dialog.orientationNbNeighbors());
|
||||
|
||||
int nb_unoriented_normals = std::distance(first_unoriented_point, points->end());
|
||||
|
|
|
|||
|
|
@ -89,8 +89,13 @@ Polyhedron* poisson_reconstruct(const Point_set& points,
|
|||
// + property maps to access each point's position and normal.
|
||||
// The position property map can be omitted here as we use iterators over Point_3 elements.
|
||||
Poisson_reconstruction_function function(
|
||||
points.begin(), points.end(),
|
||||
CGAL::make_normal_of_point_with_normal_pmap(points.begin()) );
|
||||
points.begin(), points.end(),
|
||||
#ifdef CGAL_USE_OLD_PAIR_PROPERTY_MAPS
|
||||
CGAL::make_normal_of_point_with_normal_pmap(points.begin())
|
||||
#else
|
||||
CGAL::make_normal_of_point_with_normal_pmap(Point_set::value_type())
|
||||
#endif
|
||||
);
|
||||
|
||||
bool ok = false;
|
||||
#ifdef CGAL_TAUCS_ENABLED
|
||||
|
|
|
|||
|
|
@ -102,8 +102,13 @@ bool Point_set_scene_item::read_off_point_set(std::istream& stream)
|
|||
m_points->clear();
|
||||
bool ok = stream &&
|
||||
CGAL::read_off_points_and_normals(stream,
|
||||
std::back_inserter(*m_points),
|
||||
CGAL::make_normal_of_point_with_normal_pmap(std::back_inserter(*m_points))) &&
|
||||
std::back_inserter(*m_points),
|
||||
#ifdef CGAL_USE_OLD_PAIR_PROPERTY_MAPS
|
||||
CGAL::make_normal_of_point_with_normal_pmap(std::back_inserter(*m_points))
|
||||
#else
|
||||
CGAL::make_normal_of_point_with_normal_pmap(Point_set::value_type())
|
||||
#endif
|
||||
) &&
|
||||
!isEmpty();
|
||||
|
||||
return ok;
|
||||
|
|
@ -116,8 +121,13 @@ bool Point_set_scene_item::write_off_point_set(std::ostream& stream) const
|
|||
|
||||
return stream &&
|
||||
CGAL::write_off_points_and_normals(stream,
|
||||
m_points->begin(), m_points->end(),
|
||||
CGAL::make_normal_of_point_with_normal_pmap(m_points->begin()));
|
||||
m_points->begin(), m_points->end(),
|
||||
#ifdef CGAL_USE_OLD_PAIR_PROPERTY_MAPS
|
||||
CGAL::make_normal_of_point_with_normal_pmap(m_points->begin())
|
||||
#else
|
||||
CGAL::make_normal_of_point_with_normal_pmap(Point_set::value_type())
|
||||
#endif
|
||||
);
|
||||
}
|
||||
|
||||
// Loads point set from .XYZ file
|
||||
|
|
@ -129,7 +139,12 @@ bool Point_set_scene_item::read_xyz_point_set(std::istream& stream)
|
|||
bool ok = stream &&
|
||||
CGAL::read_xyz_points_and_normals(stream,
|
||||
std::back_inserter(*m_points),
|
||||
CGAL::make_normal_of_point_with_normal_pmap(std::back_inserter(*m_points))) &&
|
||||
#ifdef CGAL_USE_OLD_PAIR_PROPERTY_MAPS
|
||||
CGAL::make_normal_of_point_with_normal_pmap(std::back_inserter(*m_points))
|
||||
#else
|
||||
CGAL::make_normal_of_point_with_normal_pmap(Point_set::value_type())
|
||||
#endif
|
||||
) &&
|
||||
!isEmpty();
|
||||
|
||||
return ok;
|
||||
|
|
@ -142,8 +157,13 @@ bool Point_set_scene_item::write_xyz_point_set(std::ostream& stream) const
|
|||
|
||||
return stream &&
|
||||
CGAL::write_xyz_points_and_normals(stream,
|
||||
m_points->begin(), m_points->end(),
|
||||
CGAL::make_normal_of_point_with_normal_pmap(m_points->begin()));
|
||||
m_points->begin(), m_points->end(),
|
||||
#ifdef CGAL_USE_OLD_PAIR_PROPERTY_MAPS
|
||||
CGAL::make_normal_of_point_with_normal_pmap(m_points->begin())
|
||||
#else
|
||||
CGAL::make_normal_of_point_with_normal_pmap(Point_set::value_type())
|
||||
#endif
|
||||
);
|
||||
}
|
||||
|
||||
QString
|
||||
|
|
|
|||
Loading…
Reference in New Issue