mirror of https://github.com/CGAL/cgal
fix warnings
This commit is contained in:
parent
6a47c1d34a
commit
f64968de0c
|
|
@ -138,7 +138,7 @@ void get_proxy_map(const Approximation &approx, FacetProxyMap fproxymap) {
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename Approximation>
|
template <typename Approximation>
|
||||||
void get_proxy_map(const Approximation &approx, internal_np::vsa_no_output_t) {}
|
void get_proxy_map(const Approximation &, internal_np::vsa_no_output_t) {}
|
||||||
|
|
||||||
template <typename Approximation, typename OutputIterator>
|
template <typename Approximation, typename OutputIterator>
|
||||||
void get_anchor_vertices(const Approximation &approx, OutputIterator out_itr) {
|
void get_anchor_vertices(const Approximation &approx, OutputIterator out_itr) {
|
||||||
|
|
@ -146,7 +146,7 @@ void get_anchor_vertices(const Approximation &approx, OutputIterator out_itr) {
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename Approximation>
|
template <typename Approximation>
|
||||||
void get_anchor_vertices(const Approximation &approx, internal_np::vsa_no_output_t) {}
|
void get_anchor_vertices(const Approximation &, internal_np::vsa_no_output_t) {}
|
||||||
|
|
||||||
template <typename Approximation, typename OutputIterator>
|
template <typename Approximation, typename OutputIterator>
|
||||||
void get_anchor_points(const Approximation &approx, OutputIterator out_itr) {
|
void get_anchor_points(const Approximation &approx, OutputIterator out_itr) {
|
||||||
|
|
@ -154,7 +154,7 @@ void get_anchor_points(const Approximation &approx, OutputIterator out_itr) {
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename Approximation>
|
template <typename Approximation>
|
||||||
void get_anchor_points(const Approximation &approx, internal_np::vsa_no_output_t) {}
|
void get_anchor_points(const Approximation &, internal_np::vsa_no_output_t) {}
|
||||||
|
|
||||||
template <typename Approximation, typename OutputIterator>
|
template <typename Approximation, typename OutputIterator>
|
||||||
void get_indexed_triangles(const Approximation &approx, OutputIterator out_itr) {
|
void get_indexed_triangles(const Approximation &approx, OutputIterator out_itr) {
|
||||||
|
|
@ -162,7 +162,7 @@ void get_indexed_triangles(const Approximation &approx, OutputIterator out_itr)
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename Approximation>
|
template <typename Approximation>
|
||||||
void get_indexed_triangles(const Approximation &approx, internal_np::vsa_no_output_t) {}
|
void get_indexed_triangles(const Approximation &, internal_np::vsa_no_output_t) {}
|
||||||
|
|
||||||
template <typename Approximation, typename OutputIterator>
|
template <typename Approximation, typename OutputIterator>
|
||||||
void get_proxies(const Approximation &approx, OutputIterator out_itr) {
|
void get_proxies(const Approximation &approx, OutputIterator out_itr) {
|
||||||
|
|
@ -170,7 +170,7 @@ void get_proxies(const Approximation &approx, OutputIterator out_itr) {
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename Approximation>
|
template <typename Approximation>
|
||||||
void get_proxies(const Approximation &approx, internal_np::vsa_no_output_t) {}
|
void get_proxies(const Approximation &, internal_np::vsa_no_output_t) {}
|
||||||
|
|
||||||
} //end of namespace CGAL
|
} //end of namespace CGAL
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -70,14 +70,11 @@ bool vsa_mesh_approximation(const TriangleMesh &tm_in,
|
||||||
PolyhedronSurface &tm_out,
|
PolyhedronSurface &tm_out,
|
||||||
const NamedParameters &np)
|
const NamedParameters &np)
|
||||||
{
|
{
|
||||||
typedef typename boost::graph_traits<TriangleMesh>::vertex_descriptor vertex_descriptor;
|
|
||||||
|
|
||||||
using boost::get_param;
|
using boost::get_param;
|
||||||
using boost::choose_param;
|
using boost::choose_param;
|
||||||
|
|
||||||
typedef typename GetGeomTraits<TriangleMesh, NamedParameters>::type GeomTraits;
|
typedef typename GetGeomTraits<TriangleMesh, NamedParameters>::type GeomTraits;
|
||||||
typedef typename GeomTraits::FT FT;
|
typedef typename GeomTraits::FT FT;
|
||||||
typedef typename GeomTraits::Point_3 Point_3;
|
|
||||||
|
|
||||||
typedef typename GetVertexPointMap<TriangleMesh, NamedParameters>::type VPMap;
|
typedef typename GetVertexPointMap<TriangleMesh, NamedParameters>::type VPMap;
|
||||||
VPMap point_pmap = choose_param(get_param(np, internal_np::vertex_point),
|
VPMap point_pmap = choose_param(get_param(np, internal_np::vertex_point),
|
||||||
|
|
|
||||||
|
|
@ -43,6 +43,15 @@ bool test_shape(const char *file_name, const std::size_t target_num_proxies)
|
||||||
vsa_l21.seeding_by_error(L21VSA::Incremental, drop, inner_iterations);
|
vsa_l21.seeding_by_error(L21VSA::Incremental, drop, inner_iterations);
|
||||||
for (std::size_t i = 0; i < num_iterations; ++i)
|
for (std::size_t i = 0; i < num_iterations; ++i)
|
||||||
vsa_l21.run_one_step();
|
vsa_l21.run_one_step();
|
||||||
|
|
||||||
|
// eliminate redundant area (local minima) by merging
|
||||||
|
std::size_t px0 = 0, px1 = 0;
|
||||||
|
while (vsa_l21.find_best_merge(px0, px1, true)) {
|
||||||
|
vsa_l21.merge(px0, px1);
|
||||||
|
for (std::size_t i = 0; i < num_iterations; ++i)
|
||||||
|
vsa_l21.run_one_step();
|
||||||
|
}
|
||||||
|
|
||||||
if (vsa_l21.get_proxies_size() != target_num_proxies) {
|
if (vsa_l21.get_proxies_size() != target_num_proxies) {
|
||||||
std::cout << "#targeted - #result "
|
std::cout << "#targeted - #result "
|
||||||
<< target_num_proxies << ' '
|
<< target_num_proxies << ' '
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue