mirror of https://github.com/CGAL/cgal
parent
af49a61c38
commit
4467ce0bf0
|
|
@ -118,6 +118,9 @@ public:
|
|||
}
|
||||
};
|
||||
|
||||
|
||||
void file_output(std::ostream& os) const;
|
||||
|
||||
private:
|
||||
void update_status_incident(Vertex_handle va,
|
||||
Vertex_handle c1,
|
||||
|
|
@ -636,11 +639,35 @@ triangulate(List_edges & list_edges, List_faces &
|
|||
} while (list_edges.size()>1);
|
||||
}
|
||||
|
||||
template < class Gt, class Tds >
|
||||
void
|
||||
Constrained_triangulation_2<Gt, Tds>::
|
||||
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) {
|
||||
for(int j = 0; j < 3; ++j){
|
||||
if (ib->is_constrained(j)) { os << "C";}
|
||||
else { os << "N";}
|
||||
if(is_ascii(os)){
|
||||
if(j==2) {
|
||||
os << "\n";
|
||||
} else {
|
||||
os << ' ';
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
template < class Gt, class Tds >
|
||||
ostream &
|
||||
operator<<(ostream& os, const Constrained_triangulation_2<Gt,Tds> &Ct)
|
||||
{
|
||||
os << (Triangulation_2<Gt, Tds>) Ct;
|
||||
//os << (Triangulation_2<Gt, Tds>) Ct;
|
||||
|
||||
// typename Constrained_triangulation_2<Gt, Tds>::Face_iterator
|
||||
// it = Ct.faces_begin();
|
||||
|
|
@ -677,7 +704,9 @@ operator<<(ostream& os, const Constrained_triangulation_2<Gt,Tds> &Ct)
|
|||
// }
|
||||
// }while(++fc != done);
|
||||
|
||||
return os ;
|
||||
|
||||
Ct.file_output(os);
|
||||
return os ;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -158,7 +158,7 @@ void
|
|||
any_button(Window_stream& W)
|
||||
{
|
||||
double x, y;
|
||||
cerr << "Press any button to continue" << endl;
|
||||
cerr << "Press any button to continue" << std::endl;
|
||||
W.read_mouse(x,y);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -42,6 +42,7 @@ public:
|
|||
// the following typedef to satisfy MIPS CC 7.3
|
||||
typedef typename Triangulation::Face_handle Face_handle;
|
||||
typedef typename Triangulation::Vertex_handle Vertex_handle;
|
||||
typedef typename Triangulation::Edge Edge;
|
||||
typedef typename Triangulation::Locate_type Locate_type;
|
||||
|
||||
// a list to memorise temporary the faces around a point
|
||||
|
|
@ -234,11 +235,11 @@ is_valid(bool verbose = false, int level = 0) const
|
|||
cerr << "face : " << (void*)&(*it)<< " "
|
||||
<<"["<< it->vertex(0)->point()
|
||||
<<"/"<< it->vertex(1)->point()
|
||||
<<"/"<< it->vertex(2)->point()<<"]"<<endl
|
||||
<<"/"<< it->vertex(2)->point()<<"]"<< std::endl
|
||||
<< "voisin : " << (void*)&(*(it->neighbor(i)))<< " "
|
||||
<<"["<<(it->neighbor(i))->vertex(0)->point()
|
||||
<<"/"<<(it->neighbor(i))->vertex(1)->point()
|
||||
<<"/"<<(it->neighbor(i))->vertex(2)->point()<<"]" <<endl;
|
||||
<<"/"<<(it->neighbor(i))->vertex(2)->point()<<"]" << std::endl;
|
||||
}
|
||||
CGAL_triangulation_assertion(result);
|
||||
}
|
||||
|
|
@ -254,8 +255,8 @@ is_valid(bool verbose = false, int level = 0) const
|
|||
cerr << "face : " << (void*)&(*it)<< " "
|
||||
<<"["<< it->vertex(0)->point()
|
||||
<<"/"<< it->vertex(1)->point()
|
||||
<<"/"<< it->vertex(2)->point()<<"]" <<endl
|
||||
<< "hidden point : " << *plit <<endl;
|
||||
<<"/"<< it->vertex(2)->point()<<"]" << std::endl
|
||||
<< "hidden point : " << *plit << std::endl;
|
||||
}
|
||||
CGAL_triangulation_assertion(result);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1068,7 +1068,7 @@ file_output( std::ostream& os, Vertex* v, bool skip_first) const
|
|||
|
||||
int n = number_of_vertices();
|
||||
int m = number_of_full_dim_faces();
|
||||
if(is_ascii(os)) os << n << ' ' << m << ' ' << dimension() << endl;
|
||||
if(is_ascii(os)) os << n << ' ' << m << ' ' << dimension() << std::endl;
|
||||
else os << n << m << dimension();
|
||||
if (n==0) return;
|
||||
|
||||
|
|
|
|||
|
|
@ -249,7 +249,7 @@ public:
|
|||
Edge_iterator operator--(int);
|
||||
|
||||
Edge operator*() const
|
||||
{return make_pair(const_cast<Face*>(pos), index);}
|
||||
{return std::make_pair(const_cast<Face*>(pos), index);}
|
||||
|
||||
private:
|
||||
void increment();
|
||||
|
|
@ -807,7 +807,7 @@ operator--(int)
|
|||
// Triangulation_ds_edge_iterator_2<Tds> ::
|
||||
// operator*() const
|
||||
// {
|
||||
// return make_pair(const_cast<Face*>(pos), index);
|
||||
// return std::make_pair(const_cast<Face*>(pos), index);
|
||||
// }
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -75,10 +75,10 @@ class Triangulation_finite_faces_iterator_2
|
|||
: public Triangulation_all_faces_iterator_2<Gt,Tds>
|
||||
{
|
||||
public:
|
||||
typedef Triangulation_2<Gt,Tds> Triangulation;
|
||||
typedef Triangulation_all_faces_iterator_2<Gt,Tds> All_faces;
|
||||
typedef Triangulation_finite_faces_iterator_2<Gt,Tds> Finite_faces;
|
||||
|
||||
typedef typename All_faces::Triangulation Triangulation;
|
||||
|
||||
private:
|
||||
const Triangulation* _tr;
|
||||
|
||||
|
|
@ -143,9 +143,9 @@ class Triangulation_finite_vertices_iterator_2
|
|||
: public Triangulation_all_vertices_iterator_2<Gt,Tds>
|
||||
{
|
||||
public:
|
||||
typedef Triangulation_all_vertices_iterator_2<Gt,Tds> All_vertices;
|
||||
typedef Triangulation_all_vertices_iterator_2<Gt,Tds> All_vertices;
|
||||
typedef Triangulation_finite_vertices_iterator_2<Gt,Tds> Finite_vertices;
|
||||
|
||||
typedef typename All_vertices::Triangulation Triangulation;
|
||||
private:
|
||||
const Triangulation* _tr;
|
||||
|
||||
|
|
@ -206,8 +206,9 @@ class Triangulation_finite_edges_iterator_2
|
|||
: public Triangulation_all_edges_iterator_2<Gt,Tds>
|
||||
{
|
||||
public:
|
||||
typedef Triangulation_all_edges_iterator_2<Gt,Tds> All_edges;
|
||||
typedef Triangulation_all_edges_iterator_2<Gt,Tds> All_edges;
|
||||
typedef Triangulation_finite_edges_iterator_2<Gt,Tds> Finite_edges;
|
||||
typedef typename All_edges::Triangulation Triangulation;
|
||||
|
||||
private:
|
||||
const Triangulation* _tr;
|
||||
|
|
|
|||
Loading…
Reference in New Issue