Commit 13c0da82 authored by Pierre Kraemer's avatar Pierre Kraemer

examples & tutos compiling !

parent bdb3cd9c
...@@ -65,10 +65,10 @@ QT4_WRAP_CPP( volumeExplorer_moc ../volumeExplorer.h ) ...@@ -65,10 +65,10 @@ QT4_WRAP_CPP( volumeExplorer_moc ../volumeExplorer.h )
add_executable( volumeExplorerD ../volumeExplorer.cpp ${volumeExplorer_ui} ${volumeExplorer_moc}) add_executable( volumeExplorerD ../volumeExplorer.cpp ${volumeExplorer_ui} ${volumeExplorer_moc})
target_link_libraries( volumeExplorerD ${CGoGN_LIBS_D} ${CGoGN_EXT_LIBS} ) target_link_libraries( volumeExplorerD ${CGoGN_LIBS_D} ${CGoGN_EXT_LIBS} )
QT4_WRAP_UI( mcmesh_ui ../mcmesh.ui ) #QT4_WRAP_UI( mcmesh_ui ../mcmesh.ui )
QT4_WRAP_CPP( mcmesh_moc ../mcmesh.h ) #QT4_WRAP_CPP( mcmesh_moc ../mcmesh.h )
add_executable( mcmeshD ../mcmesh.cpp ${mcmesh_moc} ${mcmesh_ui} ) #add_executable( mcmeshD ../mcmesh.cpp ${mcmesh_moc} ${mcmesh_ui} )
target_link_libraries( mcmeshD ${CGoGN_LIBS_D} ${CGoGN_EXT_LIBS}) #target_link_libraries( mcmeshD ${CGoGN_LIBS_D} ${CGoGN_EXT_LIBS})
QT4_WRAP_CPP( concave_rendering_moc ../concave_rendering.h ) QT4_WRAP_CPP( concave_rendering_moc ../concave_rendering.h )
add_executable( concave_renderingD ../concave_rendering.cpp ${concave_rendering_moc} ${concave_rendering_ui} ) add_executable( concave_renderingD ../concave_rendering.cpp ${concave_rendering_moc} ${concave_rendering_ui} )
......
...@@ -31,6 +31,10 @@ QT4_WRAP_CPP( texturesExample_moc ../texturesExample.h ) ...@@ -31,6 +31,10 @@ QT4_WRAP_CPP( texturesExample_moc ../texturesExample.h )
add_executable( texturesExample ../texturesExample.cpp ${texturesExample_moc} ) add_executable( texturesExample ../texturesExample.cpp ${texturesExample_moc} )
target_link_libraries( texturesExample ${CGoGN_LIBS_R} ${CGoGN_EXT_LIBS} ) target_link_libraries( texturesExample ${CGoGN_LIBS_R} ${CGoGN_EXT_LIBS} )
QT4_WRAP_CPP(simpleMap3_moc ../simpleMap3.h)
add_executable( simpleMap3 ../simpleMap3.cpp ${simpleMap3_moc} )
target_link_libraries( simpleMap3 ${CGoGN_LIBS_R} ${CGoGN_EXT_LIBS} )
QT4_WRAP_CPP( simpleGMap2_moc ../simpleGMap2.h ) QT4_WRAP_CPP( simpleGMap2_moc ../simpleGMap2.h )
add_executable( simpleGMap2 ../simpleGMap2.cpp ${simpleGMap2_moc} ) add_executable( simpleGMap2 ../simpleGMap2.cpp ${simpleGMap2_moc} )
target_link_libraries( simpleGMap2 ${CGoGN_LIBS_R} ${CGoGN_EXT_LIBS} ) target_link_libraries( simpleGMap2 ${CGoGN_LIBS_R} ${CGoGN_EXT_LIBS} )
...@@ -58,10 +62,10 @@ QT4_WRAP_CPP( volumeExplorer_moc ../volumeExplorer.h ) ...@@ -58,10 +62,10 @@ QT4_WRAP_CPP( volumeExplorer_moc ../volumeExplorer.h )
add_executable( volumeExplorer ../volumeExplorer.cpp ${volumeExplorer_ui} ${volumeExplorer_moc} ) add_executable( volumeExplorer ../volumeExplorer.cpp ${volumeExplorer_ui} ${volumeExplorer_moc} )
target_link_libraries( volumeExplorer ${CGoGN_LIBS_R} ${CGoGN_EXT_LIBS} ) target_link_libraries( volumeExplorer ${CGoGN_LIBS_R} ${CGoGN_EXT_LIBS} )
QT4_WRAP_UI( mcmesh_ui ../mcmesh.ui ) #QT4_WRAP_UI( mcmesh_ui ../mcmesh.ui )
QT4_WRAP_CPP( mcmesh_moc ../mcmesh.h ) #QT4_WRAP_CPP( mcmesh_moc ../mcmesh.h )
add_executable( mcmesh ../mcmesh.cpp ${mcmesh_moc} ${mcmesh_ui} ) #add_executable( mcmesh ../mcmesh.cpp ${mcmesh_moc} ${mcmesh_ui} )
target_link_libraries( mcmesh ${CGoGN_LIBS_R} ${CGoGN_EXT_LIBS} ) #target_link_libraries( mcmesh ${CGoGN_LIBS_R} ${CGoGN_EXT_LIBS} )
QT4_WRAP_CPP( concave_rendering_moc ../concave_rendering.h ) QT4_WRAP_CPP( concave_rendering_moc ../concave_rendering.h )
add_executable( concave_rendering ../concave_rendering.cpp ${concave_rendering_moc} ${concave_rendering_ui} ) add_executable( concave_rendering ../concave_rendering.cpp ${concave_rendering_moc} ${concave_rendering_ui} )
......
...@@ -106,20 +106,20 @@ void SimpleMap3::cb_initGL() ...@@ -106,20 +106,20 @@ void SimpleMap3::cb_initGL()
float gWidthObj = std::max<float>(std::max<float>(tailleX, tailleY), tailleZ) ; float gWidthObj = std::max<float>(std::max<float>(tailleX, tailleY), tailleZ) ;
setParamObject(gWidthObj, gPosObj.data()); setParamObject(gWidthObj, gPosObj.data());
m_render_topo = new Algo::Render::GL2::Topo3Render(); m_render_topo = new Algo::Render::GL2::Topo3RenderMap<PFP>();
m_render_topo->setDartWidth(2.0f); m_render_topo->setDartWidth(2.0f);
m_render_topo->setInitialDartsColor(1.0f,1.0f,1.0f); m_render_topo->setInitialDartsColor(1.0f,1.0f,1.0f);
m_render_topo->updateData<PFP>(myMap, position, 0.9f,0.9f,0.8f); m_render_topo->updateData(myMap, position, 0.9f,0.9f,0.8f);
m_render_topo_boundary = new Algo::Render::GL2::TopoRender(); m_render_topo_boundary = new Algo::Render::GL2::TopoRenderMap<PFP>();
m_render_topo_boundary->setDartWidth(2.0f); m_render_topo_boundary->setDartWidth(2.0f);
m_render_topo_boundary->setInitialDartsColor(0.4f,0.8f,0.4f); m_render_topo_boundary->setInitialDartsColor(0.4f,0.8f,0.4f);
m_render_topo_boundary->updateDataBoundary<PFP>(myMap, position, 0.9f,0.9f,bb.maxSize()/50.0f); m_render_topo_boundary->updateDataBoundary(myMap, position, 0.9f,0.9f,bb.maxSize()/50.0f);
m_render_topo_primal = new Algo::Render::GL2::Topo3PrimalRender(); m_render_topo_primal = new Algo::Render::GL2::Topo3PrimalRender<PFP>();
m_render_topo_primal->setDartWidth(2.0f); m_render_topo_primal->setDartWidth(2.0f);
m_render_topo_primal->setInitialDartsColor(1.0f,1.0f,1.0f); m_render_topo_primal->setInitialDartsColor(1.0f,1.0f,1.0f);
m_render_topo_primal->updateData<PFP>(myMap, position, 0.95f,0.85f); m_render_topo_primal->updateData(myMap, position, 0.95f,0.85f);
} }
void SimpleMap3::cb_keyPress(int code) void SimpleMap3::cb_keyPress(int code)
......
...@@ -45,6 +45,7 @@ struct PFP: public PFP_STANDARD ...@@ -45,6 +45,7 @@ struct PFP: public PFP_STANDARD
}; };
typedef PFP::MAP MAP ; typedef PFP::MAP MAP ;
typedef PFP::MAP::IMPL MAP_IMPL ;
typedef PFP::VEC3 VEC3 ; typedef PFP::VEC3 VEC3 ;
class SimpleMap3 : public Utils::QT::SimpleQT class SimpleMap3 : public Utils::QT::SimpleQT
...@@ -55,11 +56,11 @@ public: ...@@ -55,11 +56,11 @@ public:
MAP myMap ; MAP myMap ;
SelectorTrue allDarts ; SelectorTrue allDarts ;
VertexAttribute<VEC3> position ; VertexAttribute<VEC3, MAP_IMPL> position ;
Algo::Render::GL2::Topo3Render* m_render_topo; Algo::Render::GL2::Topo3RenderMap<PFP>* m_render_topo;
Algo::Render::GL2::TopoRender* m_render_topo_boundary; Algo::Render::GL2::TopoRenderMap<PFP>* m_render_topo_boundary;
Algo::Render::GL2::Topo3PrimalRender* m_render_topo_primal; Algo::Render::GL2::Topo3PrimalRender<PFP>* m_render_topo_primal;
SimpleMap3() ; SimpleMap3() ;
...@@ -69,4 +70,3 @@ public: ...@@ -69,4 +70,3 @@ public:
void cb_redraw() ; void cb_redraw() ;
void cb_keyPress(int code); void cb_keyPress(int code);
}; };
...@@ -80,7 +80,7 @@ void Viewer::cb_initGL() ...@@ -80,7 +80,7 @@ void Viewer::cb_initGL()
Utils::GLSLShader::setCurrentOGLVersion(2) ; Utils::GLSLShader::setCurrentOGLVersion(2) ;
m_render = new Algo::Render::GL2::MapRender() ; m_render = new Algo::Render::GL2::MapRender() ;
m_topoRender = new Algo::Render::GL2::TopoRender() ; m_topoRender = new Algo::Render::GL2::TopoRenderMap<PFP>() ;
m_topoRender->setInitialDartsColor(0.25f, 0.25f, 0.25f) ; m_topoRender->setInitialDartsColor(0.25f, 0.25f, 0.25f) ;
...@@ -230,7 +230,7 @@ void Viewer::importMesh(std::string& filename) ...@@ -230,7 +230,7 @@ void Viewer::importMesh(std::string& filename)
m_render->initPrimitives<PFP>(myMap, Algo::Render::GL2::LINES) ; m_render->initPrimitives<PFP>(myMap, Algo::Render::GL2::LINES) ;
m_render->initPrimitives<PFP>(myMap, Algo::Render::GL2::TRIANGLES) ; m_render->initPrimitives<PFP>(myMap, Algo::Render::GL2::TRIANGLES) ;
m_topoRender->updateData<PFP>(myMap, position, 0.85f, 0.85f, m_drawBoundaryTopo) ; m_topoRender->updateData(myMap, position, 0.85f, 0.85f, m_drawBoundaryTopo) ;
bb = Algo::Geometry::computeBoundingBox<PFP>(myMap, position) ; bb = Algo::Geometry::computeBoundingBox<PFP>(myMap, position) ;
normalBaseSize = bb.diagSize() / 100.0f ; normalBaseSize = bb.diagSize() / 100.0f ;
...@@ -262,7 +262,7 @@ void Viewer::exportMesh(std::string& filename, bool askExportMode) ...@@ -262,7 +262,7 @@ void Viewer::exportMesh(std::string& filename, bool askExportMode)
if (askExportMode) if (askExportMode)
Utils::QT::inputValues(Utils::QT::VarCombo("binary mode;ascii mode",ascii,"Save in")) ; Utils::QT::inputValues(Utils::QT::VarCombo("binary mode;ascii mode",ascii,"Save in")) ;
std::vector<VertexAttribute<VEC3>*> attributes ; std::vector<VertexAttribute<VEC3, MAP_IMPL>*> attributes ;
attributes.push_back(&position) ; attributes.push_back(&position) ;
Algo::Surface::Export::exportPLYnew<PFP>(myMap, attributes, filename.c_str(), !ascii) ; Algo::Surface::Export::exportPLYnew<PFP>(myMap, attributes, filename.c_str(), !ascii) ;
} }
......
...@@ -64,6 +64,7 @@ struct PFP: public PFP_STANDARD ...@@ -64,6 +64,7 @@ struct PFP: public PFP_STANDARD
}; };
typedef PFP::MAP MAP ; typedef PFP::MAP MAP ;
typedef PFP::MAP::IMPL MAP_IMPL ;
typedef PFP::VEC3 VEC3 ; typedef PFP::VEC3 VEC3 ;
//class Viewer : public Utils::QT::SimpleQT //class Viewer : public Utils::QT::SimpleQT
...@@ -100,11 +101,11 @@ public: ...@@ -100,11 +101,11 @@ public:
bool m_drawTopo ; bool m_drawTopo ;
bool m_drawBoundaryTopo; bool m_drawBoundaryTopo;
VertexAttribute<VEC3> position ; VertexAttribute<VEC3, MAP_IMPL> position ;
VertexAttribute<VEC3> normal ; VertexAttribute<VEC3, MAP_IMPL> normal ;
Algo::Render::GL2::MapRender* m_render ; Algo::Render::GL2::MapRender* m_render ;
Algo::Render::GL2::TopoRender* m_topoRender ; Algo::Render::GL2::TopoRenderMap<PFP>* m_topoRender ;
Utils::VBO* m_positionVBO ; Utils::VBO* m_positionVBO ;
Utils::VBO* m_normalVBO; Utils::VBO* m_normalVBO;
......
...@@ -122,12 +122,11 @@ void MyQT::slider_released() ...@@ -122,12 +122,11 @@ void MyQT::slider_released()
{ {
// SelectorDartNoBoundary<PFP::MAP> nb(myMap); // SelectorDartNoBoundary<PFP::MAP> nb(myMap);
//TODO MapBrowser //TODO MapBrowser
m_topo_render->updateData<PFP>(myMap, position, 0.8f, m_explode_factorf-0.05f, m_explode_factor ); m_topo_render->updateData(myMap, position, 0.8f, m_explode_factorf-0.05f, m_explode_factor );
} }
updateGL(); updateGL();
} }
void MyQT::cb_Open() void MyQT::cb_Open()
{ {
std::string filters("all (*.*)") ; std::string filters("all (*.*)") ;
...@@ -210,7 +209,7 @@ void MyQT::cb_initGL() ...@@ -210,7 +209,7 @@ void MyQT::cb_initGL()
m_explode_render = new Algo::Render::GL2::ExplodeVolumeRender(true,true,true); m_explode_render = new Algo::Render::GL2::ExplodeVolumeRender(true,true,true);
// SelectorDartNoBoundary<PFP::MAP> nb(myMap); // SelectorDartNoBoundary<PFP::MAP> nb(myMap);
m_topo_render->updateData<PFP>(myMap, position, 0.8f, 0.8f, 0.8f); m_topo_render->updateData(myMap, position, 0.8f, 0.8f, 0.8f);
m_explode_render->updateData<PFP>(myMap, position, color); m_explode_render->updateData<PFP>(myMap, position, color);
m_explode_render->setExplodeVolumes(0.8f); m_explode_render->setExplodeVolumes(0.8f);
m_explode_render->setExplodeFaces(0.9f); m_explode_render->setExplodeFaces(0.9f);
......
...@@ -95,7 +95,6 @@ class MyQT: public Utils::QT::SimpleQT ...@@ -95,7 +95,6 @@ class MyQT: public Utils::QT::SimpleQT
Utils::ClippingShader* m_sh1; Utils::ClippingShader* m_sh1;
Utils::ClippingShader* m_sh2; Utils::ClippingShader* m_sh2;
public: public:
float m_WidthObj; float m_WidthObj;
Geom::Vec3f m_PosObj; Geom::Vec3f m_PosObj;
......
...@@ -48,11 +48,15 @@ struct PFP: public PFP_STANDARD ...@@ -48,11 +48,15 @@ struct PFP: public PFP_STANDARD
typedef EmbeddedMap2 MAP; typedef EmbeddedMap2 MAP;
}; };
typedef PFP::MAP MAP;
typedef PFP::MAP::IMPL MAP_IMPL;
typedef PFP::VEC3 VEC3;
PFP::MAP myMap; PFP::MAP myMap;
VertexAttribute<PFP::VEC3> position;
VertexAttribute<PFP::VEC3> position2; VertexAttribute<VEC3, MAP_IMPL> position;
VertexAttribute<PFP::VEC3> normal; VertexAttribute<VEC3, MAP_IMPL> position2;
VertexAttribute<VEC3, MAP_IMPL> normal;
void MyQT::cb_initGL() void MyQT::cb_initGL()
{ {
...@@ -71,7 +75,6 @@ void MyQT::cb_initGL() ...@@ -71,7 +75,6 @@ void MyQT::cb_initGL()
m_shader->setAttributePosition(m_positionVBO); m_shader->setAttributePosition(m_positionVBO);
m_shader->setColor(Geom::Vec4f(1.,1.,0.,0.)); m_shader->setColor(Geom::Vec4f(1.,1.,0.,0.));
m_lines = new Utils::ShaderVectorPerVertex(); m_lines = new Utils::ShaderVectorPerVertex();
m_lines->setAttributePosition(m_positionVBO); m_lines->setAttributePosition(m_positionVBO);
m_lines->setAttributeVector(m_normalVBO); m_lines->setAttributeVector(m_normalVBO);
...@@ -87,7 +90,6 @@ void MyQT::cb_initGL() ...@@ -87,7 +90,6 @@ void MyQT::cb_initGL()
registerShader(m_lines); registerShader(m_lines);
m_normalVBO->updateData(normal); m_normalVBO->updateData(normal);
} }
void MyQT::cb_redraw() void MyQT::cb_redraw()
...@@ -313,7 +315,6 @@ int main(int argc, char **argv) ...@@ -313,7 +315,6 @@ int main(int argc, char **argv)
sqt.triangularTiling(atoi(argv[2])); sqt.triangularTiling(atoi(argv[2]));
} }
// bounding box // bounding box
Geom::BoundingBox<PFP::VEC3> bb = Algo::Geometry::computeBoundingBox<PFP>(myMap, position); Geom::BoundingBox<PFP::VEC3> bb = Algo::Geometry::computeBoundingBox<PFP>(myMap, position);
float lWidthObj = std::max<PFP::REAL>(std::max<PFP::REAL>(bb.size(0), bb.size(1)), bb.size(2)); float lWidthObj = std::max<PFP::REAL>(std::max<PFP::REAL>(bb.size(0), bb.size(1)), bb.size(2));
...@@ -327,7 +328,5 @@ int main(int argc, char **argv) ...@@ -327,7 +328,5 @@ int main(int argc, char **argv)
sqt.show(); sqt.show();
return app.exec(); return app.exec();
} }
...@@ -44,7 +44,6 @@ ...@@ -44,7 +44,6 @@
#include "Algo/Tiling/Surface/square.h" #include "Algo/Tiling/Surface/square.h"
#include "Algo/Tiling/Surface/triangular.h" #include "Algo/Tiling/Surface/triangular.h"
// forward definitions (minimize includes) // forward definitions (minimize includes)
namespace CGoGN { namespace Algo { namespace Render { namespace GL1 { class MapRender; } } } } namespace CGoGN { namespace Algo { namespace Render { namespace GL1 { class MapRender; } } } }
namespace CGoGN { namespace Utils { class VBO; } } namespace CGoGN { namespace Utils { class VBO; } }
...@@ -68,8 +67,6 @@ public: ...@@ -68,8 +67,6 @@ public:
Utils::ShaderSimpleColor* m_shader; Utils::ShaderSimpleColor* m_shader;
Utils::ShaderVectorPerVertex* m_lines; Utils::ShaderVectorPerVertex* m_lines;
MyQT(): MyQT():
m_render(NULL), m_render(NULL),
m_positionVBO(NULL), m_positionVBO(NULL),
...@@ -93,10 +90,6 @@ protected: ...@@ -93,10 +90,6 @@ protected:
void threadAttrib(); void threadAttrib();
void threadStorage(); void threadStorage();
}; };
#endif // TUTO_TILINGS_H #endif // TUTO_TILINGS_H
...@@ -38,9 +38,9 @@ ...@@ -38,9 +38,9 @@
#include "Algo/Render/GL2/drawerCells.h" #include "Algo/Render/GL2/drawerCells.h"
MAP myMap; MAP myMap;
VertexAttribute<VEC3> position ;
VertexAttribute<VEC3, MAP_IMPL> position ;
Dart dglobal; Dart dglobal;
void MyQT::cb_checkTopo(bool b) void MyQT::cb_checkTopo(bool b)
...@@ -112,16 +112,15 @@ void MyQT::cb_explode(int x) ...@@ -112,16 +112,15 @@ void MyQT::cb_explode(int x)
traverse3(); traverse3();
} }
void MyQT::cb_initGL() void MyQT::cb_initGL()
{ {
// choose to use GL version 2 // choose to use GL version 2
Utils::GLSLShader::setCurrentOGLVersion(2); Utils::GLSLShader::setCurrentOGLVersion(2);
m_render_topo = new Algo::Render::GL2::Topo3Render(); m_render_topo = new Algo::Render::GL2::Topo3RenderMap<PFP>();
m_render_topo->updateData<PFP>(myMap, position, 0.95f, 0.9f, 0.8f); m_render_topo->updateData(myMap, position, 0.95f, 0.9f, 0.8f);
m_dm_topo = new DartMarker(myMap); m_dm_topo = new DartMarker<MAP>(myMap);
} }
void MyQT::cb_redraw() void MyQT::cb_redraw()
...@@ -146,7 +145,7 @@ void MyQT::cb_mousePress(int /*button*/, int x, int y) ...@@ -146,7 +145,7 @@ void MyQT::cb_mousePress(int /*button*/, int x, int y)
{ {
if (Shift()) if (Shift())
{ {
Dart d = m_render_topo->picking<PFP>(myMap, x, y); Dart d = m_render_topo->picking(myMap, x, y);
if (d != Dart::nil()) if (d != Dart::nil())
{ {
CGoGNout << "Dart " << d << " clicked" << CGoGNendl; CGoGNout << "Dart " << d << " clicked" << CGoGNendl;
...@@ -163,7 +162,6 @@ void MyQT::cb_Save() ...@@ -163,7 +162,6 @@ void MyQT::cb_Save()
std::string filename1 = filename + std::string("Drawer") + std::string(".svg"); std::string filename1 = filename + std::string("Drawer") + std::string(".svg");
std::string filename2 = filename + std::string("Topo") + std::string(".svg"); std::string filename2 = filename + std::string("Topo") + std::string(".svg");
// std::string filename = selectFileSave("Export SVG file ",".","(*.svg)"); // std::string filename = selectFileSave("Export SVG file ",".","(*.svg)");
// Utils::SVG::SVGOut svg(filename,modelViewMatrix(),projectionMatrix()); // Utils::SVG::SVGOut svg(filename,modelViewMatrix(),projectionMatrix());
// m_drawer.toSVG(svg); // m_drawer.toSVG(svg);
...@@ -188,12 +186,7 @@ void MyQT::cb_Save() ...@@ -188,12 +186,7 @@ void MyQT::cb_Save()
// anim.add(&svg1); // anim.add(&svg1);
// anim.add(&svg2); // anim.add(&svg2);
// anim.write(filename, 2.0f); // anim.write(filename, 2.0f);
} }
template <unsigned int ORBIT> template <unsigned int ORBIT>
...@@ -240,13 +233,11 @@ void MyQT::traverse2() ...@@ -240,13 +233,11 @@ void MyQT::traverse2()
m_drawer.endList(); m_drawer.endList();
// SelectorMarked sm(*m_dm_topo); // SelectorMarked sm(*m_dm_topo);
m_render_topo->updateData<PFP>(myMap, position, 0.95f, 0.9f, 0.8f); m_render_topo->updateData(myMap, position, 0.95f, 0.9f, 0.8f);
updateGL(); updateGL();
} }
void MyQT::dynamicMarkOrbit(unsigned int orb) void MyQT::dynamicMarkOrbit(unsigned int orb)
{ {
switch(orb) switch(orb)
...@@ -300,7 +291,7 @@ void MyQT::traverse3() ...@@ -300,7 +291,7 @@ void MyQT::traverse3()
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(myMap, position, 0.95f, 0.9f, 0.8f); //sm
for (std::vector<Dart>::iterator id = m_affDarts.begin(); id != m_affDarts.end(); ++id) for (std::vector<Dart>::iterator id = m_affDarts.begin(); id != m_affDarts.end(); ++id)
m_render_topo->setDartColor(*id,0.7f,0.0f,0.0f); m_render_topo->setDartColor(*id,0.7f,0.0f,0.0f);
...@@ -321,7 +312,7 @@ void MyQT::traverse3() ...@@ -321,7 +312,7 @@ void MyQT::traverse3()
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(myMap, position, 0.95f, 0.9f, 0.8f); //sm
for (std::vector<Dart>::iterator id=m_affDarts.begin(); id != m_affDarts.end(); ++id) for (std::vector<Dart>::iterator id=m_affDarts.begin(); id != m_affDarts.end(); ++id)
m_render_topo->setDartColor(*id,0.7f,0.0f,0.0f); m_render_topo->setDartColor(*id,0.7f,0.0f,0.0f);
m_render_topo->setDartColor(m_selected,0.0f,0.7f,0.0f); m_render_topo->setDartColor(m_selected,0.0f,0.7f,0.0f);
......
...@@ -24,17 +24,10 @@ ...@@ -24,17 +24,10 @@
#ifndef __SHOW_TRAVERSORS_ #ifndef __SHOW_TRAVERSORS_
#define __SHOW_TRAVERSORS_ #define __SHOW_TRAVERSORS_
#include <iostream> #include <iostream>
//#define WITH_GMAP 1
#include "Topology/generic/parameters.h" #include "Topology/generic/parameters.h"
#ifdef WITH_GMAP #include "Topology/map/embeddedMap3.h"
#include "Topology/gmap/embeddedGMap3.h"
#else
#include "Topology/map/embeddedMap3.h"
#endif
#include "Geometry/vector_gen.h" #include "Geometry/vector_gen.h"
#include "Algo/Geometry/boundingbox.h" #include "Algo/Geometry/boundingbox.h"
...@@ -51,7 +44,6 @@ ...@@ -51,7 +44,6 @@
#include "Utils/cgognStream.h" #include "Utils/cgognStream.h"
#include "Utils/drawer.h" #include "Utils/drawer.h"
#include "Utils/Qt/qtSimple.h" #include "Utils/Qt/qtSimple.h"
#include "ui_show_traversors.h" #include "ui_show_traversors.h"
...@@ -64,17 +56,13 @@ using namespace CGoGN ; ...@@ -64,17 +56,13 @@ using namespace CGoGN ;
struct PFP: public PFP_STANDARD struct PFP: public PFP_STANDARD
{ {
// definition de la carte // definition de la carte
#ifdef WITH_GMAP
typedef EmbeddedGMap3 MAP;
#else
typedef EmbeddedMap3 MAP; typedef EmbeddedMap3 MAP;
#endif
}; };
typedef PFP::MAP MAP ; typedef PFP::MAP MAP ;
typedef PFP::MAP::IMPL MAP_IMPL ;
typedef PFP::VEC3 VEC3 ; typedef PFP::VEC3 VEC3 ;
/** /**
* Utilisation de designer-qt4: * Utilisation de designer-qt4:
* Faire un DockWiget (laisser le nom par defaut * Faire un DockWiget (laisser le nom par defaut
...@@ -86,7 +74,7 @@ class MyQT: public Utils::QT::SimpleQT ...@@ -86,7 +74,7 @@ class MyQT: public Utils::QT::SimpleQT
{ {
Q_OBJECT Q_OBJECT
Algo::Render::GL2::Topo3Render* m_render_topo; Algo::Render::GL2::Topo3RenderMap<PFP>* m_render_topo;
bool m_showTopo; bool m_showTopo;
unsigned int m_first3; unsigned int m_first3;
...@@ -118,7 +106,7 @@ public: ...@@ -118,7 +106,7 @@ public: