mirror of https://github.com/CGAL/cgal
replace the conflict_flag by tds_data according to
the changes in the TDS class
This commit is contained in:
parent
3e1b670bd3
commit
25dd9db46f
|
|
@ -675,14 +675,14 @@ Periodic_3_Delaunay_triangulation_3<Gt,Tds>::find_conflicts( const Point
|
|||
// Reset the conflict flag on the boundary.
|
||||
for(typename std::vector<Facet>::iterator fit=facets.begin();
|
||||
fit != facets.end(); ++fit) {
|
||||
fit->first->neighbor(fit->second)->set_in_conflict_flag(0);
|
||||
fit->first->neighbor(fit->second)->tds_data().clear();
|
||||
*bfit++ = *fit;
|
||||
}
|
||||
|
||||
// Reset the conflict flag in the conflict cells.
|
||||
for(typename std::vector<Cell_handle>::iterator ccit=cells.begin();
|
||||
ccit != cells.end(); ++ccit) {
|
||||
(*ccit)->set_in_conflict_flag(0);
|
||||
(*ccit)->tds_data().clear();
|
||||
*cit++ = *ccit;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -2075,12 +2075,6 @@ too_long_edges[vit].push_back(temp_inc_cells[i]->vertex(j));
|
|||
*
|
||||
* c is the current cell, which must be in conflict.
|
||||
* tester is the function object that tests if a cell is in conflict.
|
||||
* the cells in conflict are additionally marked by the in_conflict_flag
|
||||
*
|
||||
* in_conflict_flag value :
|
||||
* 0 -> unknown
|
||||
* 1 -> in conflict
|
||||
* 2 -> not in conflict (== on boundary)
|
||||
*/
|
||||
template <class GT, class TDS>
|
||||
template <class Conflict_test, class OutputIteratorBoundaryFacets,
|
||||
|
|
@ -2096,19 +2090,19 @@ find_conflicts(Cell_handle c, const Offset ¤t_off,
|
|||
CGAL_triangulation_precondition( number_of_vertices() != 0 );
|
||||
CGAL_triangulation_precondition( tester(c, current_off) );
|
||||
|
||||
c->set_in_conflict_flag(1);
|
||||
c->tds_data().mark_in_conflict();
|
||||
|
||||
*it.second++ = c;
|
||||
|
||||
for (int i=0; i< 4; ++i) {
|
||||
Cell_handle test = c->neighbor(i);
|
||||
if (test->get_in_conflict_flag() == 1) {
|
||||
if (test->tds_data().is_in_conflict()) {
|
||||
if (c < test) {
|
||||
*it.third++ = Facet(c, i); // Internal facet.
|
||||
}
|
||||
continue; // test was already in conflict.
|
||||
}
|
||||
if (test->get_in_conflict_flag() == 0) {
|
||||
if (!test->tds_data().is_in_conflict()) {
|
||||
Offset o_test = current_off + get_neighbor_offset(c, i, test);
|
||||
if (tester(test,o_test)) {
|
||||
if (c < test)
|
||||
|
|
@ -2116,7 +2110,7 @@ find_conflicts(Cell_handle c, const Offset ¤t_off,
|
|||
it = find_conflicts(test, o_test, tester, it);
|
||||
continue;
|
||||
}
|
||||
test->set_in_conflict_flag(2); // test is on the boundary.
|
||||
test->tds_data().mark_on_boundary(); // test is on the boundary.
|
||||
}
|
||||
*it.first++ = Facet(c, i);
|
||||
for (int j = 0 ; j<4 ; j++){
|
||||
|
|
|
|||
|
|
@ -52,14 +52,14 @@ public:
|
|||
typedef typename TDS::Cell_handle Cell_handle;
|
||||
typedef typename TDS::Vertex Vertex;
|
||||
typedef typename TDS::Cell Cell;
|
||||
typedef typename TDS::Cell_data TDS_data;
|
||||
|
||||
template <typename TDS2>
|
||||
struct Rebind_TDS {
|
||||
typedef Periodic_3_triangulation_ds_cell_base_3<TDS2> Other;
|
||||
};
|
||||
|
||||
Periodic_3_triangulation_ds_cell_base_3() : _in_conflict_flag(0),
|
||||
_additional_flag(0), off(0) {
|
||||
Periodic_3_triangulation_ds_cell_base_3() : _additional_flag(0), off(0) {
|
||||
set_vertices();
|
||||
set_neighbors();
|
||||
}
|
||||
|
|
@ -67,7 +67,7 @@ public:
|
|||
Periodic_3_triangulation_ds_cell_base_3(
|
||||
const Vertex_handle& v0, const Vertex_handle& v1,
|
||||
const Vertex_handle& v2, const Vertex_handle& v3) :
|
||||
_in_conflict_flag(0), _additional_flag(0), off(0) {
|
||||
_additional_flag(0), off(0) {
|
||||
set_vertices(v0, v1, v2, v3);
|
||||
set_neighbors();
|
||||
}
|
||||
|
|
@ -77,7 +77,7 @@ public:
|
|||
const Vertex_handle& v2, const Vertex_handle& v3,
|
||||
const Cell_handle& n0, const Cell_handle& n1,
|
||||
const Cell_handle& n2, const Cell_handle& n3) :
|
||||
_in_conflict_flag(0), _additional_flag(0), off(0) {
|
||||
_additional_flag(0), off(0) {
|
||||
set_vertices(v0, v1, v2, v3);
|
||||
set_neighbors(n0, n1, n2, n3);
|
||||
}
|
||||
|
|
@ -249,15 +249,9 @@ public:
|
|||
void * for_compact_container() const { return N[0].for_compact_container(); }
|
||||
void * & for_compact_container() { return N[0].for_compact_container(); }
|
||||
|
||||
// Conflict flag access functions.
|
||||
// This should become a property map or something at some point.
|
||||
void set_in_conflict_flag(unsigned char f) {
|
||||
CGAL_triangulation_assertion(f < 4);
|
||||
_in_conflict_flag = f;
|
||||
}
|
||||
unsigned char get_in_conflict_flag() const {
|
||||
return _in_conflict_flag;
|
||||
}
|
||||
// TDS internal data access functions.
|
||||
TDS_data& tds_data() { return _tds_data; }
|
||||
const TDS_data& tds_data() const { return _tds_data; }
|
||||
|
||||
// TODO: Get rid of this flag! Used in convert_to_1_cover.
|
||||
// Either use the conflict flag or a std::map.
|
||||
|
|
@ -272,7 +266,7 @@ public:
|
|||
private:
|
||||
Cell_handle N[4];
|
||||
Vertex_handle V[4];
|
||||
unsigned char _in_conflict_flag:2;
|
||||
TDS_data _tds_data;
|
||||
unsigned char _additional_flag:2;
|
||||
// 3 respective bits are the offset in x,y and z
|
||||
// right to left: bit[0]-bit[2]: vertex(0),
|
||||
|
|
|
|||
Loading…
Reference in New Issue