Commit 2cf2e5ff authored by Pierre Kraemer's avatar Pierre Kraemer
Browse files

change "mark" function of TraversorCell to "skip" (more explicit)

parent 588b0692
...@@ -46,10 +46,6 @@ Dart trianguleFace(typename PFP::MAP& map, Dart d) ...@@ -46,10 +46,6 @@ Dart trianguleFace(typename PFP::MAP& map, Dart d)
if (map.phi1(d1) == d) if (map.phi1(d1) == d)
CGoGNout << "Warning: triangulation of a face with only two edges" << CGoGNendl; CGoGNout << "Warning: triangulation of a face with only two edges" << CGoGNendl;
std::cout << "d = " << d << std::endl;
std::cout << "map.phi1(d) = " << map.phi1(d) << std::endl;
std::cout << "map.phi_1(d) = " << map.phi_1(d) << std::endl;
map.splitFace(d, d1) ; map.splitFace(d, d1) ;
map.cutEdge(map.phi_1(d)) ; map.cutEdge(map.phi_1(d)) ;
Dart x = map.phi2(map.phi_1(d)) ; Dart x = map.phi2(map.phi_1(d)) ;
...@@ -76,7 +72,7 @@ void trianguleFaces(typename PFP::MAP& map, EMBV& attributs, const FunctorSelect ...@@ -76,7 +72,7 @@ void trianguleFaces(typename PFP::MAP& map, EMBV& attributs, const FunctorSelect
Dart fit = cd ; Dart fit = cd ;
do do
{ {
t.mark(fit); t.skip(fit);
fit = map.phi2_1(fit); fit = map.phi2_1(fit);
} while(fit != cd); } while(fit != cd);
} }
...@@ -105,7 +101,7 @@ void trianguleFaces( ...@@ -105,7 +101,7 @@ void trianguleFaces(
Dart fit = cd ; Dart fit = cd ;
do do
{ {
t.mark(fit); t.skip(fit);
fit = map.phi2_1(fit); fit = map.phi2_1(fit);
} while(fit != cd); } while(fit != cd);
} }
......
...@@ -179,6 +179,7 @@ protected: ...@@ -179,6 +179,7 @@ protected:
template<typename VEC3> template<typename VEC3>
bool inTriangle(const VEC3& P, const VEC3& normal, const VEC3& Ta, const VEC3& Tb, const VEC3& Tc); bool inTriangle(const VEC3& P, const VEC3& normal, const VEC3& Ta, const VEC3& Tb, const VEC3& Tc);
public:
/** /**
* creation of indices table of triangles (optimized order) * creation of indices table of triangles (optimized order)
* @param tableIndices the table where indices are stored * @param tableIndices the table where indices are stored
...@@ -210,8 +211,6 @@ protected: ...@@ -210,8 +211,6 @@ protected:
*/ */
template <typename PFP> template <typename PFP>
void initBoundaries(typename PFP::MAP& map, const FunctorSelect& good, std::vector<GLuint>& tableIndices, unsigned int thread = 0) ; void initBoundaries(typename PFP::MAP& map, const FunctorSelect& good, std::vector<GLuint>& tableIndices, unsigned int thread = 0) ;
public:
/** /**
* initialization of the VBO indices primitives * initialization of the VBO indices primitives
* computed by a traversal of the map * computed by a traversal of the map
......
...@@ -55,7 +55,7 @@ public: ...@@ -55,7 +55,7 @@ public:
Dart next() ; Dart next() ;
void mark(Dart d); void skip(Dart d);
} ; } ;
template <typename MAP> template <typename MAP>
......
...@@ -116,7 +116,7 @@ Dart TraversorCell<MAP>::next() ...@@ -116,7 +116,7 @@ Dart TraversorCell<MAP>::next()
} }
template <typename MAP> template <typename MAP>
void TraversorCell<MAP>::mark(Dart d) void TraversorCell<MAP>::skip(Dart d)
{ {
if(dmark) if(dmark)
dmark->markOrbit(m_orbit, d) ; dmark->markOrbit(m_orbit, d) ;
......
...@@ -47,8 +47,6 @@ public: ...@@ -47,8 +47,6 @@ public:
std::string mapTypeName() { return "Map2MR_PrimalRegular" ; } std::string mapTypeName() { return "Map2MR_PrimalRegular" ; }
bool isOddVertex(Dart d) ;
void addNewLevel(bool embedNewVertices) ; void addNewLevel(bool embedNewVertices) ;
void addSynthesisFilter(Multiresolution::MRFilter* f) { synthesisFilters.push_back(f) ; } void addSynthesisFilter(Multiresolution::MRFilter* f) { synthesisFilters.push_back(f) ; }
......
...@@ -33,12 +33,6 @@ Map2MR_PrimalRegular::Map2MR_PrimalRegular() : ...@@ -33,12 +33,6 @@ Map2MR_PrimalRegular::Map2MR_PrimalRegular() :
initMR() ; initMR() ;
} }
bool Map2MR_PrimalRegular::isOddVertex(Dart d)
{
assert(getDartLevel(d) <= getCurrentLevel() || !"isOddVertex : called with a dart inserted after current level") ;
return getDartLevel(d) == getCurrentLevel() ;
}
void Map2MR_PrimalRegular::addNewLevel(bool embedNewVertices) void Map2MR_PrimalRegular::addNewLevel(bool embedNewVertices)
{ {
pushLevel() ; pushLevel() ;
...@@ -58,7 +52,7 @@ void Map2MR_PrimalRegular::addNewLevel(bool embedNewVertices) ...@@ -58,7 +52,7 @@ void Map2MR_PrimalRegular::addNewLevel(bool embedNewVertices)
TraversorE<Map2MR_PrimalRegular> travE(*this) ; TraversorE<Map2MR_PrimalRegular> travE(*this) ;
for (Dart d = travE.begin(); d != travE.end(); d = travE.next()) for (Dart d = travE.begin(); d != travE.end(); d = travE.next())
{ {
if(!shareVertexEmbeddings) if(!shareVertexEmbeddings && embedNewVertices)
{ {
if(getEmbedding(VERTEX, d) == EMBNULL) if(getEmbedding(VERTEX, d) == EMBNULL)
embedNewCell(VERTEX, d) ; embedNewCell(VERTEX, d) ;
...@@ -67,8 +61,8 @@ void Map2MR_PrimalRegular::addNewLevel(bool embedNewVertices) ...@@ -67,8 +61,8 @@ void Map2MR_PrimalRegular::addNewLevel(bool embedNewVertices)
} }
cutEdge(d) ; cutEdge(d) ;
travE.mark(d) ; travE.skip(d) ;
travE.mark(phi1(d)) ; travE.skip(phi1(d)) ;
if(embedNewVertices) if(embedNewVertices)
embedNewCell(VERTEX, phi1(d)) ; embedNewCell(VERTEX, phi1(d)) ;
...@@ -91,19 +85,19 @@ void Map2MR_PrimalRegular::addNewLevel(bool embedNewVertices) ...@@ -91,19 +85,19 @@ void Map2MR_PrimalRegular::addNewLevel(bool embedNewVertices)
Dart dd = phi1(old) ; Dart dd = phi1(old) ;
Dart e = phi1(phi1(dd)) ; Dart e = phi1(phi1(dd)) ;
splitFace(dd, e) ; splitFace(dd, e) ;
travF.mark(dd) ; travF.skip(dd) ;
dd = e ; dd = e ;
e = phi1(phi1(dd)) ; e = phi1(phi1(dd)) ;
splitFace(dd, e) ; splitFace(dd, e) ;
travF.mark(dd) ; travF.skip(dd) ;
dd = e ; dd = e ;
e = phi1(phi1(dd)) ; e = phi1(phi1(dd)) ;
splitFace(dd, e) ; splitFace(dd, e) ;
travF.mark(dd) ; travF.skip(dd) ;
travF.mark(e) ; travF.skip(e) ;
} }
else // if subdividing a polygonal face else // if subdividing a polygonal face
{ {
...@@ -113,7 +107,7 @@ void Map2MR_PrimalRegular::addNewLevel(bool embedNewVertices) ...@@ -113,7 +107,7 @@ void Map2MR_PrimalRegular::addNewLevel(bool embedNewVertices)
Dart ne = alpha1(dd) ; Dart ne = alpha1(dd) ;
cutEdge(ne) ; // cut the new edge to insert the central vertex cutEdge(ne) ; // cut the new edge to insert the central vertex
travF.mark(dd) ; travF.skip(dd) ;
if(embedNewVertices) if(embedNewVertices)
embedNewCell(VERTEX, phi1(ne)) ; embedNewCell(VERTEX, phi1(ne)) ;
...@@ -123,10 +117,10 @@ void Map2MR_PrimalRegular::addNewLevel(bool embedNewVertices) ...@@ -123,10 +117,10 @@ void Map2MR_PrimalRegular::addNewLevel(bool embedNewVertices)
{ // linked to the central vertex { // linked to the central vertex
Dart tmp = phi1(ne) ; Dart tmp = phi1(ne) ;
splitFace(tmp, dd) ; splitFace(tmp, dd) ;
travF.mark(tmp) ; travF.skip(tmp) ;
dd = phi1(phi1(dd)) ; dd = phi1(phi1(dd)) ;
} }
travF.mark(ne) ; travF.skip(ne) ;
} }
} }
......
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