mirror of https://github.com/CGAL/cgal
use range iterators
This commit is contained in:
parent
c10e87f94c
commit
420165dbe0
|
|
@ -40,7 +40,7 @@ void compute_statistics(const Triangulation& tr,
|
||||||
typedef typename Tr::Cell_handle Cell_handle;
|
typedef typename Tr::Cell_handle Cell_handle;
|
||||||
typedef typename Tr::Vertex_handle Vertex_handle;
|
typedef typename Tr::Vertex_handle Vertex_handle;
|
||||||
typedef typename Gt::Point_3 Point;
|
typedef typename Gt::Point_3 Point;
|
||||||
typedef typename Tr::Finite_facets_iterator Finite_facets_iterator;
|
typedef typename Tr::Facet Facet;
|
||||||
typedef typename Tr::Finite_cells_iterator Finite_cells_iterator;
|
typedef typename Tr::Finite_cells_iterator Finite_cells_iterator;
|
||||||
typedef typename Tr::Cell::Subdomain_index Subdomain_index;
|
typedef typename Tr::Cell::Subdomain_index Subdomain_index;
|
||||||
|
|
||||||
|
|
@ -58,11 +58,10 @@ void compute_statistics(const Triangulation& tr,
|
||||||
double max_dihedral_angle = 0.;
|
double max_dihedral_angle = 0.;
|
||||||
double min_dihedral_angle = 180.;
|
double min_dihedral_angle = 180.;
|
||||||
|
|
||||||
for (Finite_facets_iterator fit = tr.finite_facets_begin();
|
for (Facet fit : tr.finite_facets())
|
||||||
fit != tr.finite_facets_end(); ++fit)
|
|
||||||
{
|
{
|
||||||
const Cell_handle cell = fit->first;
|
const Cell_handle cell = fit.first;
|
||||||
const int& index = fit->second;
|
const int& index = fit.second;
|
||||||
if (!cell_selector(cell) || !cell_selector(cell->neighbor(index)))
|
if (!cell_selector(cell) || !cell_selector(cell->neighbor(index)))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -379,15 +379,13 @@ private:
|
||||||
boost::unordered_map<Vertex_handle,
|
boost::unordered_map<Vertex_handle,
|
||||||
std::vector<Surface_patch_index> >& vertices_surface_indices)
|
std::vector<Surface_patch_index> >& vertices_surface_indices)
|
||||||
{
|
{
|
||||||
for (typename C3t3::Facets_in_complex_iterator
|
for (Facet fit : c3t3.facets_in_complex())
|
||||||
fit = c3t3.facets_in_complex_begin();
|
|
||||||
fit != c3t3.facets_in_complex_end(); ++fit)
|
|
||||||
{
|
{
|
||||||
const Surface_patch_index& surface_index = c3t3.surface_patch_index(*fit);
|
const Surface_patch_index& surface_index = c3t3.surface_patch_index(fit);
|
||||||
|
|
||||||
for (int i = 0; i < 3; i++)
|
for (int i = 0; i < 3; i++)
|
||||||
{
|
{
|
||||||
const Vertex_handle vi = fit->first->vertex(indices(fit->second, i));
|
const Vertex_handle vi = fit.first->vertex(indices(fit.second, i));
|
||||||
|
|
||||||
std::vector<Surface_patch_index>& v_surface_indices = vertices_surface_indices[vi];
|
std::vector<Surface_patch_index>& v_surface_indices = vertices_surface_indices[vi];
|
||||||
if (std::find(v_surface_indices.begin(), v_surface_indices.end(), surface_index) == v_surface_indices.end())
|
if (std::find(v_surface_indices.begin(), v_surface_indices.end(), surface_index) == v_surface_indices.end())
|
||||||
|
|
|
||||||
|
|
@ -238,7 +238,6 @@ void split_long_edges(C3T3& c3t3,
|
||||||
typedef typename C3T3::Triangulation T3;
|
typedef typename C3T3::Triangulation T3;
|
||||||
typedef typename T3::Cell_handle Cell_handle;
|
typedef typename T3::Cell_handle Cell_handle;
|
||||||
typedef typename T3::Edge Edge;
|
typedef typename T3::Edge Edge;
|
||||||
typedef typename T3::Finite_edges_iterator Finite_edges_iterator;
|
|
||||||
typedef typename T3::Vertex_handle Vertex_handle;
|
typedef typename T3::Vertex_handle Vertex_handle;
|
||||||
typedef typename std::pair<Vertex_handle, Vertex_handle> Edge_vv;
|
typedef typename std::pair<Vertex_handle, Vertex_handle> Edge_vv;
|
||||||
|
|
||||||
|
|
@ -259,10 +258,8 @@ void split_long_edges(C3T3& c3t3,
|
||||||
//collect long edges
|
//collect long edges
|
||||||
T3& tr = c3t3.triangulation();
|
T3& tr = c3t3.triangulation();
|
||||||
Boost_bimap long_edges;
|
Boost_bimap long_edges;
|
||||||
for (Finite_edges_iterator eit = tr.finite_edges_begin();
|
for (Edge e : tr.finite_edges())
|
||||||
eit != tr.finite_edges_end(); ++eit)
|
|
||||||
{
|
{
|
||||||
Edge e = *eit;
|
|
||||||
if (!can_be_split(e, c3t3, protect_boundaries, cell_selector))
|
if (!can_be_split(e, c3t3, protect_boundaries, cell_selector))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue