mirror of https://github.com/CGAL/cgal
patches suggested by Dima for bcc
This commit is contained in:
parent
04ed0a8138
commit
c08e6771b0
|
|
@ -47,6 +47,12 @@
|
|||
|
||||
|
||||
CGAL_BEGIN_NAMESPACE
|
||||
template < class Gt, class Tds > class Triangulation_2;
|
||||
template < class Gt, class Tds > std::istream& operator>>
|
||||
(std::istream& is, Triangulation_2<Gt,Tds> &tr);
|
||||
template < class Gt, class Tds > std::ostream& operator<<
|
||||
(std::ostream& os, const Triangulation_2<Gt,Tds> &tr);
|
||||
|
||||
|
||||
template < class Gt, class Tds >
|
||||
class Triangulation_2
|
||||
|
|
|
|||
|
|
@ -44,6 +44,21 @@
|
|||
|
||||
|
||||
CGAL_BEGIN_NAMESPACE
|
||||
template < class Gt , class Vb, class Fb>
|
||||
class Triangulation_default_data_structure_2;
|
||||
|
||||
template < class Gt , class Vb, class Fb>
|
||||
std::istream& operator>>
|
||||
(std::istream& is, Triangulation_default_data_structure_2<Gt,Vb,Fb>&
|
||||
tds);
|
||||
|
||||
template < class Gt , class Vb, class Fb>
|
||||
std::ostream& operator<<
|
||||
( std::ostream& os,
|
||||
const Triangulation_default_data_structure_2<Gt,Vb,Fb>& tds);
|
||||
|
||||
|
||||
|
||||
|
||||
template < class Gt , class Vb, class Fb>
|
||||
class Triangulation_default_data_structure_2
|
||||
|
|
@ -116,15 +131,37 @@ public:
|
|||
// Face* &fr) const;
|
||||
|
||||
// ITERATORS AND CIRCULATORS
|
||||
Iterator_base iterator_base_begin() const;
|
||||
Iterator_base iterator_base_end() const;
|
||||
Face_iterator faces_begin() const;
|
||||
Face_iterator faces_end() const;
|
||||
Vertex_iterator vertices_begin() const;
|
||||
Vertex_iterator vertices_end() const;
|
||||
Edge_iterator edges_begin() const;
|
||||
Edge_iterator edges_end() const;
|
||||
|
||||
inline Iterator_base iterator_base_begin() const {
|
||||
return Iterator_base(this);
|
||||
}
|
||||
inline Iterator_base iterator_base_end() const {
|
||||
return Iterator_base(this,1);
|
||||
}
|
||||
inline Face_iterator faces_begin() const {
|
||||
Tds* ncthis = (Tds *)this;
|
||||
return Face_iterator(ncthis);
|
||||
}
|
||||
inline Face_iterator faces_end() const {
|
||||
Tds* ncthis = (Tds *)this;
|
||||
return Face_iterator(ncthis, 1);
|
||||
}
|
||||
inline Vertex_iterator vertices_begin() const {
|
||||
Tds* ncthis = (Tds*)this;
|
||||
return Vertex_iterator(ncthis);
|
||||
}
|
||||
inline Vertex_iterator vertices_end() const {
|
||||
Tds* ncthis = (Tds*)this;
|
||||
return Vertex_iterator(ncthis,1);
|
||||
}
|
||||
inline Edge_iterator edges_begin() const {
|
||||
Tds* ncthis = (Tds*)this;
|
||||
return Edge_iterator(ncthis);
|
||||
}
|
||||
inline Edge_iterator edges_end() const {
|
||||
Tds* ncthis = (Tds*)this;
|
||||
return Edge_iterator(ncthis,1);
|
||||
}
|
||||
|
||||
//Face_circulator incident_faces(Vertex* v, Face* f = NULL) const;
|
||||
//Vertex_circulator incident_vertices(Vertex* v, Face* f = NULL) const;
|
||||
//Edge_circulator incident_edges(Vertex* v, Face* f = NULL) const;
|
||||
|
|
@ -295,92 +332,92 @@ is_edge(const Vertex* va, const Vertex* vb, Face* &fr, int & i) const
|
|||
}
|
||||
|
||||
|
||||
template <class Gt , class Vb, class Fb>
|
||||
inline
|
||||
Triangulation_ds_iterator_base_2<
|
||||
Triangulation_default_data_structure_2<Gt,Vb,Fb> >
|
||||
Triangulation_default_data_structure_2<Gt,Vb,Fb>::
|
||||
iterator_base_begin() const
|
||||
{
|
||||
return Iterator_base(this);
|
||||
}
|
||||
// template <class Gt , class Vb, class Fb>
|
||||
// inline
|
||||
// Triangulation_ds_iterator_base_2<
|
||||
// Triangulation_default_data_structure_2<Gt,Vb,Fb> >
|
||||
// Triangulation_default_data_structure_2<Gt,Vb,Fb>::
|
||||
// iterator_base_begin() const
|
||||
// {
|
||||
// return Iterator_base(this);
|
||||
// }
|
||||
|
||||
template <class Gt , class Vb, class Fb>
|
||||
inline
|
||||
Triangulation_ds_iterator_base_2<
|
||||
Triangulation_default_data_structure_2<Gt,Vb,Fb> >
|
||||
Triangulation_default_data_structure_2<Gt,Vb,Fb>::
|
||||
iterator_base_end() const
|
||||
{
|
||||
return Iterator_base(this,1);
|
||||
}
|
||||
// template <class Gt , class Vb, class Fb>
|
||||
// inline
|
||||
// Triangulation_ds_iterator_base_2<
|
||||
// Triangulation_default_data_structure_2<Gt,Vb,Fb> >
|
||||
// Triangulation_default_data_structure_2<Gt,Vb,Fb>::
|
||||
// iterator_base_end() const
|
||||
// {
|
||||
// return Iterator_base(this,1);
|
||||
// }
|
||||
|
||||
template <class Gt , class Vb, class Fb>
|
||||
inline
|
||||
Triangulation_ds_face_iterator_2<
|
||||
Triangulation_default_data_structure_2<Gt,Vb,Fb> >
|
||||
Triangulation_default_data_structure_2<Gt,Vb,Fb>::
|
||||
faces_begin() const
|
||||
{
|
||||
Tds* ncthis = (Tds *)this;
|
||||
return Face_iterator(ncthis);
|
||||
}
|
||||
// template <class Gt , class Vb, class Fb>
|
||||
// inline
|
||||
// Triangulation_ds_face_iterator_2<
|
||||
// Triangulation_default_data_structure_2<Gt,Vb,Fb> >
|
||||
// Triangulation_default_data_structure_2<Gt,Vb,Fb>::
|
||||
// faces_begin() const
|
||||
// {
|
||||
// Tds* ncthis = (Tds *)this;
|
||||
// return Face_iterator(ncthis);
|
||||
// }
|
||||
|
||||
template <class Gt , class Vb, class Fb>
|
||||
inline
|
||||
Triangulation_ds_face_iterator_2<
|
||||
Triangulation_default_data_structure_2<Gt,Vb,Fb> >
|
||||
Triangulation_default_data_structure_2<Gt,Vb,Fb>::
|
||||
faces_end() const
|
||||
{
|
||||
Tds* ncthis = (Tds *)this;
|
||||
return Face_iterator(ncthis, 1);
|
||||
}
|
||||
// template <class Gt , class Vb, class Fb>
|
||||
// inline
|
||||
// Triangulation_ds_face_iterator_2<
|
||||
// Triangulation_default_data_structure_2<Gt,Vb,Fb> >
|
||||
// Triangulation_default_data_structure_2<Gt,Vb,Fb>::
|
||||
// faces_end() const
|
||||
// {
|
||||
// Tds* ncthis = (Tds *)this;
|
||||
// return Face_iterator(ncthis, 1);
|
||||
// }
|
||||
|
||||
template <class Gt , class Vb, class Fb>
|
||||
inline
|
||||
Triangulation_ds_vertex_iterator_2<
|
||||
Triangulation_default_data_structure_2<Gt,Vb,Fb> >
|
||||
Triangulation_default_data_structure_2<Gt,Vb,Fb>::
|
||||
vertices_begin() const
|
||||
{
|
||||
Tds* ncthis = (Tds*)this;
|
||||
return Vertex_iterator(ncthis);
|
||||
}
|
||||
// template <class Gt , class Vb, class Fb>
|
||||
// inline
|
||||
// Triangulation_ds_vertex_iterator_2<
|
||||
// Triangulation_default_data_structure_2<Gt,Vb,Fb> >
|
||||
// Triangulation_default_data_structure_2<Gt,Vb,Fb>::
|
||||
// vertices_begin() const
|
||||
// {
|
||||
// Tds* ncthis = (Tds*)this;
|
||||
// return Vertex_iterator(ncthis);
|
||||
// }
|
||||
|
||||
template <class Gt , class Vb, class Fb>
|
||||
inline
|
||||
Triangulation_ds_vertex_iterator_2<
|
||||
Triangulation_default_data_structure_2<Gt,Vb,Fb> >
|
||||
Triangulation_default_data_structure_2<Gt,Vb,Fb>::
|
||||
vertices_end() const
|
||||
{
|
||||
Tds* ncthis = (Tds*)this;
|
||||
return Vertex_iterator(ncthis,1);
|
||||
}
|
||||
// template <class Gt , class Vb, class Fb>
|
||||
// inline
|
||||
// Triangulation_ds_vertex_iterator_2<
|
||||
// Triangulation_default_data_structure_2<Gt,Vb,Fb> >
|
||||
// Triangulation_default_data_structure_2<Gt,Vb,Fb>::
|
||||
// vertices_end() const
|
||||
// {
|
||||
// Tds* ncthis = (Tds*)this;
|
||||
// return Vertex_iterator(ncthis,1);
|
||||
// }
|
||||
|
||||
template <class Gt , class Vb, class Fb>
|
||||
inline
|
||||
Triangulation_ds_edge_iterator_2<
|
||||
Triangulation_default_data_structure_2<Gt,Vb,Fb> >
|
||||
Triangulation_default_data_structure_2<Gt,Vb,Fb>::
|
||||
edges_begin() const
|
||||
{
|
||||
Tds* ncthis = (Tds*)this;
|
||||
return Edge_iterator(ncthis);
|
||||
}
|
||||
// template <class Gt , class Vb, class Fb>
|
||||
// inline
|
||||
// Triangulation_ds_edge_iterator_2<
|
||||
// Triangulation_default_data_structure_2<Gt,Vb,Fb> >
|
||||
// Triangulation_default_data_structure_2<Gt,Vb,Fb>::
|
||||
// edges_begin() const
|
||||
// {
|
||||
// Tds* ncthis = (Tds*)this;
|
||||
// return Edge_iterator(ncthis);
|
||||
// }
|
||||
|
||||
|
||||
template <class Gt , class Vb, class Fb>
|
||||
inline
|
||||
Triangulation_ds_edge_iterator_2<
|
||||
Triangulation_default_data_structure_2<Gt,Vb,Fb> >
|
||||
Triangulation_default_data_structure_2<Gt,Vb,Fb>::
|
||||
edges_end() const
|
||||
{
|
||||
Tds* ncthis = (Tds*)this;
|
||||
return Edge_iterator(ncthis,1);
|
||||
}
|
||||
// template <class Gt , class Vb, class Fb>
|
||||
// inline
|
||||
// Triangulation_ds_edge_iterator_2<
|
||||
// Triangulation_default_data_structure_2<Gt,Vb,Fb> >
|
||||
// Triangulation_default_data_structure_2<Gt,Vb,Fb>::
|
||||
// edges_end() const
|
||||
// {
|
||||
// Tds* ncthis = (Tds*)this;
|
||||
// return Edge_iterator(ncthis,1);
|
||||
// }
|
||||
|
||||
|
||||
template < class Gt , class Vb, class Fb>
|
||||
|
|
|
|||
|
|
@ -57,12 +57,26 @@ public:
|
|||
//ACCESS
|
||||
Face* face() const {return ( (Face *) (Vb::face()) );}
|
||||
int degree() const ;
|
||||
Vertex_circulator incident_vertices() const;
|
||||
Vertex_circulator incident_vertices(const Face* f) const;
|
||||
Face_circulator incident_faces() const;
|
||||
Face_circulator incident_faces(const Face* f) const;
|
||||
Edge_circulator incident_edges() const;
|
||||
Edge_circulator incident_edges(const Face* f) const;
|
||||
|
||||
inline Vertex_circulator incident_vertices() const {
|
||||
return Vertex_circulator(this);
|
||||
}
|
||||
inline Vertex_circulator incident_vertices(const Face* f) const {
|
||||
return Vertex_circulator(this,f);
|
||||
}
|
||||
inline Face_circulator incident_faces() const {
|
||||
return Face_circulator(this);
|
||||
}
|
||||
inline Face_circulator incident_faces(const Face* f) const {
|
||||
return Face_circulator(this, f);
|
||||
}
|
||||
inline Edge_circulator incident_edges() const {
|
||||
return Edge_circulator(this);
|
||||
}
|
||||
inline Edge_circulator incident_edges(const Face* f) const {
|
||||
return Edge_circulator(this, f);
|
||||
}
|
||||
|
||||
bool is_valid(bool verbose = false, int level = 0) const;
|
||||
|
||||
};
|
||||
|
|
@ -82,65 +96,65 @@ degree() const
|
|||
return count;
|
||||
}
|
||||
|
||||
template <class Vb, class Fb >
|
||||
inline
|
||||
Triangulation_ds_vertex_circulator_2<Triangulation_ds_vertex_2<Vb,Fb>,
|
||||
Triangulation_ds_face_2<Vb,Fb> >
|
||||
Triangulation_ds_vertex_2<Vb,Fb> ::
|
||||
incident_vertices() const
|
||||
{
|
||||
return Vertex_circulator(this);
|
||||
}
|
||||
// template <class Vb, class Fb >
|
||||
// inline
|
||||
// Triangulation_ds_vertex_circulator_2<Triangulation_ds_vertex_2<Vb,Fb>,
|
||||
// Triangulation_ds_face_2<Vb,Fb> >
|
||||
// Triangulation_ds_vertex_2<Vb,Fb> ::
|
||||
// incident_vertices() const
|
||||
// {
|
||||
// return Vertex_circulator(this);
|
||||
// }
|
||||
|
||||
template <class Vb, class Fb >
|
||||
inline
|
||||
Triangulation_ds_vertex_circulator_2<Triangulation_ds_vertex_2<Vb,Fb>,
|
||||
Triangulation_ds_face_2<Vb,Fb> >
|
||||
Triangulation_ds_vertex_2<Vb,Fb> ::
|
||||
incident_vertices(const Face* f) const
|
||||
{
|
||||
return Vertex_circulator(this,f);
|
||||
}
|
||||
// template <class Vb, class Fb >
|
||||
// inline
|
||||
// Triangulation_ds_vertex_circulator_2<Triangulation_ds_vertex_2<Vb,Fb>,
|
||||
// Triangulation_ds_face_2<Vb,Fb> >
|
||||
// Triangulation_ds_vertex_2<Vb,Fb> ::
|
||||
// incident_vertices(const Face* f) const
|
||||
// {
|
||||
// return Vertex_circulator(this,f);
|
||||
// }
|
||||
|
||||
template <class Vb, class Fb >
|
||||
inline
|
||||
Triangulation_ds_face_circulator_2<Triangulation_ds_vertex_2<Vb,Fb>,
|
||||
Triangulation_ds_face_2<Vb,Fb> >
|
||||
Triangulation_ds_vertex_2<Vb,Fb> ::
|
||||
incident_faces() const
|
||||
{
|
||||
return Face_circulator(this);
|
||||
}
|
||||
// template <class Vb, class Fb >
|
||||
// inline
|
||||
// Triangulation_ds_face_circulator_2<Triangulation_ds_vertex_2<Vb,Fb>,
|
||||
// Triangulation_ds_face_2<Vb,Fb> >
|
||||
// Triangulation_ds_vertex_2<Vb,Fb> ::
|
||||
// incident_faces() const
|
||||
// {
|
||||
// return Face_circulator(this);
|
||||
// }
|
||||
|
||||
template <class Vb, class Fb >
|
||||
inline
|
||||
Triangulation_ds_face_circulator_2<Triangulation_ds_vertex_2<Vb,Fb>,
|
||||
Triangulation_ds_face_2<Vb,Fb> >
|
||||
Triangulation_ds_vertex_2<Vb,Fb> ::
|
||||
incident_faces(const Face* f) const
|
||||
{
|
||||
return Face_circulator(this, f);
|
||||
}
|
||||
// template <class Vb, class Fb >
|
||||
// inline
|
||||
// Triangulation_ds_face_circulator_2<Triangulation_ds_vertex_2<Vb,Fb>,
|
||||
// Triangulation_ds_face_2<Vb,Fb> >
|
||||
// Triangulation_ds_vertex_2<Vb,Fb> ::
|
||||
// incident_faces(const Face* f) const
|
||||
// {
|
||||
// return Face_circulator(this, f);
|
||||
// }
|
||||
|
||||
template <class Vb, class Fb >
|
||||
inline
|
||||
Triangulation_ds_edge_circulator_2<Triangulation_ds_vertex_2<Vb,Fb>,
|
||||
Triangulation_ds_face_2<Vb,Fb> >
|
||||
Triangulation_ds_vertex_2<Vb,Fb> ::
|
||||
incident_edges() const
|
||||
{
|
||||
return Edge_circulator(this);
|
||||
}
|
||||
// template <class Vb, class Fb >
|
||||
// inline
|
||||
// Triangulation_ds_edge_circulator_2<Triangulation_ds_vertex_2<Vb,Fb>,
|
||||
// Triangulation_ds_face_2<Vb,Fb> >
|
||||
// Triangulation_ds_vertex_2<Vb,Fb> ::
|
||||
// incident_edges() const
|
||||
// {
|
||||
// return Edge_circulator(this);
|
||||
// }
|
||||
|
||||
template <class Vb, class Fb >
|
||||
inline
|
||||
Triangulation_ds_edge_circulator_2<Triangulation_ds_vertex_2<Vb,Fb>,
|
||||
Triangulation_ds_face_2<Vb,Fb> >
|
||||
Triangulation_ds_vertex_2<Vb,Fb> ::
|
||||
incident_edges(const Face* f) const
|
||||
{
|
||||
return Edge_circulator(this, f);
|
||||
}
|
||||
// template <class Vb, class Fb >
|
||||
// inline
|
||||
// Triangulation_ds_edge_circulator_2<Triangulation_ds_vertex_2<Vb,Fb>,
|
||||
// Triangulation_ds_face_2<Vb,Fb> >
|
||||
// Triangulation_ds_vertex_2<Vb,Fb> ::
|
||||
// incident_edges(const Face* f) const
|
||||
// {
|
||||
// return Edge_circulator(this, f);
|
||||
// }
|
||||
|
||||
template <class Vb, class Fb >
|
||||
bool
|
||||
|
|
|
|||
|
|
@ -59,7 +59,7 @@ class Triangulation_face_handle_2
|
|||
:public Pointer<Triangulation_face_2<Gt,Tds> >
|
||||
{
|
||||
public:
|
||||
typedef Pointer<Triangulation_face_2<Gt,Tds> > Pointer;
|
||||
typedef Pointer<Triangulation_face_2<Gt,Tds> > Pointer_;
|
||||
typedef Triangulation_face_2<Gt,Tds> Face;
|
||||
typedef Triangulation_face_handle_2<Gt,Tds> Face_handle;
|
||||
|
||||
|
|
@ -68,27 +68,27 @@ public:
|
|||
typedef Triangulation_face_circulator_2<Gt,Tds> Face_circulator;
|
||||
|
||||
Triangulation_face_handle_2()
|
||||
: Pointer(NULL)
|
||||
: Pointer_(NULL)
|
||||
{}
|
||||
|
||||
Triangulation_face_handle_2(const Face* p)
|
||||
: Pointer(p)
|
||||
: Pointer_(p)
|
||||
{}
|
||||
|
||||
Triangulation_face_handle_2(const Face_handle& p)
|
||||
: Pointer(p.ptr())
|
||||
: Pointer_(p.ptr())
|
||||
{}
|
||||
|
||||
Triangulation_face_handle_2(const Finite_faces_iterator& fit)
|
||||
: Pointer(&(*fit))
|
||||
: Pointer_(&(*fit))
|
||||
{}
|
||||
|
||||
Triangulation_face_handle_2(const All_faces_iterator& fit)
|
||||
: Pointer(&(*fit))
|
||||
: Pointer_(&(*fit))
|
||||
{}
|
||||
|
||||
Triangulation_face_handle_2(const Face_circulator& fc)
|
||||
: Pointer(&(*fc))
|
||||
: Pointer_(&(*fc))
|
||||
{}
|
||||
|
||||
Face_handle& operator=(Face* p)
|
||||
|
|
@ -109,7 +109,7 @@ class Triangulation_vertex_handle_2
|
|||
:public Pointer<Triangulation_vertex_2<Gt,Tds> >
|
||||
{
|
||||
public:
|
||||
typedef Pointer<Triangulation_vertex_2<Gt,Tds> > Pointer;
|
||||
typedef Pointer<Triangulation_vertex_2<Gt,Tds> > Pointer_;
|
||||
typedef Triangulation_vertex_2<Gt,Tds> Vertex;
|
||||
typedef Triangulation_vertex_handle_2<Gt,Tds> Vertex_handle;
|
||||
|
||||
|
|
@ -120,27 +120,27 @@ public:
|
|||
typedef Triangulation_vertex_circulator_2<Gt,Tds> Vertex_circulator;
|
||||
|
||||
Triangulation_vertex_handle_2()
|
||||
: Pointer(NULL)
|
||||
: Pointer_(NULL)
|
||||
{}
|
||||
|
||||
Triangulation_vertex_handle_2(const Vertex* p)
|
||||
: Pointer(p)
|
||||
: Pointer_(p)
|
||||
{}
|
||||
|
||||
Triangulation_vertex_handle_2(const Vertex_handle& p)
|
||||
: Pointer(p.ptr())
|
||||
: Pointer_(p.ptr())
|
||||
{}
|
||||
|
||||
Triangulation_vertex_handle_2(const Finite_vertices_iterator& vit)
|
||||
: Pointer(&(*vit))
|
||||
: Pointer_(&(*vit))
|
||||
{}
|
||||
|
||||
Triangulation_vertex_handle_2(const All_vertices_iterator& vit)
|
||||
: Pointer(&(*vit))
|
||||
: Pointer_(&(*vit))
|
||||
{}
|
||||
|
||||
Triangulation_vertex_handle_2(const Vertex_circulator& vc)
|
||||
: Pointer(&(*vc))
|
||||
: Pointer_(&(*vc))
|
||||
{}
|
||||
|
||||
Vertex_handle& operator=(Vertex* p)
|
||||
|
|
|
|||
Loading…
Reference in New Issue