Commit 9e2a51e6 authored by Sylvain Thery's avatar Sylvain Thery

update cmakelist

parent 8dfb7849
...@@ -4,6 +4,14 @@ project(examplesD) ...@@ -4,6 +4,14 @@ project(examplesD)
SET(CMAKE_BUILD_TYPE Debug) SET(CMAKE_BUILD_TYPE Debug)
# FOR Qt4
FIND_PACKAGE(Qt4 REQUIRED)
SET(QT_USE_QTOPENGL TRUE)
INCLUDE(${QT_USE_FILE})
ADD_DEFINITIONS(${QT_DEFINITIONS})
# define includes path # define includes path
include_directories( include_directories(
/usr/include/libxml2/ /usr/include/libxml2/
...@@ -26,45 +34,48 @@ link_directories( ...@@ -26,45 +34,48 @@ link_directories(
#define exec to compile #define exec to compile
add_executable( miniTestD ../miniTest.cpp) #add_executable( miniTestD ../miniTest.cpp)
target_link_libraries( miniTestD #target_link_libraries( miniTestD
containerD topologyD utilsD algoD numerical lapack blas f2c ${COMMON_LIBS} ) # containerD topologyD utilsD algoD numerical lapack blas f2c ${COMMON_LIBS} )
add_executable( ViewerD ../Viewer.cpp) #add_executable( ViewerD ../Viewer.cpp)
target_link_libraries( ViewerD #target_link_libraries( ViewerD
containerD topologyD utilsD algoD ${COMMON_LIBS} ) # containerD topologyD utilsD algoD ${COMMON_LIBS} )
add_executable( simpleGMap2D ../simpleGMap2.cpp) #add_executable( simpleGMap2D ../simpleGMap2.cpp)
target_link_libraries( simpleGMap2D #target_link_libraries( simpleGMap2D
containerD topologyD utilsD algoD ${COMMON_LIBS} Zinri) # containerD topologyD utilsD algoD ${COMMON_LIBS} Zinri)
#add_executable( SimpleEMap3D ../simpleEMap3.cpp) #add_executable( SimpleEMap3D ../simpleEMap3.cpp)
#target_link_libraries( SimpleEMap3D #target_link_libraries( SimpleEMap3D
# containerD topologyD utilsD algoD ${COMMON_LIBS} ) # containerD topologyD utilsD algoD ${COMMON_LIBS} )
add_executable( triangulationD ../triangulation.cpp) #add_executable( triangulationD ../triangulation.cpp)
target_link_libraries( triangulationD #target_link_libraries( triangulationD
containerD topologyD utilsD algoD ${COMMON_LIBS} ) # containerD topologyD utilsD algoD ${COMMON_LIBS} )
add_executable( decimationVolumiqueD ../decimationVolumique.cpp) #add_executable( decimationVolumiqueD ../decimationVolumique.cpp)
target_link_libraries( decimationVolumiqueD #target_link_libraries( decimationVolumiqueD
containerD topologyD utilsD algoD numerical lapack blas f2c ${COMMON_LIBS} ) # containerD topologyD utilsD algoD numerical lapack blas f2c ${COMMON_LIBS} )
add_executable( ter_meshesD ../ter_meshes.cpp) #add_executable( ter_meshesD ../ter_meshes.cpp)
target_link_libraries( ter_meshesD #target_link_libraries( ter_meshesD
containerD topologyD utilsD algoD ${COMMON_LIBS} ) # containerD topologyD utilsD algoD ${COMMON_LIBS} )
add_executable( polyhedronsViewD ../polyhedronsView.cpp) QT4_WRAP_CPP(polyhedronsView_moc ../polyhedronsView.h)
add_executable( polyhedronsViewD ../polyhedronsView.cpp ${polyhedronsView_moc})
target_link_libraries( polyhedronsViewD target_link_libraries( polyhedronsViewD
containerD topologyD utilsD algoD ${COMMON_LIBS} ) ${CGoGN_LIBS_D} ${COMMON_LIBS} ${QT_LIBRARIES} )
add_executable( extrusionViewD ../extrusionView.cpp) QT4_WRAP_CPP(extrusionView_moc ../extrusionView.h)
add_executable( extrusionViewD ../extrusionView.cpp ${extrusionView_moc})
target_link_libraries( extrusionViewD target_link_libraries( extrusionViewD
containerD topologyD utilsD algoD ${COMMON_LIBS} ) ${CGoGN_LIBS_D} ${COMMON_LIBS} ${QT_LIBRARIES} )
add_executable( sceneD ../scene.cpp) #add_executable( sceneD ../scene.cpp)
target_link_libraries( sceneD #target_link_libraries( sceneD
containerD topologyD utilsD algoD ${COMMON_LIBS} ) # containerD topologyD utilsD algoD ${COMMON_LIBS} )
#add_executable( VizVolumeD ../VizVolume.cpp) #add_executable( VizVolumeD ../VizVolume.cpp)
......
...@@ -34,37 +34,37 @@ link_directories( ...@@ -34,37 +34,37 @@ link_directories(
#define exec to compile #define exec to compile
add_executable( miniTest ../miniTest.cpp) #add_executable( miniTest ../miniTest.cpp)
target_link_libraries( miniTest #target_link_libraries( miniTest
container topology utils algo numerical lapack blas f2c ${COMMON_LIBS} ) # container topology utils algo numerical lapack blas f2c ${COMMON_LIBS} )
add_executable( Viewer ../Viewer.cpp) #add_executable( Viewer ../Viewer.cpp)
target_link_libraries( Viewer #target_link_libraries( Viewer
container topology utils algo ${COMMON_LIBS} ) # container topology utils algo ${COMMON_LIBS} )
add_executable( simpleGMap2 ../simpleGMap2.cpp) #add_executable( simpleGMap2 ../simpleGMap2.cpp)
target_link_libraries( simpleGMap2 #target_link_libraries( simpleGMap2
container topology utils algo ${COMMON_LIBS} Zinri) # container topology utils algo ${COMMON_LIBS} Zinri)
# add_executable( hm_convexhull ../hm_convexhull.cpp) # add_executable( hm_convexhull ../hm_convexhull.cpp)
# target_link_libraries( hm_convexhull # target_link_libraries( hm_convexhull
# topology utils algo ${COMMON_LIBS}) # topology utils algo ${COMMON_LIBS})
add_executable( squelette3carte ../squelette3carte.cpp) #add_executable( squelette3carte ../squelette3carte.cpp)
target_link_libraries( squelette3carte #target_link_libraries( squelette3carte
container topology utils algo numerical lapack blas f2c ${COMMON_LIBS} ) # container topology utils algo numerical lapack blas f2c ${COMMON_LIBS} )
add_executable( decimationVolumique ../decimationVolumique.cpp) #add_executable( decimationVolumique ../decimationVolumique.cpp)
target_link_libraries( decimationVolumique #target_link_libraries( decimationVolumique
container topology utils algo numerical lapack blas f2c ${COMMON_LIBS} ) # container topology utils algo numerical lapack blas f2c ${COMMON_LIBS} )
add_executable( triangulation ../triangulation.cpp) #add_executable( triangulation ../triangulation.cpp)
target_link_libraries( triangulation #target_link_libraries( triangulation
container topology utils algo ${COMMON_LIBS} ) # container topology utils algo ${COMMON_LIBS} )
add_executable( ter_meshes ../ter_meshes.cpp) #add_executable( ter_meshes ../ter_meshes.cpp)
target_link_libraries( ter_meshes #target_link_libraries( ter_meshes
container topology utils algo ${COMMON_LIBS} ) # 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})
...@@ -76,6 +76,6 @@ add_executable( extrusionView ../extrusionView.cpp ${extrusionView_moc}) ...@@ -76,6 +76,6 @@ 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) #add_executable( scene ../scene.cpp)
target_link_libraries( scene #target_link_libraries( scene
container topology utils algo ${COMMON_LIBS} ) # container topology utils algo ${COMMON_LIBS} )
...@@ -6,6 +6,13 @@ SET(CMAKE_BUILD_TYPE Debug) ...@@ -6,6 +6,13 @@ SET(CMAKE_BUILD_TYPE Debug)
#SET (COMMON_LIBS ${GLUT_LIBRARY} ${OPENGL_LIBRARY} ${GLEW_LIBRARY} ${DEVIL_LIBRARIES} ${ZLIB_LIBRARIES} ${LIBXML2_LIBRARIES} gzstream AntTweakBar openctm) #SET (COMMON_LIBS ${GLUT_LIBRARY} ${OPENGL_LIBRARY} ${GLEW_LIBRARY} ${DEVIL_LIBRARIES} ${ZLIB_LIBRARIES} ${LIBXML2_LIBRARIES} gzstream AntTweakBar openctm)
# FOR Qt4
FIND_PACKAGE(Qt4 REQUIRED)
SET(QT_USE_QTOPENGL TRUE)
INCLUDE(${QT_USE_FILE})
ADD_DEFINITIONS(${QT_DEFINITIONS})
# define includes path # define includes path
include_directories( include_directories(
${CGoGN_ROOT_DIR}/include ${CGoGN_ROOT_DIR}/include
...@@ -30,11 +37,11 @@ link_directories( ...@@ -30,11 +37,11 @@ link_directories(
add_executable( Geom_orientationD ./Geom_orientation.cpp) add_executable( Geom_orientationD ./Geom_orientation.cpp)
target_link_libraries( Geom_orientationD target_link_libraries( Geom_orientationD
${COMMON_LIBS} ) ${CGoGN_LIBS_D} ${COMMON_LIBS} )
add_executable( Geom_inclusionD ./Geom_inclusion.cpp) add_executable( Geom_inclusionD ./Geom_inclusion.cpp)
target_link_libraries( Geom_inclusionD target_link_libraries( Geom_inclusionD
${COMMON_LIBS} ) ${CGoGN_LIBS_D} ${COMMON_LIBS} )
#add_executable( Algo_Geom_inclusionD ./Algo_Geom_inclusion.cpp) #add_executable( Algo_Geom_inclusionD ./Algo_Geom_inclusion.cpp)
......
...@@ -30,10 +30,10 @@ using namespace CGoGN; ...@@ -30,10 +30,10 @@ using namespace CGoGN;
int main() int main()
{ {
typedef Geom::Vec3f VEC3; typedef Geom::Vec3f VEC3;
CGoGNout << "Check Geometry/inclusion.h" << CGoGNendl; std::cout << "Check Geometry/inclusion.h" << std::endl;
CGoGNout << "Check Status : PARTIAL" << CGoGNendl; std::cout << "Check Status : PARTIAL" << std::endl;
CGoGNout << "Check isPointInTriangle : Start" << CGoGNendl; std::cout << "Check isPointInTriangle : Start" << std::endl;
VEC3 ta(0,0,0); VEC3 ta(0,0,0);
VEC3 tb(5,0,0); VEC3 tb(5,0,0);
VEC3 tc(0,5,0); VEC3 tc(0,5,0);
...@@ -45,51 +45,51 @@ int main() ...@@ -45,51 +45,51 @@ int main()
if(Geom::isPointInTriangle<VEC3>(pIn1,ta,tb,tc)!=Geom::FACE_INCLUSION) if(Geom::isPointInTriangle<VEC3>(pIn1,ta,tb,tc)!=Geom::FACE_INCLUSION)
{ {
CGoGNout << "ERROR : isPointInTriangle : face inclusion" << CGoGNendl; std::cout << "ERROR : isPointInTriangle : face inclusion" << std::endl;
} }
if(Geom::isPointInTriangle<VEC3>(pIn2,ta,tb,tc)!=Geom::EDGE_INCLUSION) if(Geom::isPointInTriangle<VEC3>(pIn2,ta,tb,tc)!=Geom::EDGE_INCLUSION)
{ {
CGoGNout << "ERROR : isPointInTriangle : edge inclusion" << CGoGNendl; std::cout << "ERROR : isPointInTriangle : edge inclusion" << std::endl;
} }
if(Geom::isPointInTriangle<VEC3>(pIn3,ta,tb,tc)!=Geom::EDGE_INCLUSION) if(Geom::isPointInTriangle<VEC3>(pIn3,ta,tb,tc)!=Geom::EDGE_INCLUSION)
{ {
CGoGNout << "ERROR : isPointInTriangle : edge inclusion" << CGoGNendl; std::cout << "ERROR : isPointInTriangle : edge inclusion" << std::endl;
} }
if(Geom::isPointInTriangle<VEC3>(pIn4,ta,tb,tc)!=Geom::EDGE_INCLUSION) if(Geom::isPointInTriangle<VEC3>(pIn4,ta,tb,tc)!=Geom::EDGE_INCLUSION)
{ {
CGoGNout << "ERROR : isPointInTriangle : edge inclusion" << CGoGNendl; std::cout << "ERROR : isPointInTriangle : edge inclusion" << std::endl;
} }
if(Geom::isPointInTriangle<VEC3>(ta,ta,tb,tc)!=Geom::VERTEX_INCLUSION) if(Geom::isPointInTriangle<VEC3>(ta,ta,tb,tc)!=Geom::VERTEX_INCLUSION)
{ {
CGoGNout << "ERROR : isPointInTriangle : vertex inclusion" << CGoGNendl; std::cout << "ERROR : isPointInTriangle : vertex inclusion" << std::endl;
} }
if(Geom::isPointInTriangle<VEC3>(pOut,ta,tb,tc)!=Geom::NO_INCLUSION) if(Geom::isPointInTriangle<VEC3>(pOut,ta,tb,tc)!=Geom::NO_INCLUSION)
{ {
CGoGNout << "ERROR : isPointInTriangle : no inclusion" << CGoGNendl; std::cout << "ERROR : isPointInTriangle : no inclusion" << std::endl;
} }
CGoGNout << "Check isPointInTriangle : Done" << CGoGNendl; std::cout << "Check isPointInTriangle : Done" << std::endl;
// Inclusion isSegmentInTriangle(const VEC3& P1, const VEC3& P2, const VEC3& Ta, const VEC3& Tb, const VEC3& Tc, const VEC3& N) ; // Inclusion isSegmentInTriangle(const VEC3& P1, const VEC3& P2, const VEC3& Ta, const VEC3& Tb, const VEC3& Tc, const VEC3& N) ;
// bool isPointInTetrahedron(VEC3 points[4], VEC3& point, bool CCW) ; // bool isPointInTetrahedron(VEC3 points[4], VEC3& point, bool CCW) ;
// bool isEdgeInOrIntersectingTetrahedron(VEC3 points[4], VEC3& point1, VEC3& point2, bool CCW) ; // bool isEdgeInOrIntersectingTetrahedron(VEC3 points[4], VEC3& point1, VEC3& point2, bool CCW) ;
CGoGNout << "Check arePointsEquals : Start" << CGoGNendl; std::cout << "Check arePointsEquals : Start" << std::endl;
VEC3 p1(0,0,0); VEC3 p1(0,0,0);
VEC3 p2(0.1,0.1,0.1); VEC3 p2(0.1,0.1,0.1);
if(!Geom::arePointsEquals<VEC3>(p1,p1) || !Geom::arePointsEquals<VEC3>(p2,p2) if(!Geom::arePointsEquals<VEC3>(p1,p1) || !Geom::arePointsEquals<VEC3>(p2,p2)
|| Geom::arePointsEquals<VEC3>(p1,p2) || Geom::arePointsEquals<VEC3>(p2,p1)) || Geom::arePointsEquals<VEC3>(p1,p2) || Geom::arePointsEquals<VEC3>(p2,p1))
{ {
CGoGNout << "ERROR : arePointsEquals" << CGoGNendl; std::cout << "ERROR : arePointsEquals" << std::endl;
} }
CGoGNout << "Check arePointsEquals : Done" << CGoGNendl; std::cout << "Check arePointsEquals : Done" << std::endl;
return 0; return 0;
} }
...@@ -6,8 +6,8 @@ using namespace CGoGN; ...@@ -6,8 +6,8 @@ using namespace CGoGN;
int main() int main()
{ {
typedef Geom::Vec3f VEC3; typedef Geom::Vec3f VEC3;
CGoGNout << "Check Geometry/orientation.h" << CGoGNendl; std::cout << "Check Geometry/orientation.h" << std::endl;
CGoGNout << "Check Status : PARTIAL" << CGoGNendl; std::cout << "Check Status : PARTIAL" << std::endl;
// OrientationLine testOrientationLines<VEC3>(const VEC3& a, const VEC3& b, const VEC3& c, const VEC3& d); // OrientationLine testOrientationLines<VEC3>(const VEC3& a, const VEC3& b, const VEC3& c, const VEC3& d);
...@@ -15,17 +15,17 @@ int main() ...@@ -15,17 +15,17 @@ int main()
// Orientation3D testOrientation3D<VEC3>(const VEC3& P, const VEC3& N, const VEC3& PP); // Orientation3D testOrientation3D<VEC3>(const VEC3& P, const VEC3& N, const VEC3& PP);
CGoGNout << "Check testOrientation2D : Start" << CGoGNendl; std::cout << "Check testOrientation2D : Start" << std::endl;
VEC3 p1(0,0,0); VEC3 p1(0,0,0);
VEC3 p2(5,0,0); VEC3 p2(5,0,0);
VEC3 p3(5,5,0); VEC3 p3(5,5,0);
VEC3 p4(5,10,0); VEC3 p4(5,10,0);
if(Geom::testOrientation2D<VEC3>(p3,p2,p1)!= Geom::RIGHT) { if(Geom::testOrientation2D<VEC3>(p3,p2,p1)!= Geom::RIGHT) {
CGoGNout << "ERROR : testOrientation2D : testRight" << CGoGNendl; std::cout << "ERROR : testOrientation2D : testRight" << std::endl;
} }
if(Geom::testOrientation2D<VEC3>(p1,p2,p3)!= Geom::LEFT) { if(Geom::testOrientation2D<VEC3>(p1,p2,p3)!= Geom::LEFT) {
CGoGNout << "ERROR : testOrientation2D : testLeft" << CGoGNendl; std::cout << "ERROR : testOrientation2D : testLeft" << std::endl;
} }
if(Geom::testOrientation2D<VEC3>(p4,p2,p3)!= Geom::ALIGNED if(Geom::testOrientation2D<VEC3>(p4,p2,p3)!= Geom::ALIGNED
...@@ -33,12 +33,12 @@ int main() ...@@ -33,12 +33,12 @@ int main()
|| Geom::testOrientation2D<VEC3>(p3,p2,p3)!= Geom::ALIGNED || Geom::testOrientation2D<VEC3>(p3,p2,p3)!= Geom::ALIGNED
|| Geom::testOrientation2D<VEC3>(p2,p2,p2)!= Geom::ALIGNED || Geom::testOrientation2D<VEC3>(p2,p2,p2)!= Geom::ALIGNED
) { ) {
CGoGNout << "ERROR : testOrientation2D : testAligned" << CGoGNendl; std::cout << "ERROR : testOrientation2D : testAligned" << std::endl;
} }
CGoGNout << "Check testOrientation2D : Done" << CGoGNendl; std::cout << "Check testOrientation2D : Done" << std::endl;
// bool isTetrahedronWellOriented<VEC3>(const VEC3 points[4], bool CCW = true) ; // bool isTetrahedronWellOriented<VEC3>(const VEC3 points[4], bool CCW = true) ;
return 0; return 0;
} }
\ No newline at end of file
...@@ -62,9 +62,9 @@ add_executable( tuto5 tuto5.cpp ${tuto5_ui} ${tuto5_moc}) ...@@ -62,9 +62,9 @@ add_executable( tuto5 tuto5.cpp ${tuto5_ui} ${tuto5_moc})
target_link_libraries( tuto5 target_link_libraries( tuto5
${CGoGN_LIBS_D} ${COMMON_LIBS} ${QT_LIBRARIES} ) ${CGoGN_LIBS_D} ${COMMON_LIBS} ${QT_LIBRARIES} )
add_executable( tuto_subdivision tuto_subdivision.cpp) #add_executable( tuto_subdivision tuto_subdivision.cpp)
target_link_libraries( tuto_subdivision #target_link_libraries( tuto_subdivision
${CGoGN_LIBS_D} ${COMMON_LIBS} ) # ${CGoGN_LIBS_D} ${COMMON_LIBS} )
QT4_WRAP_CPP(tp_master_moc tp_master.h) QT4_WRAP_CPP(tp_master_moc tp_master.h)
add_executable( tp_master tp_master.cpp ${tp_master_moc}) add_executable( tp_master tp_master.cpp ${tp_master_moc})
...@@ -81,6 +81,6 @@ add_executable( tuto_ogl3 tuto_ogl3.cpp ${tuto_ogl3_moc}) ...@@ -81,6 +81,6 @@ add_executable( tuto_ogl3 tuto_ogl3.cpp ${tuto_ogl3_moc})
target_link_libraries( tuto_ogl3 target_link_libraries( tuto_ogl3
${CGoGN_LIBS_D} ${COMMON_LIBS} ${QT_LIBRARIES} ) ${CGoGN_LIBS_D} ${COMMON_LIBS} ${QT_LIBRARIES} )
add_executable( tuto_ogl2 tuto_ogl2.cpp) #add_executable( tuto_ogl2 tuto_ogl2.cpp)
target_link_libraries( tuto_ogl2 #target_link_libraries( tuto_ogl2
${CGoGN_LIBS_D} ${COMMON_LIBS} ) # ${CGoGN_LIBS_D} ${COMMON_LIBS} )
...@@ -505,7 +505,7 @@ void MyQT::cb_keyPress(int keycode) ...@@ -505,7 +505,7 @@ void MyQT::cb_keyPress(int keycode)
Dart dd = myMap.phi2(d_edges[0]); Dart dd = myMap.phi2(d_edges[0]);
ss << "Arete: dart: " << d_edges[0].index<<" phi1: "<< myMap.phi1(d_edges[0]).index; ss << "Arete: dart: " << d_edges[0].index<<" phi1: "<< myMap.phi1(d_edges[0]).index;
if (dd != d_edges[0]) if (dd != d_edges[0])
ss << CGoGNendl<< " phi2: " << dd.index<<" phi1: "<< myMap.phi1(dd).index; ss << " phi2: " << dd.index<<" phi1: "<< myMap.phi1(dd).index;
statusMsg(ss.str().c_str()); statusMsg(ss.str().c_str());
updateGL(); updateGL();
} }
......
...@@ -37,7 +37,6 @@ ...@@ -37,7 +37,6 @@
#include "tuto2.h" #include "tuto2.h"
Utils::DrawerSimple* ds;
using namespace CGoGN ; using namespace CGoGN ;
...@@ -80,7 +79,6 @@ void MyQT::cb_initGL() ...@@ -80,7 +79,6 @@ void MyQT::cb_initGL()
m_with_lines=true; m_with_lines=true;
m_line_width=4.0; m_line_width=4.0;
ds = new Utils::DrawerSimple();
} }
...@@ -96,21 +94,6 @@ void MyQT::cb_redraw() ...@@ -96,21 +94,6 @@ void MyQT::cb_redraw()
glLineWidth(m_line_width); glLineWidth(m_line_width);
m_shader->setColor(Geom::Vec4f(1.,1.,0.,0.)); m_shader->setColor(Geom::Vec4f(1.,1.,0.,0.));
m_render->draw(m_shader, Algo::Render::GL2::LINES); m_render->draw(m_shader, Algo::Render::GL2::LINES);
glPointSize(5.0f);
float c = 0.0f;
ds->globalColor(Geom::Vec4f(1.0f , 0.0 ,0.,0.));
ds->begin(GL_POINTS);
ds->vertex(Geom::Vec3f(-1,-1,0));
ds->vertex(Geom::Vec3f(-1,4,0));
ds->vertex(Geom::Vec3f(4,4,0));
ds->vertex(Geom::Vec3f(4,-1,0));
ds->end();
ds->draw();
} }
glEnable(GL_POLYGON_OFFSET_FILL); glEnable(GL_POLYGON_OFFSET_FILL);
......
Markdown is supported
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