Commit 9e0a96cf authored by Sylvain Thery's avatar Sylvain Thery

eradication of selector git diff | grep +++

parent 4f1ab1d0
...@@ -138,21 +138,21 @@ void Clipping::slot_drawFaces(bool b) ...@@ -138,21 +138,21 @@ void Clipping::slot_drawFaces(bool b)
void Clipping::slot_explodTopoPhi1(double c) void Clipping::slot_explodTopoPhi1(double c)
{ {
m_coeffTopoExplod[0] = (float)c; m_coeffTopoExplod[0] = (float)c;
m_render_topo->updateData<PFP>(myMap, position, m_coeffTopoExplod[0], m_coeffTopoExplod[1], m_coeffTopoExplod[2], allDarts); m_render_topo->updateData<PFP>(myMap, position, m_coeffTopoExplod[0], m_coeffTopoExplod[1], m_coeffTopoExplod[2]);
updateGL(); updateGL();
} }
void Clipping::slot_explodTopoPhi2(double c) void Clipping::slot_explodTopoPhi2(double c)
{ {
m_coeffTopoExplod[1] = (float)c; m_coeffTopoExplod[1] = (float)c;
m_render_topo->updateData<PFP>(myMap, position, m_coeffTopoExplod[0], m_coeffTopoExplod[1], m_coeffTopoExplod[2], allDarts); m_render_topo->updateData<PFP>(myMap, position, m_coeffTopoExplod[0], m_coeffTopoExplod[1], m_coeffTopoExplod[2]);
updateGL(); updateGL();
} }
void Clipping::slot_explodTopoPhi3(double c) void Clipping::slot_explodTopoPhi3(double c)
{ {
m_coeffTopoExplod[2] = (float)c; m_coeffTopoExplod[2] = (float)c;
m_render_topo->updateData<PFP>(myMap, position, m_coeffTopoExplod[0], m_coeffTopoExplod[1], m_coeffTopoExplod[2], allDarts); m_render_topo->updateData<PFP>(myMap, position, m_coeffTopoExplod[0], m_coeffTopoExplod[1], m_coeffTopoExplod[2]);
updateGL(); updateGL();
} }
...@@ -823,7 +823,7 @@ void Clipping::importMesh(std::string& filename) ...@@ -823,7 +823,7 @@ void Clipping::importMesh(std::string& filename)
updateVBOprimitives(Algo::Render::GL2::TRIANGLES | Algo::Render::GL2::LINES | Algo::Render::GL2::POINTS) ; updateVBOprimitives(Algo::Render::GL2::TRIANGLES | Algo::Render::GL2::LINES | Algo::Render::GL2::POINTS) ;
m_render_topo->updateData<PFP>(myMap, position, m_coeffTopoExplod[0], m_coeffTopoExplod[1], m_coeffTopoExplod[2], allDarts); m_render_topo->updateData<PFP>(myMap, position, m_coeffTopoExplod[0], m_coeffTopoExplod[1], m_coeffTopoExplod[2]);
m_bb = Algo::Geometry::computeBoundingBox<PFP>(myMap, position) ; m_bb = Algo::Geometry::computeBoundingBox<PFP>(myMap, position) ;
gPosObj = m_bb.center() ; gPosObj = m_bb.center() ;
...@@ -883,13 +883,13 @@ void Clipping::cb_initGL() ...@@ -883,13 +883,13 @@ void Clipping::cb_initGL()
void Clipping::updateVBOprimitives(int upType) void Clipping::updateVBOprimitives(int upType)
{ {
if(upType & Algo::Render::GL2::TRIANGLES) if(upType & Algo::Render::GL2::TRIANGLES)
m_render->initPrimitives<PFP>(myMap, allDarts, Algo::Render::GL2::TRIANGLES) ; m_render->initPrimitives<PFP>(myMap, Algo::Render::GL2::TRIANGLES) ;
if(upType & Algo::Render::GL2::LINES) if(upType & Algo::Render::GL2::LINES)
m_render->initPrimitives<PFP>(myMap, allDarts, Algo::Render::GL2::LINES,false) ; m_render->initPrimitives<PFP>(myMap, Algo::Render::GL2::LINES,false) ;
if(upType & Algo::Render::GL2::POINTS) if(upType & Algo::Render::GL2::POINTS)
m_render->initPrimitives<PFP>(myMap, allDarts, Algo::Render::GL2::POINTS) ; m_render->initPrimitives<PFP>(myMap, Algo::Render::GL2::POINTS) ;
} }
void Clipping::cb_redraw() void Clipping::cb_redraw()
......
...@@ -216,8 +216,8 @@ void MyQT::cb_keyPress(int code) ...@@ -216,8 +216,8 @@ void MyQT::cb_keyPress(int code)
Algo::Surface::Modelisation::EarTriangulation<PFP> triangulation(myMap); Algo::Surface::Modelisation::EarTriangulation<PFP> triangulation(myMap);
triangulation.triangule(); triangulation.triangule();
m_render->initPrimitives<PFP>(myMap, allDarts, Algo::Render::GL2::TRIANGLES); m_render->initPrimitives<PFP>(myMap, Algo::Render::GL2::TRIANGLES);
m_render->initPrimitives<PFP>(myMap, allDarts, Algo::Render::GL2::LINES); m_render->initPrimitives<PFP>(myMap, Algo::Render::GL2::LINES);
updateGL(); updateGL();
} }
break; break;
...@@ -431,9 +431,9 @@ int main(int argc, char **argv) ...@@ -431,9 +431,9 @@ int main(int argc, char **argv)
sqt.m_positionVBO->updateData(position); sqt.m_positionVBO->updateData(position);
// update des primitives du renderer // update des primitives du renderer
sqt.m_render->initPrimitives<PFP>(myMap, allDarts, Algo::Render::GL2::TRIANGLES, &position); sqt.m_render->initPrimitives<PFP>(myMap, Algo::Render::GL2::TRIANGLES, &position);
sqt.m_render->initPrimitives<PFP>(myMap, allDarts, Algo::Render::GL2::LINES, &position); sqt.m_render->initPrimitives<PFP>(myMap, Algo::Render::GL2::LINES, &position);
sqt.m_render->initPrimitives<PFP>(myMap, allDarts, Algo::Render::GL2::POINTS, &position); sqt.m_render->initPrimitives<PFP>(myMap, Algo::Render::GL2::POINTS, &position);
// show final pour premier redraw // show final pour premier redraw
sqt.show(); sqt.show();
......
...@@ -150,8 +150,8 @@ int main(int argc, char **argv) ...@@ -150,8 +150,8 @@ int main(int argc, char **argv)
sqt.m_positionVBO->updateData(position); sqt.m_positionVBO->updateData(position);
// update render primitives // update render primitives
sqt.m_render->initPrimitives<PFP>(myMap, allDarts, Algo::Render::GL2::TRIANGLES); sqt.m_render->initPrimitives<PFP>(myMap, Algo::Render::GL2::TRIANGLES);
sqt.m_render->initPrimitives<PFP>(myMap, allDarts, Algo::Render::GL2::LINES); sqt.m_render->initPrimitives<PFP>(myMap, Algo::Render::GL2::LINES);
sqt.show(); sqt.show();
return app.exec(); return app.exec();
......
...@@ -155,8 +155,9 @@ void MCMesh::MC() ...@@ -155,8 +155,9 @@ void MCMesh::MC()
void MCMesh::updateRender() void MCMesh::updateRender()
{ {
SelectorDartNoBoundary<PFP::MAP> nb(myMap); SelectorDartNoBoundary<PFP::MAP> nb(myMap);
m_render->initPrimitives<PFP>(myMap, nb, Algo::Render::GL2::LINES); //TODO add Browser for no border
m_render->initPrimitives<PFP>(myMap, nb, Algo::Render::GL2::TRIANGLES); m_render->initPrimitives<PFP>(myMap, Algo::Render::GL2::LINES);
m_render->initPrimitives<PFP>(myMap, Algo::Render::GL2::TRIANGLES);
m_positionVBO->updateData(position); m_positionVBO->updateData(position);
......
...@@ -91,7 +91,7 @@ void SimpleMap3::cb_redraw() ...@@ -91,7 +91,7 @@ void SimpleMap3::cb_redraw()
{ {
glDisable(GL_LIGHTING); glDisable(GL_LIGHTING);
glLineWidth(1.0f); glLineWidth(1.0f);
Algo::Render::GL1::renderTopoMD3<PFP>(myMap, position, true, true, true, 0.9f, 0.9f, 0.9f,allDarts); Algo::Render::GL1::renderTopoMD3<PFP>(myMap, position, true, true, true, 0.9f, 0.9f, 0.9f);
} }
/********************************************************************************************** /**********************************************************************************************
......
...@@ -83,7 +83,7 @@ void TexView::cb_initGL() ...@@ -83,7 +83,7 @@ void TexView::cb_initGL()
glEnable(GL_TEXTURE_2D); glEnable(GL_TEXTURE_2D);
m_render->initPrimitives<PFP>(myMap, allDarts, Algo::Render::GL2::TRIANGLES); m_render->initPrimitives<PFP>(myMap, Algo::Render::GL2::TRIANGLES);
} }
void TexView::cb_redraw() void TexView::cb_redraw()
......
...@@ -229,9 +229,9 @@ void Viewer::importMesh(std::string& filename) ...@@ -229,9 +229,9 @@ void Viewer::importMesh(std::string& filename)
myMap.enableQuickTraversal<VERTEX>() ; myMap.enableQuickTraversal<VERTEX>() ;
m_render->initPrimitives<PFP>(myMap, allDarts, Algo::Render::GL2::POINTS) ; m_render->initPrimitives<PFP>(myMap, Algo::Render::GL2::POINTS) ;
m_render->initPrimitives<PFP>(myMap, allDarts, Algo::Render::GL2::LINES) ; m_render->initPrimitives<PFP>(myMap, Algo::Render::GL2::LINES) ;
m_render->initPrimitives<PFP>(myMap, allDarts, Algo::Render::GL2::TRIANGLES) ; m_render->initPrimitives<PFP>(myMap, Algo::Render::GL2::TRIANGLES) ;
m_topoRender->updateData<PFP>(myMap, position, 0.85f, 0.85f) ; m_topoRender->updateData<PFP>(myMap, position, 0.85f, 0.85f) ;
...@@ -258,7 +258,7 @@ void Viewer::exportMesh(std::string& filename, bool askExportMode) ...@@ -258,7 +258,7 @@ void Viewer::exportMesh(std::string& filename, bool askExportMode)
std::string extension = filename.substr(pos) ; std::string extension = filename.substr(pos) ;
if (extension == std::string(".off")) if (extension == std::string(".off"))
Algo::Surface::Export::exportOFF<PFP>(myMap, position, filename.c_str(), allDarts) ; Algo::Surface::Export::exportOFF<PFP>(myMap, position, filename.c_str()) ;
else if (extension.compare(0, 4, std::string(".ply")) == 0) else if (extension.compare(0, 4, std::string(".ply")) == 0)
{ {
int ascii = 0 ; int ascii = 0 ;
...@@ -267,7 +267,7 @@ void Viewer::exportMesh(std::string& filename, bool askExportMode) ...@@ -267,7 +267,7 @@ void Viewer::exportMesh(std::string& filename, bool askExportMode)
std::vector<VertexAttribute<VEC3>*> attributes ; std::vector<VertexAttribute<VEC3>*> attributes ;
attributes.push_back(&position) ; attributes.push_back(&position) ;
Algo::Surface::Export::exportPLYnew<PFP>(myMap, attributes, filename.c_str(), !ascii, allDarts) ; Algo::Surface::Export::exportPLYnew<PFP>(myMap, attributes, filename.c_str(), !ascii) ;
} }
else if (extension == std::string(".map")) else if (extension == std::string(".map"))
myMap.saveMapBin(filename) ; myMap.saveMapBin(filename) ;
......
...@@ -55,8 +55,9 @@ void MyQT::topo_onoff(bool x) ...@@ -55,8 +55,9 @@ void MyQT::topo_onoff(bool x)
render_topo = !render_topo; render_topo = !render_topo;
if (render_topo) if (render_topo)
{ {
SelectorDartNoBoundary<PFP::MAP> nb(myMap); // SelectorDartNoBoundary<PFP::MAP> nb(myMap);
m_topo_render->updateData<PFP>(myMap, position, 0.8f, m_explode_factorf-0.05f, m_explode_factor, nb); //TODO MapBrowser
m_topo_render->updateData<PFP>(myMap, position, 0.8f, m_explode_factorf-0.05f, m_explode_factor);
} }
updateGL(); updateGL();
...@@ -123,8 +124,9 @@ void MyQT::slider_released() ...@@ -123,8 +124,9 @@ void MyQT::slider_released()
render_topo = render_topoTemp; render_topo = render_topoTemp;
if (render_topo) if (render_topo)
{ {
SelectorDartNoBoundary<PFP::MAP> nb(myMap); // SelectorDartNoBoundary<PFP::MAP> nb(myMap);
m_topo_render->updateData<PFP>(myMap, position, 0.8f, m_explode_factorf-0.05f, m_explode_factor, nb); //TODO MapBrowser
m_topo_render->updateData<PFP>(myMap, position, 0.8f, m_explode_factorf-0.05f, m_explode_factor );
} }
updateGL(); updateGL();
} }
...@@ -185,8 +187,8 @@ void MyQT::cb_Open() ...@@ -185,8 +187,8 @@ void MyQT::cb_Open()
color[i][2] = 1.0f - color[i][0]; color[i][2] = 1.0f - color[i][0];
} }
SelectorDartNoBoundary<PFP::MAP> nb(myMap); // SelectorDartNoBoundary<PFP::MAP> nb(myMap);
m_topo_render->updateData<PFP>(myMap, position, 0.8f, 0.8f, 0.8f, nb); m_topo_render->updateData<PFP>(myMap, position, 0.8f, 0.8f, 0.8f);
m_explode_render->updateData<PFP>(myMap, position, color); m_explode_render->updateData<PFP>(myMap, position, color);
updateGL() ; updateGL() ;
...@@ -202,8 +204,8 @@ void MyQT::cb_initGL() ...@@ -202,8 +204,8 @@ void MyQT::cb_initGL()
m_topo_render = new Algo::Render::GL2::Topo3Render(); m_topo_render = new Algo::Render::GL2::Topo3Render();
m_explode_render = new Algo::Render::GL2::ExplodeVolumeRender(true,true,false); m_explode_render = new Algo::Render::GL2::ExplodeVolumeRender(true,true,false);
SelectorDartNoBoundary<PFP::MAP> nb(myMap); // SelectorDartNoBoundary<PFP::MAP> nb(myMap);
m_topo_render->updateData<PFP>(myMap, position, 0.8f, 0.8f, 0.8f, nb); m_topo_render->updateData<PFP>(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);
......
...@@ -118,8 +118,8 @@ void MyQT::cb_initGL() ...@@ -118,8 +118,8 @@ void MyQT::cb_initGL()
m_render_topo = new Algo::Render::GL2::Topo3Render(); m_render_topo = new Algo::Render::GL2::Topo3Render();
SelectorDartNoBoundary<PFP::MAP> nb(myMap); // SelectorDartNoBoundary<PFP::MAP> nb(myMap);
m_render_topo->updateData<PFP>(myMap, position, 0.95f, 0.9f, 0.8f, nb); m_render_topo->updateData<PFP>(myMap, position, 0.95f, 0.9f, 0.8f);
m_dm_topo = new DartMarker(myMap); m_dm_topo = new DartMarker(myMap);
} }
...@@ -145,8 +145,8 @@ void MyQT::cb_mousePress(int button, int x, int y) ...@@ -145,8 +145,8 @@ void MyQT::cb_mousePress(int button, int x, int y)
{ {
if (Shift()) if (Shift())
{ {
SelectorDartNoBoundary<PFP::MAP> nb(myMap); // SelectorDartNoBoundary<PFP::MAP> nb(myMap);
Dart d = m_render_topo->picking<PFP>(myMap, x, y, nb); Dart d = m_render_topo->picking<PFP>(myMap, x, y);
if (d != Dart::nil()) if (d != Dart::nil())
{ {
CGoGNout << "Dart " << d << " clicked" << CGoGNendl; CGoGNout << "Dart " << d << " clicked" << CGoGNendl;
...@@ -229,8 +229,8 @@ void MyQT::traverse2() ...@@ -229,8 +229,8 @@ 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, sm); m_render_topo->updateData<PFP>(myMap, position, 0.95f, 0.9f, 0.8f);
updateGL(); updateGL();
} }
...@@ -293,7 +293,8 @@ void MyQT::traverse3() ...@@ -293,7 +293,8 @@ 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<PFP>(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);
...@@ -313,7 +314,7 @@ void MyQT::traverse3() ...@@ -313,7 +314,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<PFP>(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,6 +24,7 @@ ...@@ -24,6 +24,7 @@
#include "tuto1.h" #include "tuto1.h"
#include "Algo/Geometry/boundingbox.h" #include "Algo/Geometry/boundingbox.h"
#include "Topology/generic/mapBrowser.h"
using namespace CGoGN ; using namespace CGoGN ;
...@@ -76,8 +77,7 @@ void MyQT::createMap() ...@@ -76,8 +77,7 @@ void MyQT::createMap()
show(); show();
// render the topo of the map without boundary darts // render the topo of the map without boundary darts
SelectorDartNoBoundary<PFP::MAP> nb(myMap); m_render_topo->updateData<PFP>(myMap, position, 0.9f, 0.9f,true );
m_render_topo->updateData<PFP>(myMap, position, 0.9f, 0.9f, nb);
} }
// initialization GL callback // initialization GL callback
......
...@@ -101,9 +101,9 @@ void MyQT::createMap() ...@@ -101,9 +101,9 @@ void MyQT::createMap()
m_colorVBO2->updateData(colorE); m_colorVBO2->updateData(colorE);
// construct rendering primities // construct rendering primities
m_render->initPrimitives<PFP>(myMap, allDarts, Algo::Render::GL2::TRIANGLES); m_render->initPrimitives<PFP>(myMap, Algo::Render::GL2::TRIANGLES);
m_render->initPrimitives<PFP>(myMap, allDarts, Algo::Render::GL2::LINES); m_render->initPrimitives<PFP>(myMap, Algo::Render::GL2::LINES);
m_render->initPrimitives<PFP>(myMap, allDarts, Algo::Render::GL2::POINTS); // special primitive for boundary edges m_render->initPrimitives<PFP>(myMap, Algo::Render::GL2::POINTS); // special primitive for boundary edges
// traverse of all dart of the map: // traverse of all dart of the map:
// and write informations // and write informations
......
...@@ -69,8 +69,8 @@ void MyQT::traverseMap() ...@@ -69,8 +69,8 @@ void MyQT::traverseMap()
m1.markOrbit<VOLUME>(xd1); m1.markOrbit<VOLUME>(xd1);
// render the topo of the map without boundary darts // render the topo of the map without boundary darts
SelectorDartNoBoundary<PFP::MAP> nb(myMap); // SelectorDartNoBoundary<PFP::MAP> nb(myMap);
m_render_topo->updateData<PFP>(myMap, position, 0.9f, 0.9f, nb); m_render_topo->updateData<PFP>(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))
{ {
...@@ -201,8 +201,8 @@ void MyQT::createMap() ...@@ -201,8 +201,8 @@ void MyQT::createMap()
show(); show();
// render the topo of the map without boundary darts // render the topo of the map without boundary darts
SelectorDartNoBoundary<PFP::MAP> nb(myMap); // SelectorDartNoBoundary<PFP::MAP> nb(myMap);
m_render_topo->updateData<PFP>(myMap, position, 0.9f, 0.9f,nb); m_render_topo->updateData<PFP>(myMap, position, 0.9f, 0.9f); // nb
} }
// initialization GL callback // initialization GL callback
......
...@@ -156,14 +156,13 @@ void MyQT::cb_initGL() ...@@ -156,14 +156,13 @@ void MyQT::cb_initGL()
registerShader(m_sprite); registerShader(m_sprite);
registerShader(m_lines); registerShader(m_lines);
SelectorTrue allDarts;
m_render->initPrimitives<PFP>(myMap, allDarts, Algo::Render::GL2::TRIANGLES); m_render->initPrimitives<PFP>(myMap, Algo::Render::GL2::TRIANGLES);
m_render->initPrimitives<PFP>(myMap, allDarts, Algo::Render::GL2::LINES); m_render->initPrimitives<PFP>(myMap, Algo::Render::GL2::LINES);
m_render->initPrimitives<PFP>(myMap, allDarts, Algo::Render::GL2::POINTS); m_render->initPrimitives<PFP>(myMap, Algo::Render::GL2::POINTS);
SelectorDartNoBoundary<PFP::MAP> nb(myMap); // SelectorDartNoBoundary<PFP::MAP> nb(myMap);
m_render_topo->updateData<PFP>(myMap, position, 0.9f, 0.9f, 0.9f, nb); m_render_topo->updateData<PFP>(myMap, position, 0.9f, 0.9f, 0.9f); // nb
// timer example for animation // timer example for animation
m_timer = new QTimer( this ); m_timer = new QTimer( this );
...@@ -217,8 +216,8 @@ void MyQT::cb_mousePress(int button, int x, int y) ...@@ -217,8 +216,8 @@ void MyQT::cb_mousePress(int button, int x, int y)
{ {
if (Shift()) if (Shift())
{ {
SelectorDartNoBoundary<PFP::MAP> nb(myMap); // SelectorDartNoBoundary<PFP::MAP> nb(myMap);
Dart d = m_render_topo->picking<PFP>(myMap, x,y, nb); Dart d = m_render_topo->picking<PFP>(myMap, x,y); // nb
if (d != Dart::nil()) if (d != Dart::nil())
{ {
CGoGNout << "Dart "<< d << " clicked" << CGoGNendl; CGoGNout << "Dart "<< d << " clicked" << CGoGNendl;
...@@ -262,11 +261,11 @@ void MyQT::cb_keyPress(int code) ...@@ -262,11 +261,11 @@ void MyQT::cb_keyPress(int code)
Algo::Volume::Modelisation::catmullClarkVol<PFP>(myMap, position); Algo::Volume::Modelisation::catmullClarkVol<PFP>(myMap, position);
m_positionVBO->updateData(position); m_positionVBO->updateData(position);
m_render->initPrimitives<PFP>(myMap, allDarts, Algo::Render::GL2::TRIANGLES); m_render->initPrimitives<PFP>(myMap, Algo::Render::GL2::TRIANGLES);
m_render->initPrimitives<PFP>(myMap, allDarts, Algo::Render::GL2::LINES); m_render->initPrimitives<PFP>(myMap, Algo::Render::GL2::LINES);
m_render->initPrimitives<PFP>(myMap, allDarts, Algo::Render::GL2::POINTS); m_render->initPrimitives<PFP>(myMap, Algo::Render::GL2::POINTS);
m_render_topo->updateData<PFP>(myMap, position, 0.9f, 0.9f, 0.9f, allDarts); m_render_topo->updateData<PFP>(myMap, position, 0.9f, 0.9f, 0.9f);
} }
} }
......
...@@ -84,7 +84,7 @@ int main(int argc, char **argv) ...@@ -84,7 +84,7 @@ int main(int argc, char **argv)
if(dsave != NIL) if(dsave != NIL)
positionV[dsave] = PFP::VEC3(0.0); positionV[dsave] = PFP::VEC3(0.0);
//Algo::Modelisation::computeDual3<PFP>(myMap,allDarts) ; //Algo::Modelisation::computeDual3<PFP>(myMap) ;
myMap.computeDual(); myMap.computeDual();
position = positionV ; position = positionV ;
......
...@@ -160,7 +160,7 @@ void MyQT::createMap(const std::string& filename) ...@@ -160,7 +160,7 @@ void MyQT::createMap(const std::string& filename)
l_histo->histoColorizeVBO(*m_colorVBO2); l_histo->histoColorizeVBO(*m_colorVBO2);
// construct rendering primities // construct rendering primities
m_render->initPrimitives<PFP>(myMap, allDarts, Algo::Render::GL2::TRIANGLES); m_render->initPrimitives<PFP>(myMap, Algo::Render::GL2::TRIANGLES);
} }
......
...@@ -89,8 +89,8 @@ void MyQT::cb_initGL() ...@@ -89,8 +89,8 @@ void MyQT::cb_initGL()
Algo::Surface::Geometry::computeNormalVertices<PFP>(myMap, position, normal) ; Algo::Surface::Geometry::computeNormalVertices<PFP>(myMap, position, normal) ;
m_render->initPrimitives<PFP>(myMap, allDarts, Algo::Render::GL2::LINES); m_render->initPrimitives<PFP>(myMap, Algo::Render::GL2::LINES);
m_render->initPrimitives<PFP>(myMap, allDarts, Algo::Render::GL2::POINTS); m_render->initPrimitives<PFP>(myMap, Algo::Render::GL2::POINTS);
registerShader(m_shader); registerShader(m_shader);
registerShader(m_lines); registerShader(m_lines);
......
...@@ -193,7 +193,7 @@ void MyQT::createMap(int n) ...@@ -193,7 +193,7 @@ void MyQT::createMap(int n)
m_render_topo->setDartWidth(5.0f); m_render_topo->setDartWidth(5.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, 0.9f, 0.9f,nb); m_render_topo->updateData<PFP>(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))
{ {
...@@ -211,7 +211,7 @@ void MyQT::createMap(int n) ...@@ -211,7 +211,7 @@ 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
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.isBoundaryMarked2(d))) if (dm.isMarked(d) && (!myMap.isBoundaryMarked2(d)))
...@@ -251,7 +251,7 @@ void MyQT::cb_mousePress(int button, int x, int y) ...@@ -251,7 +251,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, nb); Dart d = m_render_topo->picking<PFP>(myMap, x,y); // nb
if (button == Qt::LeftButton) if (button == Qt::LeftButton)
{ {
if (d != Dart::nil()) if (d != Dart::nil())
......
...@@ -264,12 +264,12 @@ void MyQT::createMap(int n) ...@@ -264,12 +264,12 @@ 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*/);
} }
// initialization GL callback // initialization GL callback
...@@ -325,7 +325,7 @@ void MyQT::cb_mousePress(int button, int x, int y) ...@@ -325,7 +325,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, nb); Dart d = m_render_topo->picking<PFP>(myMap, x,y/*,nb*/);
if (button == Qt::LeftButton) if (button == Qt::LeftButton)
{