Commit 480085e4 authored by Sylvain Thery's avatar Sylvain Thery

update Traversor (class & examples) and add a generic Traversor

class with a factory
parent d0565b60
......@@ -65,17 +65,17 @@ add_executable( tuto_oper3 tuto_oper3.cpp ${tuto_oper3_ui} ${tuto_oper3_moc})
target_link_libraries( tuto_oper3
${CGoGN_LIBS_D} ${CGoGN_EXT_LIBS} )
#QT4_WRAP_UI( tuto_orbits_ui tuto_orbits.ui )
#QT4_WRAP_CPP(tuto_orbits_moc tuto_orbits.h)
#add_executable( tuto_orbits tuto_orbits.cpp ${tuto_orbits_ui} ${tuto_orbits_moc})
#target_link_libraries( tuto_orbits
# ${CGoGN_LIBS_D} ${CGoGN_EXT_LIBS} )
#QT4_WRAP_UI( show_traversors_ui show_traversors.ui )
#QT4_WRAP_CPP(show_traversors_moc show_traversors.h)
#add_executable( show_traversors show_traversors.cpp ${show_traversors_ui} ${show_traversors_moc})
#target_link_libraries( show_traversors
# ${CGoGN_LIBS_D} ${CGoGN_EXT_LIBS} )
QT4_WRAP_UI( tuto_orbits_ui tuto_orbits.ui )
QT4_WRAP_CPP(tuto_orbits_moc tuto_orbits.h)
add_executable( tuto_orbits tuto_orbits.cpp ${tuto_orbits_ui} ${tuto_orbits_moc})
target_link_libraries( tuto_orbits
${CGoGN_LIBS_D} ${CGoGN_EXT_LIBS} )
QT4_WRAP_UI( show_traversors_ui show_traversors.ui )
QT4_WRAP_CPP(show_traversors_moc show_traversors.h)
add_executable( show_traversors show_traversors.cpp ${show_traversors_ui} ${show_traversors_moc})
target_link_libraries( show_traversors
${CGoGN_LIBS_D} ${CGoGN_EXT_LIBS} )
add_executable( tuto_subdivision tuto_subdivision.cpp)
target_link_libraries( tuto_subdivision
......
......@@ -32,8 +32,9 @@
#include "Algo/Render/GL2/topo3Render.h"
#include "Algo/Render/SVG/mapSVGRender.h"
#include "Topology/generic/traversor3.h"
#include "Topology/generic/traversor2.h"
//#include "Topology/generic/traversor3.h"
//#include "Topology/generic/traversor3.h"
#include "Topology/generic/traversorGen.h"
#include "Algo/Render/GL2/drawerCells.h"
......@@ -213,8 +214,7 @@ void MyQT::traverse2()
{
Algo::Render::drawerCell<PFP>(VERTEX+m_second2, m_drawer, myMap, m_selected, position, m_expl);
m_drawer.color3f(1.0f,0.0f,0.0f);
Traversor2<PFP::MAP>* tra = Traversor2<PFP::MAP>::createIncident(myMap, m_selected, VERTEX+m_second2, VERTEX+m_first2);
Traversor<PFP::MAP>* tra = Traversor<PFP::MAP>::createIncident(myMap, m_selected, 2, VERTEX+m_second2, VERTEX+m_first2);
for (Dart d=tra->begin(); d != tra->end(); d= tra->next())
m_affDarts.push_back(d);
Algo::Render::drawerCells<PFP>(VERTEX+m_first2, m_drawer, myMap, m_affDarts, position, m_expl);
......@@ -223,8 +223,7 @@ void MyQT::traverse2()
{
Algo::Render::drawerCell<PFP>(VERTEX+m_first2, m_drawer, myMap, m_selected, position, m_expl);
m_drawer.color3f(1.0f,0.0f,0.0f);
Traversor2<PFP::MAP>* tra = Traversor2<PFP::MAP>::createAdjacent(myMap, m_selected, VERTEX+m_first2, VERTEX+m_second2);
Traversor<PFP::MAP>* tra = Traversor<PFP::MAP>::createAdjacent(myMap, m_selected, 2, VERTEX+m_first2, VERTEX+m_second2);
for (Dart d = tra->begin(); d != tra->end(); d = tra->next())
m_affDarts.push_back(d);
Algo::Render::drawerCells<PFP>(VERTEX+m_first2, m_drawer, myMap, m_affDarts, position, m_expl);
......@@ -238,6 +237,30 @@ void MyQT::traverse2()
updateGL();
}
void MyQT::dynamicMarkOrbit(unsigned int orb)
{
switch(orb)
{
case VERTEX:
m_dm_topo->markOrbit<VERTEX>(m_selected);
break;
case EDGE:
m_dm_topo->markOrbit<EDGE>(m_selected);
break;
case FACE:
m_dm_topo->markOrbit<FACE>(m_selected);
break;
case VOLUME:
m_dm_topo->markOrbit<VOLUME>(m_selected);
break;
default:
break;
}
}
void MyQT::traverse3()
{
if (m_selected == NIL)
......@@ -247,6 +270,7 @@ void MyQT::traverse3()
SelectorDartNoBoundary<PFP::MAP> nb(myMap);
m_affDarts.clear();
m_drawer.newList(GL_COMPILE);
m_drawer.lineWidth(7.0f);
......@@ -259,14 +283,16 @@ void MyQT::traverse3()
if (m_ajd_or_inci3 == 0) // incident
{
Algo::Render::drawerCell<PFP>(VERTEX+m_second3, m_drawer,myMap,m_selected,position,m_expl);
m_dm_topo->markOrbit<VERTEX+m_second3>(m_selected);
dynamicMarkOrbit(VERTEX+m_second3);
m_drawer.color3f(1.0f,0.0f,0.0f);
Traversor3XY<PFP::MAP, VERTEX+m_second3, VERTEX+m_first3> tra(myMap, m_selected);
for (Dart d = tra.begin(); d != tra.end(); d = tra.next())
Traversor<PFP::MAP>* tra = Traversor<PFP::MAP>::createIncident(myMap,m_selected, 3, VERTEX+m_second3, VERTEX+m_first3);
for (Dart d = tra->begin(); d != tra->end(); d = tra->next())
{
m_affDarts.push_back(d);
m_dm_topo->markOrbit<VERTEX+m_first3>(d);
dynamicMarkOrbit(VERTEX+m_first3);
}
Algo::Render::drawerCells<PFP>(VERTEX+m_first3, m_drawer, myMap, m_affDarts, position, m_expl);
m_render_topo->updateData<PFP>(myMap, position, 0.95f, 0.9f, 0.8f, sm);
......@@ -277,14 +303,16 @@ void MyQT::traverse3()
else // adjacent
{
Algo::Render::drawerCell<PFP>(VERTEX+m_first3, m_drawer, myMap, m_selected, position, m_expl);
m_dm_topo->markOrbit<VERTEX+m_first3>(m_selected);
dynamicMarkOrbit(VERTEX+m_first3);
m_drawer.color3f(1.0f,0.0f,0.0f);
Traversor3XXaY<PFP::MAP, VERTEX+m_first3, VERTEX+m_second3> tra(myMap,m_selected);
for (Dart d = tra.begin(); d != tra.end(); d = tra.next())
Traversor<PFP::MAP>* tra = Traversor<PFP::MAP>::createAdjacent(myMap,m_selected, 3, VERTEX+m_first3, VERTEX+m_second3);
for (Dart d = tra->begin(); d != tra->end(); d = tra->next())
{
m_affDarts.push_back(d);
m_dm_topo->markOrbit<VERTEX+m_first3>(d);
dynamicMarkOrbit(VERTEX+m_first3);
}
Algo::Render::drawerCells<PFP>(VERTEX+m_first3, m_drawer, myMap,m_affDarts,position,m_expl);
m_render_topo->updateData<PFP>(myMap, position, 0.95f, 0.9f, 0.8f, sm);
......@@ -298,6 +326,281 @@ void MyQT::traverse3()
updateGL();
}
/*
void MyQT::dyn_trav3XXaY(unsigned int first, unsigned int second)
{
unsigned int val = first *16 + second;
switch(val)
{
case 0x00:
break;
case 0x10:
{
Traversor3XXaY<PFP::MAP, VERTEX+1, VERTEX+0> tra(myMap,m_selected);
for (Dart d = tra.begin(); d != tra.end(); d = tra.next())
{
m_affDarts.push_back(d);
m_dm_topo->markOrbit<VERTEX+1>(d);
}
}
break;
case 0x20:
{
Traversor3XXaY<PFP::MAP, VERTEX+2, VERTEX+0> tra(myMap,m_selected);
for (Dart d = tra.begin(); d != tra.end(); d = tra.next())
{
m_affDarts.push_back(d);
m_dm_topo->markOrbit<VERTEX+2>(d);
}
}
break;
case 0x30:
{
Traversor3XXaY<PFP::MAP, VERTEX+3, VERTEX+0> tra(myMap,m_selected);
for (Dart d = tra.begin(); d != tra.end(); d = tra.next())
{
m_affDarts.push_back(d);
m_dm_topo->markOrbit<VERTEX+3>(d);
}
}
break;
case 0x01:
{
Traversor3XXaY<PFP::MAP, VERTEX, VERTEX+1> tra(myMap,m_selected);
for (Dart d = tra.begin(); d != tra.end(); d = tra.next())
{
m_affDarts.push_back(d);
m_dm_topo->markOrbit<VERTEX>(d);
}
}
break;
case 0x21:
{
Traversor3XXaY<PFP::MAP, VERTEX+2, VERTEX+1> tra(myMap,m_selected);
for (Dart d = tra.begin(); d != tra.end(); d = tra.next())
{
m_affDarts.push_back(d);
m_dm_topo->markOrbit<VERTEX+2>(d);
}
}
break;
case 0x31:
{
Traversor3XXaY<PFP::MAP, VERTEX+3, VERTEX+1> tra(myMap,m_selected);
for (Dart d = tra.begin(); d != tra.end(); d = tra.next())
{
m_affDarts.push_back(d);
m_dm_topo->markOrbit<VERTEX+3>(d);
}
}
break;
case 0x02:
{
Traversor3XXaY<PFP::MAP, VERTEX, VERTEX+2> tra(myMap,m_selected);
for (Dart d = tra.begin(); d != tra.end(); d = tra.next())
{
m_affDarts.push_back(d);
m_dm_topo->markOrbit<VERTEX>(d);
}
}
break;
case 0x12:
{
Traversor3XXaY<PFP::MAP, VERTEX+1, VERTEX+2> tra(myMap,m_selected);
for (Dart d = tra.begin(); d != tra.end(); d = tra.next())
{
m_affDarts.push_back(d);
m_dm_topo->markOrbit<VERTEX+1>(d);
}
}
break;
case 0x32:
{
Traversor3XXaY<PFP::MAP, VERTEX+3, VERTEX+2> tra(myMap,m_selected);
for (Dart d = tra.begin(); d != tra.end(); d = tra.next())
{
m_affDarts.push_back(d);
m_dm_topo->markOrbit<VERTEX+3>(d);
}
}
break;
case 0x03:
{
Traversor3XXaY<PFP::MAP, VERTEX, VERTEX+3> tra(myMap,m_selected);
for (Dart d = tra.begin(); d != tra.end(); d = tra.next())
{
m_affDarts.push_back(d);
m_dm_topo->markOrbit<VERTEX>(d);
}
}
break;
case 0x13:
{
Traversor3XXaY<PFP::MAP, VERTEX+1, VERTEX+3> tra(myMap,m_selected);
for (Dart d = tra.begin(); d != tra.end(); d = tra.next())
{
m_affDarts.push_back(d);
m_dm_topo->markOrbit<VERTEX+1>(d);
}
}
break;
case 0x23:
{
Traversor3XXaY<PFP::MAP, VERTEX+2, VERTEX+3> tra(myMap,m_selected);
for (Dart d = tra.begin(); d != tra.end(); d = tra.next())
{
m_affDarts.push_back(d);
m_dm_topo->markOrbit<VERTEX+2>(d);
}
}
break;
}
}
void MyQT::dyn_trav3XY(unsigned int first, unsigned int second)
{
unsigned int val = second *16 + first;
switch(val)
{
case 0x00:
break;
case 0x10:
{
Traversor3XY<PFP::MAP, VERTEX+1, VERTEX+0> tra(myMap,m_selected);
for (Dart d = tra.begin(); d != tra.end(); d = tra.next())
{
m_affDarts.push_back(d);
m_dm_topo->markOrbit<VERTEX+0>(d);
}
}
break;
case 0x20:
{
Traversor3XY<PFP::MAP, VERTEX+2, VERTEX+0> tra(myMap,m_selected);
for (Dart d = tra.begin(); d != tra.end(); d = tra.next())
{
m_affDarts.push_back(d);
m_dm_topo->markOrbit<VERTEX+0>(d);
}
}
break;
case 0x30:
{
Traversor3XY<PFP::MAP, VERTEX+3, VERTEX+0> tra(myMap,m_selected);
for (Dart d = tra.begin(); d != tra.end(); d = tra.next())
{
m_affDarts.push_back(d);
m_dm_topo->markOrbit<VERTEX+0>(d);
}
}
break;
case 0x01:
{
Traversor3XY<PFP::MAP, VERTEX, VERTEX+1> tra(myMap,m_selected);
for (Dart d = tra.begin(); d != tra.end(); d = tra.next())
{
m_affDarts.push_back(d);
m_dm_topo->markOrbit<VERTEX+1>(d);
}
}
break;
case 0x21:
{
Traversor3XY<PFP::MAP, VERTEX+2, VERTEX+1> tra(myMap,m_selected);
for (Dart d = tra.begin(); d != tra.end(); d = tra.next())
{
m_affDarts.push_back(d);
m_dm_topo->markOrbit<VERTEX+1>(d);
}
}
break;
case 0x31:
{
Traversor3XY<PFP::MAP, VERTEX+3, VERTEX+1> tra(myMap,m_selected);
for (Dart d = tra.begin(); d != tra.end(); d = tra.next())
{
m_affDarts.push_back(d);
m_dm_topo->markOrbit<VERTEX+1>(d);
}
}
break;
case 0x02:
{
Traversor3XY<PFP::MAP, VERTEX, VERTEX+2> tra(myMap,m_selected);
for (Dart d = tra.begin(); d != tra.end(); d = tra.next())
{
m_affDarts.push_back(d);
m_dm_topo->markOrbit<VERTEX+2>(d);
}
}
break;
case 0x12:
{
Traversor3XY<PFP::MAP, VERTEX+1, VERTEX+2> tra(myMap,m_selected);
for (Dart d = tra.begin(); d != tra.end(); d = tra.next())
{
m_affDarts.push_back(d);
m_dm_topo->markOrbit<VERTEX+2>(d);
}
}
break;
case 0x32:
{
Traversor3XY<PFP::MAP, VERTEX+3, VERTEX+2> tra(myMap,m_selected);
for (Dart d = tra.begin(); d != tra.end(); d = tra.next())
{
m_affDarts.push_back(d);
m_dm_topo->markOrbit<VERTEX+2>(d);
}
}
break;
case 0x03:
{
Traversor3XY<PFP::MAP, VERTEX, VERTEX+3> tra(myMap,m_selected);
for (Dart d = tra.begin(); d != tra.end(); d = tra.next())
{
m_affDarts.push_back(d);
m_dm_topo->markOrbit<VERTEX+3>(d);
}
}
break;
case 0x13:
{
Traversor3XY<PFP::MAP, VERTEX+1, VERTEX+3> tra(myMap,m_selected);
for (Dart d = tra.begin(); d != tra.end(); d = tra.next())
{
m_affDarts.push_back(d);
m_dm_topo->markOrbit<VERTEX+3>(d);
}
}
break;
case 0x23:
{
Traversor3XY<PFP::MAP, VERTEX+2, VERTEX+3> tra(myMap,m_selected);
for (Dart d = tra.begin(); d != tra.end(); d = tra.next())
{
m_affDarts.push_back(d);
m_dm_topo->markOrbit<VERTEX+3>(d);
}
}
break;
}
}
*/
int main(int argc, char **argv)
{
position = myMap.addAttribute<VEC3, VERTEX>( "position");
......
......@@ -137,6 +137,9 @@ protected:
void traverse2();
void traverse3();
void dynamicMarkOrbit(unsigned int orb);
// void dyn_trav3XXaY(unsigned int first, unsigned int second);
// slots locaux
public slots:
void cb_combo1(int x);
......
......@@ -56,17 +56,18 @@ void MyQT::slider_text(int x)
void MyQT::orbit_list(int x)
{
storeVerticesInfo<int>(m_att_orbits[x]);
current_orbit = x;
unsigned int orbs[9] = {VERTEX,EDGE,FACE,VOLUME,PFP::MAP::ORBIT_IN_PARENT(VERTEX),PFP::MAP::ORBIT_IN_PARENT(EDGE),PFP::MAP::ORBIT_IN_PARENT(FACE),PFP::MAP::ORBIT_IN_PARENT2(VERTEX),PFP::MAP::ORBIT_IN_PARENT2(EDGE)};
storeVerticesInfoGen(orbs[current_orbit], m_att_orbits[x]);
if (m_clicked != Dart::nil())
{
unsigned int orbs[9] = {VERTEX,EDGE,FACE,VOLUME,PFP::MAP::ORBIT_IN_PARENT(VERTEX),PFP::MAP::ORBIT_IN_PARENT(EDGE),PFP::MAP::ORBIT_IN_PARENT(FACE),PFP::MAP::ORBIT_IN_PARENT2(VERTEX),PFP::MAP::ORBIT_IN_PARENT2(EDGE)};
m_selected.clear();
// easy way to traverse darts of orbit
TraversorDartsOfOrbit<MAP> tra(myMap, orbs[current_orbit], m_clicked);
for (Dart e = tra.begin(); e != tra.end(); e = tra.next())
Traversor<MAP>* tra = Traversor<MAP>::createDartsOfOrbits(myMap,m_clicked,orbs[current_orbit]);
for (Dart e = tra->begin(); e != tra->end(); e = tra->next())
m_selected.push_back(e);
}
......@@ -74,8 +75,8 @@ void MyQT::orbit_list(int x)
updateGL();
}
template<typename T, unsigned int ORBIT>
void MyQT::storeVerticesInfo(const AttributeHandler<T, ORBIT>& attrib)
template< unsigned int ORBIT>
void MyQT::storeVerticesInfo(const AttributeHandler<int, ORBIT>* attrib)
{
SelectorDartNoBoundary<PFP::MAP> nb(myMap);
m_render_topo->computeDartMiddlePositions<PFP>(myMap, middleDarts, nb);
......@@ -86,13 +87,54 @@ void MyQT::storeVerticesInfo(const AttributeHandler<T, ORBIT>& attrib)
if (nb(d))
{
std::stringstream ss;
ss << attrib[d];
ss << (*attrib)[d];
m_strings->addString(ss.str(), middleDarts[d]);
}
}
m_strings->sendToVBO();
}
void MyQT::storeVerticesInfoGen(unsigned int orb, const AttributeHandlerGen* attrib)
{
switch(orb)
{
case VERTEX:
storeVerticesInfo<VERTEX>(static_cast< const AttributeHandler<int, VERTEX>* >(attrib));
break;
case EDGE:
storeVerticesInfo<EDGE>(static_cast< const AttributeHandler<int, EDGE>* >(attrib));
break;
case FACE:
storeVerticesInfo<FACE>(static_cast< const AttributeHandler<int, FACE>* >(attrib));
break;
case VOLUME:
storeVerticesInfo<VOLUME>(static_cast< const AttributeHandler<int, VOLUME>* >(attrib));
break;
case PFP::MAP::VERTEX_OF_PARENT:
storeVerticesInfo<PFP::MAP::VERTEX_OF_PARENT>(static_cast< const AttributeHandler<int, PFP::MAP::VERTEX_OF_PARENT>* >(attrib));
break;
case PFP::MAP::EDGE_OF_PARENT:
storeVerticesInfo<PFP::MAP::EDGE_OF_PARENT>(static_cast< const AttributeHandler<int, PFP::MAP::EDGE_OF_PARENT>* >(attrib));
break;
case PFP::MAP::FACE_OF_PARENT:
storeVerticesInfo<PFP::MAP::FACE_OF_PARENT>(static_cast< const AttributeHandler<int, PFP::MAP::FACE_OF_PARENT>* >(attrib));
break;
case PFP::MAP::VERTEX_OF_PARENT2:
storeVerticesInfo<PFP::MAP::VERTEX_OF_PARENT2>(static_cast< const AttributeHandler<int, PFP::MAP::VERTEX_OF_PARENT2>* >(attrib));
break;
case PFP::MAP::EDGE_OF_PARENT2:
storeVerticesInfo<PFP::MAP::EDGE_OF_PARENT2>(static_cast< const AttributeHandler<int, PFP::MAP::EDGE_OF_PARENT2>* >(attrib));
break;
}
}
void MyQT::cb_initGL()
{
// choose to use GL version 2
......@@ -105,7 +147,7 @@ void MyQT::cb_initGL()
m_strings = new Utils::Strings3D(true, Geom::Vec3f(0.1f,0.0f,0.3f));
registerShader(m_strings);
storeVerticesInfo<int>(m_att_orbits[0]);
storeVerticesInfoGen(VERTEX, m_att_orbits[0]);
}
void MyQT::cb_redraw()
......@@ -132,14 +174,30 @@ void MyQT::cb_mousePress(int button, int x, int y)
m_selected.clear();
// easy way to traverse darts of orbit
TraversorDartsOfOrbit<PFP::MAP> tra(myMap, orbs[current_orbit], m_clicked);
for (Dart e = tra.begin(); e != tra.end(); e = tra.next())
Traversor<MAP>* tra = Traversor<MAP>::createDartsOfOrbits(myMap,m_clicked,orbs[current_orbit]);
for (Dart e = tra->begin(); e != tra->end(); e = tra->next())
m_selected.push_back(e);
}
updateGL();
}
}
template <unsigned int ORB>
void MyQT::init_att_orb(AttributeHandlerGen* attg)
{
int i=0;
TraversorCell<MAP,ORB> tra(myMap);
// AttributeHandler<int,ORB>* attx = reinterpret_cast< AttributeHandler<int,ORB>* >(attg);
AttributeHandler<int,ORB>* att = static_cast< AttributeHandler<int,ORB>* >(attg);
for (Dart d = tra.begin(); d != tra.end(); d = tra.next())
{
(*att)[d] = i++;
}
}
void MyQT::initMap()
{
std::cout << "INIT MAP"<< std::endl;
......@@ -150,78 +208,36 @@ void MyQT::initMap()
prim.hexaGrid_topo(nb,nb,nb);
prim.embedHexaGrid(1.0f,1.0f,1.0f);
m_att_orbits[0] = myMap.addAttribute<int, VERTEX>("vertex");
m_att_orbits[1] = myMap.addAttribute<int, EDGE>("edge");
m_att_orbits[2] = myMap.addAttribute<int, FACE>("face");
m_att_orbits[3] = myMap.addAttribute<int, VOLUME>("volume");
m_att_orbits[4] = myMap.addAttribute<int, VERTEX + PFP::MAP::IN_PARENT>("vertex2");
m_att_orbits[5] = myMap.addAttribute<int, EDGE + PFP::MAP::IN_PARENT>("edge2");
m_att_orbits[6] = myMap.addAttribute<int, FACE + PFP::MAP::IN_PARENT>("face2");
m_att_orbits[7] = myMap.addAttribute<int, VERTEX + PFP::MAP::IN_PARENT2>("vertex1");
m_att_orbits[8] = myMap.addAttribute<int, EDGE + PFP::MAP::IN_PARENT2>("face1");
AttributeHandler<int, VERTEX> att0 = myMap.addAttribute<int, VERTEX>("vertex");
m_att_orbits[0] = new AttributeHandler<int, VERTEX>(att0);
init_att_orb<VERTEX>(m_att_orbits[0]);
int i=0;
TraversorV<MAP> tra0(myMap);
for (Dart d = tra0.begin(); d != tra0.end(); d = tra0.next())
{
m_att_orbits[0][d] = i++;
}
m_att_orbits[1] = new AttributeHandler<int, EDGE>(myMap.addAttribute<int, EDGE>("edge"));
m_att_orbits[2] = new AttributeHandler<int, FACE>(myMap.addAttribute<int, FACE>("face"));
m_att_orbits[3] = new AttributeHandler<int, VOLUME>(myMap.addAttribute<int, VOLUME>("volume"));
m_att_orbits[4] = new AttributeHandler<int, VERTEX + PFP::MAP::IN_PARENT>(myMap.addAttribute<int, VERTEX + PFP::MAP::IN_PARENT>("vertex2"));
m_att_orbits[5] = new AttributeHandler<int, EDGE + PFP::MAP::IN_PARENT>(myMap.addAttribute<int, EDGE + PFP::MAP::IN_PARENT>("edge2"));
m_att_orbits[6] = new AttributeHandler<int, FACE + PFP::MAP::IN_PARENT>(myMap.addAttribute<int, FACE + PFP::MAP::IN_PARENT>("face2"));
m_att_orbits[7] = new AttributeHandler<int, VERTEX + PFP::MAP::IN_PARENT2>(myMap.addAttribute<int, VERTEX + PFP::MAP::IN_PARENT2>("vertex1"));
m_att_orbits[8] = new AttributeHandler<int, EDGE + PFP::MAP::IN_PARENT2>(myMap.addAttribute<int, EDGE + PFP::MAP::IN_PARENT2>("face1"));
i=0;
TraversorE<MAP> tra1(myMap);
for (Dart d = tra1.begin(); d != tra1.end(); d = tra1.next())
{
m_att_orbits[1][d] = i++;
}
i=0;
TraversorF<MAP> tra2(myMap);
for (Dart d = tra2.begin(); d != tra2.end(); d = tra2.next())
{
m_att_orbits[2][d] = i++;
}
i=0;
TraversorW<PFP::MAP> tra3(myMap);
for (Dart d = tra3.begin(); d != tra3.end(); d = tra3.next())
{
m_att_orbits[3][d] = i++;
}
init_att_orb<EDGE>(m_att_orbits[1]);
i=0;
TraversorCell<MAP, VERTEX + PFP::MAP::IN_PARENT> tra02(myMap);
for (Dart d = tra02.begin(); d != tra02.end(); d = tra02.next())
{
m_att_orbits[4][d] = i++;
}
init_att_orb<FACE>(m_att_orbits[2]);
i=0;
TraversorCell<MAP, EDGE + PFP::MAP::IN_PARENT> tra12(myMap);
for (Dart d = tra12.begin(); d != tra12.end(); d = tra12.next())
{
m_att_orbits[5][d] = i++;
}