mirror of https://github.com/CGAL/cgal
remove unnecessary get_ helper functions
This commit is contained in:
parent
05bcc6b0c6
commit
22661170f8
|
|
@ -224,7 +224,7 @@ Runtime in seconds with target error drop of different seeding method. The bench
|
|||
Runtime of 3 phases of the algorithm in seconds: seeding, clustering iteration and meshing. The seeding method is hierarchical with target number of proxies.
|
||||
|
||||
<center>
|
||||
Model | \#Triangles | \#Proxies | \#Iterations | Seeding | Relaxation | Meshing | Total
|
||||
Model | \#Triangles | \#Proxies | \#Iterations | Seeding | Clustering | Meshing | Total
|
||||
----------: | ---------: | -------: | ----------: | -----: | --------: | -----: | ----:
|
||||
plane-sphere | 6,826 | 20 | 20 | 0.17 | 0.228 | 0.044 | 0.442
|
||||
bear | 20,188 | 200 | 20 | 1.194 | 0.784 | 0.128 | 2.006
|
||||
|
|
|
|||
|
|
@ -89,22 +89,6 @@ void get_anchor_vertices(const Approximation &approx, OutputIterator out_itr) {
|
|||
template <typename Approximation>
|
||||
void get_anchor_vertices(const Approximation &, internal_np::vsa_no_output_t) {}
|
||||
|
||||
template <typename Approximation, typename OutputIterator>
|
||||
void get_anchor_points(const Approximation &approx, OutputIterator out_itr) {
|
||||
approx.get_anchor_points(out_itr);
|
||||
}
|
||||
|
||||
template <typename Approximation>
|
||||
void get_anchor_points(const Approximation &, internal_np::vsa_no_output_t) {}
|
||||
|
||||
template <typename Approximation, typename OutputIterator>
|
||||
void get_indexed_triangles(const Approximation &approx, OutputIterator out_itr) {
|
||||
approx.get_indexed_triangles(out_itr);
|
||||
}
|
||||
|
||||
template <typename Approximation>
|
||||
void get_indexed_triangles(const Approximation &, internal_np::vsa_no_output_t) {}
|
||||
|
||||
template <typename Approximation, typename OutputIterator>
|
||||
void get_proxies(const Approximation &approx, OutputIterator out_itr) {
|
||||
approx.get_proxies(out_itr);
|
||||
|
|
|
|||
|
|
@ -1371,7 +1371,7 @@ private:
|
|||
const Point_3 &p1 = point_pmap[target(he, *m_pmesh)];
|
||||
const Point_3 &p2 = point_pmap[target(next(he, *m_pmesh), *m_pmesh)];
|
||||
const FT farea(std::sqrt(CGAL::to_double(CGAL::squared_area(p0, p1, p2))));
|
||||
const Vector_3 fnorm = CGAL::unit_normal(p0, p1, p2);
|
||||
const Vector_3 fnorm = CGAL::unit_normal(p0, p1, p2);
|
||||
|
||||
norm = sum_functor(norm, scale_functor(fnorm, farea));
|
||||
area += farea;
|
||||
|
|
|
|||
|
|
@ -136,6 +136,12 @@ bool mesh_approximation(const TriangleMesh &tm_in,
|
|||
const FT chord_error = choose_param(get_param(np, internal_np::mesh_chord_error), FT(5.0));
|
||||
const bool is_manifold = approx.extract_mesh(*tm_out, chord_error);
|
||||
|
||||
// get anchor points
|
||||
approx.get_anchor_points(apts_out_itr);
|
||||
|
||||
// get indexed triangles
|
||||
approx.get_indexed_triangles(tris_out_itr);
|
||||
|
||||
typedef typename boost::lookup_named_param_def<
|
||||
internal_np::anchor_vertices_t,
|
||||
NamedParameters,
|
||||
|
|
@ -144,12 +150,6 @@ bool mesh_approximation(const TriangleMesh &tm_in,
|
|||
get_param(np, internal_np::anchor_vertices) , internal_np::vsa_no_output);
|
||||
get_anchor_vertices(approx, avtx_out_itr);
|
||||
|
||||
// get anchor points
|
||||
get_anchor_points(approx, apts_out_itr);
|
||||
|
||||
// get indexed triangles
|
||||
get_indexed_triangles(approx, tris_out_itr);
|
||||
|
||||
typedef typename boost::lookup_named_param_def <
|
||||
internal_np::proxies_t,
|
||||
NamedParameters,
|
||||
|
|
|
|||
|
|
@ -26,9 +26,12 @@ int test() {
|
|||
|
||||
typedef CGAL::Polyhedron_3<K> Polyhedron;
|
||||
Polyhedron out_mesh;
|
||||
std::vector<typename K::Point_3> points;
|
||||
std::vector<std::vector<std::size_t> > triangles;
|
||||
|
||||
CGAL::VSA::mesh_approximation(tm,
|
||||
CGAL::internal_np::vsa_no_output,
|
||||
CGAL::internal_np::vsa_no_output,
|
||||
std::back_inserter(points),
|
||||
std::back_inserter(triangles),
|
||||
CGAL::VSA::parameters::max_nb_proxies(6).
|
||||
nb_of_iterations(30).
|
||||
nb_of_relaxations(5).
|
||||
|
|
|
|||
Loading…
Reference in New Issue