Commit 3128828e authored by Pierre Kraemer's avatar Pierre Kraemer

orbit as template -> tuto_oper OK

parent 7e8be952
...@@ -170,9 +170,8 @@ void MyQT::operation(int x) ...@@ -170,9 +170,8 @@ void MyQT::operation(int x)
void MyQT::createMap(int n) void MyQT::createMap(int n)
{ {
position = myMap.addAttribute<VEC3, VERTEX>("position");
position = myMap.addAttribute<PFP::VEC3>(VERTEX, "position"); colorDarts = myMap.addAttribute<VEC3, DART>("color");
colorDarts = myMap.addAttribute<PFP::VEC3>(DART, "color");
Algo::Modelisation::Polyhedron<PFP> grid(myMap,position); Algo::Modelisation::Polyhedron<PFP> grid(myMap,position);
grid.grid_topo(n,n); grid.grid_topo(n,n);
...@@ -208,8 +207,6 @@ void MyQT::createMap(int n) ...@@ -208,8 +207,6 @@ void MyQT::createMap(int n)
} }
} }
void MyQT::updateMap() 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);
...@@ -272,7 +269,7 @@ void MyQT::cb_keyPress(int keycode) ...@@ -272,7 +269,7 @@ void MyQT::cb_keyPress(int keycode)
switch(keycode) switch(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.isBoundaryMarked(d))
{ {
...@@ -286,7 +283,7 @@ void MyQT::cb_keyPress(int keycode) ...@@ -286,7 +283,7 @@ void MyQT::cb_keyPress(int keycode)
} }
break; break;
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.isBoundaryMarked(d))
{ {
...@@ -297,7 +294,7 @@ void MyQT::cb_keyPress(int keycode) ...@@ -297,7 +294,7 @@ void MyQT::cb_keyPress(int keycode)
break; break;
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.isBoundaryMarked(d))
{ {
...@@ -308,7 +305,7 @@ void MyQT::cb_keyPress(int keycode) ...@@ -308,7 +305,7 @@ void MyQT::cb_keyPress(int keycode)
break; break;
case Qt::Key_Up: case Qt::Key_Up:
if (m_selected!=NIL) if (m_selected!=NIL)
position[m_selected][1] +=m_shift; position[m_selected][1] += m_shift;
updateMap(); updateMap();
updateGL(); updateGL();
break; break;
...@@ -370,7 +367,7 @@ void MyQT::importMesh(std::string& filename) ...@@ -370,7 +367,7 @@ void MyQT::importMesh(std::string& filename)
if (extension == std::string(".map")) if (extension == std::string(".map"))
{ {
myMap.loadMapBin(filename); myMap.loadMapBin(filename);
position = myMap.getAttribute<PFP::VEC3>(VERTEX, "position") ; position = myMap.getAttribute<VEC3, VERTEX>("position") ;
} }
else else
{ {
...@@ -380,13 +377,13 @@ void MyQT::importMesh(std::string& filename) ...@@ -380,13 +377,13 @@ void MyQT::importMesh(std::string& filename)
CGoGNerr << "could not import " << filename << CGoGNendl ; CGoGNerr << "could not import " << filename << CGoGNendl ;
return; return;
} }
position = myMap.getAttribute<PFP::VEC3>(VERTEX, attrNames[0]) ; position = myMap.getAttribute<VEC3, VERTEX>(attrNames[0]) ;
} }
colorDarts = myMap.getAttribute<PFP::VEC3>(DART, "color"); colorDarts = myMap.getAttribute<VEC3, DART>("color");
if (!colorDarts.isValid()) if (!colorDarts.isValid())
{ {
colorDarts = myMap.addAttribute<PFP::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.isBoundaryMarked(d)))
......
...@@ -61,6 +61,8 @@ struct PFP: public PFP_STANDARD ...@@ -61,6 +61,8 @@ struct PFP: public PFP_STANDARD
#endif #endif
}; };
typedef PFP::MAP MAP ;
typedef PFP::VEC3 VEC3 ;
class MyQT: public Utils::QT::SimpleQT class MyQT: public Utils::QT::SimpleQT
...@@ -80,10 +82,10 @@ public: ...@@ -80,10 +82,10 @@ public:
protected: protected:
// declaration of the map // declaration of the map
PFP::MAP myMap; MAP myMap;
PFP::TVEC3 position; AttributeHandler<VEC3, VERTEX> position;
AttributeHandler<Geom::Vec3f> colorDarts; AttributeHandler<VEC3, DART> colorDarts;
SelectorDartNoBoundary<PFP::MAP> nb; SelectorDartNoBoundary<PFP::MAP> nb;
...@@ -113,6 +115,4 @@ public slots: ...@@ -113,6 +115,4 @@ public slots:
void width(int w); void width(int w);
}; };
#endif #endif
...@@ -39,7 +39,6 @@ int main(int argc, char **argv) ...@@ -39,7 +39,6 @@ int main(int argc, char **argv)
QApplication app(argc, argv); QApplication app(argc, argv);
MyQT sqt; MyQT sqt;
sqt.setDock(& sqt.dock); sqt.setDock(& sqt.dock);
sqt.setCallBack( sqt.dock.listOper, SIGNAL(currentRowChanged(int)), SLOT(operation(int)) ); sqt.setCallBack( sqt.dock.listOper, SIGNAL(currentRowChanged(int)), SLOT(operation(int)) );
sqt.setCallBack( sqt.dock.svg, SIGNAL(clicked()), SLOT(svg()) ); sqt.setCallBack( sqt.dock.svg, SIGNAL(clicked()), SLOT(svg()) );
...@@ -61,7 +60,6 @@ int main(int argc, char **argv) ...@@ -61,7 +60,6 @@ int main(int argc, char **argv)
return app.exec(); return app.exec();
} }
void MyQT::operation(int x) void MyQT::operation(int x)
{ {
switch(x) switch(x)
...@@ -188,9 +186,9 @@ void MyQT::operation(int x) ...@@ -188,9 +186,9 @@ void MyQT::operation(int x)
void MyQT::createMap(int n) void MyQT::createMap(int n)
{ {
myMap.clear(true); myMap.clear(true);
position = myMap.getAttribute<PFP::VEC3>(VERTEX, "position"); position = myMap.getAttribute<VEC3, VERTEX>("position");
if (!position.isValid()) if (!position.isValid())
position = myMap.addAttribute<PFP::VEC3>(VERTEX, "position"); position = myMap.addAttribute<VEC3, VERTEX>("position");
Algo::Modelisation::Primitive3D<PFP> prim(myMap, position); Algo::Modelisation::Primitive3D<PFP> prim(myMap, position);
prim.hexaGrid_topo(n,n,n); prim.hexaGrid_topo(n,n,n);
prim.embedHexaGrid(1.0f,1.0f,1.0f); prim.embedHexaGrid(1.0f,1.0f,1.0f);
...@@ -208,12 +206,8 @@ void MyQT::createMap(int n) ...@@ -208,12 +206,8 @@ void MyQT::createMap(int n)
m_render_topo->setDartWidth(3.0f); m_render_topo->setDartWidth(3.0f);
m_render_topo->setInitialDartsColor(0.0f,0.0f,0.0f); m_render_topo->setInitialDartsColor(0.0f,0.0f,0.0f);
m_render_topo->updateData<PFP>(myMap, position, m_ex1,m_ex2,m_ex3, nb); m_render_topo->updateData<PFP>(myMap, position, m_ex1,m_ex2,m_ex3, nb);
} }
void MyQT::updateMap() void MyQT::updateMap()
{ {
m_render_topo->updateData<PFP>(myMap, position, m_ex1,m_ex2,m_ex3, nb); m_render_topo->updateData<PFP>(myMap, position, m_ex1,m_ex2,m_ex3, nb);
...@@ -276,7 +270,6 @@ void MyQT::cb_mousePress(int button, int x, int y) ...@@ -276,7 +270,6 @@ void MyQT::cb_mousePress(int button, int x, int y)
} }
updateGL(); updateGL();
} }
} }
void MyQT::cb_keyPress(int keycode) void MyQT::cb_keyPress(int keycode)
...@@ -324,7 +317,6 @@ void MyQT::cb_keyPress(int keycode) ...@@ -324,7 +317,6 @@ void MyQT::cb_keyPress(int keycode)
m_selected = myMap.phi3(m_selected); m_selected = myMap.phi3(m_selected);
updateGL(); updateGL();
break; break;
case 'q': case 'q':
m_selected2 = myMap.phi1(m_selected2); m_selected2 = myMap.phi1(m_selected2);
updateGL(); updateGL();
...@@ -341,7 +333,6 @@ void MyQT::cb_keyPress(int keycode) ...@@ -341,7 +333,6 @@ void MyQT::cb_keyPress(int keycode)
m_selected2 = myMap.phi3(m_selected2); m_selected2 = myMap.phi3(m_selected2);
updateGL(); updateGL();
break; break;
case 'w': case 'w':
m_ex1 = 0.99f; m_ex1 = 0.99f;
m_ex2 = 0.99f; m_ex2 = 0.99f;
...@@ -392,7 +383,7 @@ void MyQT::cb_keyPress(int keycode) ...@@ -392,7 +383,7 @@ void MyQT::cb_keyPress(int keycode)
// break; // break;
case Qt::Key_Up: case Qt::Key_Up:
if (m_selected!=NIL) if (m_selected!=NIL)
position[m_selected][1] +=m_shift; position[m_selected][1] += m_shift;
updateMap(); updateMap();
updateGL(); updateGL();
break; break;
...@@ -420,13 +411,13 @@ void MyQT::cb_keyPress(int keycode) ...@@ -420,13 +411,13 @@ void MyQT::cb_keyPress(int keycode)
void MyQT::svg() void MyQT::svg()
{ {
if (m_selected!=NIL) if (m_selected != NIL)
m_render_topo->setDartColor(m_selected,0.8f,0.0f,0.0f); m_render_topo->setDartColor(m_selected, 0.8f, 0.0f, 0.0f);
if (m_selected2!=NIL) if (m_selected2 != NIL)
m_render_topo->setDartColor(m_selected2,0.0f,0.8f,0.0f); m_render_topo->setDartColor(m_selected2, 0.0f, 0.8f, 0.0f);
std::string filename = selectFileSave("snapshot file", ".", "(*.svg)"); std::string filename = selectFileSave("snapshot file", ".", "(*.svg)");
m_render_topo->svgout2D(filename, modelViewMatrix(),projectionMatrix()); m_render_topo->svgout2D(filename, modelViewMatrix(), projectionMatrix());
} }
void MyQT::cb_Open() void MyQT::cb_Open()
...@@ -441,7 +432,7 @@ void MyQT::cb_Open() ...@@ -441,7 +432,7 @@ void MyQT::cb_Open()
void MyQT::cb_Save() void MyQT::cb_Save()
{ {
std::string filename = selectFileSave("Export SVG file ",".","(*.off)"); std::string filename = selectFileSave("Export SVG file ",".","(*.off)");
Algo::Export::exportOFF<PFP>(myMap,position,filename.c_str()); Algo::Export::exportOFF<PFP>(myMap, position, filename.c_str());
} }
void MyQT::importMesh(std::string& filename) void MyQT::importMesh(std::string& filename)
...@@ -454,7 +445,7 @@ void MyQT::importMesh(std::string& filename) ...@@ -454,7 +445,7 @@ void MyQT::importMesh(std::string& filename)
if (extension == std::string(".map")) if (extension == std::string(".map"))
{ {
myMap.loadMapBin(filename); myMap.loadMapBin(filename);
position = myMap.getAttribute<PFP::VEC3>(VERTEX, "position") ; position = myMap.getAttribute<VEC3, VERTEX>("position") ;
} }
else if (extension == std::string(".node")) else if (extension == std::string(".node"))
{ {
...@@ -464,7 +455,7 @@ void MyQT::importMesh(std::string& filename) ...@@ -464,7 +455,7 @@ void MyQT::importMesh(std::string& filename)
std::cerr << "could not import " << filename << std::endl ; std::cerr << "could not import " << filename << std::endl ;
return ; return ;
} }
position = myMap.getAttribute<PFP::VEC3>(VERTEX, attrNames[0]) ; position = myMap.getAttribute<VEC3, VERTEX>(attrNames[0]) ;
} }
else if(extension == std::string(".tet")) else if(extension == std::string(".tet"))
{ {
...@@ -474,7 +465,7 @@ void MyQT::importMesh(std::string& filename) ...@@ -474,7 +465,7 @@ void MyQT::importMesh(std::string& filename)
std::cerr << "could not import " << filename << std::endl ; std::cerr << "could not import " << filename << std::endl ;
return ; return ;
} }
position = myMap.getAttribute<PFP::VEC3>(VERTEX, attrNames[0]) ; position = myMap.getAttribute<VEC3, VERTEX>(attrNames[0]) ;
} }
else if(extension == std::string(".off")) else if(extension == std::string(".off"))
{ {
...@@ -484,7 +475,7 @@ void MyQT::importMesh(std::string& filename) ...@@ -484,7 +475,7 @@ void MyQT::importMesh(std::string& filename)
std::cerr << "could not import " << filename << std::endl ; std::cerr << "could not import " << filename << std::endl ;
return ; return ;
} }
position = myMap.getAttribute<PFP::VEC3>(VERTEX, attrNames[0]) ; position = myMap.getAttribute<VEC3, VERTEX>(attrNames[0]) ;
} }
else else
{ {
...@@ -502,11 +493,9 @@ void MyQT::importMesh(std::string& filename) ...@@ -502,11 +493,9 @@ void MyQT::importMesh(std::string& filename)
updateGLMatrices() ; updateGLMatrices() ;
} }
void MyQT::width(int w) void MyQT::width(int w)
{ {
m_ex3 = 0.9f - 0.025f*w; m_ex3 = 0.9f - 0.025f*w;
m_render_topo->updateData<PFP>(myMap, position, m_ex1,m_ex2,m_ex3, nb); m_render_topo->updateData<PFP>(myMap, position, m_ex1,m_ex2,m_ex3, nb);
updateGL(); updateGL();
} }
...@@ -61,6 +61,8 @@ struct PFP: public PFP_STANDARD ...@@ -61,6 +61,8 @@ struct PFP: public PFP_STANDARD
#endif #endif
}; };
typedef PFP::MAP MAP ;
typedef PFP::VEC3 VEC3 ;
class MyQT: public Utils::QT::SimpleQT class MyQT: public Utils::QT::SimpleQT
...@@ -80,10 +82,9 @@ public: ...@@ -80,10 +82,9 @@ public:
protected: protected:
// declaration of the map // declaration of the map
PFP::MAP myMap; MAP myMap;
PFP::TVEC3 position; AttributeHandler<VEC3, VERTEX> position;
// AttributeHandler<Geom::Vec3f> colorDarts;
SelectorDartNoBoundary<PFP::MAP> nb; SelectorDartNoBoundary<PFP::MAP> nb;
...@@ -95,7 +96,7 @@ protected: ...@@ -95,7 +96,7 @@ protected:
DartMarker dm; DartMarker dm;
float m_shift; float m_shift;
float m_ex1,m_ex2,m_ex3; float m_ex1, m_ex2, m_ex3;
// just for more compact writing // just for more compact writing
inline Dart PHI1(Dart d) {return myMap.phi1(d);} inline Dart PHI1(Dart d) {return myMap.phi1(d);}
...@@ -117,6 +118,4 @@ public slots: ...@@ -117,6 +118,4 @@ public slots:
void width(int w); void width(int w);
}; };
#endif #endif
...@@ -164,7 +164,7 @@ bool importNodeWithELERegions(typename PFP::MAP& map, const std::string& filenam ...@@ -164,7 +164,7 @@ bool importNodeWithELERegions(typename PFP::MAP& map, const std::string& filenam
for(unsigned int j = 0 ; j < 3 ; ++j) for(unsigned int j = 0 ; j < 3 ; ++j)
{ {
FunctorSetEmb<typename PFP::MAP, VERTEX> fsetemb(map, verticesID[pt[2-j]]); FunctorSetEmb<typename PFP::MAP, VERTEX> fsetemb(map, verticesID[pt[2-j]]);
map.foreach_dart_of_orbit<VERTEX + PFP::MAP::IN_PARENT>(d, fsetemb); map.template foreach_dart_of_orbit<VERTEX + PFP::MAP::IN_PARENT>(d, fsetemb);
//store darts per vertices to optimize reconstruction //store darts per vertices to optimize reconstruction
Dart dd = d; Dart dd = d;
...@@ -183,7 +183,7 @@ bool importNodeWithELERegions(typename PFP::MAP& map, const std::string& filenam ...@@ -183,7 +183,7 @@ bool importNodeWithELERegions(typename PFP::MAP& map, const std::string& filenam
d = map.phi_1(map.phi2(d)); d = map.phi_1(map.phi2(d));
FunctorSetEmb<typename PFP::MAP, VERTEX> fsetemb(map, verticesID[pt[3]]); FunctorSetEmb<typename PFP::MAP, VERTEX> fsetemb(map, verticesID[pt[3]]);
map.foreach_dart_of_orbit<VERTEX + PFP::MAP::IN_PARENT>(d, fsetemb); map.template foreach_dart_of_orbit<VERTEX + PFP::MAP::IN_PARENT>(d, fsetemb);
//store darts per vertices to optimize reconstruction //store darts per vertices to optimize reconstruction
Dart dd = d; Dart dd = d;
...@@ -210,9 +210,9 @@ bool importNodeWithELERegions(typename PFP::MAP& map, const std::string& filenam ...@@ -210,9 +210,9 @@ bool importNodeWithELERegions(typename PFP::MAP& map, const std::string& filenam
Dart good_dart = NIL; Dart good_dart = NIL;
for(typename std::vector<Dart>::iterator it = vec.begin(); it != vec.end() && good_dart == NIL; ++it) for(typename std::vector<Dart>::iterator it = vec.begin(); it != vec.end() && good_dart == NIL; ++it)
{ {
if(map.getEmbedding<VERTEX>(map.phi1(*it)) == map.getEmbedding<VERTEX>(d) && if(map.template getEmbedding<VERTEX>(map.phi1(*it)) == map.template getEmbedding<VERTEX>(d) &&
map.getEmbedding<VERTEX>(map.phi_1(*it)) == map.getEmbedding<VERTEX>(map.phi_1(d)) /*&& map.template getEmbedding<VERTEX>(map.phi_1(*it)) == map.template getEmbedding<VERTEX>(map.phi_1(d)) /*&&
map.getEmbedding<VERTEX>(*it) == map.getEmbedding<VERTEX>(map.phi1(d)) */) map.template getEmbedding<VERTEX>(*it) == map.template getEmbedding<VERTEX>(map.phi1(d)) */)
{ {
good_dart = *it ; good_dart = *it ;
} }
...@@ -221,7 +221,7 @@ bool importNodeWithELERegions(typename PFP::MAP& map, const std::string& filenam ...@@ -221,7 +221,7 @@ bool importNodeWithELERegions(typename PFP::MAP& map, const std::string& filenam
if (good_dart != NIL) if (good_dart != NIL)
{ {
map.sewVolumes(d, good_dart, false); map.sewVolumes(d, good_dart, false);
m.unmarkOrbit<FACE>(d); m.template unmarkOrbit<FACE>(d);
} }
else else
{ {
......
...@@ -159,7 +159,7 @@ bool importOFFWithELERegions(typename PFP::MAP& map, const std::string& filename ...@@ -159,7 +159,7 @@ bool importOFFWithELERegions(typename PFP::MAP& map, const std::string& filename
for(unsigned int j = 0 ; j < 3 ; ++j) for(unsigned int j = 0 ; j < 3 ; ++j)
{ {
FunctorSetEmb<typename PFP::MAP, VERTEX> fsetemb(map, verticesID[pt[2-j]]); FunctorSetEmb<typename PFP::MAP, VERTEX> fsetemb(map, verticesID[pt[2-j]]);
map.foreach_dart_of_orbit<VERTEX + PFP::MAP::IN_PARENT>(d, fsetemb); map.template foreach_dart_of_orbit<VERTEX + PFP::MAP::IN_PARENT>(d, fsetemb);
//store darts per vertices to optimize reconstruction //store darts per vertices to optimize reconstruction
Dart dd = d; Dart dd = d;
...@@ -178,7 +178,7 @@ bool importOFFWithELERegions(typename PFP::MAP& map, const std::string& filename ...@@ -178,7 +178,7 @@ bool importOFFWithELERegions(typename PFP::MAP& map, const std::string& filename
d = map.phi_1(map.phi2(d)); d = map.phi_1(map.phi2(d));
FunctorSetEmb<typename PFP::MAP, VERTEX> fsetemb(map, verticesID[pt[3]]); FunctorSetEmb<typename PFP::MAP, VERTEX> fsetemb(map, verticesID[pt[3]]);
map.foreach_dart_of_orbit<VERTEX + PFP::MAP::IN_PARENT>(d, fsetemb); map.template foreach_dart_of_orbit<VERTEX + PFP::MAP::IN_PARENT>(d, fsetemb);
//store darts per vertices to optimize reconstruction //store darts per vertices to optimize reconstruction
Dart dd = d; Dart dd = d;
...@@ -205,9 +205,9 @@ bool importOFFWithELERegions(typename PFP::MAP& map, const std::string& filename ...@@ -205,9 +205,9 @@ bool importOFFWithELERegions(typename PFP::MAP& map, const std::string& filename
Dart good_dart = NIL; Dart good_dart = NIL;
for(typename std::vector<Dart>::iterator it = vec.begin(); it != vec.end() && good_dart == NIL; ++it) for(typename std::vector<Dart>::iterator it = vec.begin(); it != vec.end() && good_dart == NIL; ++it)
{ {
if(map.getEmbedding<VERTEX>(map.phi1(*it)) == map.getEmbedding<VERTEX>(d) && if(map.template getEmbedding<VERTEX>(map.phi1(*it)) == map.template getEmbedding<VERTEX>(d) &&
map.getEmbedding<VERTEX>(map.phi_1(*it)) == map.getEmbedding<VERTEX>(map.phi_1(d)) /*&& map.template getEmbedding<VERTEX>(map.phi_1(*it)) == map.template getEmbedding<VERTEX>(map.phi_1(d)) /*&&
map.getEmbedding<VERTEX>(*it) == map.getEmbedding<VERTEX>(map.phi1(d)) */) map.template getEmbedding<VERTEX>(*it) == map.template getEmbedding<VERTEX>(map.phi1(d)) */)
{ {
good_dart = *it ; good_dart = *it ;
} }
...@@ -216,11 +216,11 @@ bool importOFFWithELERegions(typename PFP::MAP& map, const std::string& filename ...@@ -216,11 +216,11 @@ bool importOFFWithELERegions(typename PFP::MAP& map, const std::string& filename
if (good_dart != NIL) if (good_dart != NIL)
{ {
map.sewVolumes(d, good_dart, false); map.sewVolumes(d, good_dart, false);
m.unmarkOrbit<FACE>(d); m.template unmarkOrbit<FACE>(d);
} }
else else
{ {
m.unmarkOrbit<FACE + PFP::MAP::IN_PARENT>(d); m.template unmarkOrbit<FACE + PFP::MAP::IN_PARENT>(d);
++nbBoundaryFaces; ++nbBoundaryFaces;
} }
} }
......
...@@ -136,7 +136,7 @@ bool importTs(typename PFP::MAP& map, const std::string& filename, std::vector<s ...@@ -136,7 +136,7 @@ bool importTs(typename PFP::MAP& map, const std::string& filename, std::vector<s
for(unsigned int j = 0 ; j < 3 ; ++j) for(unsigned int j = 0 ; j < 3 ; ++j)
{ {
FunctorSetEmb<typename PFP::MAP, VERTEX> fsetemb(map, verticesID[pt[2-j]]); FunctorSetEmb<typename PFP::MAP, VERTEX> fsetemb(map, verticesID[pt[2-j]]);
map.foreach_dart_of_orbit<VERTEX + PFP::MAP::IN_PARENT>(d, fsetemb); map.template foreach_dart_of_orbit<VERTEX + PFP::MAP::IN_PARENT>(d, fsetemb);
//store darts per vertices to optimize reconstruction //store darts per vertices to optimize reconstruction
Dart dd = d; Dart dd = d;
...@@ -154,7 +154,7 @@ bool importTs(typename PFP::MAP& map, const std::string& filename, std::vector<s ...@@ -154,7 +154,7 @@ bool importTs(typename PFP::MAP& map, const std::string& filename, std::vector<s
d = map.phi_1(map.phi2(d)); d = map.phi_1(map.phi2(d));
FunctorSetEmb<typename PFP::MAP, VERTEX> fsetemb(map, verticesID[pt[3]]); FunctorSetEmb<typename PFP::MAP, VERTEX> fsetemb(map, verticesID[pt[3]]);
map.foreach_dart_of_orbit<VERTEX + PFP::MAP::IN_PARENT>(d, fsetemb); map.template foreach_dart_of_orbit<VERTEX + PFP::MAP::IN_PARENT>(d, fsetemb);
//store darts per vertices to optimize reconstruction //store darts per vertices to optimize reconstruction
Dart dd = d; Dart dd = d;
...@@ -179,9 +179,9 @@ bool importTs(typename PFP::MAP& map, const std::string& filename, std::vector<s ...@@ -179,9 +179,9 @@ bool importTs(typename PFP::MAP& map, const std::string& filename, std::vector<s
Dart good_dart = NIL; Dart good_dart = NIL;
for(typename std::vector<Dart>::iterator it = vec.begin(); it != vec.end() && good_dart == NIL; ++it) for(typename std::vector<Dart>::iterator it = vec.begin(); it != vec.end() && good_dart == NIL; ++it)
{ {
if(map.getEmbedding<VERTEX>(map.phi1(*it)) == map.getEmbedding<VERTEX>(d) && if(map.template getEmbedding<VERTEX>(map.phi1(*it)) == map.template getEmbedding<VERTEX>(d) &&
map.getEmbedding<VERTEX>(map.phi_1(*it)) == map.getEmbedding<VERTEX>(map.phi_1(d)) /*&& map.template getEmbedding<VERTEX>(map.phi_1(*it)) == map.template getEmbedding<VERTEX>(map.phi_1(d)) /*&&
map.getEmbedding<VERTEX>(*it) == map.getEmbedding<VERTEX>(map.phi1(d)) */) map.template getEmbedding<VERTEX>(*it) == map.template getEmbedding<VERTEX>(map.phi1(d)) */)
{ {
good_dart = *it ; good_dart = *it ;
} }
...@@ -190,7 +190,7 @@ bool importTs(typename PFP::MAP& map, const std::string& filename, std::vector<s ...@@ -190,7 +190,7 @@ bool importTs(typename PFP::MAP& map, const std::string& filename, std::vector<s
if (good_dart != NIL) if (good_dart != NIL)
{ {
map.sewVolumes(d, good_dart, false); map.sewVolumes(d, good_dart, false);
m.unmarkOrbit<FACE>(d); m.template unmarkOrbit<FACE>(d);
} }
else else
{ {
......
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