Brève interruption de service ce midi pour augmentation de la mémoire 🤞

Commit 026b5ffd authored by Sylvain Thery's avatar Sylvain Thery

update Traversor2Virts

parent 279b47b7
......@@ -471,7 +471,6 @@ Dart Traversor2EEaF<MAP>::next()
}
else if (current == stop2)
current = NIL ;
}
return current ;
}
......
......@@ -40,13 +40,13 @@ template <typename MAP>
class VTraversor2VE: public Traversor
{
private:
MAP& m ;
const MAP& m ;
Dart start ;
Dart current ;
const std::vector<Dart>* m_QLT;
std::vector<Dart>::const_iterator m_ItDarts;
public:
VTraversor2VE(MAP& map, Dart dart) ;
VTraversor2VE(const MAP& map, Dart dart) ;
Dart begin() ;
Dart end() ;
......@@ -58,13 +58,13 @@ template <typename MAP>
class VTraversor2VF : public Traversor
{
private:
MAP& m ;
const MAP& m ;
Dart start ;
Dart current ;
const std::vector<Dart>* m_QLT;
std::vector<Dart>::const_iterator m_ItDarts;
public:
VTraversor2VF(MAP& map, Dart dart) ;
VTraversor2VF(const MAP& map, Dart dart) ;
Dart begin() ;
Dart end() ;
......@@ -76,13 +76,13 @@ template <typename MAP>
class VTraversor2VVaE : public Traversor
{
private:
MAP& m ;
const MAP& m ;
Dart start ;
Dart current ;
const std::vector<Dart>* m_QLT;
std::vector<Dart>::const_iterator m_ItDarts;
public:
VTraversor2VVaE(MAP& map, Dart dart) ;
VTraversor2VVaE(const MAP& map, Dart dart) ;
Dart begin() ;
Dart end() ;
......@@ -94,7 +94,7 @@ template <typename MAP>
class VTraversor2VVaF : public Traversor
{
private:
MAP& m ;
const MAP& m ;
Dart start ;
Dart current ;
......@@ -102,7 +102,7 @@ private:
const std::vector<Dart>* m_QLT;
std::vector<Dart>::const_iterator m_ItDarts;
public:
VTraversor2VVaF(MAP& map, Dart dart) ;
VTraversor2VVaF(const MAP& map, Dart dart) ;
Dart begin() ;
Dart end() ;
......@@ -118,13 +118,13 @@ template <typename MAP>
class VTraversor2EV : public Traversor
{
private:
MAP& m ;
const MAP& m ;
Dart start ;
Dart current ;
const std::vector<Dart>* m_QLT;
std::vector<Dart>::const_iterator m_ItDarts;
public:
VTraversor2EV(MAP& map, Dart dart) ;
VTraversor2EV(const MAP& map, Dart dart) ;
Dart begin() ;
Dart end() ;
......@@ -136,13 +136,13 @@ template <typename MAP>
class VTraversor2EF : public Traversor
{
private:
MAP& m ;
const MAP& m ;
Dart start ;
Dart current ;
const std::vector<Dart>* m_QLT;
std::vector<Dart>::const_iterator m_ItDarts;
public:
VTraversor2EF(MAP& map, Dart dart) ;
VTraversor2EF(const MAP& map, Dart dart) ;
Dart begin() ;
Dart end() ;
......@@ -154,7 +154,7 @@ template <typename MAP>
class VTraversor2EEaV : public Traversor
{
private:
MAP& m ;
const MAP& m ;
Dart start ;
Dart current ;
......@@ -162,7 +162,7 @@ private:
const std::vector<Dart>* m_QLT;
std::vector<Dart>::const_iterator m_ItDarts;
public:
VTraversor2EEaV(MAP& map, Dart dart) ;
VTraversor2EEaV(const MAP& map, Dart dart) ;
Dart begin() ;
Dart end() ;
......@@ -174,7 +174,7 @@ template <typename MAP>
class VTraversor2EEaF : public Traversor
{
private:
MAP& m ;
const MAP& m ;
Dart start ;
Dart current ;
......@@ -182,7 +182,7 @@ private:
const std::vector<Dart>* m_QLT;
std::vector<Dart>::const_iterator m_ItDarts;
public:
VTraversor2EEaF(MAP& map, Dart dart) ;
VTraversor2EEaF(const MAP& map, Dart dart) ;
Dart begin() ;
Dart end() ;
......@@ -198,13 +198,13 @@ template <typename MAP>
class VTraversor2FV : public Traversor
{
private:
MAP& m ;
const MAP& m ;
Dart start ;
Dart current ;
const std::vector<Dart>* m_QLT;
std::vector<Dart>::const_iterator m_ItDarts;
public:
VTraversor2FV(MAP& map, Dart dart) ;
VTraversor2FV(const MAP& map, Dart dart) ;
Dart begin() ;
Dart end() ;
......@@ -217,7 +217,7 @@ template <typename MAP>
class VTraversor2FE: public VTraversor2FV<MAP>
{
public:
VTraversor2FE(MAP& map, Dart dart):VTraversor2FV<MAP>(map,dart){}
VTraversor2FE(const MAP& map, Dart dart):VTraversor2FV<MAP>(map,dart){}
} ;
// Traverse the faces adjacent to a given face through sharing a common vertex
......@@ -225,7 +225,7 @@ template <typename MAP>
class VTraversor2FFaV : public Traversor
{
private:
MAP& m ;
const MAP& m ;
Dart start ;
Dart current ;
......@@ -233,7 +233,7 @@ private:
const std::vector<Dart>* m_QLT;
std::vector<Dart>::const_iterator m_ItDarts;
public:
VTraversor2FFaV(MAP& map, Dart dart) ;
VTraversor2FFaV(const MAP& map, Dart dart) ;
Dart begin() ;
Dart end() ;
......@@ -245,13 +245,13 @@ template <typename MAP>
class VTraversor2FFaE : public Traversor
{
private:
MAP& m ;
const MAP& m ;
Dart start ;
Dart current ;
const std::vector<Dart>* m_QLT;
std::vector<Dart>::const_iterator m_ItDarts;
public:
VTraversor2FFaE(MAP& map, Dart dart) ;
VTraversor2FFaE(const MAP& map, Dart dart) ;
Dart begin() ;
Dart end() ;
......
......@@ -32,7 +32,7 @@ namespace CGoGN
// VTraversor2VE
template <typename MAP>
VTraversor2VE<MAP>::VTraversor2VE(MAP& map, Dart dart) : m(map), start(dart),m_QLT(NULL)
VTraversor2VE<MAP>::VTraversor2VE(const MAP& map, Dart dart) : m(map), start(dart),m_QLT(NULL)
{
const AttributeMultiVector<NoTypeNameAttribute<std::vector<Dart> > >* quickTraversal = map.template getQuickIncidentTraversal<VERTEX,EDGE>() ;
if (quickTraversal != NULL)
......@@ -81,7 +81,7 @@ Dart VTraversor2VE<MAP>::next()
// VTraversor2VF
template <typename MAP>
VTraversor2VF<MAP>::VTraversor2VF(MAP& map, Dart dart) : m(map), start(dart),m_QLT(NULL)
VTraversor2VF<MAP>::VTraversor2VF(const MAP& map, Dart dart) : m(map), start(dart),m_QLT(NULL)
{
const AttributeMultiVector<NoTypeNameAttribute<std::vector<Dart> > >* quickTraversal = map.template getQuickIncidentTraversal<VERTEX,FACE>() ;
if (quickTraversal != NULL)
......@@ -135,7 +135,7 @@ Dart VTraversor2VF<MAP>::next()
// VTraversor2VVaE
template <typename MAP>
VTraversor2VVaE<MAP>::VTraversor2VVaE(MAP& map, Dart dart) : m(map),m_QLT(NULL)
VTraversor2VVaE<MAP>::VTraversor2VVaE(const MAP& map, Dart dart) : m(map),m_QLT(NULL)
{
const AttributeMultiVector<NoTypeNameAttribute<std::vector<Dart> > >* quickTraversal = map.template getQuickAdjacentTraversal<VERTEX,EDGE>() ;
if (quickTraversal != NULL)
......@@ -186,7 +186,7 @@ Dart VTraversor2VVaE<MAP>::next()
// VTraversor2VVaF
template <typename MAP>
VTraversor2VVaF<MAP>::VTraversor2VVaF(MAP& map, Dart dart) : m(map),m_QLT(NULL)
VTraversor2VVaF<MAP>::VTraversor2VVaF(const MAP& map, Dart dart) : m(map),m_QLT(NULL)
{
const AttributeMultiVector<NoTypeNameAttribute<std::vector<Dart> > >* quickTraversal = map.template getQuickAdjacentTraversal<VERTEX,FACE>() ;
if (quickTraversal != NULL)
......@@ -260,7 +260,7 @@ Dart VTraversor2VVaF<MAP>::next()
// VTraversor2EV
template <typename MAP>
VTraversor2EV<MAP>::VTraversor2EV(MAP& map, Dart dart) : m(map), start(dart),m_QLT(NULL)
VTraversor2EV<MAP>::VTraversor2EV(const MAP& map, Dart dart) : m(map), start(dart),m_QLT(NULL)
{
const AttributeMultiVector<NoTypeNameAttribute<std::vector<Dart> > >* quickTraversal = map.template getQuickIncidentTraversal<EDGE,VERTEX>() ;
if (quickTraversal != NULL)
......@@ -307,7 +307,7 @@ Dart VTraversor2EV<MAP>::next()
// VTraversor2EF
template <typename MAP>
VTraversor2EF<MAP>::VTraversor2EF(MAP& map, Dart dart) : m(map), start(dart),m_QLT(NULL)
VTraversor2EF<MAP>::VTraversor2EF(const MAP& map, Dart dart) : m(map), start(dart),m_QLT(NULL)
{
const AttributeMultiVector<NoTypeNameAttribute<std::vector<Dart> > >* quickTraversal = map.template getQuickIncidentTraversal<EDGE,FACE>() ;
if (quickTraversal != NULL)
......@@ -359,7 +359,7 @@ Dart VTraversor2EF<MAP>::next()
// VTraversor2EEaV
template <typename MAP>
VTraversor2EEaV<MAP>::VTraversor2EEaV(MAP& map, Dart dart) : m(map),m_QLT(NULL)
VTraversor2EEaV<MAP>::VTraversor2EEaV(const MAP& map, Dart dart) : m(map),m_QLT(NULL)
{
const AttributeMultiVector<NoTypeNameAttribute<std::vector<Dart> > >* quickTraversal = map.template getQuickAdjacentTraversal<EDGE,VERTEX>() ;
if (quickTraversal != NULL)
......@@ -414,7 +414,7 @@ Dart VTraversor2EEaV<MAP>::next()
// VTraversor2EEaF
template <typename MAP>
VTraversor2EEaF<MAP>::VTraversor2EEaF(MAP& map, Dart dart) : m(map),m_QLT(NULL)
VTraversor2EEaF<MAP>::VTraversor2EEaF(const MAP& map, Dart dart) : m(map),m_QLT(NULL)
{
const AttributeMultiVector<NoTypeNameAttribute<std::vector<Dart> > >* quickTraversal = map.template getQuickAdjacentTraversal<EDGE,FACE>() ;
if (quickTraversal != NULL)
......@@ -423,9 +423,12 @@ VTraversor2EEaF<MAP>::VTraversor2EEaF(MAP& map, Dart dart) : m(map),m_QLT(NULL)
}
else
{
start = m.phi1(dart) ;
stop1 = dart ;
stop2 = m.phi2(dart) ;
if (m.isBoundaryMarked2(dart))
stop1 = m.phi2(dart);
else
stop1 = dart;
stop2 = m.phi2(stop1) ;
start = m.phi1(stop1);
}
}
......@@ -458,9 +461,14 @@ Dart VTraversor2EEaF<MAP>::next()
if(current != NIL)
{
current = m.phi1(current) ;
if(current == stop1)
current = m.phi1(stop2) ;
else if(current == stop2)
if (current == stop1)
{
if (!m.isBoundaryMarked2(stop2))
current = m.phi1(stop2) ;
else
current=NIL;
}
else if (current == stop2)
current = NIL ;
}
return current ;
......@@ -473,7 +481,7 @@ Dart VTraversor2EEaF<MAP>::next()
// VTraversor2FV
template <typename MAP>
VTraversor2FV<MAP>::VTraversor2FV(MAP& map, Dart dart) : m(map), start(dart),m_QLT(NULL)
VTraversor2FV<MAP>::VTraversor2FV(const MAP& map, Dart dart) : m(map), start(dart),m_QLT(NULL)
{
const AttributeMultiVector<NoTypeNameAttribute<std::vector<Dart> > >* quickTraversal = map.template getQuickIncidentTraversal<FACE,VERTEX>() ;
if (quickTraversal != NULL)
......@@ -520,7 +528,7 @@ Dart VTraversor2FV<MAP>::next()
// VTraversor2FFaV
template <typename MAP>
VTraversor2FFaV<MAP>::VTraversor2FFaV(MAP& map, Dart dart) : m(map),m_QLT(NULL)
VTraversor2FFaV<MAP>::VTraversor2FFaV(const MAP& map, Dart dart) : m(map),m_QLT(NULL)
{
const AttributeMultiVector<NoTypeNameAttribute<std::vector<Dart> > >* quickTraversal = map.template getQuickAdjacentTraversal<FACE,VERTEX>() ;
if (quickTraversal != NULL)
......@@ -530,12 +538,12 @@ VTraversor2FFaV<MAP>::VTraversor2FFaV(MAP& map, Dart dart) : m(map),m_QLT(NULL)
else
{
start = m.phi2(m.phi_1(m.phi2(m.phi_1(dart)))) ;
current = start ;
if(start == dart)
while (start == dart)
{
stop = m.phi2(m.phi_1(dart)) ;
start = next() ;
dart = m.phi1(dart);
start = m.phi2(m.phi_1(m.phi2(m.phi_1(dart)))) ;
}
current = start ;
stop = dart ;
if(m.isBoundaryMarked2(start))
start = next() ;
......@@ -577,7 +585,8 @@ Dart VTraversor2FFaV<MAP>::next()
current = m.phi2(m.phi_1(m.phi2(m.phi_1(d)))) ;
if(current == d)
{
stop = m.phi2(m.phi_1(d)) ;
stop = m.phi1(d);
current = m.phi2(d);
return next() ;
}
stop = d ;
......@@ -593,7 +602,7 @@ Dart VTraversor2FFaV<MAP>::next()
// VTraversor2FFaE
template <typename MAP>
VTraversor2FFaE<MAP>::VTraversor2FFaE(MAP& map, Dart dart) : m(map),m_QLT(NULL)
VTraversor2FFaE<MAP>::VTraversor2FFaE(const MAP& map, Dart dart) : m(map),m_QLT(NULL)
{
const AttributeMultiVector<NoTypeNameAttribute<std::vector<Dart> > >* quickTraversal = map.template getQuickAdjacentTraversal<FACE,EDGE>() ;
if (quickTraversal != NULL)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment