mirror of https://github.com/CGAL/cgal
Small optimizations
This commit is contained in:
parent
09f7843b75
commit
8cad9164ad
|
|
@ -1088,10 +1088,12 @@ remove(Vertex_handle v)
|
|||
|
||||
if (!is_1_cover()) {
|
||||
CGAL_assertion(this->virtual_vertices_reverse().find(v) != this->virtual_vertices_reverse().end());
|
||||
|
||||
const std::vector<Vertex_handle> &virtual_copies = this->virtual_vertices_reverse().find(v)->second;
|
||||
for (size_t i=0; i<8; ++i) {
|
||||
remove_single_vertex(virtual_copies[i], Offset((i+1)/3, (i+1)%3));
|
||||
}
|
||||
|
||||
this->remove_from_virtual_copies(v);
|
||||
}
|
||||
}
|
||||
|
|
@ -1138,7 +1140,7 @@ remove_degree_init(Vertex_handle v, const Offset &v_o,
|
|||
i[d] = f[d]->index(v);
|
||||
w[d] = f[d]->vertex( ccw(i[d]) );
|
||||
offset_w[d] = get_offset(f[d], ccw(i[d])) - get_offset(f[d], i[d]) + v_o;
|
||||
w[d]->set_face( f[d]->neighbor(i[d]));//do no longer bother about set_face
|
||||
w[d]->set_face( f[d]->neighbor(i[d])); // do no longer bother about set_face
|
||||
|
||||
bbox = bbox + this->construct_point(w[d]->point(), offset_w[d]).bbox();
|
||||
|
||||
|
|
|
|||
|
|
@ -2049,13 +2049,14 @@ void Periodic_2_triangulation_2<Gt, Tds>::flip_single_edge(Face_handle f, int i)
|
|||
template<class Gt, class Tds>
|
||||
void
|
||||
Periodic_2_triangulation_2<Gt, Tds>::remove_from_virtual_copies(Vertex_handle v) {
|
||||
CGAL_assertion(_virtual_vertices_reverse.find(v) != _virtual_vertices_reverse.end());
|
||||
typename Virtual_vertex_reverse_map::iterator rev_it = _virtual_vertices_reverse.find(v);
|
||||
CGAL_triangulation_assertion(rev_it != _virtual_vertices_reverse.end());
|
||||
|
||||
const std::vector<Vertex_handle> &virtual_copies = _virtual_vertices_reverse.find(v)->second;
|
||||
const std::vector<Vertex_handle> &virtual_copies = rev_it->second;
|
||||
for (size_t i=0; i<virtual_copies.size(); ++i) {
|
||||
_virtual_vertices.erase(virtual_copies[i]);
|
||||
}
|
||||
_virtual_vertices_reverse.erase(v);
|
||||
_virtual_vertices_reverse.erase(rev_it);
|
||||
}
|
||||
|
||||
template<class Gt, class Tds>
|
||||
|
|
@ -4156,6 +4157,9 @@ void Periodic_2_triangulation_2<Gt, Tds>::insert_too_long_edge(Face_handle f,
|
|||
template<class Gt, class Tds>
|
||||
void Periodic_2_triangulation_2<Gt, Tds>::remove_too_long_edges_in_star(
|
||||
Vertex_handle vh) {
|
||||
if (is_1_cover())
|
||||
return;
|
||||
|
||||
// Insert the too long edges in the star of vh
|
||||
Face_handle f = vh->face();
|
||||
Face_handle f_start = f;
|
||||
|
|
|
|||
Loading…
Reference in New Issue