Commit bdb3cd9c authored by Pierre Kraemer's avatar Pierre Kraemer

less warnings

parent 437409f6
...@@ -843,7 +843,7 @@ void Clipping::cb_initGL() ...@@ -843,7 +843,7 @@ void Clipping::cb_initGL()
// create the render // create the render
m_render = new Algo::Render::GL2::MapRender(); m_render = new Algo::Render::GL2::MapRender();
m_render_topo = new Algo::Render::GL2::Topo3Render<PFP>(); m_render_topo = new Algo::Render::GL2::Topo3RenderMap<PFP>();
// create VBO for position // create VBO for position
m_positionVBO = new Utils::VBO(); m_positionVBO = new Utils::VBO();
......
...@@ -29,7 +29,6 @@ ...@@ -29,7 +29,6 @@
#include "Utils/Qt/qtui.h" #include "Utils/Qt/qtui.h"
#include "Topology/generic/parameters.h" #include "Topology/generic/parameters.h"
#include "Topology/map/map2.h"
#include "Topology/map/embeddedMap2.h" #include "Topology/map/embeddedMap2.h"
#include "Geometry/vector_gen.h" #include "Geometry/vector_gen.h"
...@@ -66,7 +65,6 @@ class MCMesh : public Utils::QT::SimpleQT ...@@ -66,7 +65,6 @@ class MCMesh : public Utils::QT::SimpleQT
public: public:
MAP myMap ; MAP myMap ;
SelectorTrue allDarts ;
Utils::QT::uiDockInterface dock ; Utils::QT::uiDockInterface dock ;
......
...@@ -132,7 +132,7 @@ void SimpleGMap3::cb_initGL() ...@@ -132,7 +132,7 @@ void SimpleGMap3::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<PFP>(); m_render_topo = new Algo::Render::GL2::Topo3RenderGMap<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(myMap, position, 0.9f,0.9f,0.8f); m_render_topo->updateData(myMap, position, 0.9f,0.9f,0.8f);
......
...@@ -22,7 +22,6 @@ ...@@ -22,7 +22,6 @@
* * * *
*******************************************************************************/ *******************************************************************************/
#include "volumeExplorer.h" #include "volumeExplorer.h"
#include <iostream> #include <iostream>
...@@ -35,10 +34,9 @@ ...@@ -35,10 +34,9 @@
#include "Algo/Export/exportVol.h" #include "Algo/Export/exportVol.h"
MAP myMap;
PFP::MAP myMap; VertexAttribute<VEC3, MAP_IMPL> position ;
VertexAttribute<PFP::VEC3> position ; VolumeAttribute<VEC3, MAP_IMPL> color ;
VolumeAttribute<PFP::VEC3> color ;
void MyQT::volumes_onoff(bool /*x*/) void MyQT::volumes_onoff(bool /*x*/)
{ {
...@@ -59,7 +57,7 @@ void MyQT::topo_onoff(bool /*x*/) ...@@ -59,7 +57,7 @@ void MyQT::topo_onoff(bool /*x*/)
{ {
// 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();
...@@ -96,7 +94,6 @@ void MyQT::hide_onoff(bool /*x*/) ...@@ -96,7 +94,6 @@ void MyQT::hide_onoff(bool /*x*/)
updateGL(); updateGL();
} }
void MyQT::slider_explode(int x) void MyQT::slider_explode(int x)
{ {
m_explode_factor = 0.01f*(x+1)-0.0001f; m_explode_factor = 0.01f*(x+1)-0.0001f;
...@@ -111,7 +108,6 @@ void MyQT::slider_explodeF(int x) ...@@ -111,7 +108,6 @@ void MyQT::slider_explodeF(int x)
updateGL(); updateGL();
} }
void MyQT::slider_pressed() void MyQT::slider_pressed()
{ {
render_topoTemp = render_topo; render_topoTemp = render_topo;
...@@ -119,10 +115,8 @@ void MyQT::slider_pressed() ...@@ -119,10 +115,8 @@ void MyQT::slider_pressed()
updateGL(); updateGL();
} }
void MyQT::slider_released() void MyQT::slider_released()
{ {
render_topo = render_topoTemp; render_topo = render_topoTemp;
if (render_topo) if (render_topo)
{ {
...@@ -190,7 +184,7 @@ void MyQT::cb_Open() ...@@ -190,7 +184,7 @@ void MyQT::cb_Open()
} }
// 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);
updateGL() ; updateGL() ;
...@@ -206,14 +200,13 @@ void MyQT::cb_Save() ...@@ -206,14 +200,13 @@ void MyQT::cb_Save()
Algo::Volume::Export::exportMesh<PFP>(myMap,position,filename); Algo::Volume::Export::exportMesh<PFP>(myMap,position,filename);
} }
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);
// create the renders // create the renders
m_topo_render = new Algo::Render::GL2::Topo3Render(); m_topo_render = new Algo::Render::GL2::Topo3RenderMap<PFP>();
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);
......
...@@ -24,17 +24,10 @@ ...@@ -24,17 +24,10 @@
#ifndef __TUTO5_ #ifndef __TUTO5_
#define __TUTO5_ #define __TUTO5_
#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"
...@@ -56,17 +49,15 @@ using namespace CGoGN ; ...@@ -56,17 +49,15 @@ 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::IMPL MAP_IMPL;
typedef PFP::VEC3 VEC3;
using namespace CGoGN ; using namespace CGoGN ;
/** /**
* Utilisation de designer-qt4: * Utilisation de designer-qt4:
* Faire un DockWiget (laisser le nom par defaut * Faire un DockWiget (laisser le nom par defaut
...@@ -85,7 +76,7 @@ class MyQT: public Utils::QT::SimpleQT ...@@ -85,7 +76,7 @@ class MyQT: public Utils::QT::SimpleQT
bool clip_volume; bool clip_volume;
bool hide_clipping; bool hide_clipping;
Algo::Render::GL2::Topo3Render* m_topo_render; Algo::Render::GL2::Topo3RenderMap<PFP>* m_topo_render;
Algo::Render::GL2::ExplodeVolumeRender* m_explode_render; Algo::Render::GL2::ExplodeVolumeRender* m_explode_render;
float m_explode_factor; float m_explode_factor;
......
...@@ -50,6 +50,11 @@ struct PFP: public PFP_STANDARD ...@@ -50,6 +50,11 @@ struct PFP: public PFP_STANDARD
typedef EmbeddedMap2 MAP; typedef EmbeddedMap2 MAP;
}; };
typedef typename PFP::MAP MAP;
typedef typename PFP::MAP::IMPL MAP_IMPL;
typedef typename PFP::VEC3 VEC3;
typedef typename PFP::VEC4 VEC4;
/** /**
* Simple example of function that work with generic type of attribute * Simple example of function that work with generic type of attribute
*/ */
...@@ -59,7 +64,6 @@ typename V_ATT::DATA_TYPE smooth(typename PFP::MAP& map, Dart d, const V_ATT& at ...@@ -59,7 +64,6 @@ typename V_ATT::DATA_TYPE smooth(typename PFP::MAP& map, Dart d, const V_ATT& at
typename V_ATT::DATA_TYPE res(0); typename V_ATT::DATA_TYPE res(0);
int count=0; int count=0;
if (attributs.getOrbit() == VERTEX) if (attributs.getOrbit() == VERTEX)
{ {
Traversor2VVaE<typename PFP::MAP> tra(map,d); Traversor2VVaE<typename PFP::MAP> tra(map,d);
...@@ -86,7 +90,6 @@ typename V_ATT::DATA_TYPE smooth(typename PFP::MAP& map, Dart d, const V_ATT& at ...@@ -86,7 +90,6 @@ typename V_ATT::DATA_TYPE smooth(typename PFP::MAP& map, Dart d, const V_ATT& at
return res; return res;
} }
template <typename PFP, typename V_ATT> template <typename PFP, typename V_ATT>
void applySmooth(typename PFP::MAP& map, const V_ATT& att_in, V_ATT& att_out) void applySmooth(typename PFP::MAP& map, const V_ATT& att_in, V_ATT& att_out)
{ {
...@@ -111,11 +114,6 @@ void applySmooth(typename PFP::MAP& map, const V_ATT& att_in, V_ATT& att_out) ...@@ -111,11 +114,6 @@ void applySmooth(typename PFP::MAP& map, const V_ATT& att_in, V_ATT& att_out)
CGoGNerr << "unsupported orbit"<< CGoGNendl; CGoGNerr << "unsupported orbit"<< CGoGNendl;
} }
int main(int argc, char **argv) int main(int argc, char **argv)
{ {
if(argc != 3) if(argc != 3)
...@@ -131,31 +129,30 @@ int main(int argc, char **argv) ...@@ -131,31 +129,30 @@ int main(int argc, char **argv)
iss >> nbSteps; iss >> nbSteps;
// declaration of the map // declaration of the map
PFP::MAP myMap; MAP myMap;
std::vector<std::string> attrNames ; std::vector<std::string> attrNames ;
Algo::Surface::Import::importMesh<PFP>(myMap, argv[1], attrNames); Algo::Surface::Import::importMesh<PFP>(myMap, argv[1], attrNames);
// get a handler to the 3D vector attribute created by the import // get a handler to the 3D vector attribute created by the import
VertexAttribute<PFP::VEC3> position = myMap.getAttribute<PFP::VEC3, VERTEX>(attrNames[0]); VertexAttribute<VEC3, MAP_IMPL> position = myMap.getAttribute<VEC3, VERTEX>(attrNames[0]);
VertexAttribute<PFP::VEC3> pos2 = myMap.addAttribute<PFP::VEC3, VERTEX>("pos2"); VertexAttribute<VEC3, MAP_IMPL> pos2 = myMap.addAttribute<VEC3, VERTEX>("pos2");
VertexAttribute<PFP::VEC4> vc = myMap.addAttribute<PFP::VEC4, VERTEX>("vertexColor"); VertexAttribute<VEC4, MAP_IMPL> vc = myMap.addAttribute<VEC4, VERTEX>("vertexColor");
VertexAttribute<PFP::VEC4> vc2 = myMap.addAttribute<PFP::VEC4, VERTEX>("vertexColor2"); VertexAttribute<VEC4, MAP_IMPL> vc2 = myMap.addAttribute<VEC4, VERTEX>("vertexColor2");
// classic usage with simple vertex attributes // classic usage with simple vertex attributes
applySmooth<PFP>(myMap,position,pos2); applySmooth<PFP>(myMap, position, pos2);
// multi attributes usage // multi attributes usage
Vertex2Attributes<PFP::VEC3, PFP::VEC4> pv_in(position,vc); Vertex2Attributes<VEC3, VEC4, MAP_IMPL> pv_in(position, vc);
Vertex2Attributes<PFP::VEC3, PFP::VEC4> pv_out(pos2,vc2); Vertex2Attributes<VEC3, VEC4, MAP_IMPL> pv_out(pos2, vc2);
applySmooth<PFP>(myMap,pv_in,pv_out); applySmooth<PFP>(myMap, pv_in, pv_out);
// usage with with a face attribute // usage with with a face attribute
FaceAttribute<PFP::VEC4> fc = myMap.addAttribute<PFP::VEC4, FACE>("faceColor"); FaceAttribute<VEC4, MAP_IMPL> fc = myMap.addAttribute<VEC4, FACE>("faceColor");
FaceAttribute<PFP::VEC4> fc2 = myMap.addAttribute<PFP::VEC4, FACE>("faceColor2"); FaceAttribute<VEC4, MAP_IMPL> fc2 = myMap.addAttribute<VEC4, FACE>("faceColor2");
applySmooth<PFP>(myMap,fc,fc2); applySmooth<PFP>(myMap, fc, fc2);
//// for(unsigned int i = 0; i < nbSteps; ++i) //// for(unsigned int i = 0; i < nbSteps; ++i)
......
...@@ -52,7 +52,7 @@ namespace Export ...@@ -52,7 +52,7 @@ namespace Export
* @return true * @return true
*/ */
template <typename PFP> template <typename PFP>
bool exportPLY(typename PFP::MAP& map, const VertexAttribute<typename PFP::VEC3>& position, const char* filename, const bool binary) ; bool exportPLY(typename PFP::MAP& map, const VertexAttribute<typename PFP::VEC3, typename PFP::MAP::IMPL>& position, const char* filename, const bool binary) ;
/** /**
* export the map into a PLY file * export the map into a PLY file
...@@ -63,7 +63,7 @@ bool exportPLY(typename PFP::MAP& map, const VertexAttribute<typename PFP::VEC3> ...@@ -63,7 +63,7 @@ bool exportPLY(typename PFP::MAP& map, const VertexAttribute<typename PFP::VEC3>
* @return true * @return true
*/ */
template <typename PFP> template <typename PFP>
bool exportPLYnew(typename PFP::MAP& map, const std::vector<VertexAttribute<typename PFP::VEC3>* >& attributeHandlers, const char* filename, const bool binary) ; bool exportPLYnew(typename PFP::MAP& map, const std::vector<VertexAttribute<typename PFP::VEC3, typename PFP::MAP::IMPL>* >& attributeHandlers, const char* filename, const bool binary) ;
/** /**
* export the map into a OFF file * export the map into a OFF file
...@@ -72,7 +72,7 @@ bool exportPLYnew(typename PFP::MAP& map, const std::vector<VertexAttribute<type ...@@ -72,7 +72,7 @@ bool exportPLYnew(typename PFP::MAP& map, const std::vector<VertexAttribute<type
* @return true * @return true
*/ */
template <typename PFP> template <typename PFP>
bool exportOFF(typename PFP::MAP& map, const VertexAttribute<typename PFP::VEC3>& position, const char* filename) ; bool exportOFF(typename PFP::MAP& map, const VertexAttribute<typename PFP::VEC3, typename PFP::MAP::IMPL>& position, const char* filename) ;
/** /**
* export the map into a OBJ file * export the map into a OBJ file
...@@ -81,7 +81,7 @@ bool exportOFF(typename PFP::MAP& map, const VertexAttribute<typename PFP::VEC3> ...@@ -81,7 +81,7 @@ bool exportOFF(typename PFP::MAP& map, const VertexAttribute<typename PFP::VEC3>
* @return true * @return true
*/ */
template <typename PFP> template <typename PFP>
bool exportOBJ(typename PFP::MAP& map, const VertexAttribute<typename PFP::VEC3>& position, const char* filename) ; bool exportOBJ(typename PFP::MAP& map, const VertexAttribute<typename PFP::VEC3, typename PFP::MAP::IMPL>& position, const char* filename) ;
/** /**
* export the map into a Trian file * export the map into a Trian file
...@@ -90,7 +90,7 @@ bool exportOBJ(typename PFP::MAP& map, const VertexAttribute<typename PFP::VEC3> ...@@ -90,7 +90,7 @@ bool exportOBJ(typename PFP::MAP& map, const VertexAttribute<typename PFP::VEC3>
* @return true * @return true
*/ */
template <typename PFP> template <typename PFP>
bool exportTrian(typename PFP::MAP& map, const VertexAttribute<typename PFP::VEC3>& position, char* filename) ; bool exportTrian(typename PFP::MAP& map, const VertexAttribute<typename PFP::VEC3, typename PFP::MAP::IMPL>& position, char* filename) ;
...@@ -160,12 +160,12 @@ bool exportPLYPTM(typename PFP::MAP& map, const char* filename, const VertexAttr ...@@ -160,12 +160,12 @@ bool exportPLYPTM(typename PFP::MAP& map, const char* filename, const VertexAttr
* @return * @return
*/ */
template <typename PFP> template <typename PFP>
bool exportChoupi(typename PFP::MAP& map, const AttributeHandler<typename PFP::VEC3, VERTEX>& position, const char* filename) ; bool exportChoupi(typename PFP::MAP& map, const VertexAttribute<typename PFP::VEC3, typename PFP::MAP::IMPL>& position, const char* filename) ;
} // namespace Export } // namespace Export
} } // namespace Surface
} // namespace Algo } // namespace Algo
......
...@@ -43,7 +43,7 @@ namespace Export ...@@ -43,7 +43,7 @@ namespace Export
{ {
template <typename PFP> template <typename PFP>
bool exportPLY(typename PFP::MAP& map, const VertexAttribute<typename PFP::VEC3>& position, const char* filename, bool binary) bool exportPLY(typename PFP::MAP& map, const VertexAttribute<typename PFP::VEC3, typename PFP::MAP::IMPL>& position, const char* filename, bool binary)
{ {
typedef typename PFP::MAP MAP; typedef typename PFP::MAP MAP;
typedef typename PFP::VEC3 VEC3; typedef typename PFP::VEC3 VEC3;
...@@ -72,7 +72,7 @@ bool exportPLY(typename PFP::MAP& map, const VertexAttribute<typename PFP::VEC3> ...@@ -72,7 +72,7 @@ bool exportPLY(typename PFP::MAP& map, const VertexAttribute<typename PFP::VEC3>
vertices.reserve(nbDarts/6) ; vertices.reserve(nbDarts/6) ;
// Go over all faces // Go over all faces
CellMarker<VERTEX> markV(map) ; CellMarker<MAP, VERTEX> markV(map) ;
TraversorF<MAP> t(map) ; TraversorF<MAP> t(map) ;
for(Dart d = t.begin(); d != t.end(); d = t.next()) for(Dart d = t.begin(); d != t.end(); d = t.next())
{ {
...@@ -170,9 +170,10 @@ bool exportPLY(typename PFP::MAP& map, const VertexAttribute<typename PFP::VEC3> ...@@ -170,9 +170,10 @@ bool exportPLY(typename PFP::MAP& map, const VertexAttribute<typename PFP::VEC3>
} }
template <typename PFP> template <typename PFP>
bool exportPLYnew(typename PFP::MAP& map, const std::vector<VertexAttribute<typename PFP::VEC3>*>& attributeHandlers, const char* filename, bool binary) bool exportPLYnew(typename PFP::MAP& map, const std::vector<VertexAttribute<typename PFP::VEC3, typename PFP::MAP::IMPL>*>& attributeHandlers, const char* filename, bool binary)
{ {
typedef typename PFP::MAP MAP; typedef typename PFP::MAP MAP;
typedef typename PFP::MAP::IMPL MAP_IMPL;
typedef typename PFP::VEC3 VEC3; typedef typename PFP::VEC3 VEC3;
// open file // open file
...@@ -199,14 +200,14 @@ bool exportPLYnew(typename PFP::MAP& map, const std::vector<VertexAttribute<type ...@@ -199,14 +200,14 @@ bool exportPLYnew(typename PFP::MAP& map, const std::vector<VertexAttribute<type
vertices.reserve(nbDarts/6) ; vertices.reserve(nbDarts/6) ;
// Go over all faces // Go over all faces
CellMarker<VERTEX> markV(map) ; CellMarker<MAP, VERTEX> markV(map) ;
TraversorF<MAP> t(map) ; TraversorF<MAP> t(map) ;
for(Dart d = t.begin(); d != t.end(); d = t.next()) for(Dart d = t.begin(); d != t.end(); d = t.next())
{ {
std::vector<unsigned int> fidx ; std::vector<unsigned int> fidx ;
fidx.reserve(8) ; fidx.reserve(8) ;
unsigned int degree = 0 ; unsigned int degree = 0 ;
Traversor2FV<typename PFP::MAP> tfv(map, d) ; Traversor2FV<MAP> tfv(map, d) ;
for(Dart it = tfv.begin(); it != tfv.end(); it = tfv.next()) for(Dart it = tfv.begin(); it != tfv.end(); it = tfv.next())
{ {
++degree ; ++degree ;
...@@ -246,7 +247,7 @@ bool exportPLYnew(typename PFP::MAP& map, const std::vector<VertexAttribute<type ...@@ -246,7 +247,7 @@ bool exportPLYnew(typename PFP::MAP& map, const std::vector<VertexAttribute<type
out << "comment or contact : cgogn@unistra.fr" << std::endl ; out << "comment or contact : cgogn@unistra.fr" << std::endl ;
// Vertex elements // Vertex elements
out << "element vertex " << vertices.size() << std::endl ; out << "element vertex " << vertices.size() << std::endl ;
for (typename std::vector<VertexAttribute<typename PFP::VEC3>* >::const_iterator attrHandler = attributeHandlers.begin() ; attrHandler != attributeHandlers.end() ; ++attrHandler) for (typename std::vector<VertexAttribute<VEC3, MAP_IMPL>* >::const_iterator attrHandler = attributeHandlers.begin() ; attrHandler != attributeHandlers.end() ; ++attrHandler)
{ {
if ((*attrHandler)->isValid() && ((*attrHandler)->getOrbit() == VERTEX) ) if ((*attrHandler)->isValid() && ((*attrHandler)->getOrbit() == VERTEX) )
{ {
...@@ -287,7 +288,7 @@ bool exportPLYnew(typename PFP::MAP& map, const std::vector<VertexAttribute<type ...@@ -287,7 +288,7 @@ bool exportPLYnew(typename PFP::MAP& map, const std::vector<VertexAttribute<type
// ascii vertices // ascii vertices
for(unsigned int i = 0; i < vertices.size(); ++i) for(unsigned int i = 0; i < vertices.size(); ++i)
{ {
for (typename std::vector<VertexAttribute<typename PFP::VEC3>* >::const_iterator attrHandler = attributeHandlers.begin() ; attrHandler != attributeHandlers.end() ; ++attrHandler) for (typename std::vector<VertexAttribute<VEC3, MAP_IMPL>* >::const_iterator attrHandler = attributeHandlers.begin() ; attrHandler != attributeHandlers.end() ; ++attrHandler)
if ((*attrHandler)->isValid() && (*attrHandler)->getOrbit() == VERTEX) if ((*attrHandler)->isValid() && (*attrHandler)->getOrbit() == VERTEX)
out << (*(*attrHandler))[vertices[i]] ; out << (*(*attrHandler))[vertices[i]] ;
out << std::endl ; out << std::endl ;
...@@ -306,10 +307,10 @@ bool exportPLYnew(typename PFP::MAP& map, const std::vector<VertexAttribute<type ...@@ -306,10 +307,10 @@ bool exportPLYnew(typename PFP::MAP& map, const std::vector<VertexAttribute<type
{ {
// binary vertices // binary vertices
for(unsigned int i = 0; i < vertices.size(); ++i) for(unsigned int i = 0; i < vertices.size(); ++i)
for (typename std::vector<VertexAttribute<typename PFP::VEC3>*>::const_iterator attrHandler = attributeHandlers.begin() ; attrHandler != attributeHandlers.end() ; ++attrHandler) for (typename std::vector<VertexAttribute<VEC3, MAP_IMPL>*>::const_iterator attrHandler = attributeHandlers.begin() ; attrHandler != attributeHandlers.end() ; ++attrHandler)
if ((*attrHandler)->isValid() && (*attrHandler)->getOrbit() == VERTEX) if ((*attrHandler)->isValid() && (*attrHandler)->getOrbit() == VERTEX)
{ {
const typename PFP::VEC3& v = (*(*attrHandler))[vertices[i]] ; const VEC3& v = (*(*attrHandler))[vertices[i]] ;
out.write((char*)(&(v[0])), sizeof(v)) ; out.write((char*)(&(v[0])), sizeof(v)) ;
} }
...@@ -328,7 +329,7 @@ bool exportPLYnew(typename PFP::MAP& map, const std::vector<VertexAttribute<type ...@@ -328,7 +329,7 @@ bool exportPLYnew(typename PFP::MAP& map, const std::vector<VertexAttribute<type
} }
template <typename PFP> template <typename PFP>
bool exportOFF(typename PFP::MAP& map, const VertexAttribute<typename PFP::VEC3>& position, const char* filename) bool exportOFF(typename PFP::MAP& map, const VertexAttribute<typename PFP::VEC3, typename PFP::MAP::IMPL>& position, const char* filename)
{ {
typedef typename PFP::MAP MAP; typedef typename PFP::MAP MAP;
typedef typename PFP::VEC3 VEC3; typedef typename PFP::VEC3 VEC3;
...@@ -350,7 +351,7 @@ bool exportOFF(typename PFP::MAP& map, const VertexAttribute<typename PFP::VEC3> ...@@ -350,7 +351,7 @@ bool exportOFF(typename PFP::MAP& map, const VertexAttribute<typename PFP::VEC3>
std::vector<unsigned int> vertices ; std::vector<unsigned int> vertices ;
vertices.reserve(nbDarts/6) ; vertices.reserve(nbDarts/6) ;
CellMarker<VERTEX> markV(map) ; CellMarker<MAP, VERTEX> markV(map) ;
TraversorF<MAP> t(map) ; TraversorF<MAP> t(map) ;
for(Dart d = t.begin(); d != t.end(); d = t.next()) for(Dart d = t.begin(); d != t.end(); d = t.next())
{ {
...@@ -986,7 +987,7 @@ bool exportPLYPTM(typename PFP::MAP& map, const char* filename, const VertexAttr ...@@ -986,7 +987,7 @@ bool exportPLYPTM(typename PFP::MAP& map, const char* filename, const VertexAttr
*/ */
template <typename PFP> template <typename PFP>
bool exportChoupi(typename PFP::MAP& map, const AttributeHandler<typename PFP::VEC3, VERTEX>& position, const char* filename) bool exportChoupi(typename PFP::MAP& map, const VertexAttribute<typename PFP::VEC3, typename PFP::MAP::IMPL>& position, const char* filename)
{ {
typedef typename PFP::MAP MAP; typedef typename PFP::MAP MAP;
typedef typename PFP::VEC3 VEC3; typedef typename PFP::VEC3 VEC3;
...@@ -1000,13 +1001,13 @@ bool exportChoupi(typename PFP::MAP& map, const AttributeHandler<typename PFP::V ...@@ -1000,13 +1001,13 @@ bool exportChoupi(typename PFP::MAP& map, const AttributeHandler<typename PFP::V
out << map.template getNbOrbits<VERTEX>() << " " << map.template getNbOrbits<EDGE>() << std::endl; out << map.template getNbOrbits<VERTEX>() << " " << map.template getNbOrbits<EDGE>() << std::endl;
TraversorV<typename PFP::MAP> travV(map); TraversorV<MAP> travV(map);
for(Dart dit = travV.begin() ; dit != travV.end() ; dit = travV.next()) for(Dart dit = travV.begin() ; dit != travV.end() ; dit = travV.next())
{ {
out << map.template getEmbedding<VERTEX>(dit) << " " << position[dit] << std::endl; out << map.template getEmbedding<VERTEX>(dit) << " " << position[dit] << std::endl;
} }
TraversorE<typename PFP::MAP> travE(map); TraversorE<MAP> travE(map);
unsigned int indexE = 0; unsigned int indexE = 0;
for(Dart dit = travE.begin() ; dit != travE.end() ; dit = travE.next()) for(Dart dit = travE.begin() ; dit != travE.end() ; dit = travE.next())
{ {
...@@ -1018,11 +1019,9 @@ bool exportChoupi(typename PFP::MAP& map, const AttributeHandler<typename PFP::V ...@@ -1018,11 +1019,9 @@ bool exportChoupi(typename PFP::MAP& map, const AttributeHandler<typename PFP::V
return true ; return true ;
} }
} // namespace Export } // namespace Export
} } // namespace Surface
} // namespace Algo } // namespace Algo
......
...@@ -117,7 +117,7 @@ bool importMesh(typename PFP::MAP& map, MeshTablesSurface<PFP>& mts) ...@@ -117,7 +117,7 @@ bool importMesh(typename PFP::MAP& map, MeshTablesSurface<PFP>& mts)
if (good_dart == map.phi2(good_dart)) if (good_dart == map.phi2(good_dart))
{ {
map.sewFaces(d, good_dart, false); map.sewFaces(d, good_dart, false);
m.unmarkOrbit<EDGE>(d); m.template unmarkOrbit<EDGE>(d);