rename make_canonical() to make_canonical_oriented_triple()

to make it more explicit
This commit is contained in:
Jane Tournois 2020-06-18 13:48:28 +02:00
parent f55ffabbe0
commit daaf92d0ac
1 changed files with 23 additions and 23 deletions

View File

@ -1646,7 +1646,7 @@ private:
Vertex_handle>::type Vertex_handle_unique_hash_map; Vertex_handle>::type Vertex_handle_unique_hash_map;
Vertex_triple make_vertex_triple(const Facet& f) const; Vertex_triple make_vertex_triple(const Facet& f) const;
void make_canonical(Vertex_triple& t) const; void make_canonical_oriented_triple(Vertex_triple& t) const;
template < class VertexRemover > template < class VertexRemover >
VertexRemover& make_hole_2D(Vertex_handle v, std::list<Edge_2D>& hole, VertexRemover& make_hole_2D(Vertex_handle v, std::list<Edge_2D>& hole,
@ -4215,7 +4215,7 @@ make_vertex_triple(const Facet& f) const
template < class Gt, class Tds, class Lds > template < class Gt, class Tds, class Lds >
void void
Triangulation_3<Gt,Tds,Lds>:: Triangulation_3<Gt,Tds,Lds>::
make_canonical(Vertex_triple& t) const make_canonical_oriented_triple(Vertex_triple& t) const
{ {
int i = (t.first < t.second) ? 0 : 1; int i = (t.first < t.second) ? 0 : 1;
if(i==0) if(i==0)
@ -4770,7 +4770,7 @@ make_hole_3D(Vertex_handle v,
Cell_handle opp_cit = (*cit)->neighbor(indv); Cell_handle opp_cit = (*cit)->neighbor(indv);
Facet f(opp_cit, opp_cit->index(*cit)); Facet f(opp_cit, opp_cit->index(*cit));
Vertex_triple vt = make_vertex_triple(f); Vertex_triple vt = make_vertex_triple(f);
make_canonical(vt); make_canonical_oriented_triple(vt);
outer_map[vt] = f; outer_map[vt] = f;
for(int i=0; i<4; i++) for(int i=0; i<4; i++)
{ {
@ -4797,7 +4797,7 @@ make_hole_3D(Vertex_handle v,
Cell_handle opp_cit = (*cit)->neighbor(indv); Cell_handle opp_cit = (*cit)->neighbor(indv);
Facet f(opp_cit, opp_cit->index(*cit)); Facet f(opp_cit, opp_cit->index(*cit));
Vertex_triple vt = make_vertex_triple(f); Vertex_triple vt = make_vertex_triple(f);
make_canonical(vt); make_canonical_oriented_triple(vt);
outer_map[vt] = f; outer_map[vt] = f;
for(int i=0; i<4; i++) for(int i=0; i<4; i++)
{ {
@ -4985,7 +4985,7 @@ remove_3D(Vertex_handle v, VertexRemover& remover)
Facet f = std::pair<Cell_handle,int>(it,i); Facet f = std::pair<Cell_handle,int>(it,i);
Vertex_triple vt_aux = make_vertex_triple(f); Vertex_triple vt_aux = make_vertex_triple(f);
Vertex_triple vt(vmap[vt_aux.first], vmap[vt_aux.third], vmap[vt_aux.second]); Vertex_triple vt(vmap[vt_aux.first], vmap[vt_aux.third], vmap[vt_aux.second]);
make_canonical(vt); make_canonical_oriented_triple(vt);
inner_map[vt]= f; inner_map[vt]= f;
} }
} }
@ -5000,7 +5000,7 @@ remove_3D(Vertex_handle v, VertexRemover& remover)
Facet f = std::pair<Cell_handle,int>(it,i); Facet f = std::pair<Cell_handle,int>(it,i);
Vertex_triple vt_aux = make_vertex_triple(f); Vertex_triple vt_aux = make_vertex_triple(f);
Vertex_triple vt(vmap[vt_aux.first], vmap[vt_aux.third], vmap[vt_aux.second]); Vertex_triple vt(vmap[vt_aux.first], vmap[vt_aux.third], vmap[vt_aux.second]);
make_canonical(vt); make_canonical_oriented_triple(vt);
inner_map[vt]= f; inner_map[vt]= f;
} }
} }
@ -5043,7 +5043,7 @@ remove_3D(Vertex_handle v, VertexRemover& remover)
{ {
Facet f = std::pair<Cell_handle,int>(new_ch,i); Facet f = std::pair<Cell_handle,int>(new_ch,i);
Vertex_triple vt = make_vertex_triple(f); Vertex_triple vt = make_vertex_triple(f);
make_canonical(vt); make_canonical_oriented_triple(vt);
std::swap(vt.second,vt.third); std::swap(vt.second,vt.third);
typename Vertex_triple_Facet_map::iterator oit2 = outer_map.find(vt); typename Vertex_triple_Facet_map::iterator oit2 = outer_map.find(vt);
@ -5181,7 +5181,7 @@ remove_3D(Vertex_handle v, VertexRemover& remover,
Facet f = std::pair<Cell_handle,int>(it,i); Facet f = std::pair<Cell_handle,int>(it,i);
Vertex_triple vt_aux = make_vertex_triple(f); Vertex_triple vt_aux = make_vertex_triple(f);
Vertex_triple vt(vmap[vt_aux.first],vmap[vt_aux.third],vmap[vt_aux.second]); Vertex_triple vt(vmap[vt_aux.first],vmap[vt_aux.third],vmap[vt_aux.second]);
make_canonical(vt); make_canonical_oriented_triple(vt);
inner_map[vt]= f; inner_map[vt]= f;
} }
} }
@ -5196,7 +5196,7 @@ remove_3D(Vertex_handle v, VertexRemover& remover,
Facet f = std::pair<Cell_handle,int>(it,i); Facet f = std::pair<Cell_handle,int>(it,i);
Vertex_triple vt_aux = make_vertex_triple(f); Vertex_triple vt_aux = make_vertex_triple(f);
Vertex_triple vt(vmap[vt_aux.first],vmap[vt_aux.third],vmap[vt_aux.second]); Vertex_triple vt(vmap[vt_aux.first],vmap[vt_aux.third],vmap[vt_aux.second]);
make_canonical(vt); make_canonical_oriented_triple(vt);
inner_map[vt]= f; inner_map[vt]= f;
} }
} }
@ -5241,7 +5241,7 @@ remove_3D(Vertex_handle v, VertexRemover& remover,
{ {
Facet f = std::pair<Cell_handle,int>(new_ch,i); Facet f = std::pair<Cell_handle,int>(new_ch,i);
Vertex_triple vt = make_vertex_triple(f); Vertex_triple vt = make_vertex_triple(f);
make_canonical(vt); make_canonical_oriented_triple(vt);
std::swap(vt.second,vt.third); std::swap(vt.second,vt.third);
typename Vertex_triple_Facet_map::iterator oit2 = outer_map.find(vt); typename Vertex_triple_Facet_map::iterator oit2 = outer_map.find(vt);
@ -5485,7 +5485,7 @@ remove_3D(Vertex_handle v, VertexRemover& remover, OutputItCells fit)
Facet f = std::pair<Cell_handle,int>(it,i); Facet f = std::pair<Cell_handle,int>(it,i);
Vertex_triple vt_aux = make_vertex_triple(f); Vertex_triple vt_aux = make_vertex_triple(f);
Vertex_triple vt(vmap[vt_aux.first], vmap[vt_aux.third], vmap[vt_aux.second]); Vertex_triple vt(vmap[vt_aux.first], vmap[vt_aux.third], vmap[vt_aux.second]);
make_canonical(vt); make_canonical_oriented_triple(vt);
inner_map[vt] = f; inner_map[vt] = f;
} }
} }
@ -5499,7 +5499,7 @@ remove_3D(Vertex_handle v, VertexRemover& remover, OutputItCells fit)
Facet f = std::pair<Cell_handle,int>(it,i); Facet f = std::pair<Cell_handle,int>(it,i);
Vertex_triple vt_aux = make_vertex_triple(f); Vertex_triple vt_aux = make_vertex_triple(f);
Vertex_triple vt(vmap[vt_aux.first], vmap[vt_aux.third], vmap[vt_aux.second]); Vertex_triple vt(vmap[vt_aux.first], vmap[vt_aux.third], vmap[vt_aux.second]);
make_canonical(vt); make_canonical_oriented_triple(vt);
inner_map[vt] = f; inner_map[vt] = f;
} }
} }
@ -5546,7 +5546,7 @@ remove_3D(Vertex_handle v, VertexRemover& remover, OutputItCells fit)
{ {
Facet f = std::pair<Cell_handle,int>(new_ch,i); Facet f = std::pair<Cell_handle,int>(new_ch,i);
Vertex_triple vt = make_vertex_triple(f); Vertex_triple vt = make_vertex_triple(f);
make_canonical(vt); make_canonical_oriented_triple(vt);
std::swap(vt.second, vt.third); std::swap(vt.second, vt.third);
typename Vertex_triple_Facet_map::iterator oit2 = outer_map.find(vt); typename Vertex_triple_Facet_map::iterator oit2 = outer_map.find(vt);
if(oit2 == outer_map.end()) if(oit2 == outer_map.end())
@ -5873,7 +5873,7 @@ move_if_no_collision(Vertex_handle v, const Point& p,
Facet f = std::pair<Cell_handle,int>(it,i); Facet f = std::pair<Cell_handle,int>(it,i);
Vertex_triple vt_aux = make_vertex_triple(f); Vertex_triple vt_aux = make_vertex_triple(f);
Vertex_triple vt(vmap[vt_aux.first],vmap[vt_aux.third],vmap[vt_aux.second]); Vertex_triple vt(vmap[vt_aux.first],vmap[vt_aux.third],vmap[vt_aux.second]);
make_canonical(vt); make_canonical_oriented_triple(vt);
inner_map[vt]= f; inner_map[vt]= f;
} }
} }
@ -5888,7 +5888,7 @@ move_if_no_collision(Vertex_handle v, const Point& p,
Facet f = std::pair<Cell_handle,int>(it,i); Facet f = std::pair<Cell_handle,int>(it,i);
Vertex_triple vt_aux = make_vertex_triple(f); Vertex_triple vt_aux = make_vertex_triple(f);
Vertex_triple vt(vmap[vt_aux.first],vmap[vt_aux.third],vmap[vt_aux.second]); Vertex_triple vt(vmap[vt_aux.first],vmap[vt_aux.third],vmap[vt_aux.second]);
make_canonical(vt); make_canonical_oriented_triple(vt);
inner_map[vt]= f; inner_map[vt]= f;
} }
} }
@ -5934,7 +5934,7 @@ move_if_no_collision(Vertex_handle v, const Point& p,
{ {
Facet f = std::pair<Cell_handle,int>(new_ch,i); Facet f = std::pair<Cell_handle,int>(new_ch,i);
Vertex_triple vt = make_vertex_triple(f); Vertex_triple vt = make_vertex_triple(f);
make_canonical(vt); make_canonical_oriented_triple(vt);
std::swap(vt.second,vt.third); std::swap(vt.second,vt.third);
typename Vertex_triple_Facet_map::iterator oit2 = outer_map.find(vt); typename Vertex_triple_Facet_map::iterator oit2 = outer_map.find(vt);
if(oit2 == outer_map.end()) if(oit2 == outer_map.end())
@ -6325,7 +6325,7 @@ move_if_no_collision_and_give_new_cells(Vertex_handle v, const Point& p,
Facet f = std::pair<Cell_handle,int>(it,i); Facet f = std::pair<Cell_handle,int>(it,i);
Vertex_triple vt_aux = make_vertex_triple(f); Vertex_triple vt_aux = make_vertex_triple(f);
Vertex_triple vt(vmap[vt_aux.first], vmap[vt_aux.third], vmap[vt_aux.second]); Vertex_triple vt(vmap[vt_aux.first], vmap[vt_aux.third], vmap[vt_aux.second]);
make_canonical(vt); make_canonical_oriented_triple(vt);
inner_map[vt]= f; inner_map[vt]= f;
} }
} }
@ -6340,7 +6340,7 @@ move_if_no_collision_and_give_new_cells(Vertex_handle v, const Point& p,
Facet f = std::pair<Cell_handle,int>(it,i); Facet f = std::pair<Cell_handle,int>(it,i);
Vertex_triple vt_aux = make_vertex_triple(f); Vertex_triple vt_aux = make_vertex_triple(f);
Vertex_triple vt(vmap[vt_aux.first], vmap[vt_aux.third], vmap[vt_aux.second]); Vertex_triple vt(vmap[vt_aux.first], vmap[vt_aux.third], vmap[vt_aux.second]);
make_canonical(vt); make_canonical_oriented_triple(vt);
inner_map[vt]= f; inner_map[vt]= f;
} }
} }
@ -6387,7 +6387,7 @@ move_if_no_collision_and_give_new_cells(Vertex_handle v, const Point& p,
{ {
Facet f = std::pair<Cell_handle, int>(new_ch, i); Facet f = std::pair<Cell_handle, int>(new_ch, i);
Vertex_triple vt = make_vertex_triple(f); Vertex_triple vt = make_vertex_triple(f);
make_canonical(vt); make_canonical_oriented_triple(vt);
std::swap(vt.second,vt.third); std::swap(vt.second,vt.third);
typename Vertex_triple_Facet_map::iterator oit2 = outer_map.find(vt); typename Vertex_triple_Facet_map::iterator oit2 = outer_map.find(vt);
if(oit2 == outer_map.end()) if(oit2 == outer_map.end())
@ -6519,7 +6519,7 @@ _make_big_hole_3D(Vertex_handle v,
Facet f(opp_cit, opp_i); Facet f(opp_cit, opp_i);
Vertex_triple vt = make_vertex_triple(f); Vertex_triple vt = make_vertex_triple(f);
make_canonical(vt); make_canonical_oriented_triple(vt);
outer_map[vt] = f; outer_map[vt] = f;
v1->set_cell(opp_cit); v1->set_cell(opp_cit);
v2->set_cell(opp_cit); v2->set_cell(opp_cit);
@ -6664,7 +6664,7 @@ _remove_cluster_3D(InputIterator first, InputIterator beyond, VertexRemover& rem
Facet f = std::pair<Cell_handle,int>(it,index); Facet f = std::pair<Cell_handle,int>(it,index);
Vertex_triple vt_aux = this->make_vertex_triple(f); Vertex_triple vt_aux = this->make_vertex_triple(f);
Vertex_triple vt(vmap[vt_aux.first], vmap[vt_aux.third], vmap[vt_aux.second]); Vertex_triple vt(vmap[vt_aux.first], vmap[vt_aux.third], vmap[vt_aux.second]);
this->make_canonical(vt); this->make_canonical_oriented_triple(vt);
inner_map[vt]= f; inner_map[vt]= f;
} }
} }
@ -6679,7 +6679,7 @@ _remove_cluster_3D(InputIterator first, InputIterator beyond, VertexRemover& rem
Facet f = std::pair<Cell_handle,int>(it,index); Facet f = std::pair<Cell_handle,int>(it,index);
Vertex_triple vt_aux = this->make_vertex_triple(f); Vertex_triple vt_aux = this->make_vertex_triple(f);
Vertex_triple vt(vmap[vt_aux.first], vmap[vt_aux.third], vmap[vt_aux.second]); Vertex_triple vt(vmap[vt_aux.first], vmap[vt_aux.third], vmap[vt_aux.second]);
this->make_canonical(vt); this->make_canonical_oriented_triple(vt);
inner_map[vt]= f; inner_map[vt]= f;
} }
} }
@ -6728,7 +6728,7 @@ _remove_cluster_3D(InputIterator first, InputIterator beyond, VertexRemover& rem
{ {
Facet f = std::pair<Cell_handle,int>(new_ch,index); Facet f = std::pair<Cell_handle,int>(new_ch,index);
Vertex_triple vt = this->make_vertex_triple(f); Vertex_triple vt = this->make_vertex_triple(f);
this->make_canonical(vt); this->make_canonical_oriented_triple(vt);
std::swap(vt.second,vt.third); std::swap(vt.second,vt.third);
typename Vertex_triple_Facet_map::iterator oit2 = outer_map.find(vt); typename Vertex_triple_Facet_map::iterator oit2 = outer_map.find(vt);
if(oit2 == outer_map.end()) if(oit2 == outer_map.end())