Commit b75bfd43 authored by Thery Sylvain's avatar Thery Sylvain

boundary2/boundary3

parent 3a8ecd23
...@@ -110,7 +110,7 @@ void MyQT::createMap() ...@@ -110,7 +110,7 @@ void MyQT::createMap()
for (Dart d = myMap.begin(); d != myMap.end(); myMap.next(d)) for (Dart d = myMap.begin(); d != myMap.end(); myMap.next(d))
{ {
CGoGNout << "Dart "<< d; CGoGNout << "Dart "<< d;
if (myMap.isBoundaryMarked(d)) if (myMap.isBoundaryMarkedCurrent(d))
CGoGNout << " is a boundary dart (implicitly added)"<< CGoGNendl; CGoGNout << " is a boundary dart (implicitly added)"<< CGoGNendl;
else else
{ {
......
...@@ -197,7 +197,7 @@ void MyQT::createMap(int n) ...@@ -197,7 +197,7 @@ void MyQT::createMap(int n)
for (Dart d=myMap.begin(); d!=myMap.end(); myMap.next(d)) for (Dart d=myMap.begin(); d!=myMap.end(); myMap.next(d))
{ {
if (dm.isMarked(d) && (!myMap.isBoundaryMarked(d))) if (dm.isMarked(d) && (!myMap.isBoundaryMarked2(d)))
{ {
int n = rand(); int n = rand();
float r = float(n&0x7f)/255.0f + 0.25f; float r = float(n&0x7f)/255.0f + 0.25f;
...@@ -214,7 +214,7 @@ void MyQT::updateMap() ...@@ -214,7 +214,7 @@ void MyQT::updateMap()
m_render_topo->updateData<PFP>(myMap, position, 0.9f, 0.9f,nb); m_render_topo->updateData<PFP>(myMap, position, 0.9f, 0.9f,nb);
for (Dart d=myMap.begin(); d!=myMap.end(); myMap.next(d)) for (Dart d=myMap.begin(); d!=myMap.end(); myMap.next(d))
{ {
if (dm.isMarked(d) && (!myMap.isBoundaryMarked(d))) if (dm.isMarked(d) && (!myMap.isBoundaryMarked2(d)))
{ {
const Geom::Vec3f& C = colorDarts[d]; const Geom::Vec3f& C = colorDarts[d];
if (C*C != 0.0f) if (C*C != 0.0f)
...@@ -273,7 +273,7 @@ void MyQT::cb_keyPress(int keycode) ...@@ -273,7 +273,7 @@ void MyQT::cb_keyPress(int keycode)
case 'c': case 'c':
for (Dart d = myMap.begin(); d != myMap.end(); myMap.next(d)) for (Dart d = myMap.begin(); d != myMap.end(); myMap.next(d))
{ {
if (!myMap.isBoundaryMarked(d)) if (!myMap.isBoundaryMarked2(d))
{ {
int n = rand(); int n = rand();
float r = float(n&0x7f)/255.0f + 0.25f; float r = float(n&0x7f)/255.0f + 0.25f;
...@@ -287,7 +287,7 @@ void MyQT::cb_keyPress(int keycode) ...@@ -287,7 +287,7 @@ void MyQT::cb_keyPress(int keycode)
case 'g': case 'g':
for (Dart d = myMap.begin(); d != myMap.end(); myMap.next(d)) for (Dart d = myMap.begin(); d != myMap.end(); myMap.next(d))
{ {
if (!myMap.isBoundaryMarked(d)) if (!myMap.isBoundaryMarked2(d))
{ {
colorDarts[d] = Geom::Vec3f(0.5f,0.5f,0.5f); colorDarts[d] = Geom::Vec3f(0.5f,0.5f,0.5f);
m_render_topo->setDartColor(d,0.5f,0.5f,0.5f); m_render_topo->setDartColor(d,0.5f,0.5f,0.5f);
...@@ -298,7 +298,7 @@ void MyQT::cb_keyPress(int keycode) ...@@ -298,7 +298,7 @@ void MyQT::cb_keyPress(int keycode)
case 'b': case 'b':
for (Dart d = myMap.begin(); d != myMap.end(); myMap.next(d)) for (Dart d = myMap.begin(); d != myMap.end(); myMap.next(d))
{ {
if (!myMap.isBoundaryMarked(d)) if (!myMap.isBoundaryMarked2(d))
{ {
colorDarts[d] = Geom::Vec3f(0.0f,0.0f,0.0f); colorDarts[d] = Geom::Vec3f(0.0f,0.0f,0.0f);
m_render_topo->setDartColor(d,0.0f,0.0f,0.0f); m_render_topo->setDartColor(d,0.0f,0.0f,0.0f);
...@@ -388,7 +388,7 @@ void MyQT::importMesh(std::string& filename) ...@@ -388,7 +388,7 @@ void MyQT::importMesh(std::string& filename)
colorDarts = myMap.addAttribute<VEC3, DART>("color"); colorDarts = myMap.addAttribute<VEC3, DART>("color");
for (Dart d=myMap.begin(); d!=myMap.end(); myMap.next(d)) for (Dart d=myMap.begin(); d!=myMap.end(); myMap.next(d))
{ {
if (dm.isMarked(d) && (!myMap.isBoundaryMarked(d))) if (dm.isMarked(d) && (!myMap.isBoundaryMarked2(d)))
{ {
int n = rand(); int n = rand();
float r = float(n&0x7f)/255.0f + 0.25f; float r = float(n&0x7f)/255.0f + 0.25f;
......
...@@ -520,7 +520,7 @@ void MyQT::cb_keyPress(int keycode) ...@@ -520,7 +520,7 @@ void MyQT::cb_keyPress(int keycode)
// case 'c': // case 'c':
// for (Dart d=myMap.begin(); d!=myMap.end(); myMap.next(d)) // for (Dart d=myMap.begin(); d!=myMap.end(); myMap.next(d))
// { // {
// if (!myMap.isBoundaryMarked(d)) // if (!myMap.isBoundaryMarked3(d))
// { // {
// int n = random(); // int n = random();
// float r = float(n&0x7f)/255.0f + 0.25f; // float r = float(n&0x7f)/255.0f + 0.25f;
...@@ -534,7 +534,7 @@ void MyQT::cb_keyPress(int keycode) ...@@ -534,7 +534,7 @@ void MyQT::cb_keyPress(int keycode)
// case 'g': // case 'g':
// for (Dart d=myMap.begin(); d!=myMap.end(); myMap.next(d)) // for (Dart d=myMap.begin(); d!=myMap.end(); myMap.next(d))
// { // {
// if (!myMap.isBoundaryMarked(d)) // if (!myMap.isBoundaryMarked3(d))
// { // {
// colorDarts[d] = Geom::Vec3f(0.5f,0.5f,0.5f); // colorDarts[d] = Geom::Vec3f(0.5f,0.5f,0.5f);
// m_render_topo->setDartColor(d,0.5f,0.5f,0.5f); // m_render_topo->setDartColor(d,0.5f,0.5f,0.5f);
...@@ -545,7 +545,7 @@ void MyQT::cb_keyPress(int keycode) ...@@ -545,7 +545,7 @@ void MyQT::cb_keyPress(int keycode)
// case 'b': // case 'b':
// for (Dart d=myMap.begin(); d!=myMap.end(); myMap.next(d)) // for (Dart d=myMap.begin(); d!=myMap.end(); myMap.next(d))
// { // {
// if (!myMap.isBoundaryMarked(d)) // if (!myMap.isBoundaryMarked3(d))
// { // {
// colorDarts[d] = Geom::Vec3f(0.0f,0.0f,0.0f); // colorDarts[d] = Geom::Vec3f(0.0f,0.0f,0.0f);
// m_render_topo->setDartColor(d,0.0f,0.0f,0.0f); // m_render_topo->setDartColor(d,0.0f,0.0f,0.0f);
......
...@@ -41,7 +41,7 @@ void subdivideEdge(typename PFP::MAP& map, Dart d, AttributeHandler<typename PFP ...@@ -41,7 +41,7 @@ void subdivideEdge(typename PFP::MAP& map, Dart d, AttributeHandler<typename PFP
{ {
assert(map.getDartLevel(d) <= map.getCurrentLevel() || !"Access to a dart introduced after current level") ; assert(map.getDartLevel(d) <= map.getCurrentLevel() || !"Access to a dart introduced after current level") ;
assert(!map.edgeIsSubdivided(d) || !"Trying to subdivide an already subdivided edge") ; assert(!map.edgeIsSubdivided(d) || !"Trying to subdivide an already subdivided edge") ;
assert(!map.isBoundaryMarked(d) || !"Trying to subdivide a dart marked boundary"); assert(!map.isBoundaryMarked3(d) || !"Trying to subdivide a dart marked boundary");
unsigned int eLevel = map.edgeLevel(d) ; unsigned int eLevel = map.edgeLevel(d) ;
...@@ -73,7 +73,7 @@ void subdivideFace(typename PFP::MAP& map, Dart d, AttributeHandler<typename PFP ...@@ -73,7 +73,7 @@ void subdivideFace(typename PFP::MAP& map, Dart d, AttributeHandler<typename PFP
{ {
assert(map.getDartLevel(d) <= map.getCurrentLevel() || !"Access to a dart introduced after current level") ; assert(map.getDartLevel(d) <= map.getCurrentLevel() || !"Access to a dart introduced after current level") ;
assert(!map.faceIsSubdivided(d) || !"Trying to subdivide an already subdivided face") ; assert(!map.faceIsSubdivided(d) || !"Trying to subdivide an already subdivided face") ;
assert(!map.isBoundaryMarked(d) || !"Trying to subdivide a dart marked boundary"); assert(!map.isBoundaryMarked3(d) || !"Trying to subdivide a dart marked boundary");
unsigned int fLevel = map.faceLevel(d) ; unsigned int fLevel = map.faceLevel(d) ;
Dart old = map.faceOldestDart(d) ; Dart old = map.faceOldestDart(d) ;
...@@ -192,7 +192,7 @@ Dart subdivideVolumeClassic(typename PFP::MAP& map, Dart d, AttributeHandler<typ ...@@ -192,7 +192,7 @@ Dart subdivideVolumeClassic(typename PFP::MAP& map, Dart d, AttributeHandler<typ
{ {
assert(map.getDartLevel(d) <= map.getCurrentLevel() || !"Access to a dart introduced after current level") ; assert(map.getDartLevel(d) <= map.getCurrentLevel() || !"Access to a dart introduced after current level") ;
assert(!map.volumeIsSubdivided(d) || !"Trying to subdivide an already subdivided volume") ; assert(!map.volumeIsSubdivided(d) || !"Trying to subdivide an already subdivided volume") ;
assert(!map.isBoundaryMarked(d) || !"Trying to subdivide a dart marked boundary"); assert(!map.isBoundaryMarked3(d) || !"Trying to subdivide a dart marked boundary");
unsigned int vLevel = map.volumeLevel(d); unsigned int vLevel = map.volumeLevel(d);
Dart old = map.volumeOldestDart(d); Dart old = map.volumeOldestDart(d);
...@@ -524,7 +524,7 @@ Dart subdivideVolumeClassic2(typename PFP::MAP& map, Dart d, AttributeHandler<ty ...@@ -524,7 +524,7 @@ Dart subdivideVolumeClassic2(typename PFP::MAP& map, Dart d, AttributeHandler<ty
{ {
assert(map.getDartLevel(d) <= map.getCurrentLevel() || !"Access to a dart introduced after current level") ; assert(map.getDartLevel(d) <= map.getCurrentLevel() || !"Access to a dart introduced after current level") ;
assert(!map.volumeIsSubdivided(d) || !"Trying to subdivide an already subdivided volume") ; assert(!map.volumeIsSubdivided(d) || !"Trying to subdivide an already subdivided volume") ;
assert(!map.isBoundaryMarked(d) || !"Trying to subdivide a dart marked boundary"); assert(!map.isBoundaryMarked3(d) || !"Trying to subdivide a dart marked boundary");
unsigned int vLevel = map.volumeLevel(d); unsigned int vLevel = map.volumeLevel(d);
Dart old = map.volumeOldestDart(d); Dart old = map.volumeOldestDart(d);
...@@ -658,7 +658,7 @@ void subdivideLoop(typename PFP::MAP& map, Dart d, AttributeHandler<typename PFP ...@@ -658,7 +658,7 @@ void subdivideLoop(typename PFP::MAP& map, Dart d, AttributeHandler<typename PFP
{ {
assert(map.getDartLevel(d) <= map.getCurrentLevel() || !"Access to a dart introduced after current level") ; assert(map.getDartLevel(d) <= map.getCurrentLevel() || !"Access to a dart introduced after current level") ;
assert(!map.volumeIsSubdivided(d) || !"Trying to subdivide an already subdivided volume") ; assert(!map.volumeIsSubdivided(d) || !"Trying to subdivide an already subdivided volume") ;
assert(!map.isBoundaryMarked(d) || !"Trying to subdivide a dart marked boundary"); assert(!map.isBoundaryMarked3(d) || !"Trying to subdivide a dart marked boundary");
unsigned int vLevel = map.volumeLevel(d); unsigned int vLevel = map.volumeLevel(d);
Dart old = map.volumeOldestDart(d); Dart old = map.volumeOldestDart(d);
......
...@@ -532,7 +532,7 @@ bool importSVG(typename PFP::MAP& map, const std::string& filename, VertexAttrib ...@@ -532,7 +532,7 @@ bool importSVG(typename PFP::MAP& map, const std::string& filename, VertexAttrib
// //close the intersections // //close the intersections
// for(Dart d = map.begin();d != map.end(); map.next(d)) // for(Dart d = map.begin();d != map.end(); map.next(d))
// { // {
// if(map.isBoundaryMarked(map.phi2(d))) // if(map.isBoundaryMarked2(map.phi2(d)))
// map.closeHole(d); // map.closeHole(d);
// } // }
......
...@@ -1183,7 +1183,7 @@ void MarchingCube<DataType, Windowing, PFP>::removeFacesOfBoundary(VertexAttribu ...@@ -1183,7 +1183,7 @@ void MarchingCube<DataType, Windowing, PFP>::removeFacesOfBoundary(VertexAttribu
DartMarker mf(*m_map); DartMarker mf(*m_map);
for (Dart d = m_map->begin(); d != m_map->end();) // next done inside loop because of deleteFace for (Dart d = m_map->begin(); d != m_map->end();) // next done inside loop because of deleteFace
{ {
if (!mf.isMarked(d) && !m_map->isBoundaryMarked(d)) if (!mf.isMarked(d) && !m_map->isBoundaryMarked2(d))
{ {
Dart dd = d; Dart dd = d;
Dart e = m_map->phi1(d); Dart e = m_map->phi1(d);
...@@ -1208,7 +1208,7 @@ void MarchingCube<DataType, Windowing, PFP>::removeFacesOfBoundary(VertexAttribu ...@@ -1208,7 +1208,7 @@ void MarchingCube<DataType, Windowing, PFP>::removeFacesOfBoundary(VertexAttribu
// vecF.reserve(8192); // vecF.reserve(8192);
// for (Dart d = m_map->begin(); d != m_map->end();m_map->next(d)) // next done inside loop because of deleteFace // for (Dart d = m_map->begin(); d != m_map->end();m_map->next(d)) // next done inside loop because of deleteFace
// { // {
// if ((!mf.isMarked(d)) && (!m_map->isBoundaryMarked(d)) ) // if ((!mf.isMarked(d)) && (!m_map->isBoundaryMarked2(d)) )
// { // {
// Dart dd = d; // Dart dd = d;
// Dart e = m_map->phi1(d); // Dart e = m_map->phi1(d);
......
...@@ -134,7 +134,7 @@ void quadranguleFaces(typename PFP::MAP& map, EMBV& attributs, const FunctorSele ...@@ -134,7 +134,7 @@ void quadranguleFaces(typename PFP::MAP& map, EMBV& attributs, const FunctorSele
// first pass: cut the edges // first pass: cut the edges
for (Dart d = map.begin(); d != map.end(); map.next(d)) for (Dart d = map.begin(); d != map.end(); map.next(d))
{ {
if (selected(d) && !map.isBoundaryMarked(d) && !me.isMarked(d)) if (selected(d) && !map.isBoundaryMarked2(d) && !me.isMarked(d))
{ {
Dart f = map.phi1(d); Dart f = map.phi1(d);
Dart e = map.cutEdge(d); Dart e = map.cutEdge(d);
...@@ -154,7 +154,7 @@ void quadranguleFaces(typename PFP::MAP& map, EMBV& attributs, const FunctorSele ...@@ -154,7 +154,7 @@ void quadranguleFaces(typename PFP::MAP& map, EMBV& attributs, const FunctorSele
// second pass: quandrangule faces // second pass: quandrangule faces
for (Dart d = map.begin(); d != map.end(); map.next(d)) for (Dart d = map.begin(); d != map.end(); map.next(d))
{ {
if (selected(d) && !map.isBoundaryMarked(d) && !mf.isMarked(d)) if (selected(d) && !map.isBoundaryMarked2(d) && !mf.isMarked(d))
{ {
EMB center = Geometry::faceCentroidGen<PFP,EMBV,EMB>(map, d, attributs); // compute center EMB center = Geometry::faceCentroidGen<PFP,EMBV,EMB>(map, d, attributs); // compute center
Dart cf = quadranguleFace<PFP>(map, d); // quadrangule the face Dart cf = quadranguleFace<PFP>(map, d); // quadrangule the face
...@@ -188,7 +188,7 @@ void CatmullClarkSubdivision(typename PFP::MAP& map, EMBV& attributs, const Func ...@@ -188,7 +188,7 @@ void CatmullClarkSubdivision(typename PFP::MAP& map, EMBV& attributs, const Func
// first pass: cut edges // first pass: cut edges
for (Dart d = map.begin(); d != map.end(); map.next(d)) for (Dart d = map.begin(); d != map.end(); map.next(d))
{ {
if (selected(d) && !map.isBoundaryMarked(d) && !me.isMarked(d)) if (selected(d) && !map.isBoundaryMarked2(d) && !me.isMarked(d))
{ {
if (!m0.isMarked(d)) if (!m0.isMarked(d))
{ {
...@@ -222,7 +222,7 @@ void CatmullClarkSubdivision(typename PFP::MAP& map, EMBV& attributs, const Func ...@@ -222,7 +222,7 @@ void CatmullClarkSubdivision(typename PFP::MAP& map, EMBV& attributs, const Func
// second pass: quandrangule faces // second pass: quandrangule faces
for (Dart d = map.begin(); d != map.end(); map.next(d)) for (Dart d = map.begin(); d != map.end(); map.next(d))
{ {
if (selected(d) && !map.isBoundaryMarked(d) && mf.isMarked(d)) // for each face not subdivided if (selected(d) && !map.isBoundaryMarked2(d) && mf.isMarked(d)) // for each face not subdivided
{ {
// compute center skip darts of new vertices non embedded // compute center skip darts of new vertices non embedded
EMB center = AttribOps::zero<EMB,PFP>(); EMB center = AttribOps::zero<EMB,PFP>();
...@@ -340,7 +340,7 @@ void LoopSubdivision(typename PFP::MAP& map, EMBV& attributs, const FunctorSelec ...@@ -340,7 +340,7 @@ void LoopSubdivision(typename PFP::MAP& map, EMBV& attributs, const FunctorSelec
// first pass cut edges // first pass cut edges
for (Dart d = map.begin(); d != map.end(); map.next(d)) for (Dart d = map.begin(); d != map.end(); map.next(d))
{ {
if (selected(d) && !map.isBoundaryMarked(d) && !me.isMarked(d)) if (selected(d) && !map.isBoundaryMarked2(d) && !me.isMarked(d))
{ {
if (!m0.isMarked(d)) if (!m0.isMarked(d))
{ {
......
...@@ -73,7 +73,7 @@ namespace Tetrahedralization ...@@ -73,7 +73,7 @@ namespace Tetrahedralization
// //check if all vertices degree is equal to 3 (= no direct adjacent vertex has been split) // //check if all vertices degree is equal to 3 (= no direct adjacent vertex has been split)
// for(std::vector<Dart>::iterator it=dov.begin();vertToTet && it!=dov.end();++it) // for(std::vector<Dart>::iterator it=dov.begin();vertToTet && it!=dov.end();++it)
// { // {
// if(!cmv.isMarked(*it) && !map.isBoundaryMarked(*it)) // if(!cmv.isMarked(*it) && !map.isBoundaryMarked3(*it))
// { // {
// cmv.mark(*it); // cmv.mark(*it);
// vertToTet = (map.phi1(map.phi2(map.phi1(map.phi2(map.phi1(map.phi2(*it))))))==*it); //degree = 3 // vertToTet = (map.phi1(map.phi2(map.phi1(map.phi2(map.phi1(map.phi2(*it))))))==*it); //degree = 3
...@@ -85,7 +85,7 @@ namespace Tetrahedralization ...@@ -85,7 +85,7 @@ namespace Tetrahedralization
// { // {
// for(std::vector<Dart>::iterator it=dov.begin();it!=dov.end();++it) // for(std::vector<Dart>::iterator it=dov.begin();it!=dov.end();++it)
// { // {
// if(cmv.isMarked(*it) && !map.isBoundaryMarked(*it)) // if(cmv.isMarked(*it) && !map.isBoundaryMarked3(*it))
// { // {
// cmv.unmark(*it); // cmv.unmark(*it);
// cut3Ear<PFP>(map,*it); // cut3Ear<PFP>(map,*it);
...@@ -569,7 +569,7 @@ Dart edgeBisection(typename PFP::MAP& map, Dart d) ...@@ -569,7 +569,7 @@ Dart edgeBisection(typename PFP::MAP& map, Dart d)
std::vector<Dart> edges; std::vector<Dart> edges;
do do
{ {
if(!map.isBoundaryMarked(dit)) if(!map.isBoundaryMarked3(dit))
{ {
edges.push_back(map.phi_1(dit)); edges.push_back(map.phi_1(dit));
edges.push_back(map.phi_1(map.phi2(map.phi_1(edges[0])))); edges.push_back(map.phi_1(map.phi2(map.phi_1(edges[0]))));
......
...@@ -204,7 +204,7 @@ void foreach_cell(MAP& map, std::vector<FunctorMapThreaded<MAP>*>& funcs, bool n ...@@ -204,7 +204,7 @@ void foreach_cell(MAP& map, std::vector<FunctorMapThreaded<MAP>*>& funcs, bool n
unsigned int nb = 0; unsigned int nb = 0;
while ((d != map.end()) && (nb < nbth*SIZE_BUFFER_THREAD) ) while ((d != map.end()) && (nb < nbth*SIZE_BUFFER_THREAD) )
{ {
if (good(d) && (!map.isBoundaryMarked(d)) && (!cmark->isMarked(d))) if (good(d) && (!map.isBoundaryMarkedCurrent(d)) && (!cmark->isMarked(d)))
{ {
cmark->mark(d); cmark->mark(d);
vd[nb%nbth].push_back(d); vd[nb%nbth].push_back(d);
...@@ -220,7 +220,7 @@ void foreach_cell(MAP& map, std::vector<FunctorMapThreaded<MAP>*>& funcs, bool n ...@@ -220,7 +220,7 @@ void foreach_cell(MAP& map, std::vector<FunctorMapThreaded<MAP>*>& funcs, bool n
unsigned int nb = 0; unsigned int nb = 0;
while ((d != map.end()) && (nb < nbth*SIZE_BUFFER_THREAD) ) while ((d != map.end()) && (nb < nbth*SIZE_BUFFER_THREAD) )
{ {
if (good(d) && (!map.isBoundaryMarked(d)) && (!dmark->isMarked(d))) if (good(d) && (!map.isBoundaryMarkedCurrent(d)) && (!dmark->isMarked(d)))
{ {
dmark->markOrbit<ORBIT>(d); dmark->markOrbit<ORBIT>(d);
vd[nb%nbth].push_back(d); vd[nb%nbth].push_back(d);
...@@ -292,7 +292,7 @@ void foreach_cell(MAP& map, std::vector<FunctorMapThreaded<MAP>*>& funcs, bool n ...@@ -292,7 +292,7 @@ void foreach_cell(MAP& map, std::vector<FunctorMapThreaded<MAP>*>& funcs, bool n
unsigned int nb = 0; unsigned int nb = 0;
while ((d != map.end()) && (nb < nbth*SIZE_BUFFER_THREAD) ) while ((d != map.end()) && (nb < nbth*SIZE_BUFFER_THREAD) )
{ {
if (good(d) && (!map.isBoundaryMarked(d)) && (!cmark->isMarked(d))) if (good(d) && (!map.isBoundaryMarkedCurrent(d)) && (!cmark->isMarked(d)))
{ {
cmark->mark(d); cmark->mark(d);
tempo[nb%nbth].push_back(d); tempo[nb%nbth].push_back(d);
...@@ -315,7 +315,7 @@ void foreach_cell(MAP& map, std::vector<FunctorMapThreaded<MAP>*>& funcs, bool n ...@@ -315,7 +315,7 @@ void foreach_cell(MAP& map, std::vector<FunctorMapThreaded<MAP>*>& funcs, bool n
unsigned int nb = 0; unsigned int nb = 0;
while ((d != map.end()) && (nb < nbth*SIZE_BUFFER_THREAD) ) while ((d != map.end()) && (nb < nbth*SIZE_BUFFER_THREAD) )
{ {
if (good(d) && (!map.isBoundaryMarked(d)) && (!dmark->isMarked(d))) if (good(d) && (!map.isBoundaryMarkedCurrent(d)) && (!dmark->isMarked(d)))
{ {
dmark->markOrbit<ORBIT>(d); dmark->markOrbit<ORBIT>(d);
tempo[nb%nbth].push_back(d); tempo[nb%nbth].push_back(d);
...@@ -704,7 +704,7 @@ void foreach_cell_all_thread(MAP& map, std::vector<FunctorMapThreaded<MAP>*>& fu ...@@ -704,7 +704,7 @@ void foreach_cell_all_thread(MAP& map, std::vector<FunctorMapThreaded<MAP>*>& fu
unsigned int nb=0; unsigned int nb=0;
while ((d != map.end()) && (nb < SIZE_BUFFER_THREAD) ) while ((d != map.end()) && (nb < SIZE_BUFFER_THREAD) )
{ {
if (good(d) && (!map.isBoundaryMarked(d)) && (!cmark->isMarked(d))) if (good(d) && (!map.isBoundaryMarkedCurrent(d)) && (!cmark->isMarked(d)))
{ {
cmark->mark(d); cmark->mark(d);
vd.push_back(d); vd.push_back(d);
...@@ -720,7 +720,7 @@ void foreach_cell_all_thread(MAP& map, std::vector<FunctorMapThreaded<MAP>*>& fu ...@@ -720,7 +720,7 @@ void foreach_cell_all_thread(MAP& map, std::vector<FunctorMapThreaded<MAP>*>& fu
unsigned int nb=0; unsigned int nb=0;
while ((d != map.end()) && (nb < SIZE_BUFFER_THREAD) ) while ((d != map.end()) && (nb < SIZE_BUFFER_THREAD) )
{ {
if (good(d) && (!map.isBoundaryMarked(d)) && (!dmark->isMarked(d))) if (good(d) && (!map.isBoundaryMarkedCurrent(d)) && (!dmark->isMarked(d)))
{ {
dmark->markOrbit<ORBIT>(d); dmark->markOrbit<ORBIT>(d);
vd.push_back(d); vd.push_back(d);
...@@ -778,7 +778,7 @@ void foreach_cell_all_thread(MAP& map, std::vector<FunctorMapThreaded<MAP>*>& fu ...@@ -778,7 +778,7 @@ void foreach_cell_all_thread(MAP& map, std::vector<FunctorMapThreaded<MAP>*>& fu
unsigned int nb=0; unsigned int nb=0;
while ((d != map.end()) && (nb < SIZE_BUFFER_THREAD) ) while ((d != map.end()) && (nb < SIZE_BUFFER_THREAD) )
{ {
if (good(d) && (!map.isBoundaryMarked(d)) && (!cmark->isMarked(d))) if (good(d) && (!map.isBoundaryMarkedCurrent(d)) && (!cmark->isMarked(d)))
{ {
cmark->mark(d); cmark->mark(d);
tempo.push_back(d); tempo.push_back(d);
...@@ -799,7 +799,7 @@ void foreach_cell_all_thread(MAP& map, std::vector<FunctorMapThreaded<MAP>*>& fu ...@@ -799,7 +799,7 @@ void foreach_cell_all_thread(MAP& map, std::vector<FunctorMapThreaded<MAP>*>& fu
unsigned int nb=0; unsigned int nb=0;
while ((d != map.end()) && (nb < SIZE_BUFFER_THREAD) ) while ((d != map.end()) && (nb < SIZE_BUFFER_THREAD) )
{ {
if (good(d) && (!map.isBoundaryMarked(d)) && (!dmark->isMarked(d))) if (good(d) && (!map.isBoundaryMarkedCurrent(d)) && (!dmark->isMarked(d)))
{ {
dmark->markOrbit<ORBIT>(d); dmark->markOrbit<ORBIT>(d);
tempo.push_back(d); tempo.push_back(d);
......
...@@ -336,7 +336,7 @@ void MapRender::initTrianglesOptimized(typename PFP::MAP& map, const FunctorSele ...@@ -336,7 +336,7 @@ void MapRender::initTrianglesOptimized(typename PFP::MAP& map, const FunctorSele
{ {
std::list<Dart> bound; std::list<Dart> bound;
if (good(dd) && !map.isBoundaryMarked(dd)) if (good(dd) && !map.isBoundaryMarkedCurrent(dd))
{ {
if(position == NULL) if(position == NULL)
addTri<PFP>(map, dd, tableIndices); addTri<PFP>(map, dd, tableIndices);
...@@ -362,7 +362,7 @@ void MapRender::initTrianglesOptimized(typename PFP::MAP& map, const FunctorSele ...@@ -362,7 +362,7 @@ void MapRender::initTrianglesOptimized(typename PFP::MAP& map, const FunctorSele
{ {
if (!m.isMarked(f)) if (!m.isMarked(f))
{ {
if (good(f) && !map.isBoundaryMarked(f)) if (good(f) && !map.isBoundaryMarkedCurrent(f))
{ {
if(position == NULL) if(position == NULL)
addTri<PFP>(map, f, tableIndices); addTri<PFP>(map, f, tableIndices);
......
...@@ -208,7 +208,7 @@ void Topo3Render::updateDataMap3(typename PFP::MAP& mapx, const VertexAttribute< ...@@ -208,7 +208,7 @@ void Topo3Render::updateDataMap3(typename PFP::MAP& mapx, const VertexAttribute<
m_nbRel2++; m_nbRel2++;
} }
e = mapx.phi3(d); e = mapx.phi3(d);
if (!mapx.isBoundaryMarked(e) && (d < e) && good(d) && good(e)) if (!mapx.isBoundaryMarked3(e) && (d < e) && good(d) && good(e))
{ {
*positionF3++ = fv2[d]; *positionF3++ = fv2[d];
*positionF3++ = fv2x[e]; *positionF3++ = fv2x[e];
...@@ -485,7 +485,7 @@ void Topo3Render::updateDataGMap3(typename PFP::MAP& mapx, const VertexAttribute ...@@ -485,7 +485,7 @@ void Topo3Render::updateDataGMap3(typename PFP::MAP& mapx, const VertexAttribute
m_nbRel2++; m_nbRel2++;
} }
e = map.beta3(d); e = map.beta3(d);
if (!map.isBoundaryMarked(e) && (d < e)) if (!map.isBoundaryMarked3(e) && (d < e))
{ {
*positionF3++ = fv2[d]; *positionF3++ = fv2[d];
*positionF3++ = fv2x[e]; *positionF3++ = fv2x[e];
...@@ -504,7 +504,7 @@ void Topo3Render::updateDataGMap3(typename PFP::MAP& mapx, const VertexAttribute ...@@ -504,7 +504,7 @@ void Topo3Render::updateDataGMap3(typename PFP::MAP& mapx, const VertexAttribute
m_nbRel2++; m_nbRel2++;
} }
e = map.beta3(d); e = map.beta3(d);
if (!map.isBoundaryMarked(e) && (d < e)) if (!map.isBoundaryMarked3(e) && (d < e))
{ {
*positionF3++ = fv2[d]; *positionF3++ = fv2[d];
*positionF3++ = fv2x[e]; *positionF3++ = fv2x[e];
...@@ -745,7 +745,7 @@ void Topo3Render::computeDartMiddlePositions(typename PFP::MAP& map, DartAttribu ...@@ -745,7 +745,7 @@ void Topo3Render::computeDartMiddlePositions(typename PFP::MAP& map, DartAttribu
// m_nbRel2++; // m_nbRel2++;
// } // }
// e = map.phi3(d); // e = map.phi3(d);
// if (!map.isBoundaryMarked(e) && (d < e)) // if (!map.isBoundaryMarked3(e) && (d < e))
// { // {
// *positionF3++ = fv2[d]; // *positionF3++ = fv2[d];
// *positionF3++ = fv2x[e]; // *positionF3++ = fv2x[e];
......
...@@ -146,6 +146,9 @@ public: ...@@ -146,6 +146,9 @@ public:
FunctorSelect* copy() const { return new SelectorEdgeNoBoundary(m_map);} FunctorSelect* copy() const { return new SelectorEdgeNoBoundary(m_map);}
}; };
/**
* Selector for darts of boundary (of current dimension)
*/
template <typename MAP> template <typename MAP>
class SelectorDartBoundary : public FunctorSelect class SelectorDartBoundary : public FunctorSelect
{ {
...@@ -154,10 +157,13 @@ protected: ...@@ -154,10 +157,13 @@ protected:
MAP& m_map; MAP& m_map;
public: public:
SelectorDartBoundary(MAP& m): m_map(m) {} SelectorDartBoundary(MAP& m): m_map(m) {}
bool operator()(Dart d) const { return m_map.isBoundaryMarked(d); } bool operator()(Dart d) const { return m_map.isBoundaryMarkedCurrent(d); }
FunctorSelect* copy() const { return new SelectorDartBoundary(m_map);} FunctorSelect* copy() const { return new SelectorDartBoundary(m_map);}
}; };
/**
* Selector for darts not of boundary (of current dimension)
*/
template <typename MAP> template <typename MAP>
class SelectorDartNoBoundary : public FunctorSelect class SelectorDartNoBoundary : public FunctorSelect
...@@ -167,7 +173,7 @@ protected: ...@@ -167,7 +173,7 @@ protected:
MAP& m_map; MAP& m_map;
public: public:
SelectorDartNoBoundary(MAP& m): m_map(m) {} SelectorDartNoBoundary(MAP& m): m_map(m) {}
bool operator()(Dart d) const { return !m_map.isBoundaryMarked(d); } bool operator()(Dart d) const { return !m_map.isBoundaryMarkedCurrent(d); }
FunctorSelect* copy() const { return new SelectorDartNoBoundary(m_map);} FunctorSelect* copy() const { return new SelectorDartNoBoundary(m_map);}
}; };
...@@ -372,7 +378,7 @@ public: ...@@ -372,7 +378,7 @@ public:
FunctorStoreNotBoundary(MAP& map, std::vector<Dart>& vec) : FunctorMap<MAP>(map), m_vec(vec) {} FunctorStoreNotBoundary(MAP& map, std::vector<Dart>& vec) : FunctorMap<MAP>(map), m_vec(vec) {}
bool operator()(Dart d) bool operator()(Dart d)
{ {
if (!this->m_map.isBoundaryMarked(d))