mirror of https://github.com/CGAL/cgal
Remove dependencies in face graph wrapper.
This commit is contained in:
parent
e44ca7bb71
commit
3c88114ab2
|
|
@ -24,6 +24,8 @@
|
||||||
#include <CGAL/Functors_for_face_graph_wrapper.h>
|
#include <CGAL/Functors_for_face_graph_wrapper.h>
|
||||||
#include <CGAL/Iterators_for_face_graph_wrapper.h>
|
#include <CGAL/Iterators_for_face_graph_wrapper.h>
|
||||||
#include <CGAL/internal/Combinatorial_map_internal_functors.h>
|
#include <CGAL/internal/Combinatorial_map_internal_functors.h>
|
||||||
|
#include <CGAL/Polyhedron_3_fwd.h>
|
||||||
|
#include <CGAL/Surface_mesh/Surface_mesh_fwd.h>
|
||||||
|
|
||||||
namespace CGAL
|
namespace CGAL
|
||||||
{
|
{
|
||||||
|
|
@ -62,15 +64,6 @@ namespace CGAL
|
||||||
class Map, typename Storage>
|
class Map, typename Storage>
|
||||||
class Linear_cell_complex_for_generalized_map;
|
class Linear_cell_complex_for_generalized_map;
|
||||||
|
|
||||||
template<class P>
|
|
||||||
class Surface_mesh;
|
|
||||||
|
|
||||||
template<class PolyhedronTraits_3,
|
|
||||||
class PolyhedronItems_3,
|
|
||||||
template<class T, class I, class A> class T_HDS,
|
|
||||||
class Alloc>
|
|
||||||
struct Polyhedron_3;
|
|
||||||
|
|
||||||
namespace Surface_mesh_topology
|
namespace Surface_mesh_topology
|
||||||
{
|
{
|
||||||
template <typename Items, typename Alloc, typename Storage>
|
template <typename Items, typename Alloc, typename Storage>
|
||||||
|
|
@ -497,15 +490,15 @@ public:
|
||||||
{ return mmap.is_empty(); }
|
{ return mmap.is_empty(); }
|
||||||
|
|
||||||
size_type capacity() const
|
size_type capacity() const
|
||||||
{ return CGAL::num_halfedges(mmap.get_fg()); }
|
{ return num_halfedges(mmap.get_fg()); }
|
||||||
|
|
||||||
bool is_used(size_type i) const
|
bool is_used(size_type i) const
|
||||||
{
|
{
|
||||||
for (typename boost::template graph_traits<typename Self::HEG>::halfedge_iterator
|
for (typename boost::template graph_traits<typename Self::HEG>::halfedge_iterator
|
||||||
it=CGAL::halfedges(mmap.get_fg()).begin(),
|
it=halfedges(mmap.get_fg()).begin(),
|
||||||
itend=CGAL::halfedges(mmap.get_fg()).end(); it!=itend; ++it)
|
itend=halfedges(mmap.get_fg()).end(); it!=itend; ++it)
|
||||||
{
|
{
|
||||||
if (i==0) { return !CGAL::is_border(*it, mmap.get_fg()); }
|
if (i==0) { return !is_border(*it, mmap.get_fg()); }
|
||||||
--i;
|
--i;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
|
|
@ -550,8 +543,8 @@ public:
|
||||||
{
|
{
|
||||||
CGAL_assertion(darts().is_used(i));
|
CGAL_assertion(darts().is_used(i));
|
||||||
for (typename boost::template graph_traits<typename Self::HEG>::halfedge_iterator
|
for (typename boost::template graph_traits<typename Self::HEG>::halfedge_iterator
|
||||||
it=CGAL::halfedges(get_fg()).begin(),
|
it=halfedges(get_fg()).begin(),
|
||||||
itend=CGAL::halfedges(get_fg()).end(); it!=itend; ++it)
|
itend=halfedges(get_fg()).end(); it!=itend; ++it)
|
||||||
{
|
{
|
||||||
if (i==0) { return *it; }
|
if (i==0) { return *it; }
|
||||||
--i;
|
--i;
|
||||||
|
|
@ -563,8 +556,8 @@ public:
|
||||||
{
|
{
|
||||||
CGAL_assertion(darts().is_used(i));
|
CGAL_assertion(darts().is_used(i));
|
||||||
for (typename boost::template graph_traits<typename Self::HEG>::halfedge_iterator
|
for (typename boost::template graph_traits<typename Self::HEG>::halfedge_iterator
|
||||||
it=CGAL::halfedges(get_fg()).begin(),
|
it=halfedges(get_fg()).begin(),
|
||||||
itend=CGAL::halfedges(get_fg()).end(); it!=itend; ++it)
|
itend=halfedges(get_fg()).end(); it!=itend; ++it)
|
||||||
{
|
{
|
||||||
if (i==0) { return *it; }
|
if (i==0) { return *it; }
|
||||||
--i;
|
--i;
|
||||||
|
|
|
||||||
|
|
@ -23,8 +23,6 @@
|
||||||
|
|
||||||
#include <boost/graph/graph_traits.hpp>
|
#include <boost/graph/graph_traits.hpp>
|
||||||
#include <CGAL/boost/graph/helpers.h>
|
#include <CGAL/boost/graph/helpers.h>
|
||||||
#include <CGAL/boost/graph/graph_traits_Polyhedron_3.h>
|
|
||||||
#include <CGAL/boost/graph/graph_traits_Surface_mesh.h>
|
|
||||||
#include <CGAL/Iterators_for_face_graph_wrapper.h>
|
#include <CGAL/Iterators_for_face_graph_wrapper.h>
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
@ -51,7 +49,7 @@ struct Is_free<HEG, 2>
|
||||||
{
|
{
|
||||||
typedef typename boost::graph_traits<HEG>::halfedge_descriptor Dart_const_handle;
|
typedef typename boost::graph_traits<HEG>::halfedge_descriptor Dart_const_handle;
|
||||||
static bool value(const HEG& heg, Dart_const_handle dh)
|
static bool value(const HEG& heg, Dart_const_handle dh)
|
||||||
{ return CGAL::is_border(CGAL::opposite(dh, heg), heg); }
|
{ return is_border(opposite(dh, heg), heg); }
|
||||||
};
|
};
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
/// Get_beta
|
/// Get_beta
|
||||||
|
|
@ -72,14 +70,14 @@ struct Get_beta<HEG, 0>
|
||||||
{
|
{
|
||||||
typedef typename boost::graph_traits<HEG>::halfedge_descriptor Dart_const_handle;
|
typedef typename boost::graph_traits<HEG>::halfedge_descriptor Dart_const_handle;
|
||||||
static Dart_const_handle value(const HEG& heg, Dart_const_handle dh)
|
static Dart_const_handle value(const HEG& heg, Dart_const_handle dh)
|
||||||
{ return CGAL::prev(dh, heg); }
|
{ return prev(dh, heg); }
|
||||||
};
|
};
|
||||||
template<typename HEG>
|
template<typename HEG>
|
||||||
struct Get_beta<HEG, 1>
|
struct Get_beta<HEG, 1>
|
||||||
{
|
{
|
||||||
typedef typename boost::graph_traits<HEG>::halfedge_descriptor Dart_const_handle;
|
typedef typename boost::graph_traits<HEG>::halfedge_descriptor Dart_const_handle;
|
||||||
static Dart_const_handle value(const HEG& heg, Dart_const_handle dh)
|
static Dart_const_handle value(const HEG& heg, Dart_const_handle dh)
|
||||||
{ return CGAL::next(dh, heg); }
|
{ return next(dh, heg); }
|
||||||
};
|
};
|
||||||
template<typename HEG>
|
template<typename HEG>
|
||||||
struct Get_beta<HEG, 2>
|
struct Get_beta<HEG, 2>
|
||||||
|
|
@ -88,7 +86,7 @@ struct Get_beta<HEG, 2>
|
||||||
static Dart_const_handle value(const HEG& heg, Dart_const_handle dh)
|
static Dart_const_handle value(const HEG& heg, Dart_const_handle dh)
|
||||||
{
|
{
|
||||||
if (Is_free<HEG, 2>::value(heg, dh)) return Dart_const_handle();
|
if (Is_free<HEG, 2>::value(heg, dh)) return Dart_const_handle();
|
||||||
return CGAL::opposite(dh, heg);
|
return opposite(dh, heg);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
|
||||||
|
|
@ -45,17 +45,17 @@ namespace CGAL
|
||||||
/// Main constructor.
|
/// Main constructor.
|
||||||
FGW_dart_iterator_basic_of_all(const Map& amap):
|
FGW_dart_iterator_basic_of_all(const Map& amap):
|
||||||
mmap(amap),
|
mmap(amap),
|
||||||
m_it(CGAL::halfedges(amap.get_fg()).begin())
|
m_it(halfedges(amap.get_fg()).begin())
|
||||||
{
|
{
|
||||||
if (m_it!=CGAL::halfedges(amap.get_fg()).end() &&
|
if (m_it!=halfedges(amap.get_fg()).end() &&
|
||||||
CGAL::is_border(*m_it, amap.get_fg()))
|
is_border(*m_it, amap.get_fg()))
|
||||||
{ operator++(0); }
|
{ operator++(0); }
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Constructor with a dart in parameter (for end iterator).
|
/// Constructor with a dart in parameter (for end iterator).
|
||||||
FGW_dart_iterator_basic_of_all(const Map& amap, Dart_handle /*adart*/):
|
FGW_dart_iterator_basic_of_all(const Map& amap, Dart_handle /*adart*/):
|
||||||
mmap(amap),
|
mmap(amap),
|
||||||
m_it(CGAL::halfedges(amap.get_fg()).end())
|
m_it(halfedges(amap.get_fg()).end())
|
||||||
{}
|
{}
|
||||||
|
|
||||||
FGW_dart_iterator_basic_of_all(const FGW_dart_iterator_basic_of_all& other):
|
FGW_dart_iterator_basic_of_all(const FGW_dart_iterator_basic_of_all& other):
|
||||||
|
|
@ -75,14 +75,14 @@ namespace CGAL
|
||||||
/// Prefix ++ operator.
|
/// Prefix ++ operator.
|
||||||
Self& operator++()
|
Self& operator++()
|
||||||
{
|
{
|
||||||
CGAL_assertion(m_it!=CGAL::halfedges(this->mmap.get_fg()).end());
|
CGAL_assertion(m_it!=halfedges(this->mmap.get_fg()).end());
|
||||||
|
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
++m_it;
|
++m_it;
|
||||||
}
|
}
|
||||||
while(m_it!=CGAL::halfedges(this->mmap.get_fg()).end() &&
|
while(m_it!=halfedges(this->mmap.get_fg()).end() &&
|
||||||
CGAL::is_border(*m_it, this->mmap.get_fg()));
|
is_border(*m_it, this->mmap.get_fg()));
|
||||||
|
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
@ -93,7 +93,7 @@ namespace CGAL
|
||||||
|
|
||||||
Dart_handle operator*() const
|
Dart_handle operator*() const
|
||||||
{
|
{
|
||||||
CGAL_assertion(m_it!=CGAL::halfedges(this->mmap.get_fg()).end());
|
CGAL_assertion(m_it!=halfedges(this->mmap.get_fg()).end());
|
||||||
return *m_it;
|
return *m_it;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue