Création d'un compte pour un collaborateur extérieur au laboratoire depuis l'intranet ICube : https://intranet.icube.unistra.fr/fr/labs/member/profile

Commit 6908d2ad authored by Pierre Kraemer's avatar Pierre Kraemer
Browse files

update traversorCell next operator

parent 7d4483cc
...@@ -93,8 +93,8 @@ public: ...@@ -93,8 +93,8 @@ public:
bool m_drawNormals ; bool m_drawNormals ;
bool m_drawTopo ; bool m_drawTopo ;
AttributeHandler<VEC3, VERTEX> position ; VertexAttribute<VEC3> position ;
AttributeHandler<VEC3, VERTEX> normal ; VertexAttribute<VEC3> normal ;
Algo::Render::GL2::MapRender* m_render ; Algo::Render::GL2::MapRender* m_render ;
Algo::Render::GL2::TopoRender* m_topoRender ; Algo::Render::GL2::TopoRender* m_topoRender ;
......
...@@ -21,6 +21,7 @@ ...@@ -21,6 +21,7 @@
* Contact information: cgogn@unistra.fr * * Contact information: cgogn@unistra.fr *
* * * *
*******************************************************************************/ *******************************************************************************/
#include "Topology/generic/traversorGen.h" #include "Topology/generic/traversorGen.h"
#ifndef __TRAVERSOR_CELL_H__ #ifndef __TRAVERSOR_CELL_H__
...@@ -34,7 +35,7 @@ namespace CGoGN ...@@ -34,7 +35,7 @@ namespace CGoGN
{ {
template <typename MAP, unsigned int ORBIT> template <typename MAP, unsigned int ORBIT>
class TraversorCell: public Traversor<MAP> class TraversorCell : public Traversor<MAP>
{ {
private: private:
MAP& m ; MAP& m ;
...@@ -99,7 +100,7 @@ public: ...@@ -99,7 +100,7 @@ public:
template <typename MAP, unsigned int ORBIT> template <typename MAP, unsigned int ORBIT>
class TraversorDartsOfOrbit: public Traversor<MAP> class TraversorDartsOfOrbit : public Traversor<MAP>
{ {
private: private:
std::vector<Dart>::iterator m_current ; std::vector<Dart>::iterator m_current ;
......
...@@ -111,31 +111,32 @@ Dart TraversorCell<MAP, ORBIT>::next() ...@@ -111,31 +111,32 @@ Dart TraversorCell<MAP, ORBIT>::next()
} }
else else
{ {
bool ismarked ;
if(dmark) if(dmark)
ismarked = dmark->isMarked(current) ;
else
ismarked = cmark->isMarked(current) ;
while(current != NIL && (ismarked || m.isBoundaryMarked(current) || !m_good(current)))
{ {
m.next(current) ; bool ismarked = dmark->isMarked(current) ;
if(current == m.end()) while(current != NIL && (ismarked || m.isBoundaryMarked(current) || !m_good(current)))
current = NIL ;
else
{ {
if(dmark) m.next(current) ;
ismarked = dmark->isMarked(current) ; if(current == m.end())
current = NIL ;
else else
ismarked = cmark->isMarked(current) ; ismarked = dmark->isMarked(current) ;
} }
if(current != NIL)
dmark->markOrbit<ORBIT>(current) ;
} }
else
if(current != NIL)
{ {
if(dmark) bool ismarked = cmark->isMarked(current) ;
dmark->markOrbit<ORBIT>(current) ; while(current != NIL && (ismarked || m.isBoundaryMarked(current) || !m_good(current)))
else {
m.next(current) ;
if(current == m.end())
current = NIL ;
else
ismarked = cmark->isMarked(current) ;
}
if(current != NIL)
cmark->mark(current) ; cmark->mark(current) ;
} }
} }
......
...@@ -79,7 +79,6 @@ public: ...@@ -79,7 +79,6 @@ public:
* @return a ptr on Generic Traversor * @return a ptr on Generic Traversor
*/ */
static Traversor<MAP>* createCell(MAP& map, unsigned int orb, const FunctorSelect& good = allDarts, bool forceDartMarker = false, unsigned int thread = 0); static Traversor<MAP>* createCell(MAP& map, unsigned int orb, const FunctorSelect& good = allDarts, bool forceDartMarker = false, unsigned int thread = 0);
}; };
} // namespace CGoGN } // namespace CGoGN
......
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