mirror of https://github.com/CGAL/cgal
add get_proxy_region
This commit is contained in:
parent
1b3c5da425
commit
e42a120c8c
|
|
@ -850,6 +850,22 @@ public:
|
||||||
facet_proxy_map[f] = fproxy_map[f];
|
facet_proxy_map[f] = fproxy_map[f];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*!
|
||||||
|
* @brief Get the facet region of the specified proxy.
|
||||||
|
* @tparam OutputIterator output iterator with `boost::graph_traits<TriangleMesh>::%face_descriptor` as value type
|
||||||
|
* @param px_idx proxy index
|
||||||
|
* @param out_itr output iterator
|
||||||
|
*/
|
||||||
|
template <typename OutputIterator>
|
||||||
|
void get_proxy_region(const std::size_t px_idx, OutputIterator out_itr) const {
|
||||||
|
if (px_idx >= proxies.size())
|
||||||
|
return;
|
||||||
|
|
||||||
|
BOOST_FOREACH(face_descriptor f, faces(*m_pmesh))
|
||||||
|
if (fproxy_map[f] == px_idx)
|
||||||
|
*out_itr++ = f;
|
||||||
|
}
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* @brief Get the proxies.
|
* @brief Get the proxies.
|
||||||
* @tparam OutputIterator output iterator with Proxy as value type
|
* @tparam OutputIterator output iterator with Proxy as value type
|
||||||
|
|
|
||||||
|
|
@ -99,6 +99,11 @@ int main()
|
||||||
std::cout << "get outputs" << std::endl;
|
std::cout << "get outputs" << std::endl;
|
||||||
approx.get_proxy_map(proxy_pmap);
|
approx.get_proxy_map(proxy_pmap);
|
||||||
|
|
||||||
|
for (std::size_t i = 0; i < approx.get_proxies_size(); ++i) {
|
||||||
|
std::list<Facet_handle> patch;
|
||||||
|
approx.get_proxy_region(i, std::back_inserter(patch));
|
||||||
|
}
|
||||||
|
|
||||||
std::vector<Plane_proxy> proxies;
|
std::vector<Plane_proxy> proxies;
|
||||||
approx.get_proxies(std::back_inserter(proxies));
|
approx.get_proxies(std::back_inserter(proxies));
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue