mirror of https://github.com/CGAL/cgal
factorize code when cells are traversed
This commit is contained in:
parent
94a1d7efdb
commit
6edb602729
|
|
@ -727,10 +727,17 @@ public:
|
||||||
int li_prev, lj_prev;
|
int li_prev, lj_prev;
|
||||||
_cell_iterator.exit(lt_prev, li_prev, lj_prev);
|
_cell_iterator.exit(lt_prev, li_prev, lj_prev);
|
||||||
|
|
||||||
switch(_curr_simplex.dimension()) {
|
if(_curr_simplex.dimension() == 3) {
|
||||||
case 3: { /*Cell_handle*/
|
|
||||||
set_curr_simplex_to_entry();
|
set_curr_simplex_to_entry();
|
||||||
} break;
|
return *this;
|
||||||
|
}
|
||||||
|
if(lt_prev == Locate_type::CELL) {
|
||||||
|
CGAL_assertion(ch_next == Cell_handle());
|
||||||
|
_curr_simplex = ch_prev;
|
||||||
|
return *this;
|
||||||
|
}
|
||||||
|
|
||||||
|
switch(_curr_simplex.dimension()) {
|
||||||
case 2: { /*Facet*/
|
case 2: { /*Facet*/
|
||||||
CGAL_assertion((ch_next == Cell_handle()) == (_cell_iterator == _cell_iterator.end()));
|
CGAL_assertion((ch_next == Cell_handle()) == (_cell_iterator == _cell_iterator.end()));
|
||||||
|
|
||||||
|
|
@ -759,10 +766,6 @@ public:
|
||||||
} else
|
} else
|
||||||
_curr_simplex = ch_prev;
|
_curr_simplex = ch_prev;
|
||||||
} break;
|
} break;
|
||||||
case Locate_type::CELL: { // facet-cell then end
|
|
||||||
CGAL_assertion(ch_next == Cell_handle());
|
|
||||||
_curr_simplex = ch_prev;
|
|
||||||
} break;
|
|
||||||
default:
|
default:
|
||||||
CGAL_unreachable();
|
CGAL_unreachable();
|
||||||
}
|
}
|
||||||
|
|
@ -801,10 +804,6 @@ public:
|
||||||
else
|
else
|
||||||
_curr_simplex = ch_prev; //query goes through the cell
|
_curr_simplex = ch_prev; //query goes through the cell
|
||||||
} break;
|
} break;
|
||||||
case Locate_type::CELL:
|
|
||||||
CGAL_assertion(ch_next == Cell_handle());
|
|
||||||
_curr_simplex = ch_prev; //edge-cell-outside
|
|
||||||
break;
|
|
||||||
default:
|
default:
|
||||||
CGAL_unreachable();
|
CGAL_unreachable();
|
||||||
}
|
}
|
||||||
|
|
@ -833,10 +832,6 @@ public:
|
||||||
else // vertex-cell-facet-outside
|
else // vertex-cell-facet-outside
|
||||||
_curr_simplex = ch_prev;
|
_curr_simplex = ch_prev;
|
||||||
} break;
|
} break;
|
||||||
case Locate_type::CELL: {
|
|
||||||
CGAL_assertion(ch_next == Cell_handle());
|
|
||||||
_curr_simplex = ch_prev;
|
|
||||||
} break;
|
|
||||||
default:
|
default:
|
||||||
CGAL_unreachable();
|
CGAL_unreachable();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue