Commit a87c07ab authored by Pierre Kraemer's avatar Pierre Kraemer

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

parent 5c271985
/* /*******************************************************************************
* texturesExample.cpp * CGoGN: Combinatorial and Geometric modeling with Generic N-dimensional Maps *
* * version 0.1 *
* Created on: Jul 21, 2011 * Copyright (C) 2009-2012, IGG Team, LSIIT, University of Strasbourg *
* Author: thery * *
*/ * This library is free software; you can redistribute it and/or modify it *
* under the terms of the GNU Lesser General Public License as published by the *
* Free Software Foundation; either version 2.1 of the License, or (at your *
* option) any later version. *
* *
* This library is distributed in the hope that it will be useful, but WITHOUT *
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or *
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License *
* for more details. *
* *
* You should have received a copy of the GNU Lesser General Public License *
* along with this library; if not, write to the Free Software Foundation, *
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. *
* *
* Web site: http://cgogn.unistra.fr/ *
* Contact information: cgogn@unistra.fr *
* *
*******************************************************************************/
#include "texturesExample.h" #include "texturesExample.h"
#include "Algo/Geometry/boundingbox.h" #include "Algo/Geometry/boundingbox.h"
#include "Algo/Modelisation/polyhedron.h" #include "Algo/Modelisation/polyhedron.h"
TexView::TexView(): TexView::TexView():
m_render(NULL), m_positionVBO(NULL), m_texcoordVBO(NULL), m_texture(NULL), m_shader(NULL),m_modeMask(false),m_fileName("") m_render(NULL),
{ m_positionVBO(NULL),
} m_texcoordVBO(NULL),
m_texture(NULL),
m_shader(NULL),
m_modeMask(false),
m_fileName("")
{}
TexView::~TexView() TexView::~TexView()
{ {
...@@ -205,7 +227,7 @@ int main(int argc, char**argv) ...@@ -205,7 +227,7 @@ int main(int argc, char**argv)
PFP::MAP& m = tv.myMap; PFP::MAP& m = tv.myMap;
VertexAttribute<VEC3> 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"); VertexAttribute<Geom::Vec2f> texcoord = m.addAttribute<Geom::Vec2f, VERTEX>("texcoord");
#define NB 96 #define NB 96
......
...@@ -62,9 +62,9 @@ typedef PFP::VEC3 Point3D; ...@@ -62,9 +62,9 @@ typedef PFP::VEC3 Point3D;
// Variables pour la gestion des plongements // Variables pour la gestion des plongements
// handler d'attribut de position par sommet // handler d'attribut de position par sommet
AttributeHandler<Point3D, VERTEX> position; VertexAttribute<Point3D> position;
// handler d'attribut de normale par sommet // handler d'attribut de normale par sommet
VertexAttribute<PFP::VEC3> normal; VertexAttribute<Point3D> normal;
/// Fonctions a connaitre: /// Fonctions a connaitre:
......
...@@ -80,7 +80,7 @@ void MyQT::createMap() ...@@ -80,7 +80,7 @@ void MyQT::createMap()
// example of attribute on face // example of attribute on face
// here for example we store the number of edges of faces at construction // here for example we store the number of edges of faces at construction
AttributeHandler<int, FACE> side = myMap.addAttribute<int, FACE>("nb_sides"); FaceAttribute<int> side = myMap.addAttribute<int, FACE>("nb_sides");
side[d1] = 3; side[d1] = 3;
side[d2] = 4; side[d2] = 4;
......
...@@ -60,8 +60,8 @@ struct PFP: public PFP_STANDARD ...@@ -60,8 +60,8 @@ struct PFP: public PFP_STANDARD
PFP::MAP myMap; PFP::MAP myMap;
// attribute handlers // attribute handlers
AttributeHandler<PFP::VEC3> position; VertexAttribute<PFP::VEC3> position;
AttributeHandler<PFP::VEC3> normal; VertexAttribute<PFP::VEC3> normal;
// open file // open file
void MyQT::cb_Open() void MyQT::cb_Open()
...@@ -86,10 +86,10 @@ void MyQT::cb_Open() ...@@ -86,10 +86,10 @@ void MyQT::cb_Open()
} }
// recuper l'attribut pour la position des points (créé lors de l'import) // recuper l'attribut pour la position des points (créé lors de l'import)
position = myMap.getAttribute<PFP::VEC3>(VERTEX, attrNames[0]) ; position = myMap.getAttribute<PFP::VEC3, VERTEX>(attrNames[0]) ;
if (!normal.isValid()) if (!normal.isValid())
normal = myMap.addAttribute<PFP::VEC3>(VERTEX, "normal"); normal = myMap.addAttribute<PFP::VEC3, VERTEX>("normal");
Algo::Geometry::computeNormalVertices<PFP>(myMap, position, normal) ; Algo::Geometry::computeNormalVertices<PFP>(myMap, position, normal) ;
...@@ -107,7 +107,7 @@ void MyQT::cb_Open() ...@@ -107,7 +107,7 @@ void MyQT::cb_Open()
void MyQT::cb_New() void MyQT::cb_New()
{ {
if (!position.isValid()) if (!position.isValid())
position = myMap.addAttribute<PFP::VEC3>(VERTEX, "position"); position = myMap.addAttribute<PFP::VEC3, VERTEX>("position");
// create a sphere // create a sphere
Algo::Modelisation::Polyhedron<PFP> prim(myMap, position); Algo::Modelisation::Polyhedron<PFP> prim(myMap, position);
...@@ -115,7 +115,7 @@ void MyQT::cb_New() ...@@ -115,7 +115,7 @@ void MyQT::cb_New()
prim.embedSphere(10.0f); prim.embedSphere(10.0f);
if (!normal.isValid()) if (!normal.isValid())
normal = myMap.addAttribute<PFP::VEC3>(VERTEX, "normal"); normal = myMap.addAttribute<PFP::VEC3, VERTEX>("normal");
Algo::Geometry::computeNormalVertices<PFP>(myMap, position, normal) ; Algo::Geometry::computeNormalVertices<PFP>(myMap, position, normal) ;
...@@ -332,7 +332,7 @@ public: ...@@ -332,7 +332,7 @@ public:
void MyQT::menu_slot1() void MyQT::menu_slot1()
{ {
// cree un handler pour les normales aux sommets // cree un handler pour les normales aux sommets
AttributeHandler<PFP::VEC3> normal2 = myMap.addAttribute<PFP::VEC3>(VERTEX, "normal2"); VertexAttribute<PFP::VEC3> normal2 = myMap.addAttribute<PFP::VEC3, VERTEX>("normal2");
// ajout de 4 threads pour les markers // ajout de 4 threads pour les markers
myMap.addThreadMarker(4); myMap.addThreadMarker(4);
...@@ -346,7 +346,7 @@ void MyQT::menu_slot1() ...@@ -346,7 +346,7 @@ void MyQT::menu_slot1()
// parallelisation de boucle sans resultat // parallelisation de boucle sans resultat
calculFunctor1<PFP> tf1(myMap,position,normal); calculFunctor1<PFP> tf1(myMap,position,normal);
Algo::Parallel::foreach_orbit<PFP>(myMap,VERTEX, tf1,4); Algo::Parallel::foreach_orbit<PFP>(myMap, VERTEX, tf1,4);
CGoGNout << "ok:"<< CGoGNendl; CGoGNout << "ok:"<< CGoGNendl;
// parallelisation de boucle avec resultats stockes // parallelisation de boucle avec resultats stockes
...@@ -355,7 +355,7 @@ void MyQT::menu_slot1() ...@@ -355,7 +355,7 @@ void MyQT::menu_slot1()
std::vector<std::pair<double,unsigned int> > lengthp; std::vector<std::pair<double,unsigned int> > lengthp;
LengthEdgeFunctor <PFP> tflef(myMap,position); // le foncteur LengthEdgeFunctor <PFP> tflef(myMap,position); // le foncteur
// on lance l'algo parallelise (4 threads, buffer de 16384 brins par thread) // on lance l'algo parallelise (4 threads, buffer de 16384 brins par thread)
Algo::Parallel::foreach_orbit_res< PFP,std::pair<double,unsigned int> >(myMap,EDGE, tflef, 4 , 16384,lengthp); Algo::Parallel::foreach_orbit_res< PFP,std::pair<double,unsigned int> >(myMap, EDGE, tflef, 4 , 16384,lengthp);
// on calcule la somme des resultats // on calcule la somme des resultats
std::pair<double,unsigned int> le = Algo::Parallel::sumPairResult<double,unsigned int>(lengthp); std::pair<double,unsigned int> le = Algo::Parallel::sumPairResult<double,unsigned int>(lengthp);
CGoGNout << "length :" <<le.first/le.second<< CGoGNendl; CGoGNout << "length :" <<le.first/le.second<< CGoGNendl;
......
...@@ -85,7 +85,7 @@ protected: ...@@ -85,7 +85,7 @@ protected:
MAP myMap; MAP myMap;
VertexAttribute<VEC3> position; VertexAttribute<VEC3> position;
AttributeHandler<VEC3, DART> colorDarts; DartAttribute<VEC3> colorDarts;
SelectorDartNoBoundary<PFP::MAP> nb; SelectorDartNoBoundary<PFP::MAP> nb;
......
...@@ -38,7 +38,7 @@ ...@@ -38,7 +38,7 @@
MAP myMap; MAP myMap;
VertexAttribute<VEC3> position ; VertexAttribute<VEC3> position ;
AttributeHandler<VEC3, DART> middleDarts; DartAttribute<VEC3> middleDarts;
void MyQT::text_onoff(bool x) void MyQT::text_onoff(bool x)
...@@ -170,7 +170,7 @@ void MyQT::cb_mousePress(int button, int x, int y) ...@@ -170,7 +170,7 @@ void MyQT::cb_mousePress(int button, int x, int y)
m_clicked = m_render_topo->picking<PFP>(myMap, x,y, nb); m_clicked = m_render_topo->picking<PFP>(myMap, x,y, nb);
if (m_clicked != Dart::nil()) if (m_clicked != Dart::nil())
{ {
unsigned int orbs[9] = {VERTEX,EDGE,FACE,VOLUME,PFP::MAP::ORBIT_IN_PARENT(VERTEX),PFP::MAP::ORBIT_IN_PARENT(EDGE),PFP::MAP::ORBIT_IN_PARENT(FACE),PFP::MAP::ORBIT_IN_PARENT2(VERTEX),PFP::MAP::ORBIT_IN_PARENT2(EDGE)}; unsigned int orbs[9] = {VERTEX,EDGE,FACE,VOLUME,PFP::MAP::VERTEX_OF_PARENT,PFP::MAP::EDGE_OF_PARENT,PFP::MAP::FACE_OF_PARENT,PFP::MAP::VERTEX_OF_PARENT2,PFP::MAP::EDGE_OF_PARENT2};
m_selected.clear(); m_selected.clear();
// easy way to traverse darts of orbit // easy way to traverse darts of orbit
...@@ -182,14 +182,12 @@ void MyQT::cb_mousePress(int button, int x, int y) ...@@ -182,14 +182,12 @@ void MyQT::cb_mousePress(int button, int x, int y)
} }
} }
template <unsigned int ORB> template <unsigned int ORB>
void MyQT::init_att_orb(AttributeHandlerGen* attg) void MyQT::init_att_orb(AttributeHandlerGen* attg)
{ {
int i=0; unsigned int i = 0;
TraversorCell<MAP,ORB> tra(myMap); TraversorCell<MAP,ORB> tra(myMap);
// AttributeHandler<int,ORB>* attx = reinterpret_cast< AttributeHandler<int,ORB>* >(attg);
AttributeHandler<int,ORB>* att = static_cast< AttributeHandler<int,ORB>* >(attg); AttributeHandler<int,ORB>* att = static_cast< AttributeHandler<int,ORB>* >(attg);
for (Dart d = tra.begin(); d != tra.end(); d = tra.next()) for (Dart d = tra.begin(); d != tra.end(); d = tra.next())
...@@ -208,35 +206,24 @@ void MyQT::initMap() ...@@ -208,35 +206,24 @@ void MyQT::initMap()
prim.hexaGrid_topo(nb,nb,nb); prim.hexaGrid_topo(nb,nb,nb);
prim.embedHexaGrid(1.0f,1.0f,1.0f); prim.embedHexaGrid(1.0f,1.0f,1.0f);
AttributeHandler<int, VERTEX> att0 = myMap.addAttribute<int, VERTEX>("vertex"); m_att_orbits[0] = new AttributeHandler<int, VERTEX>(myMap.addAttribute<int, VERTEX>("vertex"));
m_att_orbits[0] = new AttributeHandler<int, VERTEX>(att0);
init_att_orb<VERTEX>(m_att_orbits[0]);
m_att_orbits[1] = new AttributeHandler<int, EDGE>(myMap.addAttribute<int, EDGE>("edge")); m_att_orbits[1] = new AttributeHandler<int, EDGE>(myMap.addAttribute<int, EDGE>("edge"));
m_att_orbits[2] = new AttributeHandler<int, FACE>(myMap.addAttribute<int, FACE>("face")); m_att_orbits[2] = new AttributeHandler<int, FACE>(myMap.addAttribute<int, FACE>("face"));
m_att_orbits[3] = new AttributeHandler<int, VOLUME>(myMap.addAttribute<int, VOLUME>("volume")); m_att_orbits[3] = new AttributeHandler<int, VOLUME>(myMap.addAttribute<int, VOLUME>("volume"));
m_att_orbits[4] = new AttributeHandler<int, VERTEX + PFP::MAP::IN_PARENT>(myMap.addAttribute<int, VERTEX + PFP::MAP::IN_PARENT>("vertex2")); m_att_orbits[4] = new AttributeHandler<int, PFP::MAP::VERTEX_OF_PARENT>(myMap.addAttribute<int, PFP::MAP::VERTEX_OF_PARENT>("vertex2"));
m_att_orbits[5] = new AttributeHandler<int, EDGE + PFP::MAP::IN_PARENT>(myMap.addAttribute<int, EDGE + PFP::MAP::IN_PARENT>("edge2")); m_att_orbits[5] = new AttributeHandler<int, PFP::MAP::EDGE_OF_PARENT>(myMap.addAttribute<int, PFP::MAP::EDGE_OF_PARENT>("edge2"));
m_att_orbits[6] = new AttributeHandler<int, FACE + PFP::MAP::IN_PARENT>(myMap.addAttribute<int, FACE + PFP::MAP::IN_PARENT>("face2")); m_att_orbits[6] = new AttributeHandler<int, PFP::MAP::FACE_OF_PARENT>(myMap.addAttribute<int, PFP::MAP::FACE_OF_PARENT>("face2"));
m_att_orbits[7] = new AttributeHandler<int, VERTEX + PFP::MAP::IN_PARENT2>(myMap.addAttribute<int, VERTEX + PFP::MAP::IN_PARENT2>("vertex1")); m_att_orbits[7] = new AttributeHandler<int, PFP::MAP::VERTEX_OF_PARENT2>(myMap.addAttribute<int, PFP::MAP::VERTEX_OF_PARENT2>("vertex1"));
m_att_orbits[8] = new AttributeHandler<int, EDGE + PFP::MAP::IN_PARENT2>(myMap.addAttribute<int, EDGE + PFP::MAP::IN_PARENT2>("face1")); m_att_orbits[8] = new AttributeHandler<int, PFP::MAP::EDGE_OF_PARENT2>(myMap.addAttribute<int, PFP::MAP::EDGE_OF_PARENT2>("face1"));
init_att_orb<VERTEX>(m_att_orbits[0]);
init_att_orb<EDGE>(m_att_orbits[1]); init_att_orb<EDGE>(m_att_orbits[1]);
init_att_orb<FACE>(m_att_orbits[2]); init_att_orb<FACE>(m_att_orbits[2]);
init_att_orb<VOLUME>(m_att_orbits[3]); init_att_orb<VOLUME>(m_att_orbits[3]);
init_att_orb<PFP::MAP::VERTEX_OF_PARENT>(m_att_orbits[4]); init_att_orb<PFP::MAP::VERTEX_OF_PARENT>(m_att_orbits[4]);
init_att_orb<PFP::MAP::EDGE_OF_PARENT>(m_att_orbits[5]); init_att_orb<PFP::MAP::EDGE_OF_PARENT>(m_att_orbits[5]);
init_att_orb<PFP::MAP::FACE_OF_PARENT>(m_att_orbits[6]); init_att_orb<PFP::MAP::FACE_OF_PARENT>(m_att_orbits[6]);
init_att_orb<PFP::MAP::VERTEX_OF_PARENT2>(m_att_orbits[7]); init_att_orb<PFP::MAP::VERTEX_OF_PARENT2>(m_att_orbits[7]);
init_att_orb<PFP::MAP::EDGE_OF_PARENT2>(m_att_orbits[8]); init_att_orb<PFP::MAP::EDGE_OF_PARENT2>(m_att_orbits[8]);
middleDarts = myMap.addAttribute<VEC3, DART>("middle"); middleDarts = myMap.addAttribute<VEC3, DART>("middle");
......
...@@ -87,13 +87,13 @@ public: ...@@ -87,13 +87,13 @@ public:
protected: protected:
Predictor<PFP, T>* m_predictor ; Predictor<PFP, T>* m_predictor ;
AttributeHandler<T, VERTEX>& m_attrV ; // vertex attribute to be approximated VertexAttribute<T>& m_attrV ; // vertex attribute to be approximated
AttributeHandler<T, EDGE> m_approx ; // attribute to store approximation result EdgeAttribute<T> m_approx ; // attribute to store approximation result
AttributeHandler<T, EDGE> m_detail ; // attribute to store detail information for reconstruction EdgeAttribute<T> m_detail ; // attribute to store detail information for reconstruction
T m_app ; T m_app ;
public: public:
Approximator(MAP& m, AttributeHandler<T, VERTEX>& a, Predictor<PFP, T>* predictor) : Approximator(MAP& m, VertexAttribute<T>& a, Predictor<PFP, T>* predictor) :
ApproximatorGen<PFP>(m), m_predictor(predictor), m_attrV(a) ApproximatorGen<PFP>(m), m_predictor(predictor), m_attrV(a)
{ {
std::stringstream aname ; std::stringstream aname ;
......
...@@ -68,28 +68,28 @@ void decimate( ...@@ -68,28 +68,28 @@ void decimate(
approximators.push_back(new Approximator_QEMhalfEdge<PFP>(map, position)) ; approximators.push_back(new Approximator_QEMhalfEdge<PFP>(map, position)) ;
/* /*
PFP::TVEC3 frame[3] ; PFP::TVEC3 frame[3] ;
frame[0] = map.template getAttribute<typename PFP::VEC3>(VERTEX, "frame_T") ; // Tangent frame[0] = map.template getAttribute<typename PFP::VEC3, VERTEX>("frame_T") ; // Tangent
frame[1] = map.template getAttribute<typename PFP::VEC3>(VERTEX, "frame_B") ; // Bitangent frame[1] = map.template getAttribute<typename PFP::VEC3, VERTEX>("frame_B") ; // Bitangent
frame[2] = map.template getAttribute<typename PFP::VEC3>(VERTEX, "frame_N") ; // Normal frame[2] = map.template getAttribute<typename PFP::VEC3, VERTEX>("frame_N") ; // Normal
for (unsigned int i = 0 ; i < 3 ; ++i) for (unsigned int i = 0 ; i < 3 ; ++i)
if (!frame[i].isValid()) { if (!frame[i].isValid()) {
CGoGNerr << "In function decimate : frame[" << i << "] is not valid" << CGoGNendl ; CGoGNerr << "In function decimate : frame[" << i << "] is not valid" << CGoGNendl ;
} }
AttributeHandler<typename PFP::VEC3> colorPTM[6] ; VertexAttribute<typename PFP::VEC3> colorPTM[6] ;
colorPTM[0] = map.template getAttribute<typename PFP::VEC3>(VERTEX, "colorPTM_a") ; colorPTM[0] = map.template getAttribute<typename PFP::VEC3, VERTEX>("colorPTM_a") ;
colorPTM[1] = map.template getAttribute<typename PFP::VEC3>(VERTEX, "colorPTM_b") ; colorPTM[1] = map.template getAttribute<typename PFP::VEC3, VERTEX>("colorPTM_b") ;
colorPTM[2] = map.template getAttribute<typename PFP::VEC3>(VERTEX, "colorPTM_c") ; colorPTM[2] = map.template getAttribute<typename PFP::VEC3, VERTEX>("colorPTM_c") ;
colorPTM[3] = map.template getAttribute<typename PFP::VEC3>(VERTEX, "colorPTM_d") ; colorPTM[3] = map.template getAttribute<typename PFP::VEC3, VERTEX>("colorPTM_d") ;
colorPTM[4] = map.template getAttribute<typename PFP::VEC3>(VERTEX, "colorPTM_e") ; colorPTM[4] = map.template getAttribute<typename PFP::VEC3, VERTEX>("colorPTM_e") ;
colorPTM[5] = map.template getAttribute<typename PFP::VEC3>(VERTEX, "colorPTM_f") ; colorPTM[5] = map.template getAttribute<typename PFP::VEC3, VERTEX>("colorPTM_f") ;
for (unsigned int i = 0 ; i < 6 ; ++i) for (unsigned int i = 0 ; i < 6 ; ++i)
if (!colorPTM[i].isValid()) { if (!colorPTM[i].isValid()) {
CGoGNerr << "In function decimate : colorPTM[" << i << "] is not valid" << CGoGNendl ; CGoGNerr << "In function decimate : colorPTM[" << i << "] is not valid" << CGoGNendl ;
} }
*/ */
AttributeHandler<Geom::Matrix<3,3,typename PFP::REAL>, VERTEX> frame = map.template getAttribute<Geom::Matrix<3,3,typename PFP::REAL>, VERTEX>("frame") ; VertexAttribute<Geom::Matrix<3,3,typename PFP::REAL> > frame = map.template getAttribute<Geom::Matrix<3,3,typename PFP::REAL>, VERTEX>("frame") ;
AttributeHandler<Geom::Matrix<3,6,typename PFP::REAL>, VERTEX> RGBfunctions = map.template getAttribute<Geom::Matrix<3,6,typename PFP::REAL>, VERTEX>("colorPTM") ; VertexAttribute<Geom::Matrix<3,6,typename PFP::REAL> > RGBfunctions = map.template getAttribute<Geom::Matrix<3,6,typename PFP::REAL>, VERTEX>("colorPTM") ;
approximators.push_back(new Approximator_Frame<PFP>(map, frame)) ; approximators.push_back(new Approximator_Frame<PFP>(map, frame)) ;
approximators.push_back(new Approximator_RGBfunctions<PFP>(map, RGBfunctions)) ; approximators.push_back(new Approximator_RGBfunctions<PFP>(map, RGBfunctions)) ;
break ; break ;
...@@ -97,8 +97,8 @@ void decimate( ...@@ -97,8 +97,8 @@ void decimate(
case A_LightfieldHalf : case A_LightfieldHalf :
{ {
approximators.push_back(new Approximator_HalfCollapse<PFP>(map, position)) ; approximators.push_back(new Approximator_HalfCollapse<PFP>(map, position)) ;
AttributeHandler<Geom::Matrix<3,3,typename PFP::REAL>, VERTEX> frame = map.template getAttribute<Geom::Matrix<3,3,typename PFP::REAL>, VERTEX>("frame") ; VertexAttribute<Geom::Matrix<3,3,typename PFP::REAL> > frame = map.template getAttribute<Geom::Matrix<3,3,typename PFP::REAL>, VERTEX>("frame") ;
AttributeHandler<Geom::Matrix<3,6,typename PFP::REAL>, VERTEX> RGBfunctions = map.template getAttribute<Geom::Matrix<3,6,typename PFP::REAL>, VERTEX>("colorPTM") ; VertexAttribute<Geom::Matrix<3,6,typename PFP::REAL> > RGBfunctions = map.template getAttribute<Geom::Matrix<3,6,typename PFP::REAL>, VERTEX>("colorPTM") ;
approximators.push_back(new Approximator_FrameHalf<PFP>(map, frame)) ; approximators.push_back(new Approximator_FrameHalf<PFP>(map, frame)) ;
approximators.push_back(new Approximator_RGBfunctionsHalf<PFP>(map, RGBfunctions)) ; approximators.push_back(new Approximator_RGBfunctionsHalf<PFP>(map, RGBfunctions)) ;
break ; break ;
......
...@@ -111,7 +111,7 @@ private: ...@@ -111,7 +111,7 @@ private:
} LengthEdgeInfo ; } LengthEdgeInfo ;
typedef NoMathIOAttribute<LengthEdgeInfo> EdgeInfo ; typedef NoMathIOAttribute<LengthEdgeInfo> EdgeInfo ;
AttributeHandler<EdgeInfo, EDGE> edgeInfo ; EdgeAttribute<EdgeInfo> edgeInfo ;
std::multimap<float,Dart> edges ; std::multimap<float,Dart> edges ;
typename std::multimap<float,Dart>::iterator cur ; typename std::multimap<float,Dart>::iterator cur ;
...@@ -154,8 +154,8 @@ private: ...@@ -154,8 +154,8 @@ private:
} QEMedgeInfo ; } QEMedgeInfo ;
typedef NoMathIOAttribute<QEMedgeInfo> EdgeInfo ; typedef NoMathIOAttribute<QEMedgeInfo> EdgeInfo ;
AttributeHandler<EdgeInfo, EDGE> edgeInfo ; EdgeAttribute<EdgeInfo> edgeInfo ;
AttributeHandler<Quadric<REAL>, VERTEX> quadric ; VertexAttribute<Quadric<REAL> > quadric ;
Quadric<REAL> tmpQ ; Quadric<REAL> tmpQ ;
std::multimap<float,Dart> edges ; std::multimap<float,Dart> edges ;
...@@ -203,8 +203,8 @@ private: ...@@ -203,8 +203,8 @@ private:
} QEMedgeInfo ; } QEMedgeInfo ;
typedef NoMathIOAttribute<QEMedgeInfo> EdgeInfo ; typedef NoMathIOAttribute<QEMedgeInfo> EdgeInfo ;
AttributeHandler<EdgeInfo, EDGE> edgeInfo ; EdgeAttribute<EdgeInfo> edgeInfo ;
AttributeHandler<Quadric<REAL>, VERTEX> quadric ; VertexAttribute<Quadric<REAL> > quadric ;
std::multimap<float,Dart> edges ; std::multimap<float,Dart> edges ;
typename std::multimap<float,Dart>::iterator cur ; typename std::multimap<float,Dart>::iterator cur ;
...@@ -256,7 +256,7 @@ private: ...@@ -256,7 +256,7 @@ private:
REAL radius ; REAL radius ;
VertexAttribute<VEC3> normal ; VertexAttribute<VEC3> normal ;
AttributeHandler<EdgeInfo, EDGE> edgeInfo ; EdgeAttribute<EdgeInfo> edgeInfo ;
EdgeAttribute<REAL> edgeangle ; EdgeAttribute<REAL> edgeangle ;
VertexAttribute<REAL> kmax ; VertexAttribute<REAL> kmax ;
VertexAttribute<REAL> kmin ; VertexAttribute<REAL> kmin ;
...@@ -347,7 +347,7 @@ private: ...@@ -347,7 +347,7 @@ private:
} MinDetailEdgeInfo ; } MinDetailEdgeInfo ;
typedef NoMathIOAttribute<MinDetailEdgeInfo> EdgeInfo ; typedef NoMathIOAttribute<MinDetailEdgeInfo> EdgeInfo ;
AttributeHandler<EdgeInfo, EDGE> edgeInfo ; EdgeAttribute<EdgeInfo> edgeInfo ;
std::multimap<float,Dart> edges ; std::multimap<float,Dart> edges ;
typename std::multimap<float,Dart>::iterator cur ; typename std::multimap<float,Dart>::iterator cur ;
......
...@@ -45,7 +45,7 @@ public: ...@@ -45,7 +45,7 @@ public:
typedef typename PFP::REAL REAL ; typedef typename PFP::REAL REAL ;
protected: protected:
AttributeHandler<Quadric<REAL>, VERTEX> m_quadric ; VertexAttribute<Quadric<REAL> > m_quadric ;
public: public:
Approximator_QEM(MAP& m, VertexAttribute<VEC3>& pos, Predictor<PFP, VEC3>* pred = NULL) : Approximator_QEM(MAP& m, VertexAttribute<VEC3>& pos, Predictor<PFP, VEC3>* pred = NULL) :
...@@ -67,7 +67,7 @@ public: ...@@ -67,7 +67,7 @@ public:
typedef typename PFP::REAL REAL ; typedef typename PFP::REAL REAL ;
protected: protected:
AttributeHandler<Quadric<REAL>, VERTEX> m_quadric ; VertexAttribute<Quadric<REAL> > m_quadric ;
public: public:
Approximator_QEMhalfEdge(MAP& m, VertexAttribute<VEC3>& pos, Predictor<PFP, VEC3>* pred = NULL) : Approximator_QEMhalfEdge(MAP& m, VertexAttribute<VEC3>& pos, Predictor<PFP, VEC3>* pred = NULL) :
......
...@@ -53,8 +53,8 @@ private: ...@@ -53,8 +53,8 @@ private:
} QEMhalfEdgeInfo ; } QEMhalfEdgeInfo ;
typedef NoMathIOAttribute<QEMhalfEdgeInfo> HalfEdgeInfo ; typedef NoMathIOAttribute<QEMhalfEdgeInfo> HalfEdgeInfo ;
AttributeHandler<HalfEdgeInfo, DART> halfEdgeInfo ; DartAttribute<HalfEdgeInfo> halfEdgeInfo ;
AttributeHandler<Quadric<REAL>, VERTEX> quadric ; VertexAttribute<Quadric<REAL> > quadric ;
std::multimap<float,Dart> halfEdges ; std::multimap<float,Dart> halfEdges ;
typename std::multimap<float,Dart>::iterator cur ; typename std::multimap<float,Dart>::iterator cur ;
...@@ -105,11 +105,11 @@ private: ...@@ -105,11 +105,11 @@ private:
} LightfieldHalfEdgeInfo ; } LightfieldHalfEdgeInfo ;
typedef NoMathIOAttribute<LightfieldHalfEdgeInfo> HalfEdgeInfo ; typedef NoMathIOAttribute<LightfieldHalfEdgeInfo> HalfEdgeInfo ;
AttributeHandler<MATRIX33, VERTEX> m_frame ; VertexAttribute<MATRIX33> m_frame ;
AttributeHandler<HalfEdgeInfo, DART> halfEdgeInfo ; DartAttribute<HalfEdgeInfo> halfEdgeInfo ;
AttributeHandler<Quadric<REAL>, VERTEX> quadric ; VertexAttribute<Quadric<REAL> > quadric ;
AttributeHandler<QuadricRGBfunctions<REAL>, EDGE> quadricRGBfunctions ; EdgeAttribute<QuadricRGBfunctions<REAL> > quadricRGBfunctions ;
std::multimap<float,Dart> halfEdges ; std::multimap<float,Dart> halfEdges ;
typename std::multimap<float,Dart>::iterator cur ; typename std::multimap<float,Dart>::iterator cur ;
......
...@@ -49,7 +49,7 @@ public: ...@@ -49,7 +49,7 @@ public:
typedef Geom::Matrix<3,6,REAL> MATRIX36 ; typedef Geom::Matrix<3,6,REAL> MATRIX36 ;
public: public:
Approximator_FrameHalf(MAP& m, AttributeHandler<MATRIX33, VERTEX>& frame, Predictor<PFP, MATRIX33>* pred = NULL) : Approximator_FrameHalf(MAP& m, VertexAttribute<MATRIX33>& frame, Predictor<PFP, MATRIX33>* pred = NULL) :
Approximator<PFP, MATRIX33>(m, frame, pred) Approximator<PFP, MATRIX33>(m, frame, pred)
{} {}
~Approximator_FrameHalf() ~Approximator_FrameHalf()
...@@ -71,12 +71,12 @@ public: ...@@ -71,12 +71,12 @@ public:
typedef Geom::Matrix<3,6,REAL> MATRIX36 ; typedef Geom::Matrix<3,6,REAL> MATRIX36 ;
protected: protected:
AttributeHandler<MATRIX33, VERTEX> m_frame ; VertexAttribute<MATRIX33> m_frame ;
AttributeHandler<MATRIX33, EDGE> m_approxFrame ; EdgeAttribute<MATRIX33> m_approxFrame ;
AttributeHandler<QuadricRGBfunctions<REAL>, EDGE> m_quadricRGBfunctions ; EdgeAttribute<QuadricRGBfunctions<REAL>> m_quadricRGBfunctions ;
public: public:
Approximator_RGBfunctionsHalf(MAP& m, AttributeHandler<MATRIX36, VERTEX>& rgbfunctions, Predictor<PFP, MATRIX36>* pred = NULL) : Approximator_RGBfunctionsHalf(MAP& m, VertexAttribute<MATRIX36>& rgbfunctions, Predictor<PFP, MATRIX36>* pred = NULL) :
Approximator<PFP, MATRIX36>(m, rgbfunctions, pred) Approximator<PFP, MATRIX36>(m, rgbfunctions, pred)
{ } { }
~Approximator_RGBfunctionsHalf () ~Approximator_RGBfunctionsHalf ()
...@@ -102,7 +102,7 @@ protected: ...@@ -102,7 +102,7 @@ protected:
EdgeAttribute<VEC3> m_approxPosition ; EdgeAttribute<VEC3> m_approxPosition ;