Commit 7085f8c9 authored by Thomas's avatar Thomas

particleCell3D

parents 539f92e2 2a524b67
...@@ -9,11 +9,10 @@ IF(WIN32) ...@@ -9,11 +9,10 @@ IF(WIN32)
add_subdirectory(Examples/Release) add_subdirectory(Examples/Release)
add_subdirectory(Tuto) add_subdirectory(Tuto)
ELSE(WIN32) ELSE(WIN32)
SET(CGoGN_LIBS_D topologyD algoD containerD utilsD) SET(CGoGN_LIBS_D topologyD algoD containerD utilsD)
add_subdirectory(Examples/Release) add_subdirectory(Examples/Release)
add_subdirectory(Examples/Debug) add_subdirectory(Examples/Debug)
add_subdirectory(Examples/Tests) add_subdirectory(Examples/Tests)
add_subdirectory(Tuto) add_subdirectory(Tuto)
ENDIF(WIN32) ENDIF(WIN32)
...@@ -10,10 +10,9 @@ SET(QT_USE_QTOPENGL TRUE) ...@@ -10,10 +10,9 @@ SET(QT_USE_QTOPENGL TRUE)
INCLUDE(${QT_USE_FILE}) INCLUDE(${QT_USE_FILE})
ADD_DEFINITIONS(${QT_DEFINITIONS}) ADD_DEFINITIONS(${QT_DEFINITIONS})
# define includes path # define includes path
include_directories( include_directories(
${CMAKE_CURRENT_BINARY_DIR}
/usr/include/libxml2/ /usr/include/libxml2/
${CGoGN_ROOT_DIR}/include ${CGoGN_ROOT_DIR}/include
${CGoGN_ROOT_DIR}/ThirdParty/Numerical ${CGoGN_ROOT_DIR}/ThirdParty/Numerical
...@@ -34,51 +33,19 @@ link_directories( ...@@ -34,51 +33,19 @@ link_directories(
#define exec to compile #define exec to compile
#add_executable( miniTestD ../miniTest.cpp)
#target_link_libraries( miniTestD
# containerD topologyD utilsD algoD numerical lapack blas f2c ${COMMON_LIBS} )
#add_executable( ViewerD ../Viewer.cpp)
#target_link_libraries( ViewerD
# containerD topologyD utilsD algoD ${COMMON_LIBS} )
#add_executable( simpleGMap2D ../simpleGMap2.cpp)
#target_link_libraries( simpleGMap2D
# containerD topologyD utilsD algoD ${COMMON_LIBS} Zinri)
#add_executable( SimpleEMap3D ../simpleEMap3.cpp)
#target_link_libraries( SimpleEMap3D
# containerD topologyD utilsD algoD ${COMMON_LIBS} )
#add_executable( triangulationD ../triangulation.cpp)
#target_link_libraries( triangulationD
# containerD topologyD utilsD algoD ${COMMON_LIBS} )
#add_executable( decimationVolumiqueD ../decimationVolumique.cpp)
#target_link_libraries( decimationVolumiqueD
# containerD topologyD utilsD algoD numerical lapack blas f2c ${COMMON_LIBS} )
#add_executable( ter_meshesD ../ter_meshes.cpp)
#target_link_libraries( ter_meshesD
# containerD topologyD utilsD algoD ${COMMON_LIBS} )
QT4_WRAP_CPP(polyhedronsView_moc ../polyhedronsView.h) QT4_WRAP_CPP(polyhedronsView_moc ../polyhedronsView.h)
add_executable( polyhedronsViewD ../polyhedronsView.cpp ${polyhedronsView_moc}) add_executable( polyhedronsViewD ../polyhedronsView.cpp ${polyhedronsView_moc})
target_link_libraries( polyhedronsViewD target_link_libraries( polyhedronsViewD
${CGoGN_LIBS_D} ${COMMON_LIBS} ${QT_LIBRARIES} ) ${CGoGN_LIBS_D} ${COMMON_LIBS} ${QT_LIBRARIES} )
QT4_WRAP_CPP(extrusionView_moc ../extrusionView.h) QT4_WRAP_CPP(extrusionView_moc ../extrusionView.h)
add_executable( extrusionViewD ../extrusionView.cpp ${extrusionView_moc}) add_executable( extrusionViewD ../extrusionView.cpp ${extrusionView_moc})
target_link_libraries( extrusionViewD target_link_libraries( extrusionViewD
${CGoGN_LIBS_D} ${COMMON_LIBS} ${QT_LIBRARIES} ) ${CGoGN_LIBS_D} ${COMMON_LIBS} ${QT_LIBRARIES} )
QT4_WRAP_UI( viewer_ui ../viewer.ui )
#add_executable( sceneD ../scene.cpp) QT4_WRAP_CPP( viewer_moc ../viewer.h )
#target_link_libraries( sceneD add_executable( viewerD ../viewer.cpp ${viewer_moc} ${viewer_ui})
# containerD topologyD utilsD algoD ${COMMON_LIBS} ) target_link_libraries( viewerD
${CGoGN_LIBS_D} ${NUMERICAL_LIBS} ${COMMON_LIBS} ${QT_LIBRARIES} )
#add_executable( VizVolumeD ../VizVolume.cpp)
#target_link_libraries( VizVolumeD
# containerD topologyD utilsD algoD ${COMMON_LIBS} Zinri)
...@@ -37,38 +37,6 @@ ENDIF(WIN32) ...@@ -37,38 +37,6 @@ ENDIF(WIN32)
#define exec to compile #define exec to compile
#add_executable( miniTest ../miniTest.cpp)
#target_link_libraries( miniTest
# container topology utils algo numerical lapack blas f2c ${COMMON_LIBS} )
#add_executable( Viewer ../Viewer.cpp)
#target_link_libraries( Viewer
# container topology utils algo ${COMMON_LIBS} )
#add_executable( simpleGMap2 ../simpleGMap2.cpp)
#target_link_libraries( simpleGMap2
# container topology utils algo ${COMMON_LIBS} Zinri)
# add_executable( hm_convexhull ../hm_convexhull.cpp)
# target_link_libraries( hm_convexhull
# topology utils algo ${COMMON_LIBS})
#add_executable( squelette3carte ../squelette3carte.cpp)
#target_link_libraries( squelette3carte
# container topology utils algo numerical lapack blas f2c ${COMMON_LIBS} )
#add_executable( decimationVolumique ../decimationVolumique.cpp)
#target_link_libraries( decimationVolumique
# container topology utils algo numerical lapack blas f2c ${COMMON_LIBS} )
#add_executable( triangulation ../triangulation.cpp)
#target_link_libraries( triangulation
# container topology utils algo ${COMMON_LIBS} )
#add_executable( ter_meshes ../ter_meshes.cpp)
#target_link_libraries( ter_meshes
# container topology utils algo ${COMMON_LIBS} )
QT4_WRAP_CPP(polyhedronsView_moc ../polyhedronsView.h) QT4_WRAP_CPP(polyhedronsView_moc ../polyhedronsView.h)
add_executable( polyhedronsView ../polyhedronsView.cpp ${polyhedronsView_moc}) add_executable( polyhedronsView ../polyhedronsView.cpp ${polyhedronsView_moc})
target_link_libraries( polyhedronsView target_link_libraries( polyhedronsView
...@@ -78,7 +46,10 @@ QT4_WRAP_CPP(extrusionView_moc ../extrusionView.h) ...@@ -78,7 +46,10 @@ QT4_WRAP_CPP(extrusionView_moc ../extrusionView.h)
add_executable( extrusionView ../extrusionView.cpp ${extrusionView_moc}) add_executable( extrusionView ../extrusionView.cpp ${extrusionView_moc})
target_link_libraries( extrusionView target_link_libraries( extrusionView
${CGoGN_LIBS_R} ${COMMON_LIBS} ${QT_LIBRARIES} ) ${CGoGN_LIBS_R} ${COMMON_LIBS} ${QT_LIBRARIES} )
#add_executable( scene ../scene.cpp) QT4_WRAP_UI( viewer_ui ../viewer.ui )
#target_link_libraries( scene QT4_WRAP_CPP( viewer_moc ../viewer.h )
# container topology utils algo ${COMMON_LIBS} ) add_executable( viewer ../viewer.cpp ${viewer_moc} ${viewer_ui})
target_link_libraries( viewer
${CGoGN_LIBS_R} ${NUMERICAL_LIBS} ${COMMON_LIBS} ${QT_LIBRARIES} )
...@@ -43,7 +43,7 @@ int main() ...@@ -43,7 +43,7 @@ int main()
std::cout << "Check Status : PARTIAL" << std::endl; std::cout << "Check Status : PARTIAL" << std::endl;
PFP::MAP map; 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); map.newFace(3);
PFP::VEC3 ta(0,0,0); PFP::VEC3 ta(0,0,0);
......
...@@ -332,7 +332,7 @@ int main(int argc, char **argv) ...@@ -332,7 +332,7 @@ int main(int argc, char **argv)
if (argc == 1) if (argc == 1)
{ {
position = myMap.addAttribute<Geom::Vec3f>(VERTEX_ORBIT, "position"); position = myMap.addAttribute<Geom::Vec3f>(VERTEX, "position");
CGoGNout <<"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"<<CGoGNendl; CGoGNout <<"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"<<CGoGNendl;
// typedef uint8 DATATYPE; // typedef uint8 DATATYPE;
...@@ -422,10 +422,10 @@ int main(int argc, char **argv) ...@@ -422,10 +422,10 @@ int main(int argc, char **argv)
// //
// GLint t1 = glutGet(GLUT_ELAPSED_TIME); // GLint t1 = glutGet(GLUT_ELAPSED_TIME);
// //
// myMap.getAttributeContainer(VERTEX_ORBIT).toggleProcess(position); // myMap.getAttributeContainer(VERTEX).toggleProcess(position);
//// myMap.getAttributeContainer(VERTEX_ORBIT).toggleProcess(idPipo); //// 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::setMap(myMap);
// PFP::MAP::EVertex ec(0); // PFP::MAP::EVertex ec(0);
// //
...@@ -433,7 +433,7 @@ int main(int argc, char **argv) ...@@ -433,7 +433,7 @@ int main(int argc, char **argv)
// GLfloat seconds = (t2 - t1) / 1000.0f; // GLfloat seconds = (t2 - t1) / 1000.0f;
// CGoGNout << "triangulation: "<< seconds << "sec" << CGoGNendl; // CGoGNout << "triangulation: "<< seconds << "sec" << CGoGNendl;
// //
// Marker m = myMap.getNewMarker(VERTEX_ORBIT); // Marker m = myMap.getNewMarker(VERTEX);
// myMap.markEmbVertex(myMap.begin(),m); // myMap.markEmbVertex(myMap.begin(),m);
// //
// Dart xd = myMap.alpha1(myMap.begin()); // Dart xd = myMap.alpha1(myMap.begin());
...@@ -447,8 +447,8 @@ int main(int argc, char **argv) ...@@ -447,8 +447,8 @@ int main(int argc, char **argv)
// CGoGNout << "Marke aussi"<< CGoGNendl; // CGoGNout << "Marke aussi"<< CGoGNendl;
// } // }
// //
// myMap.clearEmbMarkers(m,VERTEX_ORBIT); // myMap.clearEmbMarkers(m,VERTEX);
// myMap.releaseEmbMarker(m,VERTEX_ORBIT); // myMap.releaseEmbMarker(m,VERTEX);
// //
// } // }
else else
...@@ -462,7 +462,7 @@ int main(int argc, char **argv) ...@@ -462,7 +462,7 @@ int main(int argc, char **argv)
CGoGNerr << "could not import " << std::string(argv[1]) << CGoGNendl ; CGoGNerr << "could not import " << std::string(argv[1]) << CGoGNendl ;
exit(1); 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); GLint t1 = glutGet(GLUT_ELAPSED_TIME);
...@@ -474,10 +474,10 @@ int main(int argc, char **argv) ...@@ -474,10 +474,10 @@ int main(int argc, char **argv)
// Algo::Modelisation::CatmullClark<PFP, PFP::TVEC3, PFP::VEC3>(myMap,position); // 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::setMap(myMap);
// PFP::MAP::EVertex ec(0); // 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);
// 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) ...@@ -490,15 +490,15 @@ int main(int argc, char **argv)
CGoGNout << "subdiv: "<< seconds << "sec" << CGoGNendl; CGoGNout << "subdiv: "<< seconds << "sec" << CGoGNendl;
// myMap.getAttributeContainer(VERTEX_ORBIT).toggleProcess(position); // myMap.getAttributeContainer(VERTEX).toggleProcess(position);
// PFP::MAP::EVertex::setContainer(myMap.getAttributeContainer(VERTEX_ORBIT)); // PFP::MAP::EVertex::setContainer(myMap.getAttributeContainer(VERTEX));
// PFP::MAP::EVertex::setMap(myMap); // PFP::MAP::EVertex::setMap(myMap);
// PFP::MAP::EVertex ec(0); // 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); // 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 sommets topo: "<< myMap.getNbOrbits(0)<<CGoGNendl;
CGoGNout << "Nombre de faces topo: "<< myMap.getNbOrbits(2)<<CGoGNendl; CGoGNout << "Nombre de faces topo: "<< myMap.getNbOrbits(2)<<CGoGNendl;
...@@ -515,7 +515,7 @@ int main(int argc, char **argv) ...@@ -515,7 +515,7 @@ int main(int argc, char **argv)
bool inter = Algo::Geometry::areTrianglesInIntersection<PFP>(myMap,0,10,position) ; bool inter = Algo::Geometry::areTrianglesInIntersection<PFP>(myMap,0,10,position) ;
CGoGNout << "intersection = " << inter << CGoGNendl ; CGoGNout << "intersection = " << inter << CGoGNendl ;
normal = myMap.addAttribute<Geom::Vec3f>(VERTEX_ORBIT, "normals"); normal = myMap.addAttribute<Geom::Vec3f>(VERTEX, "normals");
// PFP::NORMAL normal(normal,myMap); // PFP::NORMAL normal(normal,myMap);
......
...@@ -235,9 +235,9 @@ void MyGlutWin::myKeyboard(unsigned char keycode, int x, int y) ...@@ -235,9 +235,9 @@ void MyGlutWin::myKeyboard(unsigned char keycode, int x, int y)
/** affichage **/ /** affichage **/
case 'd' : 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); GLint t1 = glutGet(GLUT_ELAPSED_TIME);
Algo::DecimationVolumique::decimate<PFP>(myMap, Algo::DecimationVolumique::S_Random, Algo::DecimationVolumique::A_Centroid, position, nbVertices * 0.75); 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) ...@@ -370,7 +370,7 @@ int main(int argc, char **argv)
} }
Algo::Import::importOFFWithELERegions<PFP>(myMap,argv[2],argv[3],attrNames); 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") else if(std::string(argv[1]) == "-tet")
{ {
...@@ -380,7 +380,7 @@ int main(int argc, char **argv) ...@@ -380,7 +380,7 @@ int main(int argc, char **argv)
} }
Algo::Import::importTet<PFP>(myMap, argv[2], attrNames); 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") else if(std::string(argv[1]) == "-ts")
{ {
...@@ -390,18 +390,18 @@ int main(int argc, char **argv) ...@@ -390,18 +390,18 @@ int main(int argc, char **argv)
} }
Algo::Import::importTs<PFP>(myMap,argv[2],attrNames); 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 else
{ {
maillageTest(); maillageTest();
} }
//CGoGNout << "Nb Tetrahedron = " << myMap.getNbOrbits(VOLUME_ORBIT) << CGoGNendl; //CGoGNout << "Nb Tetrahedron = " << myMap.getNbOrbits(VOLUME) << CGoGNendl;
// " / Nb Edges = " << myMap.getNbOrbits(EDGE_ORBIT) << // " / Nb Edges = " << myMap.getNbOrbits(EDGE) <<
// " / Nb Vertices = " << myMap.getNbOrbits(VERTEX_ORBIT) << CGoGNendl; // " / Nb Vertices = " << myMap.getNbOrbits(VERTEX) << CGoGNendl;
// un peu d'interface // un peu d'interface
MyGlutWin* mgw = new MyGlutWin(&argc,argv,1200,800); MyGlutWin* mgw = new MyGlutWin(&argc,argv,1200,800);
......
...@@ -109,7 +109,7 @@ int main(int argc, char **argv) ...@@ -109,7 +109,7 @@ int main(int argc, char **argv)
QApplication app(argc, argv); QApplication app(argc, argv);
MyQT sqt; 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) // define the face extruded (here a cross)
std::vector<PFP::VEC3> objV; std::vector<PFP::VEC3> objV;
......
...@@ -311,8 +311,8 @@ MyGlutWin::MyGlutWin(int* argc, char **argv, int winX, int winY) : ...@@ -311,8 +311,8 @@ MyGlutWin::MyGlutWin(int* argc, char **argv, int winX, int winY) :
void MyGlutWin::init() void MyGlutWin::init()
{ {
normal = myMap.addAttribute<PFP::VEC3>(VERTEX_ORBIT, "normal") ; normal = myMap.addAttribute<PFP::VEC3>(VERTEX, "normal") ;
laplacian = myMap.addAttribute<PFP::VEC3>(VERTEX_ORBIT, "laplacian") ; laplacian = myMap.addAttribute<PFP::VEC3>(VERTEX, "laplacian") ;
vbo_render = new Algo::Render::GL2::MapRender_VBO() ; vbo_render = new Algo::Render::GL2::MapRender_VBO() ;
updateVBOdata(Algo::Render::GL2::POSITIONS | Algo::Render::GL2::NORMALS) ; updateVBOdata(Algo::Render::GL2::POSITIONS | Algo::Render::GL2::NORMALS) ;
...@@ -489,12 +489,12 @@ void MyGlutWin::myKeyboard(unsigned char keycode, int x, int y) ...@@ -489,12 +489,12 @@ void MyGlutWin::myKeyboard(unsigned char keycode, int x, int y)
GLfloat seconds = (t2 - t1) / 1000.0f ; GLfloat seconds = (t2 - t1) / 1000.0f ;
CGoGNout << "sqrt3: "<< seconds << "sec" << CGoGNendl ; CGoGNout << "sqrt3: "<< seconds << "sec" << CGoGNendl ;
normal = myMap.getAttribute<PFP::VEC3>(VERTEX_ORBIT, "normal") ; normal = myMap.getAttribute<PFP::VEC3>(VERTEX, "normal") ;
if(!normal.isValid()) if(!normal.isValid())
normal = myMap.addAttribute<PFP::VEC3>(VERTEX_ORBIT, "normal") ; normal = myMap.addAttribute<PFP::VEC3>(VERTEX, "normal") ;
laplacian = myMap.getAttribute<PFP::VEC3>(VERTEX_ORBIT, "laplacian") ; laplacian = myMap.getAttribute<PFP::VEC3>(VERTEX, "laplacian") ;
if(!laplacian.isValid()) if(!laplacian.isValid())
laplacian = myMap.addAttribute<PFP::VEC3>(VERTEX_ORBIT, "laplacian") ; laplacian = myMap.addAttribute<PFP::VEC3>(VERTEX, "laplacian") ;
t1 = glutGet(GLUT_ELAPSED_TIME) ; t1 = glutGet(GLUT_ELAPSED_TIME) ;
...@@ -560,7 +560,7 @@ void MyGlutWin::myKeyboard(unsigned char keycode, int x, int y) ...@@ -560,7 +560,7 @@ void MyGlutWin::myKeyboard(unsigned char keycode, int x, int y)
case 's': case 's':
{ {
unsigned int nbVertices = myMap.getNbOrbits(VERTEX_ORBIT) ; unsigned int nbVertices = myMap.getNbOrbits(VERTEX) ;
GLint t1 = glutGet(GLUT_ELAPSED_TIME) ; GLint t1 = glutGet(GLUT_ELAPSED_TIME) ;
...@@ -586,9 +586,9 @@ void MyGlutWin::myKeyboard(unsigned char keycode, int x, int y) ...@@ -586,9 +586,9 @@ void MyGlutWin::myKeyboard(unsigned char keycode, int x, int y)
case 'd': 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()) 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) ; Algo::Geometry::computeCentroidFaces<PFP>(myMap, position, positionF) ;
GLint t1 = glutGet(GLUT_ELAPSED_TIME) ; GLint t1 = glutGet(GLUT_ELAPSED_TIME) ;
...@@ -601,12 +601,12 @@ void MyGlutWin::myKeyboard(unsigned char keycode, int x, int y) ...@@ -601,12 +601,12 @@ void MyGlutWin::myKeyboard(unsigned char keycode, int x, int y)
position = positionF ; position = positionF ;
normal = myMap.getAttribute<PFP::VEC3>(VERTEX_ORBIT, "normal") ; normal = myMap.getAttribute<PFP::VEC3>(VERTEX, "normal") ;
if(!normal.isValid()) if(!normal.isValid())
normal = myMap.addAttribute<PFP::VEC3>(VERTEX_ORBIT, "normal") ; normal = myMap.addAttribute<PFP::VEC3>(VERTEX, "normal") ;
laplacian = myMap.getAttribute<PFP::VEC3>(VERTEX_ORBIT, "laplacian") ; laplacian = myMap.getAttribute<PFP::VEC3>(VERTEX, "laplacian") ;
if(!laplacian.isValid()) if(!laplacian.isValid())
laplacian = myMap.addAttribute<PFP::VEC3>(VERTEX_ORBIT, "laplacian") ; laplacian = myMap.addAttribute<PFP::VEC3>(VERTEX, "laplacian") ;
t1 = glutGet(GLUT_ELAPSED_TIME) ; t1 = glutGet(GLUT_ELAPSED_TIME) ;
...@@ -649,12 +649,12 @@ void MyGlutWin::myKeyboard(unsigned char keycode, int x, int y) ...@@ -649,12 +649,12 @@ void MyGlutWin::myKeyboard(unsigned char keycode, int x, int y)
case '9': case '9':
{ {
CellMarker markVisit(myMap, VERTEX_CELL) ; CellMarker markVisit(myMap, VERTEX) ;
CellMarker markNoDelete(myMap, VERTEX_CELL) ; CellMarker markNoDelete(myMap, VERTEX) ;
std::vector<Dart> visited ; std::vector<Dart> visited ;
visited.reserve(myMap.getNbCells(VERTEX_CELL)) ; visited.reserve(myMap.getNbCells(VERTEX)) ;
visited.push_back(myMap.begin()) ; visited.push_back(myMap.begin()) ;
markVisit.mark(myMap.begin()) ; markVisit.mark(myMap.begin()) ;
...@@ -811,7 +811,7 @@ int main(int argc, char** argv) ...@@ -811,7 +811,7 @@ int main(int argc, char** argv)
return 1 ; 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) ; GLint t2 = glutGet(GLUT_ELAPSED_TIME) ;
GLfloat seconds = (t2 - t1) / 1000.0f ; GLfloat seconds = (t2 - t1) / 1000.0f ;
CGoGNout << "import: " << seconds << " sec" << CGoGNendl ; CGoGNout << "import: " << seconds << " sec" << CGoGNendl ;
...@@ -820,9 +820,9 @@ int main(int argc, char** argv) ...@@ -820,9 +820,9 @@ int main(int argc, char** argv)
// myMap.closeMap(m) ; // myMap.closeMap(m) ;
} }
CGoGNout << myMap.getNbOrbits(VERTEX_ORBIT) << CGoGNendl ; CGoGNout << myMap.getNbOrbits(VERTEX) << CGoGNendl ;
CGoGNout << myMap.getNbOrbits(EDGE_ORBIT) << CGoGNendl ; CGoGNout << myMap.getNbOrbits(EDGE) << CGoGNendl ;
CGoGNout << myMap.getNbOrbits(FACE_ORBIT) << CGoGNendl ; CGoGNout << myMap.getNbOrbits(FACE) << CGoGNendl ;
// compute width and position of object for centering // compute width and position of object for centering
Geom::BoundingBox<PFP::VEC3> bb = Algo::Geometry::computeBoundingBox<PFP>(myMap, mgw->position) ; Geom::BoundingBox<PFP::VEC3> bb = Algo::Geometry::computeBoundingBox<PFP>(myMap, mgw->position) ;
......
...@@ -99,7 +99,7 @@ int main(int argc, char **argv) ...@@ -99,7 +99,7 @@ int main(int argc, char **argv)
QApplication app(argc, argv); QApplication app(argc, argv);
MyQT sqt; MyQT sqt;
PFP::TVEC3 position = myMap.addAttribute<PFP::VEC3>(VERTEX_ORBIT, "position") ; PFP::TVEC3 position = myMap.addAttribute<PFP::VEC3>(VERTEX, "position") ;
// create a cylinder // create a cylinder
Algo::Modelisation::Polyhedron<PFP> prim1(myMap, position); Algo::Modelisation::Polyhedron<PFP> prim1(myMap, position);
......
...@@ -211,8 +211,8 @@ int main(int argc, char **argv) ...@@ -211,8 +211,8 @@ int main(int argc, char **argv)
myGlutWin mgw(&argc,argv,800,800); myGlutWin mgw(&argc,argv,800,800);
mgw.init(); mgw.init();
mgw.position = myMap.addAttribute<PFP::VEC3>(VERTEX_ORBIT, "position") ; mgw.position = myMap.addAttribute<PFP::VEC3>(VERTEX, "position") ;
mgw.normal = myMap.addAttribute<PFP::VEC3>(VERTEX_ORBIT, "normal") ; mgw.normal = myMap.addAttribute<PFP::VEC3>(VERTEX, "normal") ;
glewInit(); glewInit();
if (! Utils::GLSLShader::areShadersSupported()) if (! Utils::GLSLShader::areShadersSupported())
...@@ -229,7 +229,7 @@ int main(int argc, char **argv) ...@@ -229,7 +229,7 @@ int main(int argc, char **argv)
prim1.cylinder_topo(16,15, true, true); prim1.cylinder_topo(16,15, true, true);
prim1.embedCylinder(30.0f,20.0f,50.0f); prim1.embedCylinder(30.0f,20.0f,50.0f);
CellMarker mark1(myMap,VERTEX_CELL); CellMarker mark1(myMap,VERTEX);
prim1.mark(mark1); prim1.mark(mark1);