remove unnecessary get_ helper functions

This commit is contained in:
Lingjie Zhu 2017-11-26 22:04:17 +08:00
parent 05bcc6b0c6
commit 22661170f8
5 changed files with 13 additions and 26 deletions

View File

@ -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

View File

@ -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);

View File

@ -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,

View File

@ -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).