Commit 48e27569 authored by CGoGN GIT Supervisor's avatar CGoGN GIT Supervisor

Merge branch 'master' of /home/kraemer/CGoGN

* 'master' of /home/kraemer/CGoGN:
  debug Dart/CellMarker + suppr '_ORBIT' et '_CELL'
parents 83928b30 2a524b67
......@@ -43,7 +43,7 @@ int main()
std::cout << "Check Status : PARTIAL" << std::endl;
PFP::MAP map;
AttributeHandler<PFP::VEC3> position = map.addAttribute<PFP::VEC3>(VERTEX_ORBIT, "position");
AttributeHandler<PFP::VEC3> position = map.addAttribute<PFP::VEC3>(VERTEX, "position");
map.newFace(3);
PFP::VEC3 ta(0,0,0);
......
......@@ -332,7 +332,7 @@ int main(int argc, char **argv)
if (argc == 1)
{
position = myMap.addAttribute<Geom::Vec3f>(VERTEX_ORBIT, "position");
position = myMap.addAttribute<Geom::Vec3f>(VERTEX, "position");
CGoGNout <<"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"<<CGoGNendl;
// typedef uint8 DATATYPE;
......@@ -422,10 +422,10 @@ int main(int argc, char **argv)
//
// GLint t1 = glutGet(GLUT_ELAPSED_TIME);
//
// myMap.getAttributeContainer(VERTEX_ORBIT).toggleProcess(position);
//// myMap.getAttributeContainer(VERTEX_ORBIT).toggleProcess(idPipo);
// myMap.getAttributeContainer(VERTEX).toggleProcess(position);
//// myMap.getAttributeContainer(VERTEX).toggleProcess(idPipo);
//
// PFP::MAP::EVertex::setContainer(myMap.getAttributeContainer(VERTEX_ORBIT));
// PFP::MAP::EVertex::setContainer(myMap.getAttributeContainer(VERTEX));
// PFP::MAP::EVertex::setMap(myMap);
// PFP::MAP::EVertex ec(0);
//
......@@ -433,7 +433,7 @@ int main(int argc, char **argv)
// GLfloat seconds = (t2 - t1) / 1000.0f;
// CGoGNout << "triangulation: "<< seconds << "sec" << CGoGNendl;
//
// Marker m = myMap.getNewMarker(VERTEX_ORBIT);
// Marker m = myMap.getNewMarker(VERTEX);
// myMap.markEmbVertex(myMap.begin(),m);
//
// Dart xd = myMap.alpha1(myMap.begin());
......@@ -447,8 +447,8 @@ int main(int argc, char **argv)
// CGoGNout << "Marke aussi"<< CGoGNendl;
// }
//
// myMap.clearEmbMarkers(m,VERTEX_ORBIT);
// myMap.releaseEmbMarker(m,VERTEX_ORBIT);
// myMap.clearEmbMarkers(m,VERTEX);
// myMap.releaseEmbMarker(m,VERTEX);
//
// }
else
......@@ -462,7 +462,7 @@ int main(int argc, char **argv)
CGoGNerr << "could not import " << std::string(argv[1]) << CGoGNendl ;
exit(1);
}
position = myMap.getAttribute<PFP::VEC3>(VERTEX_ORBIT, attrNames[0]) ;
position = myMap.getAttribute<PFP::VEC3>(VERTEX, attrNames[0]) ;
GLint t1 = glutGet(GLUT_ELAPSED_TIME);
......@@ -474,10 +474,10 @@ int main(int argc, char **argv)
// Algo::Modelisation::CatmullClark<PFP, PFP::TVEC3, PFP::VEC3>(myMap,position);
// PFP::MAP::EVertex::setContainer(myMap.getAttributeContainer(VERTEX_ORBIT));
// PFP::MAP::EVertex::setContainer(myMap.getAttributeContainer(VERTEX));
// PFP::MAP::EVertex::setMap(myMap);
// PFP::MAP::EVertex ec(0);
// myMap.getAttributeContainer(VERTEX_ORBIT).toggleProcess(position);
// myMap.getAttributeContainer(VERTEX).toggleProcess(position);
//
// Algo::Modelisation::LoopSubdivision<PFP, PFP::EVERTEX, PFP::EVERTEX>(myMap,ec);
// Algo::Modelisation::LoopSubdivision<PFP, PFP::EVERTEX, PFP::EVERTEX>(myMap,ec);
......@@ -490,15 +490,15 @@ int main(int argc, char **argv)
CGoGNout << "subdiv: "<< seconds << "sec" << CGoGNendl;
// myMap.getAttributeContainer(VERTEX_ORBIT).toggleProcess(position);
// PFP::MAP::EVertex::setContainer(myMap.getAttributeContainer(VERTEX_ORBIT));
// myMap.getAttributeContainer(VERTEX).toggleProcess(position);
// PFP::MAP::EVertex::setContainer(myMap.getAttributeContainer(VERTEX));
// PFP::MAP::EVertex::setMap(myMap);
// PFP::MAP::EVertex ec(0);
// Algo::Modelisation::triangleSubdivide<PFP, PFP::EVERTEX, PFP::EVERTEX>(myMap,ec);
// Algo::Modelisation::triangleSubdivide<PFP, PFP::EVERTEX, PFP::EVERTEX>(myMap,ec);
// Algo::Modelisation::triangleSubdivide<PFP, PFP::EVERTEX, PFP::EVERTEX>(myMap,ec);
CGoGNout << "Nombre de sommets plonges "<< myMap.getNbCells(VERTEX_ORBIT)<<CGoGNendl;
CGoGNout << "Nombre de sommets plonges "<< myMap.getNbCells(VERTEX)<<CGoGNendl;
CGoGNout << "Nombre de sommets topo: "<< myMap.getNbOrbits(0)<<CGoGNendl;
CGoGNout << "Nombre de faces topo: "<< myMap.getNbOrbits(2)<<CGoGNendl;
......@@ -515,7 +515,7 @@ int main(int argc, char **argv)
bool inter = Algo::Geometry::areTrianglesInIntersection<PFP>(myMap,0,10,position) ;
CGoGNout << "intersection = " << inter << CGoGNendl ;
normal = myMap.addAttribute<Geom::Vec3f>(VERTEX_ORBIT, "normals");
normal = myMap.addAttribute<Geom::Vec3f>(VERTEX, "normals");
// PFP::NORMAL normal(normal,myMap);
......
......@@ -235,9 +235,9 @@ void MyGlutWin::myKeyboard(unsigned char keycode, int x, int y)
/** affichage **/
case 'd' :
{
int nbVertices = myMap.getNbOrbits(VERTEX_ORBIT) ;
int nbVertices = myMap.getNbOrbits(VERTEX) ;
CGoGNout << "nb darts = " << myMap.getNbOrbits(DART_ORBIT) << CGoGNendl;
CGoGNout << "nb darts = " << myMap.getNbOrbits(DART) << CGoGNendl;
GLint t1 = glutGet(GLUT_ELAPSED_TIME);
Algo::DecimationVolumique::decimate<PFP>(myMap, Algo::DecimationVolumique::S_Random, Algo::DecimationVolumique::A_Centroid, position, nbVertices * 0.75);
......@@ -370,7 +370,7 @@ int main(int argc, char **argv)
}
Algo::Import::importOFFWithELERegions<PFP>(myMap,argv[2],argv[3],attrNames);
position = myMap.getAttribute<PFP::VEC3>(VERTEX_ORBIT, attrNames[0]) ;
position = myMap.getAttribute<PFP::VEC3>(VERTEX, attrNames[0]) ;
}
else if(std::string(argv[1]) == "-tet")
{
......@@ -380,7 +380,7 @@ int main(int argc, char **argv)
}
Algo::Import::importTet<PFP>(myMap, argv[2], attrNames);
position = myMap.getAttribute<PFP::VEC3>(VERTEX_ORBIT, attrNames[0]) ;
position = myMap.getAttribute<PFP::VEC3>(VERTEX, attrNames[0]) ;
}
else if(std::string(argv[1]) == "-ts")
{
......@@ -390,18 +390,18 @@ int main(int argc, char **argv)
}
Algo::Import::importTs<PFP>(myMap,argv[2],attrNames);
position = myMap.getAttribute<PFP::VEC3>(VERTEX_ORBIT, attrNames[0]) ;
position = myMap.getAttribute<PFP::VEC3>(VERTEX, attrNames[0]) ;
//scalar = myMap.getAttribute<PFP::REAL>(VERTEX_ORBIT, "scalar");
//scalar = myMap.getAttribute<PFP::REAL>(VERTEX, "scalar");
}
else
{
maillageTest();
}
//CGoGNout << "Nb Tetrahedron = " << myMap.getNbOrbits(VOLUME_ORBIT) << CGoGNendl;
// " / Nb Edges = " << myMap.getNbOrbits(EDGE_ORBIT) <<
// " / Nb Vertices = " << myMap.getNbOrbits(VERTEX_ORBIT) << CGoGNendl;
//CGoGNout << "Nb Tetrahedron = " << myMap.getNbOrbits(VOLUME) << CGoGNendl;
// " / Nb Edges = " << myMap.getNbOrbits(EDGE) <<
// " / Nb Vertices = " << myMap.getNbOrbits(VERTEX) << CGoGNendl;
// un peu d'interface
MyGlutWin* mgw = new MyGlutWin(&argc,argv,1200,800);
......
......@@ -109,7 +109,7 @@ int main(int argc, char **argv)
QApplication app(argc, argv);
MyQT sqt;
PFP::TVEC3 position = myMap.addAttribute<PFP::VEC3>(VERTEX_ORBIT, "position") ;
PFP::TVEC3 position = myMap.addAttribute<PFP::VEC3>(VERTEX, "position") ;
// define the face extruded (here a cross)
std::vector<PFP::VEC3> objV;
......
......@@ -311,8 +311,8 @@ MyGlutWin::MyGlutWin(int* argc, char **argv, int winX, int winY) :
void MyGlutWin::init()
{
normal = myMap.addAttribute<PFP::VEC3>(VERTEX_ORBIT, "normal") ;
laplacian = myMap.addAttribute<PFP::VEC3>(VERTEX_ORBIT, "laplacian") ;
normal = myMap.addAttribute<PFP::VEC3>(VERTEX, "normal") ;
laplacian = myMap.addAttribute<PFP::VEC3>(VERTEX, "laplacian") ;
vbo_render = new Algo::Render::GL2::MapRender_VBO() ;
updateVBOdata(Algo::Render::GL2::POSITIONS | Algo::Render::GL2::NORMALS) ;
......@@ -489,12 +489,12 @@ void MyGlutWin::myKeyboard(unsigned char keycode, int x, int y)
GLfloat seconds = (t2 - t1) / 1000.0f ;
CGoGNout << "sqrt3: "<< seconds << "sec" << CGoGNendl ;
normal = myMap.getAttribute<PFP::VEC3>(VERTEX_ORBIT, "normal") ;
normal = myMap.getAttribute<PFP::VEC3>(VERTEX, "normal") ;
if(!normal.isValid())
normal = myMap.addAttribute<PFP::VEC3>(VERTEX_ORBIT, "normal") ;
laplacian = myMap.getAttribute<PFP::VEC3>(VERTEX_ORBIT, "laplacian") ;
normal = myMap.addAttribute<PFP::VEC3>(VERTEX, "normal") ;
laplacian = myMap.getAttribute<PFP::VEC3>(VERTEX, "laplacian") ;
if(!laplacian.isValid())
laplacian = myMap.addAttribute<PFP::VEC3>(VERTEX_ORBIT, "laplacian") ;
laplacian = myMap.addAttribute<PFP::VEC3>(VERTEX, "laplacian") ;
t1 = glutGet(GLUT_ELAPSED_TIME) ;
......@@ -560,7 +560,7 @@ void MyGlutWin::myKeyboard(unsigned char keycode, int x, int y)
case 's':
{
unsigned int nbVertices = myMap.getNbOrbits(VERTEX_ORBIT) ;
unsigned int nbVertices = myMap.getNbOrbits(VERTEX) ;
GLint t1 = glutGet(GLUT_ELAPSED_TIME) ;
......@@ -586,9 +586,9 @@ void MyGlutWin::myKeyboard(unsigned char keycode, int x, int y)
case 'd':
{
AttributeHandler<PFP::VEC3> positionF = myMap.getAttribute<PFP::VEC3>(FACE_ORBIT, "position") ;
AttributeHandler<PFP::VEC3> positionF = myMap.getAttribute<PFP::VEC3>(FACE, "position") ;
if(!positionF.isValid())
positionF = myMap.addAttribute<PFP::VEC3>(FACE_ORBIT, "position") ;
positionF = myMap.addAttribute<PFP::VEC3>(FACE, "position") ;
Algo::Geometry::computeCentroidFaces<PFP>(myMap, position, positionF) ;
GLint t1 = glutGet(GLUT_ELAPSED_TIME) ;
......@@ -601,12 +601,12 @@ void MyGlutWin::myKeyboard(unsigned char keycode, int x, int y)
position = positionF ;
normal = myMap.getAttribute<PFP::VEC3>(VERTEX_ORBIT, "normal") ;
normal = myMap.getAttribute<PFP::VEC3>(VERTEX, "normal") ;
if(!normal.isValid())
normal = myMap.addAttribute<PFP::VEC3>(VERTEX_ORBIT, "normal") ;
laplacian = myMap.getAttribute<PFP::VEC3>(VERTEX_ORBIT, "laplacian") ;
normal = myMap.addAttribute<PFP::VEC3>(VERTEX, "normal") ;
laplacian = myMap.getAttribute<PFP::VEC3>(VERTEX, "laplacian") ;
if(!laplacian.isValid())
laplacian = myMap.addAttribute<PFP::VEC3>(VERTEX_ORBIT, "laplacian") ;
laplacian = myMap.addAttribute<PFP::VEC3>(VERTEX, "laplacian") ;
t1 = glutGet(GLUT_ELAPSED_TIME) ;
......@@ -649,12 +649,12 @@ void MyGlutWin::myKeyboard(unsigned char keycode, int x, int y)
case '9':
{
CellMarker markVisit(myMap, VERTEX_CELL) ;
CellMarker markVisit(myMap, VERTEX) ;
CellMarker markNoDelete(myMap, VERTEX_CELL) ;
CellMarker markNoDelete(myMap, VERTEX) ;
std::vector<Dart> visited ;
visited.reserve(myMap.getNbCells(VERTEX_CELL)) ;
visited.reserve(myMap.getNbCells(VERTEX)) ;
visited.push_back(myMap.begin()) ;
markVisit.mark(myMap.begin()) ;
......@@ -811,7 +811,7 @@ int main(int argc, char** argv)
return 1 ;
}
mgw->position = myMap.getAttribute<PFP::VEC3>(VERTEX_ORBIT, attrNames[0]) ;
mgw->position = myMap.getAttribute<PFP::VEC3>(VERTEX, attrNames[0]) ;
GLint t2 = glutGet(GLUT_ELAPSED_TIME) ;
GLfloat seconds = (t2 - t1) / 1000.0f ;
CGoGNout << "import: " << seconds << " sec" << CGoGNendl ;
......@@ -820,9 +820,9 @@ int main(int argc, char** argv)
// myMap.closeMap(m) ;
}
CGoGNout << myMap.getNbOrbits(VERTEX_ORBIT) << CGoGNendl ;
CGoGNout << myMap.getNbOrbits(EDGE_ORBIT) << CGoGNendl ;
CGoGNout << myMap.getNbOrbits(FACE_ORBIT) << CGoGNendl ;
CGoGNout << myMap.getNbOrbits(VERTEX) << CGoGNendl ;
CGoGNout << myMap.getNbOrbits(EDGE) << CGoGNendl ;
CGoGNout << myMap.getNbOrbits(FACE) << CGoGNendl ;
// compute width and position of object for centering
Geom::BoundingBox<PFP::VEC3> bb = Algo::Geometry::computeBoundingBox<PFP>(myMap, mgw->position) ;
......
......@@ -99,7 +99,7 @@ int main(int argc, char **argv)
QApplication app(argc, argv);
MyQT sqt;
PFP::TVEC3 position = myMap.addAttribute<PFP::VEC3>(VERTEX_ORBIT, "position") ;
PFP::TVEC3 position = myMap.addAttribute<PFP::VEC3>(VERTEX, "position") ;
// create a cylinder
Algo::Modelisation::Polyhedron<PFP> prim1(myMap, position);
......
......@@ -211,8 +211,8 @@ int main(int argc, char **argv)
myGlutWin mgw(&argc,argv,800,800);
mgw.init();
mgw.position = myMap.addAttribute<PFP::VEC3>(VERTEX_ORBIT, "position") ;
mgw.normal = myMap.addAttribute<PFP::VEC3>(VERTEX_ORBIT, "normal") ;
mgw.position = myMap.addAttribute<PFP::VEC3>(VERTEX, "position") ;
mgw.normal = myMap.addAttribute<PFP::VEC3>(VERTEX, "normal") ;
glewInit();
if (! Utils::GLSLShader::areShadersSupported())
......@@ -229,7 +229,7 @@ int main(int argc, char **argv)
prim1.cylinder_topo(16,15, true, true);
prim1.embedCylinder(30.0f,20.0f,50.0f);
CellMarker mark1(myMap,VERTEX_CELL);
CellMarker mark1(myMap,VERTEX);
prim1.mark(mark1);
// create a sphere
......@@ -237,7 +237,7 @@ int main(int argc, char **argv)
prim2.cylinder_topo(16,16, true, true);
prim2.embedSphere(40.0f);
CellMarker mark2(myMap,VERTEX_CELL);
CellMarker mark2(myMap,VERTEX);
prim2.mark(mark2);
// create a sphere
......@@ -245,7 +245,7 @@ int main(int argc, char **argv)
prim3.tore_topo(12,48);
prim3.embedTore(50.0f,10.0f);
CellMarker mark3(myMap,VERTEX_CELL);
CellMarker mark3(myMap,VERTEX);
prim3.mark(mark3);
......
......@@ -390,8 +390,8 @@ int main(int argc, char **argv)
{
myGlutWin mgw(&argc,argv,800,800);
mgw.idAttr_Position = myMap.addAttribute<PFP::VEC3>(VERTEX_ORBIT, "position", "Geom::Vec3f") ;
mgw.idAttr_Normal = myMap.addAttribute<PFP::VEC3>(VERTEX_ORBIT, "normal", "Geom::Vec3f") ;
mgw.idAttr_Position = myMap.addAttribute<PFP::VEC3>(VERTEX, "position", "Geom::Vec3f") ;
mgw.idAttr_Normal = myMap.addAttribute<PFP::VEC3>(VERTEX, "normal", "Geom::Vec3f") ;
AttributeHandler<PFP::VEC3> tablePositions(myMap, mgw.idAttr_Position) ;
PFP::VEC3 gMax;
......
......@@ -384,7 +384,7 @@ int main(int argc, char **argv)
if(argc < 2)
{
mgw.position = myMap.addAttribute<PFP::VEC3>(VERTEX_ORBIT, "position") ;
mgw.position = myMap.addAttribute<PFP::VEC3>(VERTEX, "position") ;
Dart d = myMap.newFace(4);
Dart e = myMap.newFace(3);
......@@ -415,10 +415,10 @@ int main(int argc, char **argv)
CGoGNerr <<"Import fail"<< CGoGNendl;
exit(1);
}
mgw.position = myMap.getAttribute<PFP::VEC3>(VERTEX_ORBIT, attrNames[0]) ;
mgw.position = myMap.getAttribute<PFP::VEC3>(VERTEX, attrNames[0]) ;
}
mgw.normal = myMap.addAttribute<PFP::VEC3>(VERTEX_ORBIT, "normal") ;
mgw.normal = myMap.addAttribute<PFP::VEC3>(VERTEX, "normal") ;
// pour le rendu
Geom::BoundingBox<PFP::VEC3> bb = Algo::Geometry::computeBoundingBox<PFP>(myMap, mgw.position) ;
......
......@@ -297,7 +297,7 @@ void maillageTest()
int main(int argc, char **argv)
{
//Initilisation du plongement geometrique
position = myMap.addAttribute<PFP::VEC3>(VERTEX_ORBIT, "position");
position = myMap.addAttribute<PFP::VEC3>(VERTEX, "position");
/*
* Chargement de maillages
......
......@@ -131,9 +131,9 @@ int main(int argc, char **argv)
return 1 ;
}
// cree un handler d'attribut pour la position des points (créé lors de l'import)
AttributeHandler<PFP::VEC3> position = myMap.getAttribute<PFP::VEC3>(VERTEX_ORBIT, attrNames[0]) ;
AttributeHandler<PFP::VEC3> position = myMap.getAttribute<PFP::VEC3>(VERTEX, attrNames[0]) ;
// cree un handler pour les normales aux sommets
AttributeHandler<PFP::VEC3> normal = myMap.addAttribute<PFP::VEC3>(VERTEX_ORBIT, "normal");
AttributeHandler<PFP::VEC3> normal = myMap.addAttribute<PFP::VEC3>(VERTEX, "normal");
// // parcours de tous les brins de la carte:
......@@ -148,7 +148,7 @@ int main(int argc, char **argv)
{
fonction_exemple<PFP>(myMap, position, d);
// marque tous les brins de la face de d
mf.markOrbit(FACE_ORBIT, d);
mf.markOrbit(FACE, d);
}
}
......
......@@ -127,7 +127,7 @@ void TriangulateFromDart(typename PFP::MAP& map, const AttributeHandler<typename
Dart e = d;
do
{
indices.push_back( map.getEmbedding(e,VERTEX_ORBIT) ); // recupere l'indice du point dans le handler
indices.push_back( map.getEmbedding(e,VERTEX) ); // recupere l'indice du point dans le handler
e = map.phi1(e); // brin suivant dans la face
} while (e != d); // tq par revenu au debut
......@@ -150,7 +150,7 @@ int main(int argc, char **argv)
// creation of a new attribute on vertices of type 3D vector
// a handler to this attribute is returned
AttributeHandler<PFP::VEC3> position = myMap.addAttribute<PFP::VEC3>(VERTEX_ORBIT, "position");
AttributeHandler<PFP::VEC3> position = myMap.addAttribute<PFP::VEC3>(VERTEX, "position");
// creation face 1 (convexe)
Dart d1 = myMap.newFace(5);
......
......@@ -179,7 +179,7 @@ void Viewer::importMesh(std::string& filename)
CGoGNerr << "could not import " << filename << CGoGNendl ;
return;
}
position = myMap.getAttribute<PFP::VEC3>(VERTEX_ORBIT, attrNames[0]) ;
position = myMap.getAttribute<PFP::VEC3>(VERTEX, attrNames[0]) ;
m_render->initPrimitives<PFP>(myMap, allDarts, Algo::Render::GL2::POINTS) ;
m_render->initPrimitives<PFP>(myMap, allDarts, Algo::Render::GL2::LINES) ;
......@@ -195,7 +195,7 @@ void Viewer::importMesh(std::string& filename)
vertexBaseSize = normalBaseSize * 2.0f ;
if(!normal.isValid())
normal = myMap.addAttribute<PFP::VEC3>(VERTEX_ORBIT, "normal") ;
normal = myMap.addAttribute<PFP::VEC3>(VERTEX, "normal") ;
Algo::Geometry::computeNormalVertices<PFP>(myMap, position, normal) ;
......
......@@ -586,14 +586,14 @@ int main(int argc, char **argv)
{
std::vector<std::string> attrNames ;
Algo::Import::importMesh<PFP>(myMap, argv[1], attrNames) ;
position = myMap.getAttribute<PFP::VEC3>(VERTEX_ORBIT, attrNames[0]) ;
normal = myMap.addAttribute<PFP::VEC3>(VERTEX_ORBIT, "normal");
position = myMap.getAttribute<PFP::VEC3>(VERTEX, attrNames[0]) ;
normal = myMap.addAttribute<PFP::VEC3>(VERTEX, "normal");
Algo::Geometry::computeNormalVertices<PFP>(myMap, position, normal) ;
}
else
{
position = myMap.addAttribute<PFP::VEC3>(VERTEX_ORBIT, "position");
normal = myMap.addAttribute<PFP::VEC3>(VERTEX_ORBIT, "normal");
position = myMap.addAttribute<PFP::VEC3>(VERTEX, "position");
normal = myMap.addAttribute<PFP::VEC3>(VERTEX, "normal");
createMap();
}
......
......@@ -130,7 +130,7 @@ int main(int argc, char **argv)
// creation of a new attribute on vertices of type 3D vector
// a handler to this attribute is returned
position = myMap.addAttribute<PFP::VEC3>(VERTEX_ORBIT, "position");
position = myMap.addAttribute<PFP::VEC3>(VERTEX, "position");
// affect a position to the vertices of the mesh
position[d1] = PFP::VEC3(0, 0, 0);
......
......@@ -148,7 +148,7 @@ int main(int argc, char **argv)
Dart d3 = myMap.newOrientedFace(4);
myMap.sewFaces(d2, d3);
position = myMap.addAttribute<Geom::Vec3f>(VERTEX_ORBIT, "position");
position = myMap.addAttribute<Geom::Vec3f>(VERTEX, "position");
position[d2] = PFP::VEC3(0.0f, 0.0f, 0.0f);
d2 = myMap.phi1(d2);
......@@ -175,7 +175,7 @@ int main(int argc, char **argv)
MapBrowserLinkedAuto<PFP::MAP>mbl(myMap);
// on ajoute un brin par sommet dans le browser
myMap.foreach_orbit(VERTEX_ORBIT, mbl);
myMap.foreach_orbit(VERTEX, mbl);
// et on parcours la sous-carte avec ce browser
TestDeParcoursAFF<PFP>(myMap, mbl, position);
......@@ -186,7 +186,7 @@ int main(int argc, char **argv)
CGoGNout << "Parcours avec le browser (le triangle)"<<CGoGNendl;
// on cree un attribut Dart pour la liste
AutoAttributeHandler<Dart> tableLink(myMap, DART_ORBIT);
AutoAttributeHandler<Dart> tableLink(myMap, DART);
// le browser
MapBrowserLinkedAttr<PFP::MAP>mbl2(tableLink);
// que l'on remplit a la main
......
......@@ -112,8 +112,8 @@ int main(int argc, char **argv)
Dart d3 = myMap.newOrientedFace(4);
myMap.sewFaces(d2,d3);
position = myMap.addAttribute<PFP::VEC3>(VERTEX_ORBIT, "position");
color = myMap.addAttribute<PFP::VEC3>(VERTEX_ORBIT, "couleur");
position = myMap.addAttribute<PFP::VEC3>(VERTEX, "position");
color = myMap.addAttribute<PFP::VEC3>(VERTEX, "couleur");
position[d2] = PFP::VEC3(0.0f, 0.0f, 0.0f);
color[d2] = PFP::VEC3(1.0f, 0.0f, 0.0f);
......@@ -139,11 +139,11 @@ int main(int argc, char **argv)
DartMarkerStore me(myMap);
// avec lesquels on peut marquer des orbits
mf.markOrbit(FACE_ORBIT, d2);
me.markOrbit(EDGE_ORBIT, d2);
mf.markOrbit(FACE, d2);
me.markOrbit(EDGE, d2);
// les sommet sont plonges, on peut utiliser un marqueur de cellule sommet
CellMarker cm(myMap, VERTEX_ORBIT);
CellMarker cm(myMap, VERTEX);
cm.mark(d3);
for (Dart d = myMap.begin(); d!= myMap.end(); myMap.next(d))
......@@ -204,8 +204,8 @@ int main(int argc, char **argv)
Dart dx = myMap2.newOrientedFace(4);
position2 = myMap2.addAttribute<PFP::VEC3>(VERTEX_ORBIT, "position");
color2 = myMap2.addAttribute<PFP::VEC3>(VERTEX_ORBIT, "couleur");
position2 = myMap2.addAttribute<PFP::VEC3>(VERTEX, "position");
color2 = myMap2.addAttribute<PFP::VEC3>(VERTEX, "couleur");
position2[dx] = PFP::VEC3(0.0f, 0.0f, 0.0f);
color2[dx] = PFP::VEC3(1.0f, 1.0f, 0.0f);
......
......@@ -140,7 +140,7 @@ void MyQT::slider_explode(int x)
int main(int argc, char **argv)
{
/// Utilisation des Marker
position = myMap.addAttribute<Geom::Vec3f>(VERTEX_ORBIT, "position");
position = myMap.addAttribute<Geom::Vec3f>(VERTEX, "position");
Algo::Modelisation::Polyhedron<PFP> prim3(myMap, position);
Dart d2 = prim3.tore_topo(16, 24);
......@@ -158,15 +158,15 @@ int main(int argc, char **argv)
// position[d3] = PFP::VEC3(2.0f, -2.0f, 0.0f);
// d3 = myMap.phi1(d3);
// unsigned int idAttV2 = myMap.addAttribute<float>(VERTEX_ORBIT,"reel");
// PFP::AttributeHandler<float> tableReels(idAttV2,VERTEX_ORBIT,myMap);
// unsigned int idAttV2 = myMap.addAttribute<float>(VERTEX,"reel");
// PFP::AttributeHandler<float> tableReels(idAttV2,VERTEX,myMap);
//
// tableReels[d2] = 3.5f;
// tableReels[myMap.phi1(d2)] = 3.7f;
//
// // Attention ici on cree un attribut de FACE donc les face sont maintenant plangees
// // l'attribut cree se detruira a la fin de la portee de l'objet
// PFP::MAP::AutoAttributeHandler<Geom::Vec3f> tableRGB(myMap, FACE_ORBIT, "RGB"); // "RGB" optionnel
// PFP::MAP::AutoAttributeHandler<Geom::Vec3f> tableRGB(myMap, FACE, "RGB"); // "RGB" optionnel
//
// tableRGB[d3] = Geom::Vec3f(1.0f,2.0f,3.0f);
//
......@@ -182,7 +182,7 @@ int main(int argc, char **argv)
// CGoGNout << "RGB["<<id<<"] = "<<tableRGB.at(id)<<CGoGNendl;
// }
CellMarkerStore cm(myMap, VERTEX_ORBIT);
CellMarkerStore cm(myMap, VERTEX);
Dart d3 = myMap.phi1(d2);
cm.mark(d2);
......
......@@ -125,7 +125,7 @@ void MyQT::animate()
void MyQT::storeVerticesInfo()
{
CellMarker mv(myMap,VERTEX_CELL);
CellMarker mv(myMap,VERTEX);
for (Dart d=myMap.begin(); d!=myMap.end(); myMap.next(d))
{
if (!mv.isMarked(d))
......@@ -282,7 +282,7 @@ void MyQT::cb_keyPress(int code)
int main(int argc, char **argv)
{
position = myMap.addAttribute<PFP::VEC3>(VERTEX_ORBIT, "position");
position = myMap.addAttribute<PFP::VEC3>(VERTEX, "position");
CGoGNout << 5.34 << " toto "<< Geom::Vec3f(2.5, 2.2, 4.3) << CGoGNendl;
CGoGNout << 3 << " tutu "<< 4 <<CGoGNendl;
......
......@@ -82,10 +82,10 @@ void MyQT::cb_Open()
}
// recuper l'attribut pour la position des points (créé lors de l'import)
position = myMap.getAttribute<PFP::VEC3>(VERTEX_ORBIT, attrNames[0]) ;
position = myMap.getAttribute<PFP::VEC3>(VERTEX, attrNames[0]) ;
if (!normal.isValid())
normal = myMap.addAttribute<PFP::VEC3>(VERTEX_ORBIT, "normal");
normal = myMap.addAttribute<PFP::VEC3>(VERTEX, "normal");
Algo::Geometry::computeNormalVertices<PFP>(myMap, position, normal) ;
......@@ -103,7 +103,7 @@ void MyQT::cb_Open()
void MyQT::cb_New()
{
if (!position.isValid())
position = myMap.addAttribute<PFP::VEC3>(VERTEX_ORBIT, "position");
position = myMap.addAttribute<PFP::VEC3>(VERTEX, "position");
// create a sphere
Algo::Modelisation::Polyhedron<PFP> prim(myMap, position);
......@@ -111,7 +111,7 @@ void MyQT::cb_New()
prim.embedSphere(10.0f);
if (!normal.isValid())
normal = myMap.addAttribute<PFP::VEC3>(VERTEX_ORBIT, "normal");