diff --git a/include/Topology/gmap/gmap0.h b/include/Topology/gmap/gmap0.h index 16fef5e1df0731cab4d2b4d92966d7dc8d3f56f3..41c26ea52ff4c578f3d38b835ff44caac504155f 100644 --- a/include/Topology/gmap/gmap0.h +++ b/include/Topology/gmap/gmap0.h @@ -68,6 +68,7 @@ public: * To generate or delete cells in a 0-G-map *************************************************************************/ + //@{ /** * create an edge * @return a dart of the edge @@ -79,6 +80,7 @@ public: * @param d a dart of the edge */ void deleteEdge(Dart d); + //@} /*! @name Cell Functors * Apply functors to all darts of a cell diff --git a/include/Topology/gmap/gmap1.h b/include/Topology/gmap/gmap1.h index 2792ff5061986ba452a4565db208eac814dd1843..a974a165efdf981f428e8731b6c32b42eb3cd445 100644 --- a/include/Topology/gmap/gmap1.h +++ b/include/Topology/gmap/gmap1.h @@ -112,6 +112,13 @@ public: *************************************************************************/ //@{ + //! Link two vertices belonging to distinct faces (add an edge between the two vertices) + /*! \pre Dart d and e MUST be different and belong to distinct face + * @param d first dart in the face + * @param e second dart in the face + */ + void linkVertices(Dart d, Dart e); + //! Cut an edge inserting a new dart between d and its successor in the face /*! @param d the edge to cut * \image hmtl map1_cutEdge.png @@ -138,15 +145,6 @@ public: * @param e a dart in the second face */ void mergeFaces(Dart d, Dart e); - - - //! Link two vertices belonging to distinct faces (add an edge between the two vertices) - /*! \pre Dart d and e MUST be different and belong to distinct face - * @param d first dart in the face - * @param e second dart in the face - */ - void linkVertices(Dart d, Dart e); - //@} /*! @name Topological Queries diff --git a/include/Topology/gmap/gmap1.hpp b/include/Topology/gmap/gmap1.hpp index 8196675477837d3069fe7c0bd7e9541b86152e4a..9e1de3f14b7377041cf63bb0f0ff4607de9933ac 100644 --- a/include/Topology/gmap/gmap1.hpp +++ b/include/Topology/gmap/gmap1.hpp @@ -180,6 +180,14 @@ inline void GMap1::phi1unsew(Dart d) * Topological operations on 1-maps *************************************************************************/ +inline void GMap1::linkVertices(Dart d, Dart e) +{ + assert(d != e && !sameOrientedFace(d, e)) ; + GMap1::cutEdge(phi_1(d)); // cut the edge before d (insert a new dart before d) + GMap1::cutEdge(phi_1(e)); // cut the edge before e (insert a new dart before e) + phi1sew(phi_1(d), phi_1(e)) ; // phi1sew between the 2 new inserted darts +} + inline void GMap1::cutEdge(Dart d) { Dart e = newDart(); @@ -236,14 +244,6 @@ inline void GMap1::mergeFaces(Dart d, Dart e) deleteEdge(e) ; } -inline void GMap1::linkVertices(Dart d, Dart e) -{ - assert(d != e && !sameOrientedFace(d, e)) ; - GMap1::cutEdge(phi_1(d)); // cut the edge before d (insert a new dart before d) - GMap1::cutEdge(phi_1(e)); // cut the edge before e (insert a new dart before e) - phi1sew(phi_1(d), phi_1(e)) ; // phi1sew between the 2 new inserted darts -} - /*! @name Cell Functors * Apply functors to all darts of a cell *************************************************************************/ diff --git a/include/Topology/gmap/gmap2.h b/include/Topology/gmap/gmap2.h index 81157ac1f1d9035c911d3fa0c6304acccf530fb4..229e6ab17d9e2383af90d89fadaddd56af05138e 100644 --- a/include/Topology/gmap/gmap2.h +++ b/include/Topology/gmap/gmap2.h @@ -113,6 +113,20 @@ public: */ virtual bool deleteVertex(Dart d) ; + //! Insert an edge after a dart in the vertex orbit + /*! \pre Dart d and e MUST be different and belong to distinct face + * \pre Dart e must be phi2-linked with its phi_1 dart + * @param d dart of the vertex + * @param e dart of the edge + */ + virtual void insertEdgeInVertex(Dart d, Dart e); + + //! Remove an edge from a vertex orbit + /*! \pre Dart d must be phi2 sewn + * @param d the dart of the edge to remove from the vertex + */ + virtual void removeEdgeFromVertex(Dart d); + //! Cut the edge of d and its opposite edge if it exists /*! @param d a dart of the edge to cut */ @@ -151,20 +165,6 @@ public: */ virtual bool flipBackEdge(Dart d); - //! Insert an edge after a dart in the vertex orbit - /*! \pre Dart d and e MUST be different and belong to distinct face - * \pre Dart e must be phi2-linked with its phi_1 dart - * @param d dart of the vertex - * @param e dart of the edge - */ - virtual void insertEdgeInVertex(Dart d, Dart e); - - //! Remove an edge from a vertex orbit - /*! \pre Dart d must be phi2 sewn - * @param d the dart of the edge to remove from the vertex - */ - virtual void removeEdgeFromVertex(Dart d); - //! Sew two faces along an edge (pay attention to the orientation !) /*! \pre Darts d & e MUST be fixed point of phi2 relation * @param d a dart of the first face @@ -234,13 +234,12 @@ public: */ virtual unsigned int closeHole(Dart d); -// /** -// * Mark half of dart defining an orientation -// * @param d a dart that belong to the orientation we want to mark -// * @return the marker which mark th orientation -// */ -// DartMarker markCCOrientation(Dart d); - + //! Close the map removing topological holes. + /*! Add faces to the map that close every existing hole. + * These faces are marked. + * \warning The embeddings of vertices are not updated + * @param marker + */ void closeMap(DartMarker& marker); //@} @@ -248,6 +247,7 @@ public: * Return or set various topological information *************************************************************************/ + //@{ //! Test if dart d and e belong to the same oriented vertex /*! @param d a dart * @param e a dart @@ -260,6 +260,16 @@ public: */ bool sameVertex(Dart d, Dart e); + /** + * compute the number of edges of the vertex of d + */ + unsigned int vertexDegree(Dart d) ; + + /** + * tell if the vertex of d is on the boundary of the map + */ + bool isBoundaryVertex(Dart d) ; + //! Test if dart d and e belong to the same oriented volume /*! @param d a dart * @param e a dart @@ -272,16 +282,6 @@ public: */ bool sameVolume(Dart d, Dart e); - /** - * compute the number of edges of the vertex of d - */ - unsigned int vertexDegree(Dart d) ; - - /** - * tell if the vertex of d is on the boundary of the map - */ - bool isBoundaryVertex(Dart d) ; - /** * Check if map is complete */ diff --git a/include/Topology/gmap/gmap3.h b/include/Topology/gmap/gmap3.h index 7ed17ea10e6cee3e17612fc75f3614f4f559e1b6..0456b5953a3a1ed358d0feeeb80982957b15bfc4 100644 --- a/include/Topology/gmap/gmap3.h +++ b/include/Topology/gmap/gmap3.h @@ -85,13 +85,16 @@ public: void phi3unsew(Dart d); - + /*! @name Generator and Deletor + * To generate or delete volumes in a 3-map + *************************************************************************/ //@{ - //! Delete a volume of - /*! @param d a dart of volume + //! Delete a volume erasing all its darts. + /*! The phi3-links around the volume are removed + * @param d a dart of the volume */ - void deleteOrientedVolume(Dart d); + void deleteVolume(Dart d); //@} /*! @name Topological Operators @@ -99,6 +102,24 @@ public: *************************************************************************/ //@{ + //! Cut the edge of d + /*! @param d a dart of the edge to cut + */ + virtual void cutEdge(Dart d); + + //! Split a face inserting an edge between two vertices + /*! \pre Dart d and e should belong to the same face and be distinct + * @param d dart of first vertex + * @param e dart of second vertex + * @return the dart of the new edge lying in the vertex of d after the cut + */ + virtual void splitFace(Dart d, Dart e); + + //! Unsew the "ear" of the vertex of d + /*! @param d a dart + */ + virtual Dart cutSpike(Dart d); + //! Sew two oriented volumes along their faces. /*! The oriented faces should not be phi3-linked and have the same length * @param d a dart of the first volume @@ -115,46 +136,8 @@ public: /*! @param d a dart of common face */ bool mergeVolumes(Dart d); + //@} - //! Split a face inserting an edge between two vertices - /*! \pre Dart d and e should belong to the same face and be distinct - * @param d dart of first vertex - * @param e dart of second vertex - * @return the dart of the new edge lying in the vertex of d after the cut - */ - virtual void splitFace(Dart d, Dart e); - - //! Cut the edge of d - /*! @param d a dart of the edge to cut - */ - virtual void cutEdge(Dart d); - - - //! Collapse an edge (that is deleted) possibly merging its vertices - /*! If delDegenerateFaces is true, the method checks that no degenerate - * faces are build (faces with less than 3 edges). If it occurs the faces - * are deleted and the adjacencies are updated (see deleteIfDegenerated). - * \warning This may produce two distinct vertices if the edge - * was the only link between two border faces - * @param d a dart in the deleted edge - * @param delDegenerateFaces a boolean (default to true) - */ - virtual int collapseEdge(Dart d, bool delDegenerateFaces = true, bool delDegenerateVolumes = true); - - //! - /*! - * - * @param - * @param - * @param - */ - virtual void collapseFace(Dart d, bool delDegenerateFaces = true, bool delDegenerateVolumes = true); - - //! - /*! - * - */ - virtual Dart cutSpike(Dart d); /*! @name Topological Queries * Return or set various topological information @@ -173,7 +156,16 @@ public: */ bool sameVertex(Dart d, Dart e) ; - //@{ + //! Compute the number of edges of the vertex of d + /*! @param d a dart + */ + unsigned int vertexDegree(Dart d) ; + + //! Tell if the vertex of d is on the boundary + /*! @param d a dart + */ + virtual bool isBoundaryVertex(Dart d); + //! Test if dart d and e belong to the same oriented edge /*! @param d a dart * @param e a dart @@ -186,6 +178,11 @@ public: */ bool sameEdge(Dart d, Dart e) ; + //! Compute the number of volumes around the edge of d + /*! @param d a dart + */ + unsigned int edgeDegree(Dart d); + //!Test if dart d and e belong to the same oriented face /*! @param d a dart * @param e a dart @@ -198,34 +195,15 @@ public: */ bool sameFace(Dart d, Dart e); - /** - * compute the number of edges of the vertex of d - */ - unsigned int vertexDegree(Dart d) ; - - /** - * compute the number of volumes around the edge of d - */ - virtual unsigned int edgeDegree(Dart d); - - /** - * compute the number of faces in the volume of d - */ - unsigned int volumeDegree(Dart d); - virtual bool check(); + //@} - /** - * - */ - virtual bool isBoundaryVertex(Dart d); /*! @name Cell Functors * Apply functors to all darts of a cell *************************************************************************/ //@{ - /** * Apply a functor on each dart of a face * @param d a dart of the face diff --git a/src/Topology/gmap/gmap2.cpp b/src/Topology/gmap/gmap2.cpp index f8a08371fcea8784e6065c02daac3b5a61679291..772c65da936bd7ac823d23513828f8abe98dda9e 100644 --- a/src/Topology/gmap/gmap2.cpp +++ b/src/Topology/gmap/gmap2.cpp @@ -73,6 +73,20 @@ bool GMap2::deleteVertex(Dart d) return true ; } +void GMap2::insertEdgeInVertex(Dart d, Dart e) +{ + assert(!sameVertex(d,e) && phi2(e)==phi_1(e)); + + phi1sew(phi_1(d),phi_1(e)); +} + +void GMap2::removeEdgeFromVertex(Dart d) +{ + assert(phi2(d)!=d); + + phi1sew(phi_1(d),phi2(d)); +} + void GMap2::cutEdge(Dart d) { GMap1::cutEdge(d); // Cut the edge of d @@ -192,20 +206,6 @@ bool GMap2::flipBackEdge(Dart d) return false ; // cannot flip a border edge } -void GMap2::insertEdgeInVertex(Dart d, Dart e) -{ - assert(!sameVertex(d,e) && phi2(e)==phi_1(e)); - - phi1sew(phi_1(d),phi_1(e)); -} - -void GMap2::removeEdgeFromVertex(Dart d) -{ - assert(phi2(d)!=d); - - phi1sew(phi_1(d),phi2(d)); -} - void GMap2::sewFaces(Dart d, Dart e) { phi2sew(d, e); @@ -384,45 +384,6 @@ void GMap2::closeMap(DartMarker& marker) } } -//DartMarker GMap2::markCCOrientation(Dart d) -//{ -// // lock a marker -// DartMarker markCC(*this); -// -// // init algo with parameter dart -// std::list darts_list; -// darts_list.push_back(d); -// markCC.mark(d); -// -// // use iterator for begin of not yet treated darts -// std::list::iterator beg = darts_list.begin(); -// -// // until all darts treated -// while (beg != darts_list.end()) -// { -// Dart d1 = *beg; -// // add phi<1> and phi<2> successor if they are not yet marked -// Dart d2 = beta2(beta0(d1)); -// Dart d3 = beta1(beta0(d1)); -// -// if (!markCC.isMarked(d2)) -// { -// darts_list.push_back(d2); -// markCC.mark(d2); -//// markCC.mark(beta0(d2)); -// } -// if (!markCC.isMarked(d3)) -// { -// darts_list.push_back(d3); -// markCC.mark(d3); -//// markCC.mark(beta0(d3)); -// } -// // step to next dart of list -// beg++; -// } -// return markCC; -//} - /*! @name Topological Queries * Return or set various topological information *************************************************************************/ @@ -452,6 +413,30 @@ bool GMap2::sameVertex(Dart d, Dart e) return false; // None is equal to e => vertices are distinct } +unsigned int GMap2::vertexDegree(Dart d) +{ + unsigned int count = 0 ; + Dart dNext = d ; + do + { + ++count ; + dNext = alpha1(dNext) ; + } while (dNext != d) ; + return count ; +} + +bool GMap2::isBoundaryVertex(Dart d) +{ + Dart dNext = d ; + do + { + if(beta2(dNext) == dNext) + return true ; + dNext = alpha1(dNext) ; + } while (dNext != d) ; + return false ; +} + bool GMap2::sameOrientedVolume(Dart d, Dart e) { DartMarkerStore mark(*this); // Lock a marker @@ -514,30 +499,6 @@ bool GMap2::sameVolume(Dart d, Dart e) return false; } -unsigned int GMap2::vertexDegree(Dart d) -{ - unsigned int count = 0 ; - Dart dNext = d ; - do - { - ++count ; - dNext = alpha1(dNext) ; - } while (dNext != d) ; - return count ; -} - -bool GMap2::isBoundaryVertex(Dart d) -{ - Dart dNext = d ; - do - { - if(beta2(dNext) == dNext) - return true ; - dNext = alpha1(dNext) ; - } while (dNext != d) ; - return false ; -} - bool GMap2::check() { CGoGNout << "Check: topology begin" << CGoGNendl; diff --git a/src/Topology/gmap/gmap3.cpp b/src/Topology/gmap/gmap3.cpp index 016a74e3ec98d9c601a4943fb0c8d829cb795bf8..e70e06812a33d33356a02e8c78008b47b6ef6a21 100644 --- a/src/Topology/gmap/gmap3.cpp +++ b/src/Topology/gmap/gmap3.cpp @@ -28,7 +28,11 @@ namespace CGoGN { -void GMap3::deleteOrientedVolume(Dart d) +/*! @name Generator and Deletor + * To generate or delete volumes in a 3-map + *************************************************************************/ + +void GMap3::deleteVolume(Dart d) { DartMarkerStore mark(*this); // Lock a marker bool found = false; // Last functor return value @@ -71,61 +75,9 @@ void GMap3::deleteOrientedVolume(Dart d) GMap1::deleteFace(*face); } - - - - -void GMap3::sewVolumes(Dart d, Dart e) -{ - assert(faceDegree(d) == faceDegree(e)); - - Dart fitD = d ; - Dart fitE = e ; - do - { - phi3sew(fitD,fitE); - fitD = phi1(fitD) ; - fitE = phi_1(fitE) ; - } while(fitD != d) ; -} - -void GMap3::unsewVolumes(Dart d) -{ - Dart fitD = d; - do - { - phi3unsew(fitD); - fitD = phi1(fitD); - } while(fitD != d); -} - -bool GMap3::mergeVolumes(Dart d) -{ - Dart e = phi3(d) ; - if(e != d) - { - unsewVolumes(d); - GMap2::mergeVolumes(d, e); // merge the two volumes along common face - return true ; - } - return false ; -} - -void GMap3::splitFace(Dart d, Dart e) -{ - GMap2::splitFace(d,e); - - if (phi3(d) != d) - { - Dart dd = phi1(phi3(d)); - Dart ee = phi1(phi3(e)); - - GMap2::splitFace(dd,ee); - - phi3sew(phi_1(d), phi_1(ee)); - phi3sew(phi_1(e), phi_1(dd)); - } -} +/*! @name Topological Operators + * Topological operations on 3-maps + *************************************************************************/ void GMap3::cutEdge(Dart d) { @@ -167,120 +119,20 @@ void GMap3::cutEdge(Dart d) } } -int GMap3::collapseEdge(Dart d, bool delDegenerateFaces, - bool delDegenerateVolumes) -{ - Dart e = d; - int i = 0; - - //stocke un brin par volume autour de l'arete - std::list tmp; - do - { - tmp.push_back(e); - e = alpha2(e); - i++; - } while (e != d); - - for (std::list::iterator it = tmp.begin(); it != tmp.end(); ++it) - { - Dart e = phi2(*it); - - cutSpike(e); - - Dart t1=e,t2=e; - //si les faces opposées ont un tetraedre cousu - if(phi3(phi2(phi1(e))) != phi2(phi1(e))) { - t1 = phi3(phi2(phi1(e))); - unsewVolumes(t1); - } - - if(phi3(phi2(phi_1(e))) != phi2(phi_1(e))) { - t2 = phi3(phi2(phi_1(e))); - unsewVolumes(t2); - } - - if(t1 != e && t2 != e) { - sewVolumes(t1,t2); - } - - //unsewVolumes(e); - //unsewVolumes(*it); - - deleteOrientedVolume(*it); - } - - return i; -} - -//TODO -void GMap3::collapseFace(Dart d, bool delDegenerateFaces, - bool delDegenerateVolumes) +void GMap3::splitFace(Dart d, Dart e) { - Dart e = d; - std::list tmp; - - //save a dart from the edge for all neighbors - do - { - //if(phi3(phi2(e)) != phi2(e)) - // tmp.push_back(phi3(phi2(e))); - tmp.push_back(phi3(phi2(e))); - e = phi1(e); - }while(e != d); - - //del the last one (n-1 edge collapse) - tmp.pop_back(); - - //CGoGNout << "#voisin=" << tmp.size() << CGoGNendl; + GMap2::splitFace(d,e); - //collapse all the edges in the list - for(std::list::iterator it = tmp.begin() ; it != tmp.end() ; ++it) + if (phi3(d) != d) { - Dart d = *it; - //CGoGNout << "collapseEdge" << CGoGNendl; - //collapseEdge(*it, delDegenerateFaces, delDegenerateVolumes); - //stocke un brin par volume autour de l'arete - - Dart e = d; - - //stocke un brin par volume autour de l'arete - std::list tmpedge; - do - { - tmpedge.push_back(e); - e = alpha2(e); - } while (e != d); - - for (std::list::iterator it = tmpedge.begin(); it != tmpedge.end(); ++it) - { - Dart e = phi2(*it); - - cutSpike(e); - - Dart t1=e,t2=e; - //si les faces opposées ont un tetraedre cousu - if(phi3(phi2(phi1(e))) != phi2(phi1(e))) { - t1 = phi3(phi2(phi1(e))); - unsewVolumes(t1); - } - - if(phi3(phi2(phi_1(e))) != phi2(phi_1(e))) { - t2 = phi3(phi2(phi_1(e))); - unsewVolumes(t2); - } + Dart dd = phi1(phi3(d)); + Dart ee = phi1(phi3(e)); - if(t1 != e && t2 != e) { - sewVolumes(t1,t2); - } + GMap2::splitFace(dd,ee); - //deleteOrientedVolume(*it); - } + phi3sew(phi_1(d), phi_1(ee)); + phi3sew(phi_1(e), phi_1(dd)); } -// for(std::list::iterator it = tmp.begin() ; it != tmp.end() ; ++it) -// { -// deleteOrientedVolume(*it); -// } } Dart GMap3::cutSpike(Dart d) @@ -345,6 +197,42 @@ Dart GMap3::cutSpike(Dart d) return dNew; } +void GMap3::sewVolumes(Dart d, Dart e) +{ + assert(faceDegree(d) == faceDegree(e)); + + Dart fitD = d ; + Dart fitE = e ; + do + { + phi3sew(fitD,fitE); + fitD = phi1(fitD) ; + fitE = phi_1(fitE) ; + } while(fitD != d) ; +} + +void GMap3::unsewVolumes(Dart d) +{ + Dart fitD = d; + do + { + phi3unsew(fitD); + fitD = phi1(fitD); + } while(fitD != d); +} + +bool GMap3::mergeVolumes(Dart d) +{ + Dart e = phi3(d) ; + if(e != d) + { + unsewVolumes(d); + GMap2::mergeVolumes(d, e); // merge the two volumes along common face + return true ; + } + return false ; +} + /*! @name Topological Queries * Return or set various topological information *************************************************************************/ @@ -430,6 +318,91 @@ bool GMap3::sameVertex(Dart d, Dart e) return false; } +unsigned int GMap3::vertexDegree(Dart d) +{ + int count = 0; + DartMarkerStore mv(*this); // Lock a marker + + std::list darts_list; //Darts that are traversed + darts_list.push_back(d); //Start with the dart d + std::list::iterator darts; + + mv.mark(d); + + for(darts = darts_list.begin(); darts != darts_list.end() ; ++darts) + { + Dart dc = *darts; + + //add phi21 and phi23 successor if they are not marked yet + Dart d2 = phi2(dc); + Dart d21 = phi1(d2); // turn in volume + Dart d23 = phi3(d2); // change volume + + if(!mv.isMarked(d21)) + { + darts_list.push_back(d21); + mv.mark(d21); + } + + if((d23!=d2) && !mv.isMarked(d23)) + { + darts_list.push_back(d23); + mv.mark(d23); + } + } + + DartMarkerStore me(*this); + + for(darts = darts_list.begin(); darts != darts_list.end() ; ++darts) + { + if(!me.isMarked(*darts)) + { + ++count; + me.markOrbit(EDGE, *darts); + } + } + + return count; +} + +bool GMap3::isBoundaryVertex(Dart d) +{ + DartMarkerStore mv(*this); // Lock a marker + bool found = false; // Last functor return value + + std::list darts_list; //Darts that are traversed + darts_list.push_back(d); //Start with the dart d + std::list::iterator darts; + + mv.mark(d); + + for(darts = darts_list.begin(); !found && darts != darts_list.end() ; ++darts) + { + Dart dc = *darts; + + //add phi21 and phi23 successor if they are not marked yet + Dart d2 = phi2(dc); + Dart d21 = phi1(d2); // turn in volume + Dart d23 = phi3(d2); // change volume + + if(!mv.isMarked(d21)) + { + darts_list.push_back(d21); + mv.mark(d21); + } + + if((d23!=d2) && !mv.isMarked(d23)) + { + darts_list.push_back(d23); + mv.mark(d23); + } + + found = phi3(dc) == dc; + } + + return found; +} + bool GMap3::sameOrientedEdge(Dart d, Dart e) { Dart dNext = d; @@ -461,6 +434,20 @@ bool GMap3::sameEdge(Dart d, Dart e) return false; } +unsigned int GMap3::edgeDegree(Dart d) +{ + unsigned int deg = 0; + Dart e = d; + + do + { + deg++; + e = alpha2(e); + } while(e != d); + + return deg; +} + bool GMap3::sameOrientedFace(Dart d, Dart e) { Dart dd = d; @@ -493,20 +480,6 @@ bool GMap3::sameFace(Dart d, Dart e) return false; } -unsigned int GMap3::edgeDegree(Dart d) -{ - unsigned int deg = 0; - Dart e = d; - - do - { - deg++; - e = alpha2(e); - } while(e != d); - - return deg; -} - bool GMap3::check() { CGoGNout << "Check: topology begin" << CGoGNendl; @@ -585,44 +558,6 @@ bool GMap3::check() return true; } -bool GMap3::isBoundaryVertex(Dart d) -{ - DartMarkerStore mv(*this); // Lock a marker - bool found = false; // Last functor return value - - std::list darts_list; //Darts that are traversed - darts_list.push_back(d); //Start with the dart d - std::list::iterator darts; - - mv.mark(d); - - for(darts = darts_list.begin(); !found && darts != darts_list.end() ; ++darts) - { - Dart dc = *darts; - - //add phi21 and phi23 successor if they are not marked yet - Dart d2 = phi2(dc); - Dart d21 = phi1(d2); // turn in volume - Dart d23 = phi3(d2); // change volume - - if(!mv.isMarked(d21)) - { - darts_list.push_back(d21); - mv.mark(d21); - } - - if((d23!=d2) && !mv.isMarked(d23)) - { - darts_list.push_back(d23); - mv.mark(d23); - } - - found = phi3(dc) == dc; - } - - return found; -} - /*! @name Cell Functors * Apply functors to all darts of a cell *************************************************************************/ @@ -740,12 +675,4 @@ bool GMap3::foreach_dart_of_cc(Dart d, FunctorType& f, unsigned int thread) return found; } - - - - - - - - } // end namespace