mirror of https://github.com/CGAL/cgal
Update graph traits: now source, target and halfedge are ok.
This commit is contained in:
parent
b14c990b78
commit
b8b419f3b9
|
|
@ -83,7 +83,7 @@ struct EdgeHandle : Dart_handle
|
||||||
{ return this->beta(2); }
|
{ return this->beta(2); }
|
||||||
|
|
||||||
bool operator==(const EdgeHandle& h)
|
bool operator==(const EdgeHandle& h)
|
||||||
{ return (*this)==h /* TODO || h->beta(2)==*this */ ; }
|
{ return (*this)==h || h->get_f(2)==*this; }
|
||||||
};
|
};
|
||||||
|
|
||||||
template <class CMap, typename Dart_Iterator>
|
template <class CMap, typename Dart_Iterator>
|
||||||
|
|
@ -424,8 +424,8 @@ halfedge(typename boost::graph_traits<CGAL_LCC_TYPE>::edge_descriptor e,
|
||||||
CGAL_LCC_TEMPLATE_ARGS
|
CGAL_LCC_TEMPLATE_ARGS
|
||||||
typename boost::graph_traits<CGAL_LCC_TYPE>::halfedge_descriptor
|
typename boost::graph_traits<CGAL_LCC_TYPE>::halfedge_descriptor
|
||||||
halfedge(typename boost::graph_traits<CGAL_LCC_TYPE>::vertex_descriptor v,
|
halfedge(typename boost::graph_traits<CGAL_LCC_TYPE>::vertex_descriptor v,
|
||||||
const CGAL_LCC_TYPE&)
|
const CGAL_LCC_TYPE& cmap)
|
||||||
{ return v->dart(); }
|
{ return const_cast<CGAL_LCC_TYPE&>(cmap).template beta<2>(v->dart()); }
|
||||||
|
|
||||||
CGAL_LCC_TEMPLATE_ARGS
|
CGAL_LCC_TEMPLATE_ARGS
|
||||||
std::pair<
|
std::pair<
|
||||||
|
|
@ -553,7 +553,6 @@ void set_halfedge(typename boost::graph_traits<CGAL_LCC_TYPE>::vertex_descriptor
|
||||||
CGAL_LCC_TYPE& cm)
|
CGAL_LCC_TYPE& cm)
|
||||||
{
|
{
|
||||||
//cm.template set_dart_of_attribute<0>(v, h);
|
//cm.template set_dart_of_attribute<0>(v, h);
|
||||||
|
|
||||||
cm.template set_dart_of_attribute<0>(v, cm.template beta<2>(h));
|
cm.template set_dart_of_attribute<0>(v, cm.template beta<2>(h));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -103,6 +103,12 @@ namespace CGAL {
|
||||||
void * & for_compact_container()
|
void * & for_compact_container()
|
||||||
{ return mf[0].for_compact_container(); }
|
{ return mf[0].for_compact_container(); }
|
||||||
|
|
||||||
|
Dart_handle get_f(unsigned int i) const
|
||||||
|
{
|
||||||
|
assert(i<=dimension);
|
||||||
|
return mf[i];
|
||||||
|
}
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
/** Default constructor: no real initialisation,
|
/** Default constructor: no real initialisation,
|
||||||
* because this is done in the combinatorial map class.
|
* because this is done in the combinatorial map class.
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue