Commit 5c271985 authored by Pierre Kraemer's avatar Pierre Kraemer
Browse files

AttributeHandler -> [Vertex,Edge,...]Attribute

parent 961a702b
...@@ -81,7 +81,7 @@ public: ...@@ -81,7 +81,7 @@ public:
//Manip Carte //Manip Carte
MAP myMap ; MAP myMap ;
AttributeHandler<VEC3, VERTEX> position; VertexAttribute<VEC3> position;
Dart dglobal; Dart dglobal;
//Render //Render
......
...@@ -132,7 +132,7 @@ typedef PFP::VEC3 VEC3 ; ...@@ -132,7 +132,7 @@ typedef PFP::VEC3 VEC3 ;
// declaration of the map // declaration of the map
MAP myMap; MAP myMap;
// and attribute of position // and attribute of position
AttributeHandler<VEC3, VERTEX> position; VertexAttribute<VEC3> position;
unsigned int nb_ears; unsigned int nb_ears;
......
...@@ -102,7 +102,7 @@ int main(int argc, char **argv) ...@@ -102,7 +102,7 @@ int main(int argc, char **argv)
QApplication app(argc, argv); QApplication app(argc, argv);
MyQT sqt; MyQT sqt;
AttributeHandler<VEC3, VERTEX> position = myMap.addAttribute<VEC3, VERTEX>("position") ; VertexAttribute<VEC3> 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;
......
...@@ -73,7 +73,7 @@ public: ...@@ -73,7 +73,7 @@ public:
bool m_drawEdges ; bool m_drawEdges ;
bool m_drawFaces ; bool m_drawFaces ;
AttributeHandler<VEC3, VERTEX> position ; VertexAttribute<VEC3> position ;
Algo::Render::GL2::MapRender* m_render ; Algo::Render::GL2::MapRender* m_render ;
......
...@@ -51,7 +51,7 @@ class SimpleGMap2 : public Utils::QT::SimpleQT ...@@ -51,7 +51,7 @@ class SimpleGMap2 : public Utils::QT::SimpleQT
public: public:
MAP myMap ; MAP myMap ;
AttributeHandler<VEC3, VERTEX> position ; VertexAttribute<VEC3> position ;
SimpleGMap2() ; SimpleGMap2() ;
......
...@@ -52,9 +52,9 @@ class SimpleGMap3 : public Utils::QT::SimpleQT ...@@ -52,9 +52,9 @@ class SimpleGMap3 : public Utils::QT::SimpleQT
public: public:
MAP myMap ; MAP myMap ;
AttributeHandler<VEC3, VERTEX> position ; VertexAttribute<VEC3> position ;
AttributeHandler<VEC3, VERTEX> normal ; VertexAttribute<VEC3> normal ;
AttributeHandler<VEC3, VOLUME> volume ; VolumeAttribute<VEC3> volume ;
SimpleGMap3() ; SimpleGMap3() ;
......
...@@ -52,7 +52,7 @@ public: ...@@ -52,7 +52,7 @@ public:
MAP myMap ; MAP myMap ;
SelectorTrue allDarts ; SelectorTrue allDarts ;
AttributeHandler<VEC3, VERTEX> position ; VertexAttribute<VEC3> position ;
SimpleMap3() ; SimpleMap3() ;
......
...@@ -204,7 +204,7 @@ int main(int argc, char**argv) ...@@ -204,7 +204,7 @@ int main(int argc, char**argv)
PFP::MAP& m = tv.myMap; PFP::MAP& m = tv.myMap;
AttributeHandler<VEC3, VERTEX> position = m.addAttribute<VEC3, VERTEX>("position"); VertexAttribute<VEC3> position = m.addAttribute<VEC3, VERTEX>("position");
AttributeHandler<Geom::Vec2f, VERTEX> texcoord = m.addAttribute<Geom::Vec2f, VERTEX>("texcoord"); AttributeHandler<Geom::Vec2f, VERTEX> texcoord = m.addAttribute<Geom::Vec2f, VERTEX>("texcoord");
#define NB 96 #define NB 96
......
...@@ -248,7 +248,7 @@ void Viewer::exportMesh(std::string& filename) ...@@ -248,7 +248,7 @@ void Viewer::exportMesh(std::string& filename)
Algo::Export::exportOFF<PFP>(myMap, position, filename.c_str(), allDarts) ; Algo::Export::exportOFF<PFP>(myMap, position, filename.c_str(), allDarts) ;
else if (extension.compare(0, 4, std::string(".ply")) == 0) else if (extension.compare(0, 4, std::string(".ply")) == 0)
{ {
std::vector<AttributeHandler<VEC3, VERTEX>*> attributes ; std::vector<VertexAttribute<VEC3>*> attributes ;
attributes.push_back(&position) ; attributes.push_back(&position) ;
Algo::Export::exportPLYnew<PFP>(myMap, attributes, filename.c_str(), true, allDarts) ; Algo::Export::exportPLYnew<PFP>(myMap, attributes, filename.c_str(), true, allDarts) ;
} }
......
...@@ -33,8 +33,8 @@ ...@@ -33,8 +33,8 @@
PFP::MAP myMap; PFP::MAP myMap;
AttributeHandler<PFP::VEC3, VERTEX> position ; VertexAttribute<PFP::VEC3> position ;
AttributeHandler<PFP::VEC3, VOLUME> color ; VolumeAttribute<PFP::VEC3> color ;
void MyQT::volumes_onoff(bool x) void MyQT::volumes_onoff(bool x)
{ {
......
...@@ -40,7 +40,7 @@ ...@@ -40,7 +40,7 @@
MAP myMap; MAP myMap;
AttributeHandler<VEC3, VERTEX> position ; VertexAttribute<VEC3> position ;
Dart dglobal; Dart dglobal;
void MyQT::cb_checkTopo(bool b) void MyQT::cb_checkTopo(bool b)
......
...@@ -64,7 +64,7 @@ typedef PFP::VEC3 Point3D; ...@@ -64,7 +64,7 @@ typedef PFP::VEC3 Point3D;
// handler d'attribut de position par sommet // handler d'attribut de position par sommet
AttributeHandler<Point3D, VERTEX> position; AttributeHandler<Point3D, VERTEX> position;
// handler d'attribut de normale par sommet // handler d'attribut de normale par sommet
AttributeHandler<PFP::VEC3, VERTEX> normal; VertexAttribute<PFP::VEC3> normal;
/// Fonctions a connaitre: /// Fonctions a connaitre:
......
...@@ -73,7 +73,7 @@ protected: ...@@ -73,7 +73,7 @@ protected:
MAP myMap; MAP myMap;
// attribute for vertices positions // attribute for vertices positions
AttributeHandler<VEC3, VERTEX> position; VertexAttribute<VEC3> position;
// render (for the topo) // render (for the topo)
Algo::Render::GL2::TopoRender* m_render_topo; Algo::Render::GL2::TopoRender* m_render_topo;
......
...@@ -53,7 +53,7 @@ void MyQT::createMap() ...@@ -53,7 +53,7 @@ void MyQT::createMap()
Dart d1 = myMap.newFace(3); Dart d1 = myMap.newFace(3);
Dart d2 = myMap.newFace(4); Dart d2 = myMap.newFace(4);
myMap.sewFaces(d1, d2); myMap.sewFaces(d1, d2);
AttributeHandler<VEC3, VERTEX> position = myMap.addAttribute<PFP::VEC3, VERTEX>("position"); VertexAttribute<VEC3> position = myMap.addAttribute<PFP::VEC3, VERTEX>("position");
position[d1] = PFP::VEC3(0, 0, 0); position[d1] = PFP::VEC3(0, 0, 0);
position[PHI1(d1)] = PFP::VEC3(2, 0, 0); position[PHI1(d1)] = PFP::VEC3(2, 0, 0);
position[PHI_1(d1)] = PFP::VEC3(1, 2, 0); position[PHI_1(d1)] = PFP::VEC3(1, 2, 0);
...@@ -61,7 +61,7 @@ void MyQT::createMap() ...@@ -61,7 +61,7 @@ void MyQT::createMap()
position[PHI_1(d2)] = PFP::VEC3(2, -2, 0); position[PHI_1(d2)] = PFP::VEC3(2, -2, 0);
// create another attribute on vertices (for faces drawing) // create another attribute on vertices (for faces drawing)
AttributeHandler<VEC3, VERTEX> colorF = myMap.addAttribute<PFP::VEC3, VERTEX>("colorF"); VertexAttribute<VEC3> colorF = myMap.addAttribute<PFP::VEC3, VERTEX>("colorF");
colorF[d1] = Geom::Vec3f(1.0f,0.0f,0.0f); colorF[d1] = Geom::Vec3f(1.0f,0.0f,0.0f);
colorF[PHI1(d1)] = Geom::Vec3f(0.0f,1.0f,0.0f); colorF[PHI1(d1)] = Geom::Vec3f(0.0f,1.0f,0.0f);
...@@ -70,7 +70,7 @@ void MyQT::createMap() ...@@ -70,7 +70,7 @@ void MyQT::createMap()
colorF[PHI_1(d2)] = Geom::Vec3f(0.0f,1.0f,1.0f); colorF[PHI_1(d2)] = Geom::Vec3f(0.0f,1.0f,1.0f);
// create another attribute on vertices (for edges drawing) // create another attribute on vertices (for edges drawing)
AttributeHandler<VEC3, VERTEX> colorE = myMap.addAttribute<PFP::VEC3, VERTEX>("colorE"); VertexAttribute<VEC3> colorE = myMap.addAttribute<PFP::VEC3, VERTEX>("colorE");
colorE[d1] = Geom::Vec3f(0.0f,0.5f,0.5f); colorE[d1] = Geom::Vec3f(0.0f,0.5f,0.5f);
colorE[PHI1(d1)] = Geom::Vec3f(0.5f,0.0f,0.5f); colorE[PHI1(d1)] = Geom::Vec3f(0.5f,0.0f,0.5f);
......
...@@ -75,7 +75,7 @@ protected: ...@@ -75,7 +75,7 @@ protected:
MAP myMap; MAP myMap;
// attribute handler on position; // attribute handler on position;
AttributeHandler<VEC3, VERTEX> position; VertexAttribute<VEC3> position;
// render (for the topo) // render (for the topo)
Algo::Render::GL2::TopoRender* m_render_topo; Algo::Render::GL2::TopoRender* m_render_topo;
......
...@@ -63,7 +63,7 @@ protected: ...@@ -63,7 +63,7 @@ protected:
MAP myMap; MAP myMap;
// attribute handler on position; // attribute handler on position;
AttributeHandler<VEC3, VERTEX> position; VertexAttribute<VEC3> position;
// render (for the topo) // render (for the topo)
Algo::Render::GL2::TopoRender* m_render_topo; Algo::Render::GL2::TopoRender* m_render_topo;
......
...@@ -35,7 +35,7 @@ ...@@ -35,7 +35,7 @@
MAP myMap; MAP myMap;
AttributeHandler<VEC3, VERTEX> position ; VertexAttribute<VEC3> position ;
Dart dglobal; Dart dglobal;
void MyQT::balls_onoff(bool x) void MyQT::balls_onoff(bool x)
......
...@@ -84,7 +84,7 @@ protected: ...@@ -84,7 +84,7 @@ protected:
// declaration of the map // declaration of the map
MAP myMap; MAP myMap;
AttributeHandler<VEC3, VERTEX> position; VertexAttribute<VEC3> position;
AttributeHandler<VEC3, DART> colorDarts; AttributeHandler<VEC3, DART> colorDarts;
SelectorDartNoBoundary<PFP::MAP> nb; SelectorDartNoBoundary<PFP::MAP> nb;
......
...@@ -84,7 +84,7 @@ protected: ...@@ -84,7 +84,7 @@ protected:
// declaration of the map // declaration of the map
MAP myMap; MAP myMap;
AttributeHandler<VEC3, VERTEX> position; VertexAttribute<VEC3> position;
SelectorDartNoBoundary<PFP::MAP> nb; SelectorDartNoBoundary<PFP::MAP> nb;
......
...@@ -37,7 +37,7 @@ ...@@ -37,7 +37,7 @@
#include "Algo/Import/import.h" #include "Algo/Import/import.h"
MAP myMap; MAP myMap;
AttributeHandler<VEC3, VERTEX> position ; VertexAttribute<VEC3> position ;
AttributeHandler<VEC3, DART> middleDarts; AttributeHandler<VEC3, DART> middleDarts;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment