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

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}) ...@@ -65,17 +65,17 @@ add_executable( tuto_oper3 tuto_oper3.cpp ${tuto_oper3_ui} ${tuto_oper3_moc})
target_link_libraries( tuto_oper3 target_link_libraries( tuto_oper3
${CGoGN_LIBS_D} ${CGoGN_EXT_LIBS} ) ${CGoGN_LIBS_D} ${CGoGN_EXT_LIBS} )
#QT4_WRAP_UI( tuto_orbits_ui tuto_orbits.ui ) QT4_WRAP_UI( tuto_orbits_ui tuto_orbits.ui )
#QT4_WRAP_CPP(tuto_orbits_moc tuto_orbits.h) QT4_WRAP_CPP(tuto_orbits_moc tuto_orbits.h)
#add_executable( tuto_orbits tuto_orbits.cpp ${tuto_orbits_ui} ${tuto_orbits_moc}) add_executable( tuto_orbits tuto_orbits.cpp ${tuto_orbits_ui} ${tuto_orbits_moc})
#target_link_libraries( tuto_orbits target_link_libraries( tuto_orbits
# ${CGoGN_LIBS_D} ${CGoGN_EXT_LIBS} ) ${CGoGN_LIBS_D} ${CGoGN_EXT_LIBS} )
#QT4_WRAP_UI( show_traversors_ui show_traversors.ui ) QT4_WRAP_UI( show_traversors_ui show_traversors.ui )
#QT4_WRAP_CPP(show_traversors_moc show_traversors.h) QT4_WRAP_CPP(show_traversors_moc show_traversors.h)
#add_executable( show_traversors show_traversors.cpp ${show_traversors_ui} ${show_traversors_moc}) add_executable( show_traversors show_traversors.cpp ${show_traversors_ui} ${show_traversors_moc})
#target_link_libraries( show_traversors target_link_libraries( show_traversors
# ${CGoGN_LIBS_D} ${CGoGN_EXT_LIBS} ) ${CGoGN_LIBS_D} ${CGoGN_EXT_LIBS} )
add_executable( tuto_subdivision tuto_subdivision.cpp) add_executable( tuto_subdivision tuto_subdivision.cpp)
target_link_libraries( tuto_subdivision target_link_libraries( tuto_subdivision
......
...@@ -32,8 +32,9 @@ ...@@ -32,8 +32,9 @@
#include "Algo/Render/GL2/topo3Render.h" #include "Algo/Render/GL2/topo3Render.h"
#include "Algo/Render/SVG/mapSVGRender.h" #include "Algo/Render/SVG/mapSVGRender.h"
#include "Topology/generic/traversor3.h" //#include "Topology/generic/traversor3.h"
#include "Topology/generic/traversor2.h" //#include "Topology/generic/traversor3.h"
#include "Topology/generic/traversorGen.h"
#include "Algo/Render/GL2/drawerCells.h" #include "Algo/Render/GL2/drawerCells.h"
...@@ -213,8 +214,7 @@ void MyQT::traverse2() ...@@ -213,8 +214,7 @@ void MyQT::traverse2()
{ {
Algo::Render::drawerCell<PFP>(VERTEX+m_second2, m_drawer, myMap, m_selected, position, m_expl); Algo::Render::drawerCell<PFP>(VERTEX+m_second2, m_drawer, myMap, m_selected, position, m_expl);
m_drawer.color3f(1.0f,0.0f,0.0f); m_drawer.color3f(1.0f,0.0f,0.0f);
Traversor<PFP::MAP>* tra = Traversor<PFP::MAP>::createIncident(myMap, m_selected, 2, VERTEX+m_second2, VERTEX+m_first2);
Traversor2<PFP::MAP>* tra = Traversor2<PFP::MAP>::createIncident(myMap, m_selected, VERTEX+m_second2, VERTEX+m_first2);
for (Dart d=tra->begin(); d != tra->end(); d= tra->next()) for (Dart d=tra->begin(); d != tra->end(); d= tra->next())
m_affDarts.push_back(d); m_affDarts.push_back(d);
Algo::Render::drawerCells<PFP>(VERTEX+m_first2, m_drawer, myMap, m_affDarts, position, m_expl); Algo::Render::drawerCells<PFP>(VERTEX+m_first2, m_drawer, myMap, m_affDarts, position, m_expl);
...@@ -223,8 +223,7 @@ void MyQT::traverse2() ...@@ -223,8 +223,7 @@ void MyQT::traverse2()
{ {
Algo::Render::drawerCell<PFP>(VERTEX+m_first2, m_drawer, myMap, m_selected, position, m_expl); Algo::Render::drawerCell<PFP>(VERTEX+m_first2, m_drawer, myMap, m_selected, position, m_expl);
m_drawer.color3f(1.0f,0.0f,0.0f); 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()) for (Dart d = tra->begin(); d != tra->end(); d = tra->next())
m_affDarts.push_back(d); m_affDarts.push_back(d);
Algo::Render::drawerCells<PFP>(VERTEX+m_first2, m_drawer, myMap, m_affDarts, position, m_expl); Algo::Render::drawerCells<PFP>(VERTEX+m_first2, m_drawer, myMap, m_affDarts, position, m_expl);
...@@ -238,6 +237,30 @@ void MyQT::traverse2() ...@@ -238,6 +237,30 @@ void MyQT::traverse2()
updateGL(); 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() void MyQT::traverse3()
{ {
if (m_selected == NIL) if (m_selected == NIL)
...@@ -247,6 +270,7 @@ void MyQT::traverse3() ...@@ -247,6 +270,7 @@ void MyQT::traverse3()
SelectorDartNoBoundary<PFP::MAP> nb(myMap); SelectorDartNoBoundary<PFP::MAP> nb(myMap);
m_affDarts.clear(); m_affDarts.clear();
m_drawer.newList(GL_COMPILE); m_drawer.newList(GL_COMPILE);
m_drawer.lineWidth(7.0f); m_drawer.lineWidth(7.0f);
...@@ -259,14 +283,16 @@ void MyQT::traverse3() ...@@ -259,14 +283,16 @@ void MyQT::traverse3()
if (m_ajd_or_inci3 == 0) // incident if (m_ajd_or_inci3 == 0) // incident
{ {
Algo::Render::drawerCell<PFP>(VERTEX+m_second3, m_drawer,myMap,m_selected,position,m_expl); 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); 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_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); 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); m_render_topo->updateData<PFP>(myMap, position, 0.95f, 0.9f, 0.8f, sm);
...@@ -277,14 +303,16 @@ void MyQT::traverse3() ...@@ -277,14 +303,16 @@ void MyQT::traverse3()
else // adjacent else // adjacent
{ {
Algo::Render::drawerCell<PFP>(VERTEX+m_first3, m_drawer, myMap, m_selected, position, m_expl); 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); 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_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); 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); m_render_topo->updateData<PFP>(myMap, position, 0.95f, 0.9f, 0.8f, sm);
...@@ -298,6 +326,281 @@ void MyQT::traverse3() ...@@ -298,6 +326,281 @@ void MyQT::traverse3()
updateGL(); 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) int main(int argc, char **argv)
{ {
position = myMap.addAttribute<VEC3, VERTEX>( "position"); position = myMap.addAttribute<VEC3, VERTEX>( "position");
......
...@@ -137,6 +137,9 @@ protected: ...@@ -137,6 +137,9 @@ protected:
void traverse2(); void traverse2();
void traverse3(); void traverse3();
void dynamicMarkOrbit(unsigned int orb);
// void dyn_trav3XXaY(unsigned int first, unsigned int second);
// slots locaux // slots locaux
public slots: public slots:
void cb_combo1(int x); void cb_combo1(int x);
......
...@@ -56,17 +56,18 @@ void MyQT::slider_text(int x) ...@@ -56,17 +56,18 @@ void MyQT::slider_text(int x)
void MyQT::orbit_list(int x) void MyQT::orbit_list(int x)
{ {
storeVerticesInfo<int>(m_att_orbits[x]);
current_orbit = 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()) 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(); m_selected.clear();
// easy way to traverse darts of orbit // easy way to traverse darts of orbit
TraversorDartsOfOrbit<MAP> tra(myMap, orbs[current_orbit], m_clicked); Traversor<MAP>* tra = Traversor<MAP>::createDartsOfOrbits(myMap,m_clicked,orbs[current_orbit]);
for (Dart e = tra.begin(); e != tra.end(); e = tra.next()) for (Dart e = tra->begin(); e != tra->end(); e = tra->next())
m_selected.push_back(e); m_selected.push_back(e);
} }
...@@ -74,8 +75,8 @@ void MyQT::orbit_list(int x) ...@@ -74,8 +75,8 @@ void MyQT::orbit_list(int x)
updateGL(); updateGL();
} }
template<typename T, unsigned int ORBIT> template< unsigned int ORBIT>
void MyQT::storeVerticesInfo(const AttributeHandler<T, ORBIT>& attrib) void MyQT::storeVerticesInfo(const AttributeHandler<int, ORBIT>* attrib)
{ {
SelectorDartNoBoundary<PFP::MAP> nb(myMap); SelectorDartNoBoundary<PFP::MAP> nb(myMap);
m_render_topo->computeDartMiddlePositions<PFP>(myMap, middleDarts, nb); m_render_topo->computeDartMiddlePositions<PFP>(myMap, middleDarts, nb);
...@@ -86,13 +87,54 @@ void MyQT::storeVerticesInfo(const AttributeHandler<T, ORBIT>& attrib) ...@@ -86,13 +87,54 @@ void MyQT::storeVerticesInfo(const AttributeHandler<T, ORBIT>& attrib)
if (nb(d)) if (nb(d))
{ {
std::stringstream ss; std::stringstream ss;
ss << attrib[d]; ss << (*attrib)[d];
m_strings->addString(ss.str(), middleDarts[d]); m_strings->addString(ss.str(), middleDarts[d]);
} }
} }
m_strings->sendToVBO(); 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() void MyQT::cb_initGL()
{ {
// choose to use GL version 2 // choose to use GL version 2
...@@ -105,7 +147,7 @@ void MyQT::cb_initGL() ...@@ -105,7 +147,7 @@ void MyQT::cb_initGL()
m_strings = new Utils::Strings3D(true, Geom::Vec3f(0.1f,0.0f,0.3f)); m_strings = new Utils::Strings3D(true, Geom::Vec3f(0.1f,0.0f,0.3f));
registerShader(m_strings); registerShader(m_strings);
storeVerticesInfo<int>(m_att_orbits[0]); storeVerticesInfoGen(VERTEX, m_att_orbits[0]);
} }
void MyQT::cb_redraw() void MyQT::cb_redraw()
...@@ -132,14 +174,30 @@ void MyQT::cb_mousePress(int button, int x, int y) ...@@ -132,14 +174,30 @@ void MyQT::cb_mousePress(int button, int x, int y)
m_selected.clear(); m_selected.clear();
// easy way to traverse darts of orbit // easy way to traverse darts of orbit