Commit ab4e079a authored by Pierre Kraemer's avatar Pierre Kraemer

add some Cell typing

parent d944530c
...@@ -35,7 +35,8 @@ public: ...@@ -35,7 +35,8 @@ public:
virtual void select(Dart d, bool emitSignal = true) = 0; virtual void select(Dart d, bool emitSignal = true) = 0;
virtual void unselect(Dart d, bool emitSignal = true) = 0; virtual void unselect(Dart d, bool emitSignal = true) = 0;
inline void select(const std::vector<Dart>& d) template <unsigned int ORBIT>
inline void select(const std::vector<Cell<ORBIT> >& d)
{ {
for(unsigned int i = 0; i < d.size(); ++i) for(unsigned int i = 0; i < d.size(); ++i)
select(d[i], false); select(d[i], false);
...@@ -47,7 +48,8 @@ public: ...@@ -47,7 +48,8 @@ public:
} }
} }
inline void unselect(const std::vector<Dart>& d) template <unsigned int ORBIT>
inline void unselect(const std::vector<Cell<ORBIT> >& d)
{ {
for(unsigned int i = 0; i < d.size(); ++i) for(unsigned int i = 0; i < d.size(); ++i)
unselect(d[i], false); unselect(d[i], false);
......
...@@ -63,7 +63,7 @@ void computeCurvatureVertices_QuadraticFitting( ...@@ -63,7 +63,7 @@ void computeCurvatureVertices_QuadraticFitting(
template <typename PFP> template <typename PFP>
void computeCurvatureVertex_QuadraticFitting( void computeCurvatureVertex_QuadraticFitting(
typename PFP::MAP& map, typename PFP::MAP& map,
Dart dart, Vertex v,
const VertexAttribute<typename PFP::VEC3, typename PFP::MAP::IMPL>& position, const VertexAttribute<typename PFP::VEC3, typename PFP::MAP::IMPL>& position,
const VertexAttribute<typename PFP::VEC3, typename PFP::MAP::IMPL>& normal, const VertexAttribute<typename PFP::VEC3, typename PFP::MAP::IMPL>& normal,
VertexAttribute<typename PFP::REAL, typename PFP::MAP::IMPL>& kmax, VertexAttribute<typename PFP::REAL, typename PFP::MAP::IMPL>& kmax,
...@@ -74,7 +74,7 @@ void computeCurvatureVertex_QuadraticFitting( ...@@ -74,7 +74,7 @@ void computeCurvatureVertex_QuadraticFitting(
template <typename PFP> template <typename PFP>
void vertexQuadraticFitting( void vertexQuadraticFitting(
typename PFP::MAP& map, typename PFP::MAP& map,
Dart dart, Vertex v,
typename PFP::MATRIX33& localFrame, typename PFP::MATRIX33& localFrame,
const VertexAttribute<typename PFP::VEC3, typename PFP::MAP::IMPL>& position, const VertexAttribute<typename PFP::VEC3, typename PFP::MAP::IMPL>& position,
const VertexAttribute<typename PFP::VEC3, typename PFP::MAP::IMPL>& normal, const VertexAttribute<typename PFP::VEC3, typename PFP::MAP::IMPL>& normal,
...@@ -104,7 +104,8 @@ template <typename PFP> ...@@ -104,7 +104,8 @@ template <typename PFP>
void cubicFittingAddVertexNormal(typename PFP::VEC3& v, typename PFP::VEC3& n, typename PFP::VEC3& p, typename PFP::MATRIX33& localFrame) ; void cubicFittingAddVertexNormal(typename PFP::VEC3& v, typename PFP::VEC3& n, typename PFP::VEC3& p, typename PFP::MATRIX33& localFrame) ;
*/ */
/* normal cycles by [ACDLD03] : useful for parallel computing*/ /* normal cycles by [ACDLD03] : useful for parallel computing */
template <typename PFP> template <typename PFP>
void computeCurvatureVertices_NormalCycles( void computeCurvatureVertices_NormalCycles(
typename PFP::MAP& map, typename PFP::MAP& map,
...@@ -122,7 +123,7 @@ void computeCurvatureVertices_NormalCycles( ...@@ -122,7 +123,7 @@ void computeCurvatureVertices_NormalCycles(
template <typename PFP> template <typename PFP>
void computeCurvatureVertex_NormalCycles( void computeCurvatureVertex_NormalCycles(
typename PFP::MAP& map, typename PFP::MAP& map,
Dart dart, Vertex v,
typename PFP::REAL radius, typename PFP::REAL radius,
const VertexAttribute<typename PFP::VEC3, typename PFP::MAP::IMPL>& position, const VertexAttribute<typename PFP::VEC3, typename PFP::MAP::IMPL>& position,
const VertexAttribute<typename PFP::VEC3, typename PFP::MAP::IMPL>& normal, const VertexAttribute<typename PFP::VEC3, typename PFP::MAP::IMPL>& normal,
...@@ -174,7 +175,7 @@ void computeCurvatureVertices_NormalCycles_Projected( ...@@ -174,7 +175,7 @@ void computeCurvatureVertices_NormalCycles_Projected(
template <typename PFP> template <typename PFP>
void computeCurvatureVertex_NormalCycles_Projected( void computeCurvatureVertex_NormalCycles_Projected(
typename PFP::MAP& map, typename PFP::MAP& map,
Dart dart, Vertex v,
typename PFP::REAL radius, typename PFP::REAL radius,
const VertexAttribute<typename PFP::VEC3, typename PFP::MAP::IMPL>& position, const VertexAttribute<typename PFP::VEC3, typename PFP::MAP::IMPL>& position,
const VertexAttribute<typename PFP::VEC3, typename PFP::MAP::IMPL>& normal, const VertexAttribute<typename PFP::VEC3, typename PFP::MAP::IMPL>& normal,
...@@ -204,8 +205,7 @@ void computeCurvatureVertices_NormalCycles( ...@@ -204,8 +205,7 @@ void computeCurvatureVertices_NormalCycles(
template <typename PFP> template <typename PFP>
void computeCurvatureVertex_NormalCycles( void computeCurvatureVertex_NormalCycles(
typename PFP::MAP& map, Vertex v,
Dart dart,
Algo::Surface::Selection::Collector<PFP> & neigh, Algo::Surface::Selection::Collector<PFP> & neigh,
const VertexAttribute<typename PFP::VEC3, typename PFP::MAP::IMPL>& position, const VertexAttribute<typename PFP::VEC3, typename PFP::MAP::IMPL>& position,
const VertexAttribute<typename PFP::VEC3, typename PFP::MAP::IMPL>& normal, const VertexAttribute<typename PFP::VEC3, typename PFP::MAP::IMPL>& normal,
...@@ -233,8 +233,7 @@ void computeCurvatureVertices_NormalCycles_Projected( ...@@ -233,8 +233,7 @@ void computeCurvatureVertices_NormalCycles_Projected(
template <typename PFP> template <typename PFP>
void computeCurvatureVertex_NormalCycles_Projected( void computeCurvatureVertex_NormalCycles_Projected(
typename PFP::MAP& map, Vertex v,
Dart dart,
Algo::Surface::Selection::Collector<PFP> & neigh, Algo::Surface::Selection::Collector<PFP> & neigh,
const VertexAttribute<typename PFP::VEC3, typename PFP::MAP::IMPL>& position, const VertexAttribute<typename PFP::VEC3, typename PFP::MAP::IMPL>& position,
const VertexAttribute<typename PFP::VEC3, typename PFP::MAP::IMPL>& normal, const VertexAttribute<typename PFP::VEC3, typename PFP::MAP::IMPL>& normal,
......
This diff is collapsed.
...@@ -67,9 +67,9 @@ protected: ...@@ -67,9 +67,9 @@ protected:
bool isInsideCollected; bool isInsideCollected;
std::vector<Dart> insideVertices; std::vector<Vertex> insideVertices;
std::vector<Dart> insideEdges; std::vector<Edge> insideEdges;
std::vector<Dart> insideFaces; std::vector<Face> insideFaces;
std::vector<Dart> border; std::vector<Dart> border;
public: public:
...@@ -105,9 +105,9 @@ public: ...@@ -105,9 +105,9 @@ public:
inline Dart getCenterDart() const { return centerDart; } inline Dart getCenterDart() const { return centerDart; }
inline const std::vector<Dart>& getInsideVertices() const { assert(isInsideCollected || !"getInsideVertices: inside cells have not been collected.") ; return insideVertices; } inline const std::vector<Vertex>& getInsideVertices() const { assert(isInsideCollected || !"getInsideVertices: inside cells have not been collected.") ; return insideVertices; }
inline const std::vector<Dart>& getInsideEdges() const { assert(isInsideCollected || !"getInsideEdges: inside cells have not been collected.") ; return insideEdges; } inline const std::vector<Edge>& getInsideEdges() const { assert(isInsideCollected || !"getInsideEdges: inside cells have not been collected.") ; return insideEdges; }
inline const std::vector<Dart>& getInsideFaces() const { assert(isInsideCollected || !"getInsideFaces: inside cells have not been collected.") ; return insideFaces; } inline const std::vector<Face>& getInsideFaces() const { assert(isInsideCollected || !"getInsideFaces: inside cells have not been collected.") ; return insideFaces; }
inline const std::vector<Dart>& getBorder() const { return border; } inline const std::vector<Dart>& getBorder() const { return border; }
inline unsigned int getNbInsideVertices() const { assert(isInsideCollected || !"getNbInsideVertices: inside cells have not been collected.") ; return insideVertices.size(); } inline unsigned int getNbInsideVertices() const { assert(isInsideCollected || !"getNbInsideVertices: inside cells have not been collected.") ; return insideVertices.size(); }
...@@ -118,12 +118,19 @@ public: ...@@ -118,12 +118,19 @@ public:
template <typename PPFP> template <typename PPFP>
friend std::ostream& operator<<(std::ostream &out, const Collector<PPFP>& c); friend std::ostream& operator<<(std::ostream &out, const Collector<PPFP>& c);
virtual REAL computeArea (const VertexAttribute<VEC3, MAP_IMPL>& /*pos*/) { virtual REAL computeArea (const VertexAttribute<VEC3, MAP_IMPL>& /*pos*/)
{
assert(!"Warning: Collector<PFP>::computeArea() should be overloaded in non-virtual derived classes"); assert(!"Warning: Collector<PFP>::computeArea() should be overloaded in non-virtual derived classes");
return 0.0; return 0.0;
} }
virtual void computeNormalCyclesTensor (const VertexAttribute<VEC3, MAP_IMPL>& /*pos*/, const EdgeAttribute<REAL, MAP_IMPL>& /*edgeangle*/, typename PFP::MATRIX33&) {assert(!"Warning: Collector<PFP>::computeNormalCyclesTensor() should be overloaded in non-virtual derived classes"); } virtual void computeNormalCyclesTensor (const VertexAttribute<VEC3, MAP_IMPL>& /*pos*/, const EdgeAttribute<REAL, MAP_IMPL>& /*edgeangle*/, typename PFP::MATRIX33&)
virtual void computeNormalCyclesTensor (const VertexAttribute<VEC3, MAP_IMPL>& /*pos*/, typename PFP::MATRIX33&) {assert(!"Warning: Collector<PFP>::computeNormalCyclesTensor() should be overloaded in non-virtual derived classes"); } {
assert(!"Warning: Collector<PFP>::computeNormalCyclesTensor() should be overloaded in non-virtual derived classes");
}
virtual void computeNormalCyclesTensor (const VertexAttribute<VEC3, MAP_IMPL>& /*pos*/, typename PFP::MATRIX33&)
{
assert(!"Warning: Collector<PFP>::computeNormalCyclesTensor() should be overloaded in non-virtual derived classes");
}
}; };
/********************************************************* /*********************************************************
...@@ -186,8 +193,9 @@ public: ...@@ -186,8 +193,9 @@ public:
void collectBorder(Dart d); void collectBorder(Dart d);
REAL computeArea(const VertexAttribute<VEC3, MAP_IMPL>& pos); REAL computeArea(const VertexAttribute<VEC3, MAP_IMPL>& pos);
void computeNormalCyclesTensor (const VertexAttribute<VEC3, MAP_IMPL>& pos, const EdgeAttribute<REAL, MAP_IMPL>&edgeangle, typename PFP::MATRIX33&); void computeNormalCyclesTensor (const VertexAttribute<VEC3, MAP_IMPL>& pos, const EdgeAttribute<REAL, MAP_IMPL>& edgeangle, typename PFP::MATRIX33&);
void computeNormalCyclesTensor (const VertexAttribute<VEC3, MAP_IMPL>& pos, typename PFP::MATRIX33&); void computeNormalCyclesTensor (const VertexAttribute<VEC3, MAP_IMPL>& pos, typename PFP::MATRIX33&);
}; };
/********************************************************* /*********************************************************
...@@ -345,7 +353,7 @@ public : ...@@ -345,7 +353,7 @@ public :
} }
}; };
// tests if the angle between vertex normals is below some threshold // tests if the angle between triangle normals is below some threshold
template <typename PFP> template <typename PFP>
class CollectorCriterion_TriangleNormalAngle : public CollectorCriterion class CollectorCriterion_TriangleNormalAngle : public CollectorCriterion
{ {
...@@ -422,7 +430,6 @@ public: ...@@ -422,7 +430,6 @@ public:
Collector<PFP>(m, thread), Collector<PFP>(m, thread),
crit(c) crit(c)
{} {}
void collectAll(Dart d); void collectAll(Dart d);
void collectBorder(Dart d); void collectBorder(Dart d);
}; };
...@@ -450,7 +457,6 @@ public: ...@@ -450,7 +457,6 @@ public:
Collector_Triangles(typename PFP::MAP& m, CollectorCriterion& c, unsigned int thread = 0) : Collector_Triangles(typename PFP::MAP& m, CollectorCriterion& c, unsigned int thread = 0) :
Collector<PFP>(m,thread), crit(c) Collector<PFP>(m,thread), crit(c)
{} {}
void collectAll(Dart d) ; void collectAll(Dart d) ;
void collectBorder(Dart d) ; void collectBorder(Dart d) ;
}; };
......
This diff is collapsed.
...@@ -397,7 +397,7 @@ public: ...@@ -397,7 +397,7 @@ public:
}; };
template < unsigned int ORBIT_TO, unsigned int ORBIT_FROM, typename MAP, typename FUNC> template <unsigned int ORBIT_TO, unsigned int ORBIT_FROM, typename MAP, typename FUNC>
inline void foreach_incident2(MAP& map, Cell<ORBIT_FROM> c,FUNC f) inline void foreach_incident2(MAP& map, Cell<ORBIT_FROM> c,FUNC f)
{ {
IncidentTrav2<MAP,ORBIT_FROM,ORBIT_TO> trav(const_cast<const MAP&>(map),c); IncidentTrav2<MAP,ORBIT_FROM,ORBIT_TO> trav(const_cast<const MAP&>(map),c);
...@@ -406,7 +406,7 @@ inline void foreach_incident2(MAP& map, Cell<ORBIT_FROM> c,FUNC f) ...@@ -406,7 +406,7 @@ inline void foreach_incident2(MAP& map, Cell<ORBIT_FROM> c,FUNC f)
} }
template <unsigned int THRU, unsigned int ORBIT, typename MAP, typename FUNC> template <unsigned int THRU, unsigned int ORBIT, typename MAP, typename FUNC>
inline void foreach_adjacent2( MAP& map, Cell<ORBIT> c, FUNC f) inline void foreach_adjacent2(MAP& map, Cell<ORBIT> c, FUNC f)
{ {
AdjacentTrav2<MAP,ORBIT,THRU> trav(const_cast<const MAP&>(map),c); AdjacentTrav2<MAP,ORBIT,THRU> trav(const_cast<const MAP&>(map),c);
for (Cell<ORBIT> c = trav.t.begin(), e = trav.t.end(); c.dart != e.dart; c = trav.t.next()) for (Cell<ORBIT> c = trav.t.begin(), e = trav.t.end(); c.dart != e.dart; c = trav.t.next())
......
...@@ -32,12 +32,12 @@ namespace CGoGN ...@@ -32,12 +32,12 @@ namespace CGoGN
// Traversor2VE // Traversor2VE
template <typename MAP> template <typename MAP>
Traversor2VE<MAP>::Traversor2VE(const MAP& map, Vertex dart) : m(map), start(dart),m_QLT(NULL) Traversor2VE<MAP>::Traversor2VE(const MAP& map, Vertex v) : m(map), start(v),m_QLT(NULL)
{ {
const AttributeMultiVector<NoTypeNameAttribute<std::vector<Dart> > >* quickTraversal = map.template getQuickIncidentTraversal<VERTEX,EDGE>() ; const AttributeMultiVector<NoTypeNameAttribute<std::vector<Dart> > >* quickTraversal = map.template getQuickIncidentTraversal<VERTEX,EDGE>() ;
if (quickTraversal != NULL) if (quickTraversal != NULL)
{ {
m_QLT = &(quickTraversal->operator[](map.getEmbedding(dart))); m_QLT = &(quickTraversal->operator[](map.getEmbedding(v)));
} }
} }
...@@ -81,12 +81,12 @@ Edge Traversor2VE<MAP>::next() ...@@ -81,12 +81,12 @@ Edge Traversor2VE<MAP>::next()
// Traversor2VF // Traversor2VF
template <typename MAP> template <typename MAP>
Traversor2VF<MAP>::Traversor2VF(const MAP& map, Vertex dart) : m(map), start(dart),m_QLT(NULL) Traversor2VF<MAP>::Traversor2VF(const MAP& map, Vertex v) : m(map), start(v),m_QLT(NULL)
{ {
const AttributeMultiVector<NoTypeNameAttribute<std::vector<Dart> > >* quickTraversal = map.template getQuickIncidentTraversal<VERTEX,FACE>() ; const AttributeMultiVector<NoTypeNameAttribute<std::vector<Dart> > >* quickTraversal = map.template getQuickIncidentTraversal<VERTEX,FACE>() ;
if (quickTraversal != NULL) if (quickTraversal != NULL)
{ {
m_QLT = &(quickTraversal->operator[](map.template getEmbedding<VERTEX>(dart))); m_QLT = &(quickTraversal->operator[](map.getEmbedding(v)));
} }
else else
{ {
...@@ -135,16 +135,16 @@ Face Traversor2VF<MAP>::next() ...@@ -135,16 +135,16 @@ Face Traversor2VF<MAP>::next()
// Traversor2VVaE // Traversor2VVaE
template <typename MAP> template <typename MAP>
Traversor2VVaE<MAP>::Traversor2VVaE(const MAP& map, Vertex dart) : m(map),m_QLT(NULL) Traversor2VVaE<MAP>::Traversor2VVaE(const MAP& map, Vertex v) : m(map), m_QLT(NULL)
{ {
const AttributeMultiVector<NoTypeNameAttribute<std::vector<Dart> > >* quickTraversal = map.template getQuickAdjacentTraversal<VERTEX,EDGE>() ; const AttributeMultiVector<NoTypeNameAttribute<std::vector<Dart> > >* quickTraversal = map.template getQuickAdjacentTraversal<VERTEX,EDGE>() ;
if (quickTraversal != NULL) if (quickTraversal != NULL)
{ {
m_QLT = &(quickTraversal->operator[](map.template getEmbedding<VERTEX>(dart))); m_QLT = &(quickTraversal->operator[](map.getEmbedding(v)));
} }
else else
{ {
start = m.phi2(dart) ; start = m.phi2(v.dart) ;
} }
} }
...@@ -186,21 +186,21 @@ Vertex Traversor2VVaE<MAP>::next() ...@@ -186,21 +186,21 @@ Vertex Traversor2VVaE<MAP>::next()
// Traversor2VVaF // Traversor2VVaF
template <typename MAP> template <typename MAP>
Traversor2VVaF<MAP>::Traversor2VVaF(const MAP& map, Vertex dart) : m(map),m_QLT(NULL) Traversor2VVaF<MAP>::Traversor2VVaF(const MAP& map, Vertex v) : m(map), m_QLT(NULL)
{ {
const AttributeMultiVector<NoTypeNameAttribute<std::vector<Dart> > >* quickTraversal = map.template getQuickAdjacentTraversal<VERTEX,FACE>() ; const AttributeMultiVector<NoTypeNameAttribute<std::vector<Dart> > >* quickTraversal = map.template getQuickAdjacentTraversal<VERTEX,FACE>() ;
if (quickTraversal != NULL) if (quickTraversal != NULL)
{ {
m_QLT = &(quickTraversal->operator[](map.template getEmbedding<VERTEX>(dart))); m_QLT = &(quickTraversal->operator[](map.getEmbedding(v)));
} }
else else
{ {
if(m.template isBoundaryMarked<2>(dart)) if(m.template isBoundaryMarked<2>(v.dart))
dart = m.phi2(m.phi_1(dart)) ; v.dart = m.phi2(m.phi_1(v.dart)) ;
start = m.phi1(m.phi1(dart)) ; start = m.phi1(m.phi1(v.dart)) ;
if(start.dart == dart.dart) if(start.dart == v.dart)
start = m.phi1(dart) ; start = m.phi1(v.dart) ;
stop = dart ; stop = v ;
} }
} }
...@@ -260,12 +260,12 @@ Vertex Traversor2VVaF<MAP>::next() ...@@ -260,12 +260,12 @@ Vertex Traversor2VVaF<MAP>::next()
// Traversor2EV // Traversor2EV
template <typename MAP> template <typename MAP>
Traversor2EV<MAP>::Traversor2EV(const MAP& map, Edge dart) : m(map), start(dart),m_QLT(NULL) Traversor2EV<MAP>::Traversor2EV(const MAP& map, Edge e) : m(map), start(e), m_QLT(NULL)
{ {
const AttributeMultiVector<NoTypeNameAttribute<std::vector<Dart> > >* quickTraversal = map.template getQuickIncidentTraversal<EDGE,VERTEX>() ; const AttributeMultiVector<NoTypeNameAttribute<std::vector<Dart> > >* quickTraversal = map.template getQuickIncidentTraversal<EDGE,VERTEX>() ;
if (quickTraversal != NULL) if (quickTraversal != NULL)
{ {
m_QLT = &(quickTraversal->operator[](map.template getEmbedding<EDGE>(dart))); m_QLT = &(quickTraversal->operator[](map.getEmbedding(e)));
} }
} }
...@@ -307,17 +307,17 @@ Vertex Traversor2EV<MAP>::next() ...@@ -307,17 +307,17 @@ Vertex Traversor2EV<MAP>::next()
// Traversor2EF // Traversor2EF
template <typename MAP> template <typename MAP>
Traversor2EF<MAP>::Traversor2EF(const MAP& map, Edge dart) : m(map), start(dart),m_QLT(NULL) Traversor2EF<MAP>::Traversor2EF(const MAP& map, Edge e) : m(map), start(e),m_QLT(NULL)
{ {
const AttributeMultiVector<NoTypeNameAttribute<std::vector<Dart> > >* quickTraversal = map.template getQuickIncidentTraversal<EDGE,FACE>() ; const AttributeMultiVector<NoTypeNameAttribute<std::vector<Dart> > >* quickTraversal = map.template getQuickIncidentTraversal<EDGE,FACE>() ;
if (quickTraversal != NULL) if (quickTraversal != NULL)
{ {
m_QLT = &(quickTraversal->operator[](map.template getEmbedding<EDGE>(dart))); m_QLT = &(quickTraversal->operator[](map.getEmbedding(e)));
} }
else else
{ {
if(m.template isBoundaryMarked<2>(start)) if(m.template isBoundaryMarked<2>(start.dart))
start = m.phi2(start) ; start = m.phi2(start.dart) ;
} }
} }
...@@ -359,18 +359,18 @@ Face Traversor2EF<MAP>::next() ...@@ -359,18 +359,18 @@ Face Traversor2EF<MAP>::next()
// Traversor2EEaV // Traversor2EEaV
template <typename MAP> template <typename MAP>
Traversor2EEaV<MAP>::Traversor2EEaV(const MAP& map, Edge dart) : m(map),m_QLT(NULL) Traversor2EEaV<MAP>::Traversor2EEaV(const MAP& map, Edge e) : m(map), m_QLT(NULL)
{ {
const AttributeMultiVector<NoTypeNameAttribute<std::vector<Dart> > >* quickTraversal = map.template getQuickAdjacentTraversal<EDGE,VERTEX>() ; const AttributeMultiVector<NoTypeNameAttribute<std::vector<Dart> > >* quickTraversal = map.template getQuickAdjacentTraversal<EDGE,VERTEX>() ;
if (quickTraversal != NULL) if (quickTraversal != NULL)
{ {
m_QLT = &(quickTraversal->operator[](map.template getEmbedding<EDGE>(dart))); m_QLT = &(quickTraversal->operator[](map.getEmbedding(e)));
} }
else else
{ {
start = m.phi2(m.phi_1(dart)) ; start = m.phi2(m.phi_1(e.dart)) ;
stop1 = dart ; stop1 = e ;
stop2 = m.phi2(dart) ; stop2 = m.phi2(e.dart) ;
} }
} }
...@@ -414,22 +414,21 @@ Edge Traversor2EEaV<MAP>::next() ...@@ -414,22 +414,21 @@ Edge Traversor2EEaV<MAP>::next()
// Traversor2EEaF // Traversor2EEaF
template <typename MAP> template <typename MAP>
Traversor2EEaF<MAP>::Traversor2EEaF(const MAP& map, Edge dart) : Traversor2EEaF<MAP>::Traversor2EEaF(const MAP& map, Edge e) : m(map), m_QLT(NULL)
m(map),m_QLT(NULL)
{ {
const AttributeMultiVector<NoTypeNameAttribute<std::vector<Dart> > >* quickTraversal = map.template getQuickAdjacentTraversal<EDGE,FACE>() ; const AttributeMultiVector<NoTypeNameAttribute<std::vector<Dart> > >* quickTraversal = map.template getQuickAdjacentTraversal<EDGE,FACE>() ;
if (quickTraversal != NULL) if (quickTraversal != NULL)
{ {
m_QLT = &(quickTraversal->operator[](map.template getEmbedding<EDGE>(dart))); m_QLT = &(quickTraversal->operator[](map.getEmbedding(e)));
} }
else else
{ {
if (m.template isBoundaryMarked<2>(dart)) if (m.template isBoundaryMarked<2>(e.dart))
stop1 = m.phi2(dart); stop1 = m.phi2(e.dart);
else else
stop1 = dart; stop1 = e;
stop2 = m.phi2(stop1) ; stop2 = m.phi2(stop1.dart) ;
start = m.phi1(stop1); start = m.phi1(stop1.dart);
} }
} }
...@@ -479,16 +478,15 @@ Edge Traversor2EEaF<MAP>::next() ...@@ -479,16 +478,15 @@ Edge Traversor2EEaF<MAP>::next()
FACE CENTERED TRAVERSALS FACE CENTERED TRAVERSALS
*******************************************************************************/ *******************************************************************************/
// Traversor2FV // Traversor2FV
template <typename MAP> template <typename MAP>
Traversor2FV<MAP>::Traversor2FV(const MAP& map, Face dart) : m(map), start(dart),m_QLT(NULL) Traversor2FV<MAP>::Traversor2FV(const MAP& map, Face f) : m(map), start(f), m_QLT(NULL)
{ {
const AttributeMultiVector<NoTypeNameAttribute<std::vector<Dart> > >* quickTraversal = map.template getQuickIncidentTraversal<FACE,VERTEX>() ; const AttributeMultiVector<NoTypeNameAttribute<std::vector<Dart> > >* quickTraversal = map.template getQuickIncidentTraversal<FACE,VERTEX>() ;
if (quickTraversal != NULL) if (quickTraversal != NULL)
{ {
m_QLT = &(quickTraversal->operator[](map.template getEmbedding<FACE>(dart))); m_QLT = &(quickTraversal->operator[](map.getEmbedding(f)));
} }
} }
...@@ -527,16 +525,15 @@ Vertex Traversor2FV<MAP>::next() ...@@ -527,16 +525,15 @@ Vertex Traversor2FV<MAP>::next()
return current ; return current ;
} }
// Traversor2FE // Traversor2FE
template <typename MAP> template <typename MAP>
Traversor2FE<MAP>::Traversor2FE(const MAP& map, Face dart) : m(map), start(dart),m_QLT(NULL) Traversor2FE<MAP>::Traversor2FE(const MAP& map, Face f) : m(map), start(f), m_QLT(NULL)
{ {
const AttributeMultiVector<NoTypeNameAttribute<std::vector<Dart> > >* quickTraversal = map.template getQuickIncidentTraversal<FACE,VERTEX>() ; const AttributeMultiVector<NoTypeNameAttribute<std::vector<Dart> > >* quickTraversal = map.template getQuickIncidentTraversal<FACE,VERTEX>() ;
if (quickTraversal != NULL) if (quickTraversal != NULL)
{ {
m_QLT = &(quickTraversal->operator[](map.template getEmbedding<FACE>(dart))); m_QLT = &(quickTraversal->operator[](map.getEmbedding(f)));
} }
} }
...@@ -578,23 +575,23 @@ Edge Traversor2FE<MAP>::next() ...@@ -578,23 +575,23 @@ Edge Traversor2FE<MAP>::next()
// Traversor2FFaV // Traversor2FFaV
template <typename MAP> template <typename MAP>
Traversor2FFaV<MAP>::Traversor2FFaV(const MAP& map, Face dart) : m(map),m_QLT(NULL) Traversor2FFaV<MAP>::Traversor2FFaV(const MAP& map, Face f) : m(map), m_QLT(NULL)
{ {
const AttributeMultiVector<NoTypeNameAttribute<std::vector<Dart> > >* quickTraversal = map.template getQuickAdjacentTraversal<FACE,VERTEX>() ; const AttributeMultiVector<NoTypeNameAttribute<std::vector<Dart> > >* quickTraversal = map.template getQuickAdjacentTraversal<FACE,VERTEX>() ;
if (quickTraversal != NULL) if (quickTraversal != NULL)
{ {
m_QLT = &(quickTraversal->operator[](map.template getEmbedding<FACE>(dart))); m_QLT = &(quickTraversal->operator[](map.getEmbedding(f)));
} }
else else
{ {
start = m.phi2(m.phi_1(m.phi2(m.phi_1(dart)))) ;