mirror of https://github.com/CGAL/cgal
- fixes for g++ 3.4.
This commit is contained in:
parent
f7b9e787f0
commit
2abaf86e24
|
|
@ -1,7 +1,10 @@
|
|||
Package triangulation: provides triangulations Delaunay triangulations,
|
||||
constrained and regular triangulations with tests and examples.
|
||||
|
||||
ver 7.64 (08/03/03)
|
||||
ver 7.65 (12/04/03)
|
||||
- fixes for g++ 3.4.
|
||||
|
||||
ver 7.64 (08/04/03)
|
||||
- fixed missing test files
|
||||
- fixed missing typename
|
||||
- there is still a bug in test_regular_hierarchy on Sun only
|
||||
|
|
|
|||
|
|
@ -191,12 +191,12 @@ public:
|
|||
Locate_type lt;
|
||||
Face_handle fh = locate(p,lt,li, start);
|
||||
switch(lt) {
|
||||
case OUTSIDE_AFFINE_HULL:
|
||||
case VERTEX:
|
||||
case Ctr::OUTSIDE_AFFINE_HULL:
|
||||
case Ctr::VERTEX:
|
||||
return false;
|
||||
case FACE:
|
||||
case EDGE:
|
||||
case OUTSIDE_CONVEX_HULL:
|
||||
case Ctr::FACE:
|
||||
case Ctr::EDGE:
|
||||
case Ctr::OUTSIDE_CONVEX_HULL:
|
||||
*fit++ = fh; //put fh in Out_it1
|
||||
propagate_conflicts(p,fh,0,fit,eit);
|
||||
propagate_conflicts(p,fh,1,fit,eit);
|
||||
|
|
@ -271,7 +271,7 @@ flip(Face_handle& f, int i)
|
|||
// of triangulation to work on constrained Delaunay triangulation
|
||||
//CGAL_triangulation_precondition(is_flipable(f,i));
|
||||
Face_handle g = f->neighbor(i);
|
||||
_tds.flip( &(*f), i);
|
||||
this->_tds.flip( &(*f), i);
|
||||
int ig=g->index(f->vertex(i));
|
||||
// set constraints to new triangles
|
||||
Face_handle nfi=f->neighbor(i);
|
||||
|
|
@ -569,7 +569,7 @@ void
|
|||
Constrained_Delaunay_triangulation_2<Gt,Tds,Itag>::
|
||||
remove_2D(Vertex_handle v)
|
||||
{
|
||||
if (test_dim_down(v)) { _tds.remove_dim_down(&(*v)); }
|
||||
if (test_dim_down(v)) { this->_tds.remove_dim_down(v); }
|
||||
else {
|
||||
std::list<Edge> hole;
|
||||
make_hole(v, hole);
|
||||
|
|
|
|||
|
|
@ -96,7 +96,7 @@ public:
|
|||
for( ;lcit != lc.end(); lcit++) {
|
||||
insert( (*lcit).first, (*lcit).second);
|
||||
}
|
||||
CGAL_triangulation_postcondition( is_valid() );
|
||||
CGAL_triangulation_postcondition( this->is_valid() );
|
||||
}
|
||||
|
||||
template<class InputIterator>
|
||||
|
|
@ -108,7 +108,7 @@ public:
|
|||
for ( ; it != last; it++) {
|
||||
insert_constraint((*it).first, (*it).second);
|
||||
}
|
||||
CGAL_triangulation_postcondition( is_valid() );
|
||||
CGAL_triangulation_postcondition( this->is_valid() );
|
||||
}
|
||||
|
||||
//TODO Is that destructor correct ?
|
||||
|
|
@ -346,7 +346,7 @@ insert(const Point& a, Locate_type lt, Face_handle loc, int li)
|
|||
Vertex_handle v1, v2;
|
||||
bool insert_in_constrained_edge = false;
|
||||
|
||||
if ( lt == EDGE && loc->is_constrained(li) ){
|
||||
if ( lt == Triangulation::EDGE && loc->is_constrained(li) ){
|
||||
insert_in_constrained_edge = true;
|
||||
v1=loc->vertex(ccw(li)); //endpoint of the constraint
|
||||
v2=loc->vertex(cw(li)); // endpoint of the constraint
|
||||
|
|
@ -354,7 +354,7 @@ insert(const Point& a, Locate_type lt, Face_handle loc, int li)
|
|||
|
||||
va = Triangulation::insert(a,lt,loc,li);
|
||||
if (insert_in_constrained_edge) update_constraints_incident(va, v1,v2);
|
||||
else if(lt != VERTEX) clear_constraints_incident(va);
|
||||
else if(lt != Triangulation::VERTEX) clear_constraints_incident(va);
|
||||
if (dimension() == 2) update_constraints_opposite(va);
|
||||
return va;
|
||||
}
|
||||
|
|
@ -373,7 +373,7 @@ insert(const Point& a, Locate_type lt, Face_handle loc, int li)
|
|||
// c2 = f->vertex(ccw(i)); //endpoint of edge
|
||||
// bool insert_in_constrained_edge = f->is_constrained(i);
|
||||
|
||||
// va = _tds.insert_in_edge(f, i);
|
||||
// va = this->_tds.insert_in_edge(f, i);
|
||||
// va->set_point(a);
|
||||
|
||||
// if (insert_in_constrained_edge) update_constraints_incident(va, c1,c2);
|
||||
|
|
@ -593,7 +593,7 @@ intersect(Face_handle f, int i,
|
|||
Itag itag = Itag();
|
||||
bool ok = intersection(geom_traits(), pa, pb, pc, pd, pi, itag );
|
||||
CGAL_triangulation_assertion(ok);
|
||||
Vertex_handle vi = virtual_insert(pi, EDGE, f, i);
|
||||
Vertex_handle vi = virtual_insert(pi, Triangulation::EDGE, f, i);
|
||||
return vi;
|
||||
}
|
||||
|
||||
|
|
@ -869,7 +869,7 @@ void
|
|||
Constrained_triangulation_2<Gt,Tds,Itag>::
|
||||
remove_2D(Vertex_handle v)
|
||||
{
|
||||
if (test_dim_down(v)) {_tds.remove_dim_down(&(*v));}
|
||||
if (test_dim_down(v)) { this->_tds.remove_dim_down(v);}
|
||||
else {
|
||||
List_edges hole;
|
||||
make_hole(v, hole);
|
||||
|
|
@ -1030,8 +1030,8 @@ file_output(std::ostream& os) const
|
|||
Triangulation_2<Gt, Tds>::file_output(os);
|
||||
|
||||
// write constrained status
|
||||
typename Tds::Iterator_base ib = _tds.iterator_base_begin();
|
||||
for( ; ib != _tds.iterator_base_end(); ++ib) {
|
||||
typename Tds::Iterator_base ib = this->_tds.iterator_base_begin();
|
||||
for( ; ib != this->_tds.iterator_base_end(); ++ib) {
|
||||
for(int j = 0; j < 3; ++j){
|
||||
if (ib->is_constrained(j)) { os << "C";}
|
||||
else { os << "N";}
|
||||
|
|
|
|||
|
|
@ -96,7 +96,7 @@ public:
|
|||
for( ;lcit != lc.end(); lcit++) {
|
||||
insert_constraint( (*lcit).first, (*lcit).second);
|
||||
}
|
||||
CGAL_triangulation_postcondition( is_valid() );
|
||||
CGAL_triangulation_postcondition( this->is_valid() );
|
||||
}
|
||||
|
||||
template<class InputIterator>
|
||||
|
|
@ -109,7 +109,7 @@ public:
|
|||
insert_constraint((*first).first, (*first).second);
|
||||
++first;
|
||||
}
|
||||
CGAL_triangulation_postcondition( is_valid() );
|
||||
CGAL_triangulation_postcondition( this->is_valid() );
|
||||
}
|
||||
|
||||
//Helping
|
||||
|
|
@ -268,7 +268,7 @@ insert(const Point& a, Locate_type lt, Face_handle loc, int li)
|
|||
Vertex_handle v1, v2;
|
||||
bool insert_in_constrained_edge = false;
|
||||
|
||||
if ( lt == EDGE && loc->is_constrained(li) ){
|
||||
if ( lt == Triangulation::EDGE && loc->is_constrained(li) ){
|
||||
insert_in_constrained_edge = true;
|
||||
v1=loc->vertex(ccw(li)); //endpoint of the constraint
|
||||
v2=loc->vertex(cw(li)); // endpoint of the constraint
|
||||
|
|
@ -416,7 +416,7 @@ intersect(Face_handle f, int i,
|
|||
bool ok = intersection(geom_traits(), pa, pb, pc, pd, pi, itag );
|
||||
CGAL_triangulation_assertion(ok);
|
||||
|
||||
Vertex_handle vi = insert(pi, EDGE, f, i);
|
||||
Vertex_handle vi = insert(pi, Triangulation::EDGE, f, i);
|
||||
return vi;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -580,7 +580,7 @@ typename Constraint_hierarchy_2<T,Data>::H_edge
|
|||
Constraint_hierarchy_2<T,Data>::
|
||||
make_edge(T va, T vb) const
|
||||
{
|
||||
Constraint_hierarchy_2<T,Data>::H_edge he;
|
||||
H_edge he;
|
||||
if(va<vb)
|
||||
{ he.first = va; he.second = vb; }
|
||||
else
|
||||
|
|
|
|||
|
|
@ -168,12 +168,12 @@ public:
|
|||
Locate_type lt;
|
||||
Face_handle fh = locate(p,lt,li, start);
|
||||
switch(lt) {
|
||||
case OUTSIDE_AFFINE_HULL:
|
||||
case VERTEX:
|
||||
case Triangulation::OUTSIDE_AFFINE_HULL:
|
||||
case Triangulation::VERTEX:
|
||||
return false;
|
||||
case FACE:
|
||||
case EDGE:
|
||||
case OUTSIDE_CONVEX_HULL:
|
||||
case Triangulation::FACE:
|
||||
case Triangulation::EDGE:
|
||||
case Triangulation::OUTSIDE_CONVEX_HULL:
|
||||
*fit++ = fh; //put fh in Out_it1
|
||||
propagate_conflicts(p,fh,0,fit,eit);
|
||||
propagate_conflicts(p,fh,1,fit,eit);
|
||||
|
|
@ -517,7 +517,7 @@ void
|
|||
Delaunay_triangulation_2<Gt,Tds>::
|
||||
remove_2D(Vertex_handle v)
|
||||
{
|
||||
if (test_dim_down(v)) { _tds.remove_dim_down(&(*v)); }
|
||||
if (test_dim_down(v)) { this->_tds.remove_dim_down(v); }
|
||||
else {
|
||||
std::list<Edge> hole;
|
||||
make_hole(v, hole);
|
||||
|
|
|
|||
|
|
@ -51,6 +51,7 @@ public:
|
|||
typedef typename Base::Vertex Vertex;
|
||||
typedef typename Base::Edge Edge;
|
||||
typedef typename Base::Locate_type Locate_type;
|
||||
typedef typename Base::Vertex_circulator Vertex_circulator;
|
||||
typedef typename Base::Face_circulator Face_circulator;
|
||||
typedef typename Base::Edge_circulator Edge_circulator;
|
||||
typedef typename Base::Finite_edges_iterator Finite_edges_iterator;
|
||||
|
|
@ -254,12 +255,12 @@ copy_triangulation(const Self &tr )
|
|||
// not good
|
||||
// clear them and next
|
||||
// scan the hidden vertices to retablish the list in faces
|
||||
typename Tds::Iterator_base baseit=_tds.iterator_base_begin();
|
||||
for( ; baseit != _tds.iterator_base_end(); baseit++){
|
||||
typename Tds::Iterator_base baseit = this->_tds.iterator_base_begin();
|
||||
for( ; baseit != this->_tds.iterator_base_end(); ++baseit){
|
||||
baseit->vertex_list().clear();
|
||||
}
|
||||
Hidden_vertices_iterator hvit = hidden_vertices_begin();
|
||||
for( ; hvit != hidden_vertices_end() ; hvit++){
|
||||
for( ; hvit != hidden_vertices_end() ; ++hvit){
|
||||
hvit->face()->vertex_list().push_back(&(*hvit));
|
||||
}
|
||||
CGAL_triangulation_postcondition(is_valid());
|
||||
|
|
@ -395,9 +396,9 @@ is_valid_vertex(Vertex_handle vh) const
|
|||
result = result && (!is_infinite(vh->face()));
|
||||
Face_handle loc = locate(vh->point(), lt, li, vh->face());
|
||||
result = result && (loc == vh->face() ||
|
||||
(lt == VERTEX &&
|
||||
(lt == Base::VERTEX &&
|
||||
vh->face()->has_vertex(loc->vertex(li))) ||
|
||||
(lt == EDGE && vh->face() ==
|
||||
(lt == Base::EDGE && vh->face() ==
|
||||
loc->neighbor(li)) );
|
||||
if ( !result) {
|
||||
std::cerr << vh->point() << " " << std::endl;
|
||||
|
|
@ -721,14 +722,14 @@ insert(const Weighted_point &p, Locate_type lt, Face_handle loc, int li)
|
|||
Vertex_handle v(NULL);
|
||||
Oriented_side os;
|
||||
switch (lt) {
|
||||
case VERTEX:
|
||||
case Base::VERTEX:
|
||||
if (power_test(loc->vertex(li)->point(), p) != ON_POSITIVE_SIDE)
|
||||
return hide_new_vertex(loc,p);
|
||||
hide_new_vertex(loc, loc->vertex(li)->point());
|
||||
loc->vertex(li)->set_point(p);
|
||||
v = loc->vertex(li);
|
||||
break;
|
||||
case EDGE:
|
||||
case Base::EDGE:
|
||||
os = dimension() == 1 ? power_test(loc,li,p) :
|
||||
power_test(loc,p);
|
||||
if (os == ON_NEGATIVE_SIDE) { //hide preferably in finite face
|
||||
|
|
@ -737,15 +738,15 @@ insert(const Weighted_point &p, Locate_type lt, Face_handle loc, int li)
|
|||
}
|
||||
v = insert_in_edge(p,loc,li);
|
||||
break;
|
||||
case FACE:
|
||||
case Base::FACE:
|
||||
if (power_test(loc,p) == ON_NEGATIVE_SIDE)
|
||||
return hide_new_vertex(loc,p);
|
||||
v = insert_in_face(p,loc);
|
||||
break;
|
||||
case OUTSIDE_CONVEX_HULL:
|
||||
case Base::OUTSIDE_CONVEX_HULL:
|
||||
v = insert_outside_convex_hull(p,loc);
|
||||
break;
|
||||
case OUTSIDE_AFFINE_HULL:
|
||||
case Base::OUTSIDE_AFFINE_HULL:
|
||||
v = insert_outside_affine_hull(p);
|
||||
//clear vertex list of infinite faces which have been copied
|
||||
for ( All_faces_iterator afi = all_faces_begin();
|
||||
|
|
@ -781,7 +782,7 @@ reinsert(Vertex_handle v, Face_handle start)
|
|||
Vertex_handle vh = insert(v->point(), start);
|
||||
if(vh->is_hidden()) exchange_hidden(v,vh);
|
||||
else exchange_incidences(v,vh);
|
||||
_tds.delete_vertex(vh);
|
||||
this->_tds.delete_vertex(vh);
|
||||
return v;
|
||||
}
|
||||
|
||||
|
|
@ -1004,7 +1005,7 @@ void
|
|||
Regular_triangulation_2<Gt,Tds>::
|
||||
remove_2D(Vertex_handle v)
|
||||
{
|
||||
if (test_dim_down(v)) { _tds.remove_dim_down(&(*v)); }
|
||||
if (test_dim_down(v)) { this->_tds.remove_dim_down(v); }
|
||||
else {
|
||||
std::list<Edge> hole;
|
||||
make_hole(v, hole);
|
||||
|
|
@ -1367,7 +1368,7 @@ void
|
|||
Regular_triangulation_2<Gt,Tds>::
|
||||
hide_remove_degree_3(Face_handle fh, Vertex_handle vh)
|
||||
{
|
||||
Vertex_handle vnew= _tds.create_vertex();
|
||||
Vertex_handle vnew= this->_tds.create_vertex();
|
||||
exchange_incidences(vnew,vh);
|
||||
remove_degree_3(vnew, fh);
|
||||
hide_vertex(fh,vh);
|
||||
|
|
@ -1379,7 +1380,7 @@ typename Regular_triangulation_2<Gt,Tds>::Vertex_handle
|
|||
Regular_triangulation_2<Gt,Tds>::
|
||||
hide_new_vertex(Face_handle f, const Weighted_point& p)
|
||||
{
|
||||
Vertex_handle v = _tds.create_vertex();
|
||||
Vertex_handle v = this->_tds.create_vertex();
|
||||
v->set_point(p);
|
||||
hide_vertex(f, v);
|
||||
return v;
|
||||
|
|
@ -1497,7 +1498,7 @@ stack_flip_4_2(Face_handle f, int i, int j, Faces_around_stack & faces_around)
|
|||
//Face_handle gn = g->neighbor(g->index(f->vertex(i)));
|
||||
Vertex_handle vq = f->vertex(j);
|
||||
|
||||
_tds.flip( &(*f), i); //not using flip because the vertex j is flat.
|
||||
this->_tds.flip( &(*f), i); //not using flip because the vertex j is flat.
|
||||
update_hidden_points_2_2(f,fn);
|
||||
Face_handle h1 = ( f->has_vertex(vq) ? fn : f);
|
||||
//hide_vertex(h1, vq);
|
||||
|
|
|
|||
Loading…
Reference in New Issue