Commit 437409f6 authored by Pierre Kraemer's avatar Pierre Kraemer

first successfully compiled program !!

parent 0ea6813e
...@@ -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]); m_render_topo->updateData(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]); m_render_topo->updateData(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]); m_render_topo->updateData(myMap, position, m_coeffTopoExplod[0], m_coeffTopoExplod[1], m_coeffTopoExplod[2]);
updateGL(); updateGL();
} }
...@@ -814,7 +814,7 @@ void Clipping::importMesh(std::string& filename) ...@@ -814,7 +814,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]); m_render_topo->updateData(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() ;
...@@ -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(); m_render_topo = new Algo::Render::GL2::Topo3Render<PFP>();
// create VBO for position // create VBO for position
m_positionVBO = new Utils::VBO(); m_positionVBO = new Utils::VBO();
......
...@@ -70,18 +70,18 @@ struct PFP: public PFP_STANDARD ...@@ -70,18 +70,18 @@ struct PFP: public PFP_STANDARD
typedef EmbeddedMap3 MAP; typedef EmbeddedMap3 MAP;
}; };
typedef PFP::MAP MAP;
typedef PFP::MAP::IMPL MAP_IMPL;
typedef PFP::VEC3 VEC3;
class Clipping: public Utils::QT::SimpleQT class Clipping: public Utils::QT::SimpleQT
{ {
Q_OBJECT Q_OBJECT
public: public:
typedef PFP::MAP MAP;
typedef PFP::VEC3 VEC3;
//Manip Carte //Manip Carte
MAP myMap ; MAP myMap ;
VertexAttribute<VEC3> position; VertexAttribute<VEC3, MAP_IMPL> position;
Dart dglobal; Dart dglobal;
//Render //Render
...@@ -91,7 +91,7 @@ public: ...@@ -91,7 +91,7 @@ public:
bool m_drawTopo; bool m_drawTopo;
Algo::Render::GL2::MapRender* m_render; Algo::Render::GL2::MapRender* m_render;
Algo::Render::GL2::Topo3Render* m_render_topo; Algo::Render::GL2::Topo3Render<PFP>* m_render_topo;
Geom::BoundingBox<PFP::VEC3> m_bb; Geom::BoundingBox<PFP::VEC3> m_bb;
......
...@@ -128,12 +128,13 @@ struct PFP: public PFP_STANDARD ...@@ -128,12 +128,13 @@ 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 ;
// declaration of the map // declaration of the map
MAP myMap; MAP myMap;
// and attribute of position // and attribute of position
VertexAttribute<VEC3> position; VertexAttribute<VEC3, MAP_IMPL> position;
unsigned int nb_ears; unsigned int nb_ears;
......
...@@ -53,6 +53,7 @@ struct PFP: public PFP_STANDARD ...@@ -53,6 +53,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 ;
MAP myMap; MAP myMap;
...@@ -103,7 +104,7 @@ int main(int argc, char **argv) ...@@ -103,7 +104,7 @@ int main(int argc, char **argv)
QApplication app(argc, argv); QApplication app(argc, argv);
MyQT sqt; MyQT sqt;
VertexAttribute<VEC3> position = myMap.addAttribute<VEC3, VERTEX>("position") ; VertexAttribute<VEC3, MAP_IMPL> position = myMap.addAttribute<VEC3, VERTEX>("position") ;
// define the face extruded (here a cross) // define the face extruded (here a cross)
std::vector<PFP::VEC3> objV; std::vector<PFP::VEC3> objV;
......
...@@ -55,6 +55,7 @@ struct PFP: public PFP_STANDARD ...@@ -55,6 +55,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 ;
typedef unsigned char DATATYPE; typedef unsigned char DATATYPE;
...@@ -76,7 +77,7 @@ public: ...@@ -76,7 +77,7 @@ public:
bool m_drawEdges ; bool m_drawEdges ;
bool m_drawFaces ; bool m_drawFaces ;
VertexAttribute<VEC3> position ; VertexAttribute<VEC3, MAP_IMPL> position ;
Algo::Render::GL2::MapRender* m_render ; Algo::Render::GL2::MapRender* m_render ;
......
...@@ -42,6 +42,7 @@ struct PFP: public PFP_STANDARD ...@@ -42,6 +42,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 SimpleGMap2 : public Utils::QT::SimpleQT class SimpleGMap2 : public Utils::QT::SimpleQT
...@@ -51,7 +52,7 @@ class SimpleGMap2 : public Utils::QT::SimpleQT ...@@ -51,7 +52,7 @@ class SimpleGMap2 : public Utils::QT::SimpleQT
public: public:
MAP myMap ; MAP myMap ;
VertexAttribute<VEC3> position ; VertexAttribute<VEC3, MAP_IMPL> position ;
SimpleGMap2() ; SimpleGMap2() ;
......
...@@ -132,10 +132,10 @@ void SimpleGMap3::cb_initGL() ...@@ -132,10 +132,10 @@ 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(); m_render_topo = new Algo::Render::GL2::Topo3Render<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);
} }
void SimpleGMap3::cb_redraw() void SimpleGMap3::cb_redraw()
......
...@@ -43,6 +43,7 @@ struct PFP: public PFP_STANDARD ...@@ -43,6 +43,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 SimpleGMap3 : public Utils::QT::SimpleQT class SimpleGMap3 : public Utils::QT::SimpleQT
...@@ -52,10 +53,10 @@ class SimpleGMap3 : public Utils::QT::SimpleQT ...@@ -52,10 +53,10 @@ class SimpleGMap3 : public Utils::QT::SimpleQT
public: public:
MAP myMap ; MAP myMap ;
VertexAttribute<VEC3> position ; VertexAttribute<VEC3, MAP_IMPL> position ;
VolumeAttribute<VEC3> volume ; VolumeAttribute<VEC3, MAP_IMPL> volume ;
Algo::Render::GL2::Topo3Render* m_render_topo; Algo::Render::GL2::Topo3Render<PFP>* m_render_topo;
SimpleGMap3() ; SimpleGMap3() ;
......
...@@ -85,12 +85,11 @@ void TexView::cb_initGL() ...@@ -85,12 +85,11 @@ void TexView::cb_initGL()
m_shader2->setSpecular(Geom::Vec4f(0.5)); m_shader2->setSpecular(Geom::Vec4f(0.5));
registerShader(m_shader2); registerShader(m_shader2);
glEnable(GL_TEXTURE_2D); glEnable(GL_TEXTURE_2D);
if (!m_obj.hasNormals()) if (!m_obj.hasNormals())
{ {
VertexAttribute<Geom::Vec3f> normal = myMap.getAttribute<VEC3, VERTEX>("normal") ; VertexAttribute<Geom::Vec3f, MAP_IMPL> normal = myMap.getAttribute<VEC3, VERTEX>("normal") ;
if(!normal.isValid()) if(!normal.isValid())
normal = myMap.addAttribute<VEC3, VERTEX>("normal") ; normal = myMap.addAttribute<VEC3, VERTEX>("normal") ;
...@@ -99,7 +98,6 @@ void TexView::cb_initGL() ...@@ -99,7 +98,6 @@ void TexView::cb_initGL()
} }
m_nbIndices = m_obj.createSimpleVBO_PTN(m_positionVBO,m_texcoordVBO,m_normalVBO); m_nbIndices = m_obj.createSimpleVBO_PTN(m_positionVBO,m_texcoordVBO,m_normalVBO);
} }
void TexView::cb_redraw() void TexView::cb_redraw()
...@@ -120,8 +118,6 @@ void TexView::cb_redraw() ...@@ -120,8 +118,6 @@ void TexView::cb_redraw()
glDrawArrays(GL_TRIANGLES, 0, m_nbIndices); glDrawArrays(GL_TRIANGLES, 0, m_nbIndices);
m_shader->disableVertexAttribs(); m_shader->disableVertexAttribs();
} }
} }
void TexView::cb_keyPress(int code) void TexView::cb_keyPress(int code)
...@@ -152,7 +148,6 @@ void TexView::cb_keyPress(int code) ...@@ -152,7 +148,6 @@ void TexView::cb_keyPress(int code)
m_shader2->setShininess(1.0f); m_shader2->setShininess(1.0f);
m_shader2->setSpecular(Geom::Vec4f(0)); m_shader2->setSpecular(Geom::Vec4f(0));
break; break;
} }
updateGL(); updateGL();
} }
...@@ -179,10 +174,8 @@ void TexView::init(const std::string& fnm, const std::string& fnt) ...@@ -179,10 +174,8 @@ void TexView::init(const std::string& fnm, const std::string& fnt)
// send BB info to interface for centering on GL screen // send BB info to interface for centering on GL screen
setParamObject(lWidthObj, lPosObj.data()); setParamObject(lWidthObj, lPosObj.data());
} }
void TexView::computeImage() void TexView::computeImage()
{ {
std::vector<Geom::Vec3f> colorTable; std::vector<Geom::Vec3f> colorTable;
...@@ -213,8 +206,8 @@ void TexView::computeTore() ...@@ -213,8 +206,8 @@ void TexView::computeTore()
{ {
#define NB 96 #define NB 96
VertexAttribute<VEC3> position = myMap.addAttribute<VEC3, VERTEX>("position"); VertexAttribute<VEC3, MAP_IMPL> position = myMap.addAttribute<VEC3, VERTEX>("position");
VertexAttribute<Geom::Vec2f> texcoord = myMap.addAttribute<Geom::Vec2f, VERTEX>("texcoord"); VertexAttribute<Geom::Vec2f, MAP_IMPL> texcoord = myMap.addAttribute<Geom::Vec2f, VERTEX>("texcoord");
//Algo::Surface::Modelisation::Polyhedron<PFP> prim(myMap, position); //Algo::Surface::Modelisation::Polyhedron<PFP> prim(myMap, position);
Algo::Surface::Tilings::Square::Tore<PFP> prim(myMap, NB, NB); Algo::Surface::Tilings::Square::Tore<PFP> prim(myMap, NB, NB);
prim.embedIntoTore(position, 40.0f,20.0f); prim.embedIntoTore(position, 40.0f,20.0f);
...@@ -245,9 +238,6 @@ void TexView::computeTore() ...@@ -245,9 +238,6 @@ void TexView::computeTore()
m_obj.setTexCoordAttribute(texcoord); m_obj.setTexCoordAttribute(texcoord);
} }
int main(int argc, char**argv) int main(int argc, char**argv)
{ {
// interface: // interface:
...@@ -267,10 +257,8 @@ int main(int argc, char**argv) ...@@ -267,10 +257,8 @@ int main(int argc, char**argv)
tv.init("","x"); tv.init("","x");
} }
tv.show(); tv.show();
// et on attend la fin. // et on attend la fin.
return app.exec(); return app.exec();
} }
...@@ -50,7 +50,9 @@ struct PFP: public PFP_STANDARD ...@@ -50,7 +50,9 @@ 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 ;
/** /**
* A class for a little interface and rendering * A class for a little interface and rendering
*/ */
......
...@@ -41,7 +41,7 @@ namespace Geometry ...@@ -41,7 +41,7 @@ namespace Geometry
{ {
template <typename PFP> template <typename PFP>
Geom::BoundingBox<typename PFP::VEC3> computeBoundingBox(typename PFP::MAP& map, const VertexAttribute<typename PFP::VEC3>& position) Geom::BoundingBox<typename PFP::VEC3> computeBoundingBox(typename PFP::MAP& map, const VertexAttribute<typename PFP::VEC3, typename PFP::MAP::IMPL>& position)
{ {
Geom::BoundingBox<typename PFP::VEC3> bb ; Geom::BoundingBox<typename PFP::VEC3> bb ;
TraversorV<typename PFP::MAP> t(map) ; TraversorV<typename PFP::MAP> t(map) ;
......
...@@ -43,41 +43,41 @@ template <typename PFP, typename ATTR_TYPE> ...@@ -43,41 +43,41 @@ template <typename PFP, typename ATTR_TYPE>
ATTR_TYPE computeLaplacianTopoVertex( ATTR_TYPE computeLaplacianTopoVertex(
typename PFP::MAP& map, typename PFP::MAP& map,
Dart d, Dart d,
const VertexAttribute<ATTR_TYPE>& attr) ; const VertexAttribute<ATTR_TYPE, typename PFP::MAP::IMPL>& attr) ;
template <typename PFP, typename ATTR_TYPE> template <typename PFP, typename ATTR_TYPE>
ATTR_TYPE computeLaplacianCotanVertex( ATTR_TYPE computeLaplacianCotanVertex(
typename PFP::MAP& map, typename PFP::MAP& map,
Dart d, Dart d,
const EdgeAttribute<typename PFP::REAL>& edgeWeight, const EdgeAttribute<typename PFP::REAL, typename PFP::MAP::IMPL>& edgeWeight,
const VertexAttribute<typename PFP::REAL>& vertexArea, const VertexAttribute<typename PFP::REAL, typename PFP::MAP::IMPL>& vertexArea,
const VertexAttribute<ATTR_TYPE>& attr) ; const VertexAttribute<ATTR_TYPE, typename PFP::MAP::IMPL>& attr) ;
template <typename PFP, typename ATTR_TYPE> template <typename PFP, typename ATTR_TYPE>
void computeLaplacianTopoVertices( void computeLaplacianTopoVertices(
typename PFP::MAP& map, typename PFP::MAP& map,
const VertexAttribute<ATTR_TYPE>& attr, const VertexAttribute<ATTR_TYPE, typename PFP::MAP::IMPL>& attr,
VertexAttribute<ATTR_TYPE>& laplacian) ; VertexAttribute<ATTR_TYPE, typename PFP::MAP::IMPL>& laplacian) ;
template <typename PFP, typename ATTR_TYPE> template <typename PFP, typename ATTR_TYPE>
void computeLaplacianCotanVertices( void computeLaplacianCotanVertices(
typename PFP::MAP& map, typename PFP::MAP& map,
const EdgeAttribute<typename PFP::REAL>& edgeWeight, const EdgeAttribute<typename PFP::REAL, typename PFP::MAP::IMPL>& edgeWeight,
const VertexAttribute<typename PFP::REAL>& vertexArea, const VertexAttribute<typename PFP::REAL, typename PFP::MAP::IMPL>& vertexArea,
const VertexAttribute<ATTR_TYPE>& attr, const VertexAttribute<ATTR_TYPE, typename PFP::MAP::IMPL>& attr,
VertexAttribute<ATTR_TYPE>& laplacian) ; VertexAttribute<ATTR_TYPE, typename PFP::MAP::IMPL>& laplacian) ;
template <typename PFP> template <typename PFP>
typename PFP::REAL computeCotanWeightEdge( typename PFP::REAL computeCotanWeightEdge(
typename PFP::MAP& map, typename PFP::MAP& map,
Dart d, Dart d,
const VertexAttribute<typename PFP::VEC3>& position) ; const VertexAttribute<typename PFP::VEC3, typename PFP::MAP::IMPL>& position) ;
template <typename PFP> template <typename PFP>
void computeCotanWeightEdges( void computeCotanWeightEdges(
typename PFP::MAP& map, typename PFP::MAP& map,
const VertexAttribute<typename PFP::VEC3>& position, const VertexAttribute<typename PFP::VEC3, typename PFP::MAP::IMPL>& position,
EdgeAttribute<typename PFP::REAL>& edgeWeight) ; EdgeAttribute<typename PFP::REAL, typename PFP::MAP::IMPL>& edgeWeight) ;
} // namespace Geometry } // namespace Geometry
...@@ -90,19 +90,21 @@ namespace Geometry ...@@ -90,19 +90,21 @@ namespace Geometry
{ {
template <typename PFP, typename ATTR_TYPE> template <typename PFP, typename ATTR_TYPE>
ATTR_TYPE computeLaplacianTopoVertex( typename PFP::MAP& map, Dart d, const VertexAttribute<ATTR_TYPE>& attr) ; ATTR_TYPE computeLaplacianTopoVertex(
typename PFP::MAP& map,
Dart d,
const VertexAttribute<ATTR_TYPE, typename PFP::MAP::IMPL>& attr) ;
template <typename PFP, typename ATTR_TYPE> template <typename PFP, typename ATTR_TYPE>
void computeLaplacianTopoVertices(typename PFP::MAP& map, const VertexAttribute<ATTR_TYPE>& attr, void computeLaplacianTopoVertices(
VertexAttribute<ATTR_TYPE>& laplacian) ; typename PFP::MAP& map,
const VertexAttribute<ATTR_TYPE, typename PFP::MAP::IMPL>& attr,
VertexAttribute<ATTR_TYPE, typename PFP::MAP::IMPL>& laplacian) ;
} // namespace Geometry } // namespace Geometry
} // namespace Volume } // namespace Volume
} // namespace Algo } // namespace Algo
} // namespace CGoGN } // namespace CGoGN
......
...@@ -42,7 +42,7 @@ template <typename PFP, typename ATTR_TYPE> ...@@ -42,7 +42,7 @@ template <typename PFP, typename ATTR_TYPE>
ATTR_TYPE computeLaplacianTopoVertex( ATTR_TYPE computeLaplacianTopoVertex(
typename PFP::MAP& map, typename PFP::MAP& map,
Dart d, Dart d,
const VertexAttribute<ATTR_TYPE>& attr) const VertexAttribute<ATTR_TYPE, typename PFP::MAP::IMPL>& attr)
{ {
ATTR_TYPE l(0) ; ATTR_TYPE l(0) ;
ATTR_TYPE value = attr[d] ; ATTR_TYPE value = attr[d] ;
...@@ -63,19 +63,21 @@ template <typename PFP, typename ATTR_TYPE> ...@@ -63,19 +63,21 @@ template <typename PFP, typename ATTR_TYPE>
ATTR_TYPE computeLaplacianCotanVertex( ATTR_TYPE computeLaplacianCotanVertex(
typename PFP::MAP& map, typename PFP::MAP& map,
Dart d, Dart d,
const EdgeAttribute<typename PFP::REAL>& edgeWeight, const EdgeAttribute<typename PFP::REAL, typename PFP::MAP::IMPL>& edgeWeight,
const VertexAttribute<typename PFP::REAL>& vertexArea, const VertexAttribute<typename PFP::REAL, typename PFP::MAP::IMPL>& vertexArea,
const VertexAttribute<ATTR_TYPE>& attr) const VertexAttribute<ATTR_TYPE, typename PFP::MAP::IMPL>& attr)
{ {
typedef typename PFP::REAL REAL;
ATTR_TYPE l(0) ; ATTR_TYPE l(0) ;
typename PFP::REAL vArea = vertexArea[d] ; REAL vArea = vertexArea[d] ;
ATTR_TYPE value = attr[d] ; ATTR_TYPE value = attr[d] ;
typename PFP::REAL wSum = 0 ; REAL wSum = 0 ;
Traversor2VE<typename PFP::MAP> t(map, d) ; Traversor2VE<typename PFP::MAP> t(map, d) ;
for(Dart it = t.begin(); it != t.end(); it = t.next()) for(Dart it = t.begin(); it != t.end(); it = t.next())
{ {
typename PFP::REAL w = edgeWeight[it] / vArea ; REAL w = edgeWeight[it] / vArea ;
l += (attr[map.phi1(it)] - value) * w ; l += (attr[map.phi1(it)] - value) * w ;
wSum += w ; wSum += w ;
} }
...@@ -87,8 +89,8 @@ ATTR_TYPE computeLaplacianCotanVertex( ...@@ -87,8 +89,8 @@ ATTR_TYPE computeLaplacianCotanVertex(
template <typename PFP, typename ATTR_TYPE> template <typename PFP, typename ATTR_TYPE>
void computeLaplacianTopoVertices( void computeLaplacianTopoVertices(
typename PFP::MAP& map, typename PFP::MAP& map,
const VertexAttribute<ATTR_TYPE>& attr, const VertexAttribute<ATTR_TYPE, typename PFP::MAP::IMPL>& attr,
VertexAttribute<ATTR_TYPE>& laplacian) VertexAttribute<ATTR_TYPE, typename PFP::MAP::IMPL>& laplacian)
{ {
TraversorV<typename PFP::MAP> t(map) ; TraversorV<typename PFP::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())
...@@ -98,10 +100,10 @@ void computeLaplacianTopoVertices( ...@@ -98,10 +100,10 @@ void computeLaplacianTopoVertices(
template <typename PFP, typename ATTR_TYPE> template <typename PFP, typename ATTR_TYPE>
void computeLaplacianCotanVertices( void computeLaplacianCotanVertices(
typename PFP::MAP& map, typename PFP::MAP& map,
const EdgeAttribute<typename PFP::REAL>& edgeWeight, const EdgeAttribute<typename PFP::REAL, typename PFP::MAP::IMPL>& edgeWeight,
const VertexAttribute<typename PFP::REAL>& vertexArea, const VertexAttribute<typename PFP::REAL, typename PFP::MAP::IMPL>& vertexArea,
const VertexAttribute<ATTR_TYPE>& attr, const VertexAttribute<ATTR_TYPE, typename PFP::MAP::IMPL>& attr,
VertexAttribute<ATTR_TYPE>& laplacian) VertexAttribute<ATTR_TYPE, typename PFP::MAP::IMPL>& laplacian)
{ {
TraversorV<typename PFP::MAP> t(map) ; TraversorV<typename PFP::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())
...@@ -112,26 +114,29 @@ template <typename PFP> ...@@ -112,26 +114,29 @@ template <typename PFP>
typename PFP::REAL computeCotanWeightEdge( typename PFP::REAL computeCotanWeightEdge(
typename PFP::MAP& map, typename PFP::MAP& map,
Dart d, Dart d,
const VertexAttribute<typename PFP::VEC3>& position) const VertexAttribute<typename PFP::VEC3, typename PFP::MAP::IMPL>& position)
{ {
typedef typename PFP::VEC3 VEC3;
typedef typename PFP::REAL REAL;
if(map.isBoundaryEdge(d)) if(map.isBoundaryEdge(d))
{ {
const typename PFP::VEC3& p1 = position[d] ; const VEC3& p1 = position[d] ;
const typename