Commit b75bfd43 by 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(myMap, position, 0.9f, 0.9f,nb); m_render_topo->updateData(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("color"); colorDarts = myMap.addAttribute("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
 ... @@ -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::removeFacesOfBoundary(VertexAttribu ... @@ -1183,7 +1183,7 @@ void MarchingCube::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::removeFacesOfBoundary(VertexAttribu ... @@ -1208,7 +1208,7 @@ void MarchingCube::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(map, d, attributs); // compute center EMB center = Geometry::faceCentroidGen(map, d, attributs); // compute center Dart cf = quadranguleFace(map, d); // quadrangule the face Dart cf = quadranguleFace(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 center = AttribOps::zero(); ... @@ -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::iterator it=dov.begin();vertToTet && it!=dov.end();++it) // for(std::vector::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::iterator it=dov.begin();it!=dov.end();++it) // for(std::vector::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(map,*it); // cut3Ear(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 edges; std::vector 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])))); ... ...