Commit eaf23de4 authored by Pierre Kraemer's avatar Pierre Kraemer

remove Numerical libs (except Eigen)

parent 222b9959

Too many changes to show.

To preserve performance only 143 of 143+ files are displayed.

SET(EXECUTABLE_OUTPUT_PATH ${CGoGN_ROOT_DIR}/bin)
# FOR Qt4
#SET(QT_USE_QTOPENGL TRUE)
#INCLUDE(${QT_USE_FILE})
#ADD_DEFINITIONS(${QT_DEFINITIONS})
IF (ONELIB)
SET(CGoGN_LIBS_R cgogn)
ELSE (ONELIB)
......@@ -36,4 +31,3 @@ IF (WITH_QT)
ENDIF (WITH_QT)
add_subdirectory(Examples/Tests)
......@@ -15,7 +15,7 @@ include_directories(
# define libs path
IF(WIN32)
link_directories( ${CGoGN_ROOT_DIR}/lib/$(ConfigurationName) ${Boost_LIBRARY_DIRS})
link_directories( ${CGoGN_ROOT_DIR}/lib/$(ConfigurationName) ${Boost_LIBRARY_DIRS} )
ELSE(WIN32)
link_directories( ${CGoGN_ROOT_DIR}/lib/Release )
ENDIF(WIN32)
......@@ -23,46 +23,46 @@ ENDIF(WIN32)
#define exec to compile
QT4_WRAP_CPP(frame_manip_moc ../frame_manip.h)
add_executable( frame_manip ../frame_manip.cpp ${frame_manip_moc})
target_link_libraries( frame_manip ${CGoGN_LIBS_R} ${CGoGN_EXT_LIBS} )
QT4_WRAP_CPP( frame_manip_moc ../frame_manip.h )
add_executable( frame_manip ../frame_manip.cpp ${frame_manip_moc} )
target_link_libraries( frame_manip ${CGoGN_LIBS_R} ${CGoGN_EXT_LIBS} )
QT4_WRAP_CPP(texturesExample_moc ../texturesExample.h)
QT4_WRAP_CPP( texturesExample_moc ../texturesExample.h )
add_executable( texturesExample ../texturesExample.cpp ${texturesExample_moc} )
target_link_libraries( texturesExample ${CGoGN_LIBS_R} ${CGoGN_EXT_LIBS} )
target_link_libraries( texturesExample ${CGoGN_LIBS_R} ${CGoGN_EXT_LIBS} )
QT4_WRAP_CPP(simpleGMap2_moc ../simpleGMap2.h)
QT4_WRAP_CPP( simpleGMap2_moc ../simpleGMap2.h )
add_executable( simpleGMap2 ../simpleGMap2.cpp ${simpleGMap2_moc} )
target_link_libraries( simpleGMap2 ${CGoGN_LIBS_R} ${CGoGN_EXT_LIBS} )
QT4_WRAP_CPP(simpleGMap3_moc ../simpleGMap3.h)
QT4_WRAP_CPP( simpleGMap3_moc ../simpleGMap3.h )
add_executable( simpleGMap3 ../simpleGMap3.cpp ${simpleGMap3_moc} )
target_link_libraries( simpleGMap3 ${CGoGN_LIBS_R} ${CGoGN_EXT_LIBS} )
QT4_WRAP_CPP(extrusionView_moc ../extrusionView.h)
add_executable( extrusionView ../extrusionView.cpp ${extrusionView_moc})
target_link_libraries( extrusionView ${CGoGN_LIBS_R} ${CGoGN_EXT_LIBS} )
QT4_WRAP_CPP( extrusionView_moc ../extrusionView.h )
add_executable( extrusionView ../extrusionView.cpp ${extrusionView_moc} )
target_link_libraries( extrusionView ${CGoGN_LIBS_R} ${CGoGN_EXT_LIBS} )
QT4_WRAP_UI( viewer_ui ../viewer.ui )
QT4_WRAP_CPP( viewer_moc ../viewer.h )
add_executable( viewer ../viewer.cpp ${viewer_moc} ${viewer_ui})
add_executable( viewer ../viewer.cpp ${viewer_moc} ${viewer_ui} )
target_link_libraries( viewer ${CGoGN_LIBS_R} ${NUMERICAL_LIBS} ${CGoGN_EXT_LIBS} )
QT4_WRAP_UI( clipping_ui ../clipping.ui )
QT4_WRAP_CPP( clipping_moc ../clipping.h )
add_executable( clipping ../clipping.cpp ${clipping_ui} ${clipping_moc})
target_link_libraries( clipping ${CGoGN_LIBS_R} ${CGoGN_EXT_LIBS} )
add_executable( clipping ../clipping.cpp ${clipping_ui} ${clipping_moc} )
target_link_libraries( clipping ${CGoGN_LIBS_R} ${CGoGN_EXT_LIBS} )
QT4_WRAP_UI( volumeExplorer_ui ../volumeExplorer.ui )
QT4_WRAP_CPP( volumeExplorer_moc ../volumeExplorer.h )
add_executable( volumeExplorer ../volumeExplorer.cpp ${volumeExplorer_ui} ${volumeExplorer_moc})
target_link_libraries( volumeExplorer ${CGoGN_LIBS_R} ${CGoGN_EXT_LIBS} )
add_executable( volumeExplorer ../volumeExplorer.cpp ${volumeExplorer_ui} ${volumeExplorer_moc} )
target_link_libraries( volumeExplorer ${CGoGN_LIBS_R} ${CGoGN_EXT_LIBS} )
QT4_WRAP_UI( mcmesh_ui ../mcmesh.ui )
QT4_WRAP_CPP( mcmesh_moc ../mcmesh.h )
add_executable( mcmesh ../mcmesh.cpp ${mcmesh_moc} ${mcmesh_ui} )
target_link_libraries( mcmesh ${CGoGN_LIBS_R} ${CGoGN_EXT_LIBS})
target_link_libraries( mcmesh ${CGoGN_LIBS_R} ${CGoGN_EXT_LIBS} )
QT4_WRAP_CPP( concave_rendering_moc ../concave_rendering.h )
add_executable( concave_rendering ../concave_rendering.cpp ${concave_rendering_moc} ${concave_rendering_ui} )
target_link_libraries( concave_rendering ${CGoGN_LIBS_R} ${CGoGN_EXT_LIBS})
target_link_libraries( concave_rendering ${CGoGN_LIBS_R} ${CGoGN_EXT_LIBS} )
......@@ -2,28 +2,30 @@ cmake_minimum_required(VERSION 2.8)
project(CGoGN)
#SET( CMAKE_VERBOSE_MAKEFILE 1 )
#SET ( CMAKE_VERBOSE_MAKEFILE 1 )
SET(CGoGN_ROOT_DIR ${CMAKE_SOURCE_DIR})
SET ( CGoGN_ROOT_DIR ${CMAKE_SOURCE_DIR} )
# for GLEW
SET(CMAKE_MODULE_PATH ${CGoGN_ROOT_DIR}/cmake_modules/)
SET ( CMAKE_MODULE_PATH ${CGoGN_ROOT_DIR}/cmake_modules/ )
# for shared or not shared
SET ( BUILD_SHARED_LIBS OFF CACHE BOOL "if used all library are build as shared type (.so /dylib/dll).")
SET ( WITH_ASSIMP ON CACHE BOOL "build CGoGN with Assimp ")
SET ( WITH_ZINRI ON CACHE BOOL "build CGoGN with Zinri lib ")
SET ( WITH_QT ON CACHE BOOL "build CGoGN with Qt lib ")
SET ( WITH_NUMERICAL ON CACHE BOOL "build CGoGN with Numerical libs support ")
SET ( BUILD_SHARED_LIBS OFF CACHE BOOL "if used all library are build as shared type (.so/.dylib/.dll)" )
SET ( WITH_ASSIMP ON CACHE BOOL "build CGoGN with Assimp" )
SET ( WITH_ZINRI ON CACHE BOOL "build CGoGN with Zinri lib" )
SET ( WITH_QT ON CACHE BOOL "build CGoGN with Qt lib" )
# for CGoGN MR
SET ( FORCE_MR "0" CACHE STRING "0: normal mode / 1 multires mode")
SET ( FORCE_MR "0" CACHE STRING "0: normal mode / 1 multires mode" )
#create one big lib
SET ( ONELIB OFF CACHE BOOL "build CGoGN in one lib")
SET ( WITH_GLEWMX OFF CACHE BOOL "use multi-contex GLEW")
SET ( ONELIB OFF CACHE BOOL "build CGoGN in one lib" )
SET ( WITH_GLEWMX OFF CACHE BOOL "use multi-contex GLEW" )
IF(WIN32)
set(CMAKE_PREFIX_PATH ${CGoGN_ROOT_DIR}/windows_dependencies CACHE STRING "path to dependencies")
SET ( CMAKE_PREFIX_PATH ${CGoGN_ROOT_DIR}/windows_dependencies CACHE STRING "path to dependencies" )
ENDIF(WIN32)
find_package(OpenGL REQUIRED)
......@@ -32,14 +34,12 @@ find_package(ZLIB REQUIRED)
find_package(LibXml2 REQUIRED)
find_package(GLEW REQUIRED)
IF (DEFINED ASSERTON)
add_definitions(-DCGOGN_ASSERT_BOOL=${ASSERTON})
ELSE (DEFINED ASSERTON)
add_definitions(-DCGOGN_ASSERT_BOOL=false)
ENDIF (DEFINED ASSERTON)
IF (FORCE_MR EQUAL 0)
file(WRITE ${CGoGN_ROOT_DIR}/include/cgogn_mr.h "0" )
ENDIF (FORCE_MR EQUAL 0)
......@@ -49,14 +49,12 @@ IF (FORCE_MR EQUAL 1)
file(WRITE ${CGoGN_ROOT_DIR}/include/cgogn_mr.h "1" )
ENDIF (FORCE_MR EQUAL 1)
IF (ONELIB)
file(WRITE ${CGoGN_ROOT_DIR}/include/cgogn_onelib.h "1" )
ELSE (ONELIB)
file(WRITE ${CGoGN_ROOT_DIR}/include/cgogn_onelib.h "0" )
ENDIF (ONELIB)
IF (WITH_GLEWMX)
file(WRITE ${CGoGN_ROOT_DIR}/include/cgogn_gmx.h "1" )
ELSE (WITH_GLEWMX)
......@@ -64,48 +62,47 @@ ELSE (WITH_GLEWMX)
ENDIF (WITH_GLEWMX)
add_definitions(-DSHADERPATH="${CGoGN_ROOT_DIR}/lib/Shaders/")
# define includes of external libs
SET(CGoGN_EXT_INCLUDES
${CGoGN_ROOT_DIR}/ThirdParty/glm
SET (CGoGN_EXT_INCLUDES
${CGoGN_ROOT_DIR}/ThirdParty/include
${OPENGL_INCLUDE_DIR}
${GLEW_INCLUDE_DIRS}
${ZLIB_INCLUDE_DIRS}
${LIBXML2_INCLUDE_DIR}
${Boost_INCLUDE_DIRS} )
${Boost_INCLUDE_DIRS}
)
# define libs for external libs
SET (CGoGN_EXT_LIBS
SET (CGoGN_EXT_LIBS
${OPENGL_LIBRARY}
${GLEW_LIBRARIES}
${ZLIB_LIBRARIES}
${LIBXML2_LIBRARIES}
${Boost_SYSTEM_LIBRARY}
${Boost_REGEX_LIBRARY}
${Boost_THREAD_LIBRARY} )
${Boost_THREAD_LIBRARY}
)
#optionnal libs
IF (WITH_ASSIMP)
add_definitions(-DWITH_ASSIMP)
SET (CGoGN_EXT_INCLUDES ${CGoGN_EXT_INCLUDES} ${CGoGN_ROOT_DIR}/ThirdParty/Assimp/include)
SET (CGoGN_EXT_LIBS ${CGoGN_EXT_LIBS} assimp)
INSTALL (DIRECTORY ThirdParty/Assimp/include DESTINATION .)
ENDIF (WITH_ASSIMP)
IF (WITH_ZINRI)
add_definitions(-DWITH_ZINRI)
SET (CGoGN_EXT_INCLUDES ${CGoGN_EXT_INCLUDES} ${CGoGN_ROOT_DIR}/ThirdParty/Zinri)
SET (CGoGN_EXT_LIBS ${CGoGN_EXT_LIBS} Zinri)
INSTALL (DIRECTORY ThirdParty/Zinri/ DESTINATION include FILES_MATCHING PATTERN "*.h")
ENDIF (WITH_ZINRI)
IF (WITH_QT)
add_definitions(-DWITH_QT)
SET(QT_USE_QTOPENGL TRUE)
SET(QT_USE_QTSVG TRUE)
find_package(Qt4 REQUIRED)
add_definitions(-DWITH_QT)
INCLUDE(${QT_USE_FILE})
ADD_DEFINITIONS(${QT_DEFINITIONS})
SET (CGoGN_EXT_INCLUDES ${CGoGN_EXT_INCLUDES} ${QT_INCLUDE_DIR})
......@@ -116,17 +113,6 @@ IF (WITH_GLEWMX)
ADD_DEFINITIONS(-DGLEW_MX)
ENDIF (WITH_GLEWMX)
#IF (WITH_NUMERICAL)
# add_definitions(-DWITH_NUMERICAL)
# SET (CGoGN_NUMERICAL_INCLUDES ${CGoGN_ROOT_DIR}/ThirdParty/Numerical ${CGoGN_ROOT_DIR}/ThirdParty/Numerical/UFconfig)
# SET (CGoGN_NUMERICAL_LIBS f2c blas numerical lapack)
#ENDIF (WITH_NUMERICAL)
IF (WITH_NUMERICAL)
INSTALL(FILES ThirdParty/Numerical/UFconfig/UFconfig.h DESTINATION include )
INSTALL(DIRECTORY ThirdParty/Numerical/ DESTINATION include FILES_MATCHING PATTERN "*.h")
INSTALL(DIRECTORY ThirdParty/Numerical/ DESTINATION include FILES_MATCHING PATTERN "*.hpp")
ENDIF (WITH_NUMERICAL)
# qq definition specifiques pour mac
IF(APPLE)
......@@ -153,7 +139,6 @@ ELSE(WIN32)
ENDIF(WIN32)
INSTALL (DIRECTORY ${CGoGN_ROOT_DIR}/include ${CGoGN_ROOT_DIR}/lib ${CGoGN_ROOT_DIR}/bin DESTINATION .)
INSTALL (DIRECTORY ThirdParty/glm/glm DESTINATION include)
INSTALL (DIRECTORY ThirdParty/glm DESTINATION include)
INSTALL (DIRECTORY cmake_modules DESTINATION .)
INSTALL (FILES apps_cmake.txt DESTINATION .)
......@@ -26,7 +26,6 @@ file(
${CGoGN_ROOT_DIR}/include/Topology/*.h
)
file(
GLOB_RECURSE
files_container
......@@ -35,7 +34,6 @@ file(
${CGoGN_ROOT_DIR}/include/Container/*.h
)
file(
GLOB_RECURSE
files_algo
......@@ -45,9 +43,7 @@ file(
${CGoGN_ROOT_DIR}/include/Algo/*.h
)
file(
# GLOB_RECURSE
GLOB
shaders_srcD
${CGoGN_ROOT_DIR}/include/Utils/*.frag
......@@ -58,6 +54,7 @@ file(
${CGoGN_ROOT_DIR}/include/Utils/Shaders/*.geom
)
IF(WIN32)
add_custom_target(shader_targetD ${CGoGN_ROOT_DIR}/ThirdParty/bin/Release/shader_to_h ${shaders_srcD}
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
......@@ -70,7 +67,6 @@ ELSE(WIN32)
ENDIF(WIN32)
file(
GLOB # WARNING NO MORE RECURSE TO AVOID TAKING QT FILES
files_utils
......@@ -89,7 +85,8 @@ IF(WITH_QT)
files_utils_qt
${CGoGN_ROOT_DIR}/src/Utils/Qt/*.cpp
${CGoGN_ROOT_DIR}/include/Utils/Qt/*.hpp
${CGoGN_ROOT_DIR}/include/Utils/Qt/*.h )
${CGoGN_ROOT_DIR}/include/Utils/Qt/*.h
)
file(
GLOB
utils_qt_headers
......@@ -97,15 +94,14 @@ IF(WITH_QT)
${CGoGN_ROOT_DIR}/include/Utils/Qt/qtSimple.h
${CGoGN_ROOT_DIR}/include/Utils/Qt/qtpopup.h
${CGoGN_ROOT_DIR}/include/Utils/Qt/qthistodraw.h
${CGoGN_ROOT_DIR}/include/Utils/Qt/qtcolorschooser.h )
${CGoGN_ROOT_DIR}/include/Utils/Qt/qtcolorschooser.h
)
QT4_WRAP_CPP(UTILS_QT_HEADERS_MOC ${utils_qt_headers})
SET (files_utils_withQt ${files_utils} ${files_utils_qt} ${UTILS_QT_HEADERS_MOC})
ENDIF (WITH_QT)
IF (ONELIB)
IF(WITH_QT)
add_library( cgognD ${files_topology} ${files_container} ${files_algo} ${files_utils_withQt})
......
......@@ -42,9 +42,7 @@ file(
${CGoGN_ROOT_DIR}/include/Algo/*.h
)
file(
# GLOB_RECURSE
GLOB
shaders_src
${CGoGN_ROOT_DIR}/include/Utils/*.frag
......@@ -66,6 +64,7 @@ ELSE(WIN32)
SOURCES ${shaders_src} )
ENDIF(WIN32)
file(
GLOB # WARNING NO MORE RECURSE TO AVOID TAKING QT FILES
files_utils
......@@ -79,13 +78,13 @@ file(
)
IF(WITH_QT)
file(
GLOB
files_utils_qt
${CGoGN_ROOT_DIR}/src/Utils/Qt/*.cpp
${CGoGN_ROOT_DIR}/include/Utils/Qt/*.hpp
${CGoGN_ROOT_DIR}/include/Utils/Qt/*.h )
${CGoGN_ROOT_DIR}/include/Utils/Qt/*.h
)
file(
GLOB
utils_qt_headers
......@@ -93,15 +92,14 @@ IF(WITH_QT)
${CGoGN_ROOT_DIR}/include/Utils/Qt/qtSimple.h
${CGoGN_ROOT_DIR}/include/Utils/Qt/qtpopup.h
${CGoGN_ROOT_DIR}/include/Utils/Qt/qthistodraw.h
${CGoGN_ROOT_DIR}/include/Utils/Qt/qtcolorschooser.h )
${CGoGN_ROOT_DIR}/include/Utils/Qt/qtcolorschooser.h
)
QT4_WRAP_CPP(UTILS_QT_HEADERS_MOC ${utils_qt_headers})
SET (files_utils_withQt ${files_utils} ${files_utils_qt} ${UTILS_QT_HEADERS_MOC})
ENDIF (WITH_QT)
IF (ONELIB)
IF(WITH_QT)
add_library( cgogn ${files_topology} ${files_container} ${files_algo} ${files_utils_withQt})
......
......@@ -2,20 +2,102 @@ cmake_minimum_required(VERSION 2.8)
project(SCHNApps)
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -fPIC")
SET(CGoGN_ROOT_DIR ${CMAKE_SOURCE_DIR}/.. CACHE STRING "CGoGN root dir")
SET(CMAKE_MODULE_PATH ${CGoGN_ROOT_DIR}/cmake_modules/)
find_package(OpenGL REQUIRED)
find_package(Boost COMPONENTS regex thread system REQUIRED)
find_package(ZLIB REQUIRED)
find_package(LibXml2 REQUIRED)
find_package(GLEW REQUIRED)
find_package(Qt4 REQUIRED)
find_package(QGLViewer REQUIRED)
find_package(PythonLibs REQUIRED)
SET( QT_USE_QTOPENGL TRUE )
SET( QT_USE_QTXML TRUE )
SET( QT_USE_QTDESIGNER TRUE )
SET( QT_USE_QTGUI TRUE )
SET( QT_USE_QTPLUGIN TRUE )
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -fPIC")
INCLUDE(${QT_USE_FILE})
ADD_DEFINITIONS(${QT_DEFINITIONS})
file(STRINGS ${CGoGN_ROOT_DIR}/include/cgogn_mr.h FORCE_MR)
IF (FORCE_MR EQUAL 1)
add_definitions(-DCGoGN_FORCE_MR=1)
ENDIF (FORCE_MR EQUAL 1)
file(STRINGS ${CGoGN_ROOT_DIR}/include/cgogn_onelib.h ONELIB_STR)
IF (ONELIB_STR EQUAL 1)
SET(CGoGN_LIBS_D cgognD)
SET(CGoGN_LIBS_R cgogn)
ELSE (ONELIB_STR EQUAL 1)
SET(CGoGN_LIBS_D topologyD algoD containerD utilsD)
SET(CGoGN_LIBS_R topology algo container utils)
ENDIF (ONELIB_STR EQUAL 1)
IF (DEFINED ASSERTON)
add_definitions(-DCGOGN_ASSERT_BOOL=${ASSERTON})
ELSE (DEFINED ASSERTON)
add_definitions(-DCGOGN_ASSERT_BOOL=false)
ENDIF (DEFINED ASSERTON)
add_definitions(-DSHADERPATH="${CGoGN_ROOT_DIR}/lib/Shaders/")
# define includes of external libs
SET (EXT_INCLUDES
${CGoGN_ROOT_DIR}/ThirdParty/include
${OPENGL_INCLUDE_DIR}
${GLEW_INCLUDE_DIRS}
${ZLIB_INCLUDE_DIRS}
${LIBXML2_INCLUDE_DIR}
${Boost_INCLUDE_DIRS}
${QT_INCLUDE_DIR}
${QGLVIEWER_INCLUDE_DIR}
${PYTHON_INCLUDE_DIRS}
)
# define libs for external libs
SET (EXT_LIBS
PythonQt
${OPENGL_LIBRARY}
${GLEW_LIBRARIES}
${ZLIB_LIBRARIES}
${LIBXML2_LIBRARIES}
${Boost_SYSTEM_LIBRARY}
${Boost_REGEX_LIBRARY}
${Boost_THREAD_LIBRARY}
${QT_LIBRARIES}
${QGLVIEWER_LIBRARIES}
${PYTHON_LIBRARIES}
)
# qq definition specifiques pour mac
IF(APPLE)
# attention a changer pour chercher la bonne version automatiquement
SET(CMAKE_OSX_SYSROOT "/Developer/SDKs/MacOSX10.6.sdk" CACHE STRING "developer SDK")
SET(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,-undefined -Wl,dynamic_lookup")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DMAC_OSX")
SET(CMAKE_OSX_ARCHITECTURES x86_64)
ENDIF(APPLE)
#========CGoGN========#
SET(CGoGN_ROOT_DIR ${CMAKE_SOURCE_DIR}/.. CACHE STRING "CGoGN root dir")
INCLUDE(${CGoGN_ROOT_DIR}/apps_cmake.txt)
#======SCHNApps=======#
SET(SCHNApps_ROOT_DIR ${CGoGN_ROOT_DIR}/SCHNApps)
SET(EXECUTABLE_OUTPUT_PATH ${SCHNApps_ROOT_DIR}/bin)
SET(LIBRARY_OUTPUT_PATH ${SCHNApps_ROOT_DIR}/lib)
......@@ -24,15 +106,3 @@ ADD_SUBDIRECTORY(${CMAKE_SOURCE_DIR}/Release Release)
IF (NOT WIN32)
ADD_SUBDIRECTORY(${CMAKE_SOURCE_DIR}/Debug Debug)
ENDIF (NOT WIN32)
#======Documentation=======#
#find_package(Doxygen)
#if(DOXYGEN_FOUND)
#configure_file(${CMAKE_SOURCE_DIR}/doc/Doxyfile.in ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile @ONLY)
#add_custom_target(doc
# ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile
# WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/Doc
# COMMENT "Generating API documentation with Doxygen" VERBATIM
#)
#endif(DOXYGEN_FOUND)
......@@ -10,12 +10,10 @@ ENDIF (WIN32)
INCLUDE_DIRECTORIES(
${CGoGN_ROOT_DIR}/include
${COMMON_INCLUDES}
${SCHNApps_ROOT_DIR}/include
${EXT_INCLUDES}
${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_CURRENT_BINARY_DIR}
${QGLVIEWER_INCLUDE_DIR}
${PYTHON_INCLUDE_DIRS}
${SCHNApps_ROOT_DIR}/include
)
file(
......@@ -79,9 +77,7 @@ ADD_EXECUTABLE( SCHNAppsD
TARGET_LINK_LIBRARIES( SCHNAppsD
${CGoGN_LIBS_D}
${COMMON_LIBS}
${QGLVIEWER_LIBRARIES}
PythonQt
${EXT_LIBS}
)
......
......@@ -45,7 +45,6 @@ IF( ${CMAKE_BUILD_TYPE} STREQUAL Debug )
TARGET_LINK_LIBRARIES( DifferentialPropertiesPluginD
${CGoGN_LIBS_D}
${COMMON_LIBS}
${QGLVIEWER_LIBRARIES}
)
ADD_DEPENDENCIES( DifferentialPropertiesPluginD SCHNAppsD )
......@@ -72,7 +71,6 @@ ELSE ( ${CMAKE_BUILD_TYPE} STREQUAL Debug )
TARGET_LINK_LIBRARIES( DifferentialPropertiesPlugin
${CGoGN_LIBS_R}
${COMMON_LIBS}
${QGLVIEWER_LIBRARIES}
)
ADD_DEPENDENCIES( DifferentialPropertiesPlugin SCHNApps )
......
......@@ -10,6 +10,7 @@ namespace SCHNApps
{
class Window;
class MapHandlerGen;
class ComputeCurvatureDialog : public QDialog, public Ui::ComputeCurvatureDialog
{
......@@ -17,13 +18,14 @@ class ComputeCurvatureDialog : public QDialog, public Ui::ComputeCurvatureDialog
public:
ComputeCurvatureDialog(Window* w);
void init();
public slots:
void cb_selectedMapChanged();
private:
Window* m_window;
public slots:
void selectedMapChanged();
void addMapToList(MapHandlerGen* m);
void removeMapFromList(MapHandlerGen* m);
};
} // namespace SCHNApps
......
......@@ -10,6 +10,7 @@ namespace SCHNApps
{
class Window;
class MapHandlerGen;
class ComputeNormalDialog : public QDialog, public Ui::ComputeNormalDialog
{
......@@ -17,13 +18,14 @@ class ComputeNormalDialog : public QDialog, public Ui::ComputeNormalDialog
public:
ComputeNormalDialog(Window* w);
void init();
public slots:
void cb_selectedMapChanged();
private:
Window* m_window;
public slots:
void selectedMapChanged();
void addMapToList(MapHandlerGen* m);
void removeMapFromList(MapHandlerGen* m);
};
} // namespace SCHNApps
......
......@@ -37,19 +37,12 @@ public:
virtual void mouseMove(View* view, int buttons, int x, int y) {}
virtual void wheelEvent(View* view, int delta, int x, int y) {}
virtual void viewLinked(View* view) {}
virtual void viewUnlinked(View* view) {}
virtual void currentViewChanged(View* view) {}
virtual void mapLinked(View* view, MapHandlerGen* m) {}
virtual void mapUnlinked(View* view, MapHandlerGen* m) {}
public slots:
void cb_openComputeNormalDialog();
void cb_openComputeCurvatureDialog();
void openComputeNormalDialog();
void openComputeCurvatureDialog();
void cb_computeNormal();
void cb_computeCurvature();
void computeNormal();
void computeCurvature();
private:
ComputeNormalDialog* m_computeNormalDialog;
......
......@@ -13,30 +13,24 @@ namespace SCHNApps
ComputeCurvatureDialog::ComputeCurvatureDialog(Window* w) : m_window(w)
{
setupUi(this);
connect(mapList, SIGNAL(itemSelectionChanged()), this, SLOT(cb_selectedMapChanged()));
}
void ComputeCurvatureDialog::init()
{
mapList->clear();
combo_positionAttribute->clear();
combo_normalAttribute->clear();
combo_KmaxAttribute->clear();
combo_kmaxAttribute->clear();
combo_KminAttribute->clear();
combo_kminAttribute->clear();
combo_KnormalAttribute->clear();
KmaxAttributeName->setText("Kmax");
kmaxAttributeName->setText("kmax");
KminAttributeName->setText("Kmin");
kminAttributeName->setText("kmin");
KnormalAttributeName->setText("Knormal");
connect(m_window, SIGNAL(mapAdded(MapHandlerGen*)), this, SLOT(addMapToList(MapHandlerGen*)));
connect(m_window, SIGNAL(mapRemoved(MapHandlerGen*)), this, SLOT(removeMapFromList(MapHandlerGen*)));
connect(mapList, SIGNAL(itemSelectionChanged()), this, SLOT(selectedMapChanged()));
const QList<MapHandlerGen*>& maps = m_window->getMapsList();
foreach(MapHandlerGen* map, maps)
mapList->addItem(map->getName());
}
void ComputeCurvatureDialog::cb_selectedMapChanged()
void ComputeCurvatureDialog::selectedMapChanged()
{
QList<QListWidgetItem*> currentItems = mapList->selectedItems();
if(!currentItems.empty())
......@@ -98,6 +92,23 @@ void ComputeCurvatureDialog::cb_selectedMapChanged()
}
}
void ComputeCurvatureDialog::addMapToList(MapHandlerGen* m)
{
mapList->addItem(m->getName());
}
void ComputeCurvatureDialog::removeMapFromList(MapHandlerGen* m)
{
for(int i = 0; i < mapList->count(); ++i)
{
if(mapList->item(i)->text() == m->getName())
{
delete mapList->item(i);
return;
}
}
}
} // namespace SCHNApps
} // namespace CGoGN
......@@ -13,21 +13,20 @@ namespace SCHNApps
ComputeNormalDialog::ComputeNormalDialog(Window* w) : m_window(w)
{
setupUi(this);
connect(mapList, SIGNAL(itemSelectionChanged()), this, SLOT(cb_selectedMapChanged()));
}
void ComputeNormalDialog::init()
{
mapList->clear();