mirror of https://github.com/CGAL/cgal
make is_selected(edge) a lot simpler than its naive version
This commit is contained in:
parent
0fdfebd57f
commit
b1f3dfaeba
|
|
@ -602,6 +602,7 @@ bool is_outside(const typename C3t3::Edge & edge,
|
|||
return true; //all incident cells are outside or infinite
|
||||
}
|
||||
|
||||
// is `v` part of the selection of cells that should be remeshed?
|
||||
template<typename C3t3, typename CellSelector>
|
||||
bool is_selected(const typename C3t3::Vertex_handle v,
|
||||
const C3t3& c3t3,
|
||||
|
|
@ -650,13 +651,22 @@ bool is_internal(const typename C3t3::Edge& edge,
|
|||
return true;
|
||||
}
|
||||
|
||||
// is `e` part of the selection of cells that should be remeshed?
|
||||
template<typename C3T3, typename CellSelector>
|
||||
bool is_selected(const typename C3T3::Triangulation::Edge& e,
|
||||
const C3T3& c3t3,
|
||||
CellSelector cell_selector)
|
||||
{
|
||||
return is_boundary(c3t3, e, cell_selector)
|
||||
|| is_internal(e, c3t3, cell_selector);
|
||||
typedef typename C3T3::Triangulation::Cell_circulator Cell_circulator;
|
||||
Cell_circulator circ = c3t3.triangulation().incident_cells(e);
|
||||
Cell_circulator done = circ;
|
||||
do
|
||||
{
|
||||
if (cell_selector(circ))
|
||||
return true;
|
||||
} while (++circ != done);
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
template<typename Gt>
|
||||
|
|
|
|||
Loading…
Reference in New Issue