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

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

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