mirror of https://github.com/CGAL/cgal
remove get_ in member functions
This commit is contained in:
parent
b593ef4622
commit
b66c35aa83
|
|
@ -64,7 +64,7 @@ int main(int argc, char *argv[])
|
|||
static_cast<CGAL::VSA::Seeding>(method), boost::none, error_drop, nb_relaxations);
|
||||
t.stop();
|
||||
std::cerr << "seeding time " << t.time() << " sec." << std::endl;
|
||||
std::cerr << "#proxies " << approx.get_proxies_size() << std::endl;
|
||||
std::cerr << "#proxies " << approx.proxies_size() << std::endl;
|
||||
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -75,7 +75,7 @@ public:
|
|||
// output helper functions
|
||||
template <typename Approximation, typename FacetProxyMap>
|
||||
void get_proxy_map(const Approximation &approx, FacetProxyMap fproxymap) {
|
||||
approx.get_proxy_map(fproxymap);
|
||||
approx.proxy_map(fproxymap);
|
||||
}
|
||||
|
||||
template <typename Approximation>
|
||||
|
|
@ -83,7 +83,7 @@ void get_proxy_map(const Approximation &, internal_np::vsa_no_output_t) {}
|
|||
|
||||
template <typename Approximation, typename OutputIterator>
|
||||
void get_anchor_vertices(const Approximation &approx, OutputIterator out_itr) {
|
||||
approx.get_anchor_vertices(out_itr);
|
||||
approx.anchor_vertices(out_itr);
|
||||
}
|
||||
|
||||
template <typename Approximation>
|
||||
|
|
@ -91,7 +91,7 @@ void get_anchor_vertices(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);
|
||||
approx.proxies(out_itr);
|
||||
}
|
||||
|
||||
template <typename Approximation>
|
||||
|
|
|
|||
|
|
@ -912,7 +912,7 @@ public:
|
|||
* @param[out] facet_proxy_map facet proxy index map
|
||||
*/
|
||||
template <typename FacetProxyMap>
|
||||
void get_proxy_map(FacetProxyMap &facet_proxy_map) const {
|
||||
void proxy_map(FacetProxyMap &facet_proxy_map) const {
|
||||
BOOST_FOREACH(face_descriptor f, faces(*m_ptm))
|
||||
facet_proxy_map[f] = get(m_fproxy_map, f);
|
||||
}
|
||||
|
|
@ -924,7 +924,7 @@ public:
|
|||
* @param out_itr output iterator
|
||||
*/
|
||||
template <typename OutputIterator>
|
||||
void get_proxy_region(const std::size_t px_idx, OutputIterator out_itr) const {
|
||||
void proxy_region(const std::size_t px_idx, OutputIterator out_itr) const {
|
||||
if (px_idx >= m_proxies.size())
|
||||
return;
|
||||
|
||||
|
|
@ -939,7 +939,7 @@ public:
|
|||
* @param out_itr output iterator
|
||||
*/
|
||||
template <typename OutputIterator>
|
||||
void get_proxies(OutputIterator out_itr) const {
|
||||
void proxies(OutputIterator out_itr) const {
|
||||
BOOST_FOREACH(const Proxy_wrapper &pxw, m_proxies)
|
||||
*out_itr++ = pxw.px;
|
||||
}
|
||||
|
|
@ -951,7 +951,7 @@ public:
|
|||
* @param out_itr output iterator
|
||||
*/
|
||||
template <typename OutputIterator>
|
||||
void get_wrapped_proxies(OutputIterator out_itr) const {
|
||||
void wrapped_proxies(OutputIterator out_itr) const {
|
||||
BOOST_FOREACH(const Proxy_wrapper &pxw, m_proxies)
|
||||
*out_itr++ = pxw;
|
||||
}
|
||||
|
|
@ -961,7 +961,7 @@ public:
|
|||
* @brief Get the proxies size.
|
||||
* @return number of proxies
|
||||
*/
|
||||
std::size_t get_proxies_size() const { return m_proxies.size(); }
|
||||
std::size_t proxies_size() const { return m_proxies.size(); }
|
||||
|
||||
/*!
|
||||
* @brief Get the anchor points, which have the area-averaged position of the projected anchor vertex points on the incident proxies.
|
||||
|
|
@ -969,7 +969,7 @@ public:
|
|||
* @param out_itr output iterator
|
||||
*/
|
||||
template <typename OutputIterator>
|
||||
void get_anchor_points(OutputIterator out_itr) const {
|
||||
void anchor_points(OutputIterator out_itr) const {
|
||||
BOOST_FOREACH(const Anchor &a, m_anchors)
|
||||
*out_itr++ = a.pos;
|
||||
}
|
||||
|
|
@ -980,7 +980,7 @@ public:
|
|||
* @param out_itr output iterator
|
||||
*/
|
||||
template <typename OutputIterator>
|
||||
void get_anchor_vertices(OutputIterator out_itr) const {
|
||||
void anchor_vertices(OutputIterator out_itr) const {
|
||||
BOOST_FOREACH(const Anchor &a, m_anchors)
|
||||
*out_itr++ = a.vtx;
|
||||
}
|
||||
|
|
@ -992,7 +992,7 @@ public:
|
|||
* @param out_itr output iterator
|
||||
*/
|
||||
template <typename OutputIterator>
|
||||
void get_indexed_triangles(OutputIterator out_itr) const {
|
||||
void indexed_triangles(OutputIterator out_itr) const {
|
||||
BOOST_FOREACH(const std::vector<std::size_t> &t, m_tris)
|
||||
*out_itr++ = t;
|
||||
}
|
||||
|
|
@ -1002,7 +1002,7 @@ public:
|
|||
* @tparam OutputIterator output iterator with std::vector<std::size_t> as value type
|
||||
*/
|
||||
template <typename OutputIterator>
|
||||
void get_indexed_boundary_polygons(OutputIterator out_itr) const {
|
||||
void indexed_boundary_polygons(OutputIterator out_itr) const {
|
||||
BOOST_FOREACH(const Boundary_cycle &bcycle, m_bcycles) {
|
||||
std::vector<std::size_t> plg;
|
||||
halfedge_descriptor he = bcycle.he_head;
|
||||
|
|
|
|||
|
|
@ -117,7 +117,7 @@ bool mesh_approximation(const TriangleMesh &tm_in,
|
|||
approx.run(nb_of_iterations);
|
||||
|
||||
#ifdef CGAL_SURFACE_MESH_APPROXIMATION_DEBUG
|
||||
std::cout << "#px = " << approx.get_proxies_size()
|
||||
std::cout << "#px = " << approx.proxies_size()
|
||||
<< ", #itr = " << nb_of_iterations
|
||||
<< ", #relx = " << nb_of_relaxations << std::endl;
|
||||
#endif
|
||||
|
|
@ -137,10 +137,10 @@ bool mesh_approximation(const TriangleMesh &tm_in,
|
|||
const bool is_manifold = approx.extract_mesh(*tm_out, chord_error);
|
||||
|
||||
// get anchor points
|
||||
approx.get_anchor_points(apts_out_itr);
|
||||
approx.anchor_points(apts_out_itr);
|
||||
|
||||
// get indexed triangles
|
||||
approx.get_indexed_triangles(tris_out_itr);
|
||||
approx.indexed_triangles(tris_out_itr);
|
||||
|
||||
typedef typename boost::lookup_named_param_def<
|
||||
internal_np::anchor_vertices_t,
|
||||
|
|
|
|||
|
|
@ -112,7 +112,7 @@ void mesh_segmentation(const TriangleMesh &tm_in,
|
|||
<< ", #relx = " << nb_of_relaxations << std::endl;
|
||||
#endif
|
||||
|
||||
approx.get_proxy_map(segment_ids);
|
||||
approx.proxy_map(segment_ids);
|
||||
|
||||
typedef typename boost::lookup_named_param_def <
|
||||
internal_np::proxies_t,
|
||||
|
|
|
|||
|
|
@ -55,7 +55,7 @@ int main()
|
|||
std::cout << "random seeding and run" << std::endl;
|
||||
approx.seeding(CGAL::VSA::Random, 10);
|
||||
approx.run(10);
|
||||
if (approx.get_proxies_size() != 10)
|
||||
if (approx.proxies_size() != 10)
|
||||
return EXIT_FAILURE;
|
||||
|
||||
// incremental add and run to convergence
|
||||
|
|
@ -63,20 +63,20 @@ int main()
|
|||
approx.add_proxies_furthest(3, 5);
|
||||
if (approx.run_to_converge(0.1))
|
||||
std::cout << "Converged." << std::endl;
|
||||
if (approx.get_proxies_size() != 13)
|
||||
if (approx.proxies_size() != 13)
|
||||
return EXIT_FAILURE;
|
||||
|
||||
std::cout << "hierarchical add and run" << std::endl;
|
||||
approx.add_proxies_error_diffusion(3);
|
||||
approx.run(10);
|
||||
if (approx.get_proxies_size() != 16)
|
||||
if (approx.proxies_size() != 16)
|
||||
return EXIT_FAILURE;
|
||||
|
||||
// merge and teleport the proxies from local minimal
|
||||
std::cout << "teleport" << std::endl;
|
||||
approx.teleport_proxies(3);
|
||||
approx.run(10);
|
||||
if (approx.get_proxies_size() != 16)
|
||||
if (approx.proxies_size() != 16)
|
||||
return EXIT_FAILURE;
|
||||
|
||||
// split proxy 0 into 2 proxies
|
||||
|
|
@ -84,7 +84,7 @@ int main()
|
|||
std::cout << "spliting" << std::endl;
|
||||
if (!approx.split(0, 2, 10))
|
||||
return EXIT_FAILURE;
|
||||
if (approx.get_proxies_size() != 17)
|
||||
if (approx.proxies_size() != 17)
|
||||
return EXIT_FAILURE;
|
||||
|
||||
// extract the approximation polyhedron
|
||||
|
|
@ -97,45 +97,45 @@ int main()
|
|||
|
||||
// get outputs
|
||||
std::cout << "get outputs" << std::endl;
|
||||
approx.get_proxy_map(proxy_pmap);
|
||||
approx.proxy_map(proxy_pmap);
|
||||
|
||||
for (std::size_t i = 0; i < approx.get_proxies_size(); ++i) {
|
||||
for (std::size_t i = 0; i < approx.proxies_size(); ++i) {
|
||||
std::list<Facet_handle> patch;
|
||||
approx.get_proxy_region(i, std::back_inserter(patch));
|
||||
approx.proxy_region(i, std::back_inserter(patch));
|
||||
}
|
||||
|
||||
std::vector<Plane_proxy> proxies;
|
||||
approx.get_proxies(std::back_inserter(proxies));
|
||||
approx.proxies(std::back_inserter(proxies));
|
||||
|
||||
std::vector<Point> anchor_pos;
|
||||
approx.get_anchor_points(std::back_inserter(anchor_pos));
|
||||
approx.anchor_points(std::back_inserter(anchor_pos));
|
||||
|
||||
std::vector<Polyhedron::Vertex_handle> anchor_vtx;
|
||||
approx.get_anchor_vertices(std::back_inserter(anchor_vtx));
|
||||
approx.anchor_vertices(std::back_inserter(anchor_vtx));
|
||||
|
||||
std::vector<std::vector<std::size_t> > tris;
|
||||
approx.get_indexed_triangles(std::back_inserter(tris));
|
||||
approx.indexed_triangles(std::back_inserter(tris));
|
||||
|
||||
std::vector<std::vector<std::size_t> > boundary;
|
||||
approx.get_indexed_boundary_polygons(std::back_inserter(boundary));
|
||||
approx.indexed_boundary_polygons(std::back_inserter(boundary));
|
||||
|
||||
const FT drop(0.001);
|
||||
const std::size_t iterations = 5;
|
||||
std::cout << "rebuild and hierarchical seeding" << std::endl;
|
||||
approx.rebuild();
|
||||
if (approx.get_proxies_size() != 0)
|
||||
if (approx.proxies_size() != 0)
|
||||
return EXIT_FAILURE;
|
||||
approx.seeding(CGAL::VSA::Hierarchical, boost::none, drop, iterations);
|
||||
approx.run(10);
|
||||
std::cout << "#proxies " << approx.get_proxies_size() << std::endl;
|
||||
std::cout << "#proxies " << approx.proxies_size() << std::endl;
|
||||
|
||||
std::cout << "rebuild and incremental seeding" << std::endl;
|
||||
approx.rebuild();
|
||||
if (approx.get_proxies_size() != 0)
|
||||
if (approx.proxies_size() != 0)
|
||||
return EXIT_FAILURE;
|
||||
approx.seeding(CGAL::VSA::Incremental, boost::none, drop, iterations);
|
||||
approx.run(10);
|
||||
std::cout << "#proxies " << approx.get_proxies_size() << std::endl;
|
||||
std::cout << "#proxies " << approx.proxies_size() << std::endl;
|
||||
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -50,10 +50,10 @@ bool test_shape(const char *file_name, const std::size_t target_num_proxies)
|
|||
approx.run(num_iterations);
|
||||
}
|
||||
|
||||
if (approx.get_proxies_size() != target_num_proxies) {
|
||||
if (approx.proxies_size() != target_num_proxies) {
|
||||
std::cout << "#targeted - #result "
|
||||
<< target_num_proxies << ' '
|
||||
<< approx.get_proxies_size() << std::endl;
|
||||
<< approx.proxies_size() << std::endl;
|
||||
|
||||
std::cout << "Failed." << std::endl;
|
||||
return false;
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@ bool test_manifold(const char *file_name, const FT drop = FT(1e-8))
|
|||
const std::size_t inner_iterations = 5;
|
||||
approx.seeding(CGAL::VSA::Incremental, boost::none, drop, inner_iterations);
|
||||
approx.run(num_iterations);
|
||||
std::cout << "#proxies " << approx.get_proxies_size() << std::endl;
|
||||
std::cout << "#proxies " << approx.proxies_size() << std::endl;
|
||||
|
||||
// meshing
|
||||
Polyhedron mesh_out;
|
||||
|
|
|
|||
|
|
@ -101,7 +101,7 @@ int main()
|
|||
std::cout << "random seeding and run" << std::endl;
|
||||
approx.seeding(CGAL::VSA::Random, 20);
|
||||
approx.run(20);
|
||||
if (approx.get_proxies_size() != 20)
|
||||
if (approx.proxies_size() != 20)
|
||||
return EXIT_FAILURE;
|
||||
|
||||
// extract the approximation polyhedron
|
||||
|
|
|
|||
|
|
@ -69,7 +69,7 @@ int main()
|
|||
std::cout << "Random seeding by number." << std::endl;
|
||||
std::srand(static_cast<unsigned int>(std::time(0)));
|
||||
approx.seeding(CGAL::VSA::Random, 50);
|
||||
if (approx.get_proxies_size() != 50)
|
||||
if (approx.proxies_size() != 50)
|
||||
return EXIT_FAILURE;
|
||||
approx.run(10);
|
||||
|
||||
|
|
@ -96,9 +96,9 @@ int main()
|
|||
for (Facet_iterator fitr = mesh.facets_begin(); fitr != mesh.facets_end(); ++fitr)
|
||||
internal_fidxmap[fitr] = 0;
|
||||
Facet_proxy_map fproxymap(internal_fidxmap);
|
||||
approx.get_proxy_map(fproxymap);
|
||||
approx.proxy_map(fproxymap);
|
||||
std::vector<Plane_proxies> proxies;
|
||||
approx.get_proxies(std::back_inserter(proxies));
|
||||
approx.proxies(std::back_inserter(proxies));
|
||||
|
||||
CGAL::Bbox_3 bbox = CGAL::bbox_3(mesh.points_begin(), mesh.points_end());
|
||||
const FT ymin = bbox.ymin(), ymax = bbox.ymax(), yrange = ymax - ymin;
|
||||
|
|
|
|||
Loading…
Reference in New Issue