diff --git a/SCHNApps_old/CMakeLists.txt b/SCHNApps_old/CMakeLists.txt deleted file mode 100644 index 38d73d600b6db2b8dfdc68d8755136230d773879..0000000000000000000000000000000000000000 --- a/SCHNApps_old/CMakeLists.txt +++ /dev/null @@ -1,149 +0,0 @@ -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 2.7 REQUIRED) -find_package(SuiteSparse REQUIRED) -#find_package(SuperLU 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 ) - -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} - ${SUITESPARSE_INCLUDE_DIRS} -# ${SUPERLU_INCLUDE_DIRS} -) - -# define libs for external libs -SET (EXT_LIBS - PythonQt - nl - ${OPENGL_LIBRARY} - ${GLEW_LIBRARIES} - ${ZLIB_LIBRARIES} - ${LIBXML2_LIBRARIES} - ${Boost_SYSTEM_LIBRARY} - ${Boost_REGEX_LIBRARY} - ${Boost_THREAD_LIBRARY} - ${QT_LIBRARIES} - ${QGLVIEWER_LIBRARIES} - ${PYTHON_LIBRARIES} - ${SUITESPARSE_LIBRARIES} -# ${SUPERLU_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) - - - - -SET(SCHNApps_ROOT_DIR ${CGoGN_ROOT_DIR}/SCHNApps) -SET(EXECUTABLE_OUTPUT_PATH ${SCHNApps_ROOT_DIR}/bin) -SET(LIBRARY_OUTPUT_PATH ${SCHNApps_ROOT_DIR}/lib) - - -file( - GLOB_RECURSE - SCHNApps_FILES - ${SCHNApps_ROOT_DIR}/src/*.cpp - ${SCHNApps_ROOT_DIR}/include/*.h - ${SCHNApps_ROOT_DIR}/include/*.hpp -) - -file( - GLOB_RECURSE - SCHNApps_UI_FILES - ${SCHNApps_ROOT_DIR}/forms/*.ui -) - -SET(SCHNApps_QOBJECT_FILES - ${SCHNApps_ROOT_DIR}/include/camera.h - ${SCHNApps_ROOT_DIR}/include/mapHandler.h - ${SCHNApps_ROOT_DIR}/include/plugin.h - ${SCHNApps_ROOT_DIR}/include/view.h - ${SCHNApps_ROOT_DIR}/include/window.h - ${SCHNApps_ROOT_DIR}/include/viewButtonArea.h - ${SCHNApps_ROOT_DIR}/include/dialogs/camerasDialog.h - ${SCHNApps_ROOT_DIR}/include/dialogs/pluginsDialog.h - ${SCHNApps_ROOT_DIR}/include/dialogs/mapsDialog.h - ${SCHNApps_ROOT_DIR}/include/dialogs/cameraViewDialog.h - ${SCHNApps_ROOT_DIR}/include/dialogs/pluginsViewDialog.h - ${SCHNApps_ROOT_DIR}/include/dialogs/mapsViewDialog.h - ${SCHNApps_ROOT_DIR}/include/colorComboBox.h -) - - - -ADD_SUBDIRECTORY(${CMAKE_SOURCE_DIR}/Release Release) -IF (NOT WIN32) - ADD_SUBDIRECTORY(${CMAKE_SOURCE_DIR}/Debug Debug) -ENDIF (NOT WIN32) diff --git a/SCHNApps_old/Debug/CMakeLists.txt b/SCHNApps_old/Debug/CMakeLists.txt deleted file mode 100644 index 3d9edd0c7b6c8339edce5c4f957b1de5ca85c59d..0000000000000000000000000000000000000000 --- a/SCHNApps_old/Debug/CMakeLists.txt +++ /dev/null @@ -1,44 +0,0 @@ -cmake_minimum_required(VERSION 2.8) - -SET(CMAKE_BUILD_TYPE Debug) - -IF(WIN32) - link_directories( ${CGoGN_ROOT_DIR}/lib/Release ) -ELSE (WIN32) - link_directories( ${CGoGN_ROOT_DIR}/lib/Debug ${CGoGN_ROOT_DIR}/lib/Release ) -ENDIF (WIN32) - -INCLUDE_DIRECTORIES( - ${CGoGN_ROOT_DIR}/include - ${SCHNApps_ROOT_DIR}/include - ${EXT_INCLUDES} - ${CMAKE_CURRENT_SOURCE_DIR} - ${CMAKE_CURRENT_BINARY_DIR} -) - -QT4_WRAP_UI( UIC_FILES - ${SCHNApps_UI_FILES} -) - -QT4_WRAP_CPP( MOC_FILES - ${SCHNApps_QOBJECT_FILES} -) - -QT4_ADD_RESOURCES( RCC_FILES - ${SCHNApps_ROOT_DIR}/resources/resources.qrc -) - -ADD_EXECUTABLE( SCHNAppsD - ${SCHNApps_FILES} - ${UIC_FILES} - ${MOC_FILES} - ${RCC_FILES} -) - -TARGET_LINK_LIBRARIES( SCHNAppsD - ${CGoGN_LIBS_D} - ${EXT_LIBS} -) - - -ADD_SUBDIRECTORY(${SCHNApps_ROOT_DIR}/Plugins PluginsD) diff --git a/SCHNApps_old/Plugins/CMakeLists.txt b/SCHNApps_old/Plugins/CMakeLists.txt deleted file mode 100644 index be703257c2ae1f175f7e0350a148ea804e9d690b..0000000000000000000000000000000000000000 --- a/SCHNApps_old/Plugins/CMakeLists.txt +++ /dev/null @@ -1,13 +0,0 @@ -cmake_minimum_required(VERSION 2.8) - -ADD_SUBDIRECTORY(importSurface) -ADD_SUBDIRECTORY(importVolume) -ADD_SUBDIRECTORY(differentialProperties) -ADD_SUBDIRECTORY(render) -ADD_SUBDIRECTORY(renderVector) -ADD_SUBDIRECTORY(renderScalar) -ADD_SUBDIRECTORY(renderExplod) -ADD_SUBDIRECTORY(renderTopoSurface) -ADD_SUBDIRECTORY(subdivideSurface) -ADD_SUBDIRECTORY(surfaceDeformation) - diff --git a/SCHNApps_old/Plugins/differentialProperties/CMakeLists.txt b/SCHNApps_old/Plugins/differentialProperties/CMakeLists.txt deleted file mode 100644 index e970512867c78122238c06f39985f2a0953a3c37..0000000000000000000000000000000000000000 --- a/SCHNApps_old/Plugins/differentialProperties/CMakeLists.txt +++ /dev/null @@ -1,33 +0,0 @@ -cmake_minimum_required(VERSION 2.8) - -SET( PLUGIN_NAME DifferentialProperties ) - -SET( PLUGIN_ROOT_DIR ${SCHNApps_ROOT_DIR}/Plugins/differentialProperties ) - -INCLUDE_DIRECTORIES( - ${PLUGIN_ROOT_DIR}/include - ${CMAKE_CURRENT_BINARY_DIR} -) - -file( - GLOB_RECURSE - PLUGIN_FILES - ${PLUGIN_ROOT_DIR}/src/*.cpp - ${PLUGIN_ROOT_DIR}/include/*.h - ${PLUGIN_ROOT_DIR}/include/*.hpp -) - -file( - GLOB_RECURSE - PLUGIN_UI_FILES - ${PLUGIN_ROOT_DIR}/forms/*.ui -) - -SET( - PLUGIN_QOBJECT_FILES - ${PLUGIN_ROOT_DIR}/include/differentialProperties.h - ${PLUGIN_ROOT_DIR}/include/computeNormalDialog.h - ${PLUGIN_ROOT_DIR}/include/computeCurvatureDialog.h -) - -include( ${SCHNApps_ROOT_DIR}/Plugins/plugins_cmake.txt ) diff --git a/SCHNApps_old/Plugins/differentialProperties/forms/computeCurvatureDialog.ui b/SCHNApps_old/Plugins/differentialProperties/forms/computeCurvatureDialog.ui deleted file mode 100644 index bcfc9a1008228ffa9688bf31e70fd9746d7deb55..0000000000000000000000000000000000000000 --- a/SCHNApps_old/Plugins/differentialProperties/forms/computeCurvatureDialog.ui +++ /dev/null @@ -1,354 +0,0 @@ - - - ComputeCurvatureDialog - - - - 0 - 0 - 568 - 442 - - - - Compute Curvature - - - - - - - - - - - Position attribute : - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - - - - - - 0 - 0 - - - - - - - - Normal attribute : - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - - - - - - 0 - 0 - - - - - - - - - - Computed attributes - - - - - - - 75 - true - true - - - - Kmax : - - - - - - - Existing attribute : - - - - - - - - 0 - 0 - - - - - - - - New attribute : - - - - - - - - - - - 75 - true - true - - - - kmax : - - - - - - - Existing attribute : - - - - - - - - 0 - 0 - - - - - - - - New attribute : - - - - - - - - - - - 75 - true - true - - - - Kmin : - - - - - - - Existing attribute : - - - - - - - - 0 - 0 - - - - - - - - New attribute : - - - - - - - - - - - 75 - true - true - - - - kmin : - - - - - - - Existing attribute : - - - - - - - - 0 - 0 - - - - - - - - New attribute : - - - - - - - - - - - 75 - true - true - - - - Knormal : - - - - - - - Existing attribute : - - - - - - - - 0 - 0 - - - - - - - - New attribute : - - - - - - - - - - compute kmean - - - - - - - compute kgaussian - - - - - - - - - - - - Cancel - - - - - - - Apply - - - - - - - OK - - - - - - - - - - - button_ok - clicked() - ComputeCurvatureDialog - accept() - - - 232 - 283 - - - 140 - 156 - - - - - button_cancel - clicked() - ComputeCurvatureDialog - reject() - - - 52 - 283 - - - 140 - 156 - - - - - diff --git a/SCHNApps_old/Plugins/differentialProperties/forms/computeNormalDialog.ui b/SCHNApps_old/Plugins/differentialProperties/forms/computeNormalDialog.ui deleted file mode 100644 index 0afad975a6f0ff77b32af1ac259d8d93f5713fc1..0000000000000000000000000000000000000000 --- a/SCHNApps_old/Plugins/differentialProperties/forms/computeNormalDialog.ui +++ /dev/null @@ -1,143 +0,0 @@ - - - ComputeNormalDialog - - - - 0 - 0 - 472 - 276 - - - - Compute Normal - - - - - - - - - - - Position attribute : - - - - - - - - 0 - 0 - - - - - - - - - - Normal attribute - - - - - - - - Existing attribute : - - - - - - - - 0 - 0 - - - - - - - - New attribute : - - - - - - - - - - - - - - - - - Cancel - - - - - - - Apply - - - - - - - OK - - - - - - - - - - - button_ok - clicked() - ComputeNormalDialog - accept() - - - 232 - 283 - - - 140 - 156 - - - - - button_cancel - clicked() - ComputeNormalDialog - reject() - - - 52 - 283 - - - 140 - 156 - - - - - diff --git a/SCHNApps_old/Plugins/differentialProperties/include/computeCurvatureDialog.h b/SCHNApps_old/Plugins/differentialProperties/include/computeCurvatureDialog.h deleted file mode 100644 index 19808a5cfe61e8eed62e1b625e27dd1834a90c37..0000000000000000000000000000000000000000 --- a/SCHNApps_old/Plugins/differentialProperties/include/computeCurvatureDialog.h +++ /dev/null @@ -1,37 +0,0 @@ -#ifndef _COMPUTECURVATURE_DIALOG_H_ -#define _COMPUTECURVATURE_DIALOG_H_ - -#include "ui_computeCurvatureDialog.h" - -namespace CGoGN -{ - -namespace SCHNApps -{ - -class Window; -class MapHandlerGen; - -class ComputeCurvatureDialog : public QDialog, public Ui::ComputeCurvatureDialog -{ - Q_OBJECT - -public: - ComputeCurvatureDialog(Window* w); - -private: - Window* m_window; - MapHandlerGen* m_selectedMap; - -public slots: - void selectedMapChanged(); - void addMapToList(MapHandlerGen* m); - void removeMapFromList(MapHandlerGen* m); - void addAttributeToList(unsigned int orbit, const QString& nameAttr); -}; - -} // namespace SCHNApps - -} // namespace CGoGN - -#endif diff --git a/SCHNApps_old/Plugins/differentialProperties/include/computeNormalDialog.h b/SCHNApps_old/Plugins/differentialProperties/include/computeNormalDialog.h deleted file mode 100644 index 9a65c05f6abf4c2fcf6afd4a8db6fd99bc94bed5..0000000000000000000000000000000000000000 --- a/SCHNApps_old/Plugins/differentialProperties/include/computeNormalDialog.h +++ /dev/null @@ -1,37 +0,0 @@ -#ifndef _COMPUTENORMAL_DIALOG_H_ -#define _COMPUTENORMAL_DIALOG_H_ - -#include "ui_computeNormalDialog.h" - -namespace CGoGN -{ - -namespace SCHNApps -{ - -class Window; -class MapHandlerGen; - -class ComputeNormalDialog : public QDialog, public Ui::ComputeNormalDialog -{ - Q_OBJECT - -public: - ComputeNormalDialog(Window* w); - -private: - Window* m_window; - MapHandlerGen* m_selectedMap; - -public slots: - void selectedMapChanged(); - void addMapToList(MapHandlerGen* m); - void removeMapFromList(MapHandlerGen* m); - void addAttributeToList(unsigned int orbit, const QString& nameAttr); -}; - -} // namespace SCHNApps - -} // namespace CGoGN - -#endif diff --git a/SCHNApps_old/Plugins/differentialProperties/include/differentialProperties.h b/SCHNApps_old/Plugins/differentialProperties/include/differentialProperties.h deleted file mode 100644 index dbb053ec1278e1e74602bf536bc89a2f301264d4..0000000000000000000000000000000000000000 --- a/SCHNApps_old/Plugins/differentialProperties/include/differentialProperties.h +++ /dev/null @@ -1,114 +0,0 @@ -#ifndef _DIFFERENTIALPROPERTIES_PLUGIN_H_ -#define _DIFFERENTIALPROPERTIES_PLUGIN_H_ - -#include "plugin.h" - -#include "computeNormalDialog.h" -#include "computeCurvatureDialog.h" - - -using namespace CGoGN; -using namespace SCHNApps; - - -class DifferentialPropertiesPlugin : public Plugin -{ - Q_OBJECT - Q_INTERFACES(CGoGN::SCHNApps::Plugin) - -public: - DifferentialPropertiesPlugin() - { - setProvidesRendering(false); - } - - ~DifferentialPropertiesPlugin() - {} - - virtual bool enable(); - virtual void disable() {} - - virtual void redraw(View *view) {} - - virtual void keyPress(View* view, QKeyEvent* event) {} - virtual void keyRelease(View* view, QKeyEvent* event) {} - virtual void mousePress(View* view, QMouseEvent* event) {} - virtual void mouseRelease(View* view, QMouseEvent* event) {} - virtual void mouseMove(View* view, QMouseEvent* event) {} - virtual void wheelEvent(View* view, QWheelEvent* event) {} - -public slots: - void mapAdded(MapHandlerGen* map); - void mapRemoved(MapHandlerGen* map); - void attributeModified(unsigned int orbit, QString nameAttr); - - void openComputeNormalDialog(); - void openComputeCurvatureDialog(); - - void computeNormalFromDialog(); - void computeCurvatureFromDialog(); - - void computeNormal(const QString& mapName, - const QString& positionAttributeName = "position", - const QString& normalAttributeName = "normal", - bool autoUpdate = true); - - void computeCurvature( - const QString& mapName, - const QString& positionAttributeName = "position", - const QString& normalAttributeName = "normal", - const QString& KmaxAttributeName = "Kmax", - const QString& kmaxAttributeName = "kmax", - const QString& KminAttributeName = "Kmin", - const QString& kminAttributeName = "kmin", - const QString& KnormalAttributeName = "Knormal", - bool compute_kmean = true, - bool compute_kgaussian = true, - bool autoUpdate = true - ); - -private: - ComputeNormalDialog* m_computeNormalDialog; - ComputeCurvatureDialog* m_computeCurvatureDialog; - - QAction* m_computeNormalAction; - QAction* m_computeCurvatureAction; - - struct ComputeNormalParameters - { - ComputeNormalParameters() {} - ComputeNormalParameters(const QString& p, const QString& n, bool update) : - positionName(p), normalName(n), autoUpdate(update) - {} - QString positionName; - QString normalName; - bool autoUpdate; - }; - QHash computeNormalLastParameters; - - struct ComputeCurvatureParameters - { - ComputeCurvatureParameters() {} - ComputeCurvatureParameters( - const QString& p, const QString& n, - const QString& Kmax, const QString& kmax, const QString& Kmin, const QString& kmin, const QString& Knormal, - bool kmean, bool kgaussian, bool update) : - positionName(p), normalName(n), - KmaxName(Kmax), kmaxName(kmax), KminName(Kmin), kminName(kmin), KnormalName(Knormal), - compute_kmean(kmean), compute_kgaussian(kgaussian), autoUpdate(update) - {} - QString positionName; - QString normalName; - QString KmaxName; - QString kmaxName; - QString KminName; - QString kminName; - QString KnormalName; - bool compute_kmean; - bool compute_kgaussian; - bool autoUpdate; - }; - QHash computeCurvatureLastParameters; -}; - -#endif diff --git a/SCHNApps_old/Plugins/differentialProperties/src/computeCurvatureDialog.cpp b/SCHNApps_old/Plugins/differentialProperties/src/computeCurvatureDialog.cpp deleted file mode 100644 index 855dd5c7b615540364222a131df6f394bf8c37df..0000000000000000000000000000000000000000 --- a/SCHNApps_old/Plugins/differentialProperties/src/computeCurvatureDialog.cpp +++ /dev/null @@ -1,153 +0,0 @@ -#include "computeCurvatureDialog.h" - -#include "differentialProperties.h" -#include "window.h" -#include "mapHandler.h" - -namespace CGoGN -{ - -namespace SCHNApps -{ - -ComputeCurvatureDialog::ComputeCurvatureDialog(Window* w) : - m_window(w), - m_selectedMap(NULL) -{ - setupUi(this); - - 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& maps = m_window->getMapsList(); - foreach(MapHandlerGen* map, maps) - { - QListWidgetItem* item = new QListWidgetItem(map->getName(), mapList); - item->setCheckState(Qt::Unchecked); - } -} - -void ComputeCurvatureDialog::selectedMapChanged() -{ - if(m_selectedMap) - disconnect(m_selectedMap, SIGNAL(attributeAdded(unsigned int, const QString&)), this, SLOT(addAttributeToList(unsigned int, const QString&))); - - QList currentItems = mapList->selectedItems(); - if(!currentItems.empty()) - { - combo_positionAttribute->clear(); - combo_normalAttribute->clear(); - combo_KmaxAttribute->clear(); - combo_KminAttribute->clear(); - combo_KnormalAttribute->clear(); - combo_kmaxAttribute->clear(); - combo_kminAttribute->clear(); - - const QString& mapname = currentItems[0]->text(); - MapHandlerGen* mh = m_window->getMap(mapname); - - QString vec3TypeName = QString::fromStdString(nameOfType(PFP2::VEC3())); - QString realTypeName = QString::fromStdString(nameOfType(PFP2::REAL())); - - unsigned int j = 0; - unsigned int k = 0; - const AttributeHash& attribs = mh->getAttributesList(VERTEX); - for(AttributeHash::const_iterator i = attribs.constBegin(); i != attribs.constEnd(); ++i) - { - if(i.value() == vec3TypeName) - { - combo_positionAttribute->addItem(i.key()); - if(i.key() == "position") // try to select a position attribute named "position" - combo_positionAttribute->setCurrentIndex(j); - - combo_normalAttribute->addItem(i.key()); - if(i.key() == "normal") // try to select a normal attribute named "normal" - combo_normalAttribute->setCurrentIndex(j); - - combo_KmaxAttribute->addItem(i.key()); - if(i.key() == "Kmax") // try to select a normal attribute named "Kmax" - combo_KmaxAttribute->setCurrentIndex(j); - - combo_KminAttribute->addItem(i.key()); - if(i.key() == "Kmin") // try to select a normal attribute named "Kmin" - combo_KminAttribute->setCurrentIndex(j); - - combo_KnormalAttribute->addItem(i.key()); - if(i.key() == "Knormal") // try to select a normal attribute named "Knormal" - combo_KnormalAttribute->setCurrentIndex(j); - - ++j; - } - else if(i.value() == realTypeName) - { - combo_kmaxAttribute->addItem(i.key()); - if(i.key() == "kmax") // try to select a normal attribute named "kmax" - combo_kmaxAttribute->setCurrentIndex(k); - - combo_kminAttribute->addItem(i.key()); - if(i.key() == "kmin") // try to select a normal attribute named "kmin" - combo_kminAttribute->setCurrentIndex(k); - - ++k; - } - } - - m_selectedMap = mh; - connect(m_selectedMap, SIGNAL(attributeAdded(unsigned int, const QString&)), this, SLOT(addAttributeToList(unsigned int, const QString&))); - } - else - m_selectedMap = NULL; -} - -void ComputeCurvatureDialog::addMapToList(MapHandlerGen* m) -{ - QListWidgetItem* item = new QListWidgetItem(m->getName(), mapList); - item->setCheckState(Qt::Unchecked); -} - -void ComputeCurvatureDialog::removeMapFromList(MapHandlerGen* m) -{ - QList items = mapList->findItems(m->getName(), Qt::MatchExactly); - if(!items.empty()) - delete items[0]; - - if(m_selectedMap == m) - { - disconnect(m_selectedMap, SIGNAL(attributeAdded(unsigned int, const QString&)), this, SLOT(addAttributeToList(unsigned int, const QString&))); - m_selectedMap = NULL; - } -} - -void ComputeCurvatureDialog::addAttributeToList(unsigned int orbit, const QString& nameAttr) -{ - QString vec3TypeName = QString::fromStdString(nameOfType(PFP2::VEC3())); - QString realTypeName = QString::fromStdString(nameOfType(PFP2::REAL())); - - const QString& typeAttr = m_selectedMap->getAttributeTypeName(orbit, nameAttr); - - if(typeAttr == vec3TypeName) - { - combo_positionAttribute->addItem(nameAttr); - combo_normalAttribute->addItem(nameAttr); - combo_KmaxAttribute->addItem(nameAttr); - combo_KminAttribute->addItem(nameAttr); - combo_KnormalAttribute->addItem(nameAttr); - } - else if(typeAttr == realTypeName) - { - combo_kmaxAttribute->addItem(nameAttr); - combo_kminAttribute->addItem(nameAttr); - } -} - -} // namespace SCHNApps - -} // namespace CGoGN diff --git a/SCHNApps_old/Plugins/differentialProperties/src/computeNormalDialog.cpp b/SCHNApps_old/Plugins/differentialProperties/src/computeNormalDialog.cpp deleted file mode 100644 index 83266fce54869d3ff2b1376c54017239036e6ae3..0000000000000000000000000000000000000000 --- a/SCHNApps_old/Plugins/differentialProperties/src/computeNormalDialog.cpp +++ /dev/null @@ -1,109 +0,0 @@ -#include "computeNormalDialog.h" - -#include "differentialProperties.h" -#include "window.h" -#include "mapHandler.h" - -namespace CGoGN -{ - -namespace SCHNApps -{ - -ComputeNormalDialog::ComputeNormalDialog(Window* w) : - m_window(w), - m_selectedMap(NULL) -{ - setupUi(this); - - normalAttributeName->setText("normal"); - - 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& maps = m_window->getMapsList(); - foreach(MapHandlerGen* map, maps) - { - QListWidgetItem* item = new QListWidgetItem(map->getName(), mapList); - item->setCheckState(Qt::Unchecked); - } -} - -void ComputeNormalDialog::selectedMapChanged() -{ - if(m_selectedMap) - disconnect(m_selectedMap, SIGNAL(attributeAdded(unsigned int, const QString&)), this, SLOT(addAttributeToList(unsigned int, const QString&))); - - QList currentItems = mapList->selectedItems(); - if(!currentItems.empty()) - { - combo_positionAttribute->clear(); - combo_normalAttribute->clear(); - - const QString& mapname = currentItems[0]->text(); - MapHandlerGen* mh = m_window->getMap(mapname); - - QString vec3TypeName = QString::fromStdString(nameOfType(PFP2::VEC3())); - - unsigned int j = 0; - const AttributeHash& attribs = mh->getAttributesList(VERTEX); - for(AttributeHash::const_iterator i = attribs.constBegin(); i != attribs.constEnd(); ++i) - { - if(i.value() == vec3TypeName) - { - combo_positionAttribute->addItem(i.key()); - if(i.key() == "position") // try to select a position attribute named "position" - combo_positionAttribute->setCurrentIndex(j); - - combo_normalAttribute->addItem(i.key()); - if(i.key() == "normal") // try to select a normal attribute named "normal" - combo_normalAttribute->setCurrentIndex(j); - - ++j; - } - } - - m_selectedMap = mh; - connect(m_selectedMap, SIGNAL(attributeAdded(unsigned int, const QString&)), this, SLOT(addAttributeToList(unsigned int, const QString&))); - } - else - m_selectedMap = NULL; -} - -void ComputeNormalDialog::addMapToList(MapHandlerGen* m) -{ - QListWidgetItem* item = new QListWidgetItem(m->getName(), mapList); - item->setCheckState(Qt::Unchecked); -} - -void ComputeNormalDialog::removeMapFromList(MapHandlerGen* m) -{ - QList items = mapList->findItems(m->getName(), Qt::MatchExactly); - if(!items.empty()) - delete items[0]; - - if(m_selectedMap == m) - { - disconnect(m_selectedMap, SIGNAL(attributeAdded(unsigned int, const QString&)), this, SLOT(addAttributeToList(unsigned int, const QString&))); - m_selectedMap = NULL; - } -} - -void ComputeNormalDialog::addAttributeToList(unsigned int orbit, const QString& nameAttr) -{ - QString vec3TypeName = QString::fromStdString(nameOfType(PFP2::VEC3())); - - const QString& typeAttr = m_selectedMap->getAttributeTypeName(orbit, nameAttr); - - if(typeAttr == vec3TypeName) - { - combo_positionAttribute->addItem(nameAttr); - combo_normalAttribute->addItem(nameAttr); - } -} - -} // namespace SCHNApps - -} // namespace CGoGN diff --git a/SCHNApps_old/Plugins/differentialProperties/src/differentialProperties.cpp b/SCHNApps_old/Plugins/differentialProperties/src/differentialProperties.cpp deleted file mode 100644 index 034473833a4165b515b1868a91b38272b24e36cf..0000000000000000000000000000000000000000 --- a/SCHNApps_old/Plugins/differentialProperties/src/differentialProperties.cpp +++ /dev/null @@ -1,285 +0,0 @@ -#include "differentialProperties.h" - -#include "mapHandler.h" - -#include "Algo/Geometry/normal.h" -#include "Algo/Geometry/curvature.h" - -bool DifferentialPropertiesPlugin::enable() -{ - m_computeNormalDialog = new ComputeNormalDialog(m_window); - m_computeCurvatureDialog = new ComputeCurvatureDialog(m_window); - - m_computeNormalAction = new QAction("Compute Normal", this); - m_computeCurvatureAction = new QAction("Compute Curvature", this); - - addMenuAction("Surface;Differential Properties;Compute Normal", m_computeNormalAction); - addMenuAction("Surface;Differential Properties;Compute Curvature", m_computeCurvatureAction); - - connect(m_computeNormalAction, SIGNAL(triggered()), this, SLOT(openComputeNormalDialog())); - connect(m_computeCurvatureAction, SIGNAL(triggered()), this, SLOT(openComputeCurvatureDialog())); - - connect(m_computeNormalDialog, SIGNAL(accepted()), this, SLOT(computeNormalFromDialog())); - connect(m_computeNormalDialog->button_apply, SIGNAL(clicked()), this, SLOT(computeNormalFromDialog())); - - connect(m_computeCurvatureDialog, SIGNAL(accepted()), this, SLOT(computeCurvatureFromDialog())); - connect(m_computeCurvatureDialog->button_apply, SIGNAL(clicked()), this, SLOT(computeCurvatureFromDialog())); - - connect(m_window, SIGNAL(mapAdded(MapHandlerGen*)), this, SLOT(mapAdded(MapHandlerGen*))); - connect(m_window, SIGNAL(mapRemoved(MapHandlerGen*)), this, SLOT(mapRemoved(MapHandlerGen*))); - - return true; -} - -void DifferentialPropertiesPlugin::mapAdded(MapHandlerGen *map) -{ - connect(map, SIGNAL(attributeModified(unsigned int, QString)), this, SLOT(attributeModified(unsigned int, QString))); -} - -void DifferentialPropertiesPlugin::mapRemoved(MapHandlerGen *map) -{ - disconnect(map, SIGNAL(attributeModified(unsigned int, QString)), this, SLOT(attributeModified(unsigned int, QString))); -} - -void DifferentialPropertiesPlugin::attributeModified(unsigned int orbit, QString nameAttr) -{ - if(orbit == VERTEX) - { - MapHandlerGen* map = static_cast(QObject::sender()); - if(computeNormalLastParameters.contains(map->getName())) - { - ComputeNormalParameters& params = computeNormalLastParameters[map->getName()]; - if(params.autoUpdate && params.positionName == nameAttr) - computeNormal(map->getName(), params.positionName, params.normalName, true); - } - if(computeCurvatureLastParameters.contains(map->getName())) - { - ComputeCurvatureParameters& params = computeCurvatureLastParameters[map->getName()]; - if(params.autoUpdate && (params.positionName == nameAttr || params.normalName == nameAttr)) - computeCurvature( - map->getName(), - params.positionName, params.normalName, - params.KmaxName, params.kmaxName, params.KminName, params.kminName, params.KnormalName, - true - ); - } - } -} - -void DifferentialPropertiesPlugin::openComputeNormalDialog() -{ - m_computeNormalDialog->show(); -} - -void DifferentialPropertiesPlugin::openComputeCurvatureDialog() -{ - m_computeCurvatureDialog->show(); -} - -void DifferentialPropertiesPlugin::computeNormalFromDialog() -{ - QList currentItems = m_computeNormalDialog->mapList->selectedItems(); - if(!currentItems.empty()) - { - const QString& mapName = currentItems[0]->text(); - - QString positionName = m_computeNormalDialog->combo_positionAttribute->currentText(); - - QString normalName; - if(m_computeNormalDialog->normalAttributeName->text().isEmpty()) - normalName = m_computeNormalDialog->combo_normalAttribute->currentText(); - else - normalName = m_computeNormalDialog->normalAttributeName->text(); - - bool autoUpdate = (currentItems[0]->checkState() == Qt::Checked); - - computeNormal(mapName, positionName, normalName, autoUpdate); - } -} - -void DifferentialPropertiesPlugin::computeCurvatureFromDialog() -{ - QList currentItems = m_computeCurvatureDialog->mapList->selectedItems(); - if(!currentItems.empty()) - { - const QString& mapName = currentItems[0]->text(); - - QString positionName = m_computeCurvatureDialog->combo_positionAttribute->currentText(); - QString normalName = m_computeCurvatureDialog->combo_normalAttribute->currentText(); - - QString KmaxName; - if(m_computeCurvatureDialog->KmaxAttributeName->text().isEmpty()) - KmaxName = m_computeCurvatureDialog->combo_KmaxAttribute->currentText(); - else - KmaxName = m_computeCurvatureDialog->KmaxAttributeName->text(); - - QString kmaxName; - if(m_computeCurvatureDialog->kmaxAttributeName->text().isEmpty()) - kmaxName = m_computeCurvatureDialog->combo_kmaxAttribute->currentText(); - else - kmaxName = m_computeCurvatureDialog->kmaxAttributeName->text(); - - QString KminName; - if(m_computeCurvatureDialog->KminAttributeName->text().isEmpty()) - KminName = m_computeCurvatureDialog->combo_KminAttribute->currentText(); - else - KminName = m_computeCurvatureDialog->KminAttributeName->text(); - - QString kminName; - if(m_computeCurvatureDialog->kminAttributeName->text().isEmpty()) - kminName = m_computeCurvatureDialog->combo_kminAttribute->currentText(); - else - kminName = m_computeCurvatureDialog->kminAttributeName->text(); - - QString KnormalName; - if(m_computeCurvatureDialog->KnormalAttributeName->text().isEmpty()) - KnormalName = m_computeCurvatureDialog->combo_KnormalAttribute->currentText(); - else - KnormalName = m_computeCurvatureDialog->KnormalAttributeName->text(); - - bool compute_kmean = (m_computeCurvatureDialog->check_computeKmean->checkState() == Qt::Checked); - bool compute_kgaussian = (m_computeCurvatureDialog->check_computeKgaussian->checkState() == Qt::Checked); - bool autoUpdate = (currentItems[0]->checkState() == Qt::Checked); - - computeCurvature( - mapName, - positionName, normalName, - KmaxName, kmaxName, KminName, kminName, KnormalName, - compute_kmean, compute_kgaussian, - autoUpdate - ); - } -} - -void DifferentialPropertiesPlugin::computeNormal( - const QString& mapName, - const QString& positionAttributeName, - const QString& normalAttributeName, - bool autoUpdate) -{ - MapHandler* mh = static_cast*>(m_window->getMap(mapName)); - if(mh == NULL) - return; - - VertexAttribute position = mh->getAttribute(positionAttributeName); - if(!position.isValid()) - return; - - VertexAttribute normal = mh->getAttribute(normalAttributeName); - if(!normal.isValid()) - normal = mh->addAttribute(normalAttributeName); - - PFP2::MAP* map = mh->getMap(); - Algo::Surface::Geometry::computeNormalVertices(*map, position, normal); - - computeNormalLastParameters[mapName] = - ComputeNormalParameters(positionAttributeName, normalAttributeName, autoUpdate); - - mh->createVBO(normal); - - mh->notifyAttributeModification(normal); -} - -void DifferentialPropertiesPlugin::computeCurvature( - const QString& mapName, - const QString& positionAttributeName, - const QString& normalAttributeName, - const QString& KmaxAttributeName, - const QString& kmaxAttributeName, - const QString& KminAttributeName, - const QString& kminAttributeName, - const QString& KnormalAttributeName, - bool compute_kmean, - bool compute_kgaussian, - bool autoUpdate) -{ - MapHandler* mh = static_cast*>(m_window->getMap(mapName)); - if(mh == NULL) - return; - - VertexAttribute position = mh->getAttribute(positionAttributeName); - if(!position.isValid()) - return; - - VertexAttribute normal = mh->getAttribute(normalAttributeName); - if(!normal.isValid()) - return; - - VertexAttribute Kmax = mh->getAttribute(KmaxAttributeName); - if(!Kmax.isValid()) - Kmax = mh->addAttribute(KmaxAttributeName); - - VertexAttribute kmax = mh->getAttribute(kmaxAttributeName); - if(!kmax.isValid()) - kmax = mh->addAttribute(kmaxAttributeName); - - VertexAttribute Kmin = mh->getAttribute(KminAttributeName); - if(!Kmin.isValid()) - Kmin = mh->addAttribute(KminAttributeName); - - VertexAttribute kmin = mh->getAttribute(kminAttributeName); - if(!kmin.isValid()) - kmin = mh->addAttribute(kminAttributeName); - - VertexAttribute Knormal = mh->getAttribute(KnormalAttributeName); - if(!Knormal.isValid()) - Knormal = mh->addAttribute(KnormalAttributeName); - - EdgeAttribute edgeAngle = mh->getAttribute("edgeAngle"); - if(!edgeAngle.isValid()) - edgeAngle = mh->addAttribute("edgeAngle"); - - PFP2::MAP* map = mh->getMap(); - Algo::Surface::Geometry::computeAnglesBetweenNormalsOnEdges(*map, position, edgeAngle); - Algo::Surface::Geometry::computeCurvatureVertices_NormalCycles_Projected(*map, 0.01f * mh->getBBdiagSize(), position, normal, edgeAngle, kmax, kmin, Kmax, Kmin, Knormal); - - computeCurvatureLastParameters[mapName] = - ComputeCurvatureParameters( - positionAttributeName, normalAttributeName, - KmaxAttributeName, kmaxAttributeName, KminAttributeName, kminAttributeName, KnormalAttributeName, - compute_kmean, compute_kgaussian, autoUpdate); - - mh->createVBO(Kmax); - mh->createVBO(kmax); - mh->createVBO(Kmin); - mh->createVBO(kmin); - mh->createVBO(Knormal); - - mh->notifyAttributeModification(Kmax); - mh->notifyAttributeModification(kmax); - mh->notifyAttributeModification(Kmin); - mh->notifyAttributeModification(kmin); - mh->notifyAttributeModification(Knormal); - - if(compute_kmean) - { - VertexAttribute kmean = mh->getAttribute("kmean"); - if(!kmean.isValid()) - kmean = mh->addAttribute("kmean"); - - for(unsigned int i = kmin.begin(); i != kmin.end(); kmin.next(i)) - kmean[i] = (kmin[i] + kmax[i]) / 2.0; - - mh->createVBO(kmean); - mh->notifyAttributeModification(kmean); - } - - if(compute_kgaussian) - { - VertexAttribute kgaussian = mh->getAttribute("kgaussian"); - if(!kgaussian.isValid()) - kgaussian = mh->addAttribute("kgaussian"); - - for(unsigned int i = kmin.begin(); i != kmin.end(); kmin.next(i)) - kgaussian[i] = kmin[i] * kmax[i]; - - mh->createVBO(kgaussian); - mh->notifyAttributeModification(kgaussian); - } -} - -#ifndef DEBUG -Q_EXPORT_PLUGIN2(DifferentialPropertiesPlugin, DifferentialPropertiesPlugin) -#else -Q_EXPORT_PLUGIN2(DifferentialPropertiesPluginD, DifferentialPropertiesPlugin) -#endif diff --git a/SCHNApps_old/Plugins/importSurface/CMakeLists.txt b/SCHNApps_old/Plugins/importSurface/CMakeLists.txt deleted file mode 100644 index 55230abaccf0142a6572a5fcced390b25e5e182a..0000000000000000000000000000000000000000 --- a/SCHNApps_old/Plugins/importSurface/CMakeLists.txt +++ /dev/null @@ -1,31 +0,0 @@ -cmake_minimum_required(VERSION 2.8) - -SET( PLUGIN_NAME ImportSurface ) - -SET( PLUGIN_ROOT_DIR ${SCHNApps_ROOT_DIR}/Plugins/importSurface ) - -INCLUDE_DIRECTORIES( - ${PLUGIN_ROOT_DIR}/include - ${CMAKE_CURRENT_BINARY_DIR} -) - -file( - GLOB_RECURSE - PLUGIN_FILES - ${PLUGIN_ROOT_DIR}/src/*.cpp - ${PLUGIN_ROOT_DIR}/include/*.h - ${PLUGIN_ROOT_DIR}/include/*.hpp -) - -file( - GLOB_RECURSE - PLUGIN_UI_FILES - ${PLUGIN_ROOT_DIR}/forms/*.ui -) - -SET( - PLUGIN_QOBJECT_FILES - ${PLUGIN_ROOT_DIR}/include/importSurface.h -) - -include( ${SCHNApps_ROOT_DIR}/Plugins/plugins_cmake.txt ) diff --git a/SCHNApps_old/Plugins/importSurface/include/importSurface.h b/SCHNApps_old/Plugins/importSurface/include/importSurface.h deleted file mode 100644 index e9e2cbcb918a7e834a5bba05ea318ed61ea12e3d..0000000000000000000000000000000000000000 --- a/SCHNApps_old/Plugins/importSurface/include/importSurface.h +++ /dev/null @@ -1,51 +0,0 @@ -#ifndef _IMPORTSURFACE_PLUGIN_H_ -#define _IMPORTSURFACE_PLUGIN_H_ - -#include "plugin.h" - - -namespace CGoGN -{ - -namespace SCHNApps -{ - -class ImportSurfacePlugin : public Plugin -{ - Q_OBJECT - Q_INTERFACES(CGoGN::SCHNApps::Plugin) - -public: - ImportSurfacePlugin() - { - setProvidesRendering(false); - } - - ~ImportSurfacePlugin() - {} - - virtual bool enable(); - virtual void disable() {} - - virtual void redraw(View *view) {} - - virtual void keyPress(View* view, QKeyEvent* event) {} - virtual void keyRelease(View* view, QKeyEvent* event) {} - virtual void mousePress(View* view, QMouseEvent* event) {} - virtual void mouseRelease(View* view, QMouseEvent* event) {} - virtual void mouseMove(View* view, QMouseEvent* event) {} - virtual void wheelEvent(View* view, QWheelEvent* event) {} - -public slots: - MapHandlerGen* importFromFile(const QString& fileName); - void importFromFileDialog(); - -private: - QAction* importAction; -}; - -} // namespace SCHNApps - -} // namespace CGoGN - -#endif diff --git a/SCHNApps_old/Plugins/importSurface/src/importSurface.cpp b/SCHNApps_old/Plugins/importSurface/src/importSurface.cpp deleted file mode 100644 index 2719d6505529b4bf87d5b7670dd50a36aeef5037..0000000000000000000000000000000000000000 --- a/SCHNApps_old/Plugins/importSurface/src/importSurface.cpp +++ /dev/null @@ -1,75 +0,0 @@ -#include "importSurface.h" - -#include "mapHandler.h" - -#include "Algo/Import/import.h" - -#include -#include - -namespace CGoGN -{ - -namespace SCHNApps -{ - -bool ImportSurfacePlugin::enable() -{ - importAction = new QAction("import", this); - addMenuAction("Surface;Import", importAction); - connect(importAction, SIGNAL(triggered()), this, SLOT(importFromFileDialog())); - return true; -} - -MapHandlerGen* ImportSurfacePlugin::importFromFile(const QString& fileName) -{ - QFileInfo fi(fileName); - if(fi.exists()) - { - MapHandlerGen* mhg = m_window->addMap(fi.baseName(), 2); - if(mhg) - { - MapHandler* mh = static_cast*>(mhg); - PFP2::MAP* map = mh->getMap(); - - std::vector attrNames; - Algo::Surface::Import::importMesh(*map, fileName.toStdString(), attrNames); - - // get vertex position attribute - VertexAttribute position = map->getAttribute(attrNames[0]); - mh->registerAttribute(position); - - // create position VBO - mh->createVBO(position); - - // update corresponding VBO & emit attribute update signal - mh->notifyAttributeModification(position); - - // compute map bounding box - mh->updateBB(position); - } - return mhg; - } - else - return NULL; -} - -void ImportSurfacePlugin::importFromFileDialog() -{ - QStringList fileNames = QFileDialog::getOpenFileNames(m_window, "Import surfaces", m_window->getAppPath(), "Surface mesh Files (*.ply *.off *.trian)"); - QStringList::Iterator it = fileNames.begin(); - while(it != fileNames.end()) { - importFromFile(*it); - ++it; - } -} - -#ifndef DEBUG -Q_EXPORT_PLUGIN2(ImportSurfacePlugin, ImportSurfacePlugin) -#else -Q_EXPORT_PLUGIN2(ImportSurfacePluginD, ImportSurfacePlugin) -#endif - -} // namespace SCHNApps - -} // namespace CGoGN diff --git a/SCHNApps_old/Plugins/importVolume/CMakeLists.txt b/SCHNApps_old/Plugins/importVolume/CMakeLists.txt deleted file mode 100644 index 2786ef9bfe1beea231358605941da329300ec9a5..0000000000000000000000000000000000000000 --- a/SCHNApps_old/Plugins/importVolume/CMakeLists.txt +++ /dev/null @@ -1,31 +0,0 @@ -cmake_minimum_required(VERSION 2.8) - -SET( PLUGIN_NAME ImportVolume ) - -SET( PLUGIN_ROOT_DIR ${SCHNApps_ROOT_DIR}/Plugins/importVolume ) - -INCLUDE_DIRECTORIES( - ${PLUGIN_ROOT_DIR}/include - ${CMAKE_CURRENT_BINARY_DIR} -) - -file( - GLOB_RECURSE - PLUGIN_FILES - ${PLUGIN_ROOT_DIR}/src/*.cpp - ${PLUGIN_ROOT_DIR}/include/*.h - ${PLUGIN_ROOT_DIR}/include/*.hpp -) - -file( - GLOB_RECURSE - PLUGIN_UI_FILES - ${PLUGIN_ROOT_DIR}/forms/*.ui -) - -SET( - PLUGIN_QOBJECT_FILES - ${PLUGIN_ROOT_DIR}/include/importVolume.h -) - -include( ${SCHNApps_ROOT_DIR}/Plugins/plugins_cmake.txt ) diff --git a/SCHNApps_old/Plugins/importVolume/include/importVolume.h b/SCHNApps_old/Plugins/importVolume/include/importVolume.h deleted file mode 100644 index d35c926f3efbeec162af5c49e7545b6c25f1c3c8..0000000000000000000000000000000000000000 --- a/SCHNApps_old/Plugins/importVolume/include/importVolume.h +++ /dev/null @@ -1,51 +0,0 @@ -#ifndef _IMPORTVOLUME_PLUGIN_H_ -#define _IMPORTVOLUME_PLUGIN_H_ - -#include "plugin.h" - - -namespace CGoGN -{ - -namespace SCHNApps -{ - -class ImportVolumePlugin : public Plugin -{ - Q_OBJECT - Q_INTERFACES(CGoGN::SCHNApps::Plugin) - -public: - ImportVolumePlugin() - { - setProvidesRendering(false); - } - - ~ImportVolumePlugin() - {} - - virtual bool enable(); - virtual void disable() {} - - virtual void redraw(View *view) {} - - virtual void keyPress(View* view, QKeyEvent* event) {} - virtual void keyRelease(View* view, QKeyEvent* event) {} - virtual void mousePress(View* view, QMouseEvent* event) {} - virtual void mouseRelease(View* view, QMouseEvent* event) {} - virtual void mouseMove(View* view, QMouseEvent* event) {} - virtual void wheelEvent(View* view, QWheelEvent* event) {} - -public slots: - MapHandlerGen* importFromFile(const QString& fileName); - void importFromFileDialog(); - -private: - QAction* importAction; -}; - -} // namespace SCHNApps - -} // namespace CGoGN - -#endif diff --git a/SCHNApps_old/Plugins/importVolume/src/importVolume.cpp b/SCHNApps_old/Plugins/importVolume/src/importVolume.cpp deleted file mode 100644 index 1fc52301c96b9e4a0e249113c6fc883843c5cc4b..0000000000000000000000000000000000000000 --- a/SCHNApps_old/Plugins/importVolume/src/importVolume.cpp +++ /dev/null @@ -1,75 +0,0 @@ -#include "importVolume.h" - -#include "mapHandler.h" - -#include "Algo/Import/import.h" - -#include -#include - -namespace CGoGN -{ - -namespace SCHNApps -{ - -bool ImportVolumePlugin::enable() -{ - importAction = new QAction("import", this); - addMenuAction("Volume;Import", importAction); - connect(importAction, SIGNAL(triggered()), this, SLOT(importFromFileDialog())); - return true; -} - -MapHandlerGen* ImportVolumePlugin::importFromFile(const QString& fileName) -{ - QFileInfo fi(fileName); - if(fi.exists()) - { - MapHandlerGen* mhg = m_window->addMap(fi.baseName(), 3); - if(mhg) - { - MapHandler* mh = static_cast*>(mhg); - PFP3::MAP* map = mh->getMap(); - - std::vector attrNames ; - Algo::Volume::Import::importMesh(*map, fileName.toStdString(), attrNames); - - // get vertex position attribute - VertexAttribute position = map->getAttribute(attrNames[0]); - mh->registerAttribute(position); - - // create position VBO - mh->createVBO(position); - - // update corresponding VBO & emit attribute update signal - mh->notifyAttributeModification(position); - - // compute map bounding box - mh->updateBB(position); - } - return mhg; - } - else - return NULL; -} - -void ImportVolumePlugin::importFromFileDialog() -{ - QStringList fileNames = QFileDialog::getOpenFileNames(m_window, "Import volumes", m_window->getAppPath(), "Volume mesh Files (*.node *.ts *.off *.tet)"); - QStringList::Iterator it = fileNames.begin(); - while(it != fileNames.end()) { - importFromFile(*it); - ++it; - } -} - -#ifndef DEBUG -Q_EXPORT_PLUGIN2(ImportVolumePlugin, ImportVolumePlugin) -#else -Q_EXPORT_PLUGIN2(ImportVolumePluginD, ImportVolumePlugin) -#endif - -} // namespace SCHNApps - -} // namespace CGoGN diff --git a/SCHNApps_old/Plugins/plugins_cmake.txt b/SCHNApps_old/Plugins/plugins_cmake.txt deleted file mode 100644 index 4037e6e65656bc940b5438f0dbb32facf8a02e31..0000000000000000000000000000000000000000 --- a/SCHNApps_old/Plugins/plugins_cmake.txt +++ /dev/null @@ -1,52 +0,0 @@ - -QT4_WRAP_UI( PLUGIN_UIC_FILES ${PLUGIN_UI_FILES} ) - -QT4_WRAP_CPP( PLUGIN_MOC_FILES ${PLUGIN_QOBJECT_FILES} ) - -IF( ${CMAKE_BUILD_TYPE} STREQUAL Debug ) - - ADD_DEFINITIONS(-DDEBUG) - - IF(WIN32) - link_directories( ${CGoGN_ROOT_DIR}/lib/Release ) - ELSE (WIN32) - link_directories( ${CGoGN_ROOT_DIR}/lib/Debug ${CGoGN_ROOT_DIR}/lib/Release ) - ENDIF (WIN32) - - ADD_LIBRARY( ${PLUGIN_NAME}D SHARED - ${PLUGIN_FILES} - ${PLUGIN_UIC_FILES} - ${PLUGIN_MOC_FILES} - ) - - TARGET_LINK_LIBRARIES( ${PLUGIN_NAME}D - ${CGoGN_LIBS_D} - ${EXT_LIBS} - ) - - ADD_DEPENDENCIES( ${PLUGIN_NAME}D SCHNAppsD ) - - SET_TARGET_PROPERTIES( ${PLUGIN_NAME}D PROPERTIES COMPILE_DEFINITIONS "DEBUG" ) - -ELSE ( ${CMAKE_BUILD_TYPE} STREQUAL Debug ) - - IF(WIN32) - link_directories( ${CGoGN_ROOT_DIR}/lib/Release ) - ELSE (WIN32) - link_directories( ${CGoGN_ROOT_DIR}/lib/Release ) - ENDIF (WIN32) - - ADD_LIBRARY( ${PLUGIN_NAME} SHARED - ${PLUGIN_FILES} - ${PLUGIN_UIC_FILES} - ${PLUGIN_MOC_FILES} - ) - - TARGET_LINK_LIBRARIES( ${PLUGIN_NAME} - ${CGoGN_LIBS_R} - ${EXT_LIBS} - ) - - ADD_DEPENDENCIES( ${PLUGIN_NAME} SCHNApps ) - -ENDIF ( ${CMAKE_BUILD_TYPE} STREQUAL Debug ) diff --git a/SCHNApps_old/Plugins/render/CMakeLists.txt b/SCHNApps_old/Plugins/render/CMakeLists.txt deleted file mode 100644 index 28f684407dbc5036be38fde447809e18377170de..0000000000000000000000000000000000000000 --- a/SCHNApps_old/Plugins/render/CMakeLists.txt +++ /dev/null @@ -1,32 +0,0 @@ -cmake_minimum_required(VERSION 2.8) - -SET( PLUGIN_NAME Render ) - -SET( PLUGIN_ROOT_DIR ${SCHNApps_ROOT_DIR}/Plugins/render ) - -INCLUDE_DIRECTORIES( - ${PLUGIN_ROOT_DIR}/include - ${CMAKE_CURRENT_BINARY_DIR} -) - -file( - GLOB_RECURSE - PLUGIN_FILES - ${PLUGIN_ROOT_DIR}/src/*.cpp - ${PLUGIN_ROOT_DIR}/include/*.h - ${PLUGIN_ROOT_DIR}/include/*.hpp -) - -file( - GLOB_RECURSE - PLUGIN_UI_FILES - ${PLUGIN_ROOT_DIR}/forms/*.ui -) - -SET( - PLUGIN_QOBJECT_FILES - ${PLUGIN_ROOT_DIR}/include/render.h - ${PLUGIN_ROOT_DIR}/include/renderDockTab.h -) - -include( ${SCHNApps_ROOT_DIR}/Plugins/plugins_cmake.txt ) diff --git a/SCHNApps_old/Plugins/render/forms/render.ui b/SCHNApps_old/Plugins/render/forms/render.ui deleted file mode 100644 index 39f9b5c689ed6ef666555316da396c96790cbede..0000000000000000000000000000000000000000 --- a/SCHNApps_old/Plugins/render/forms/render.ui +++ /dev/null @@ -1,145 +0,0 @@ - - - RenderDockWidget - - - - 0 - 0 - 174 - 545 - - - - Form - - - - - - - - - QLayout::SetDefaultConstraint - - - - - - 0 - 0 - - - - - - - - Position : - - - - - - - - 0 - 0 - - - - - - - - Normal : - - - - - - - - - - - - render vertices - - - - - - - 50 - - - Qt::Horizontal - - - - - - - render edges - - - - - - - render faces - - - true - - - - - - - - - Flat - - - true - - - group_faceShading - - - - - - - Phong - - - group_faceShading - - - - - - - - - Qt::Vertical - - - - 156 - 161 - - - - - - - - - - - - diff --git a/SCHNApps_old/Plugins/render/include/render.h b/SCHNApps_old/Plugins/render/include/render.h deleted file mode 100644 index 05031f0ac6f8ca71d4397bc30a392b169b0cb63d..0000000000000000000000000000000000000000 --- a/SCHNApps_old/Plugins/render/include/render.h +++ /dev/null @@ -1,124 +0,0 @@ -#ifndef _RENDER_PLUGIN_H_ -#define _RENDER_PLUGIN_H_ - -#include "plugin.h" -#include "renderDockTab.h" - -#include "Utils/Shaders/shaderFlat.h" -#include "Utils/Shaders/shaderPhong.h" -#include "Utils/Shaders/shaderSimpleColor.h" -#include "Utils/pointSprite.h" - -namespace CGoGN -{ - -namespace SCHNApps -{ - -enum FaceShadingStyle -{ - FLAT = 0, - PHONG = 1 -}; - -struct PerMapParameterSet -{ - PerMapParameterSet() : - positionVBO(NULL), - normalVBO(NULL), - verticesScaleFactor(1.0f), - renderVertices(false), - renderEdges(false), - renderFaces(true), - faceStyle(FLAT) - {} - - PerMapParameterSet(MapHandlerGen* map); - - Utils::VBO* positionVBO; - Utils::VBO* normalVBO; - float verticesScaleFactor; - bool renderVertices; - bool renderEdges; - bool renderFaces; - FaceShadingStyle faceStyle; -}; - -struct ParameterSet -{ - ParameterSet() : selectedMap(NULL) - {} - - QHash perMap; - MapHandlerGen* selectedMap; -}; - - -class RenderPlugin : public Plugin -{ - Q_OBJECT - Q_INTERFACES(CGoGN::SCHNApps::Plugin) - -public: - RenderPlugin() - { - setProvidesRendering(true); - } - - ~RenderPlugin() - {} - - virtual bool enable(); - virtual void disable(); - - virtual void redraw(View *view); - - virtual void keyPress(View* view, QKeyEvent* event) {} - virtual void keyRelease(View* view, QKeyEvent* event) {} - virtual void mousePress(View* view, QMouseEvent* event) {} - virtual void mouseRelease(View* view, QMouseEvent* event) {} - virtual void mouseMove(View* view, QMouseEvent* event) {} - virtual void wheelEvent(View* view, QWheelEvent* event) {} - -protected: - RenderDockTab* m_dockTab; - QHash h_viewParams; - - CGoGN::Utils::ShaderFlat* m_flatShader; - CGoGN::Utils::ShaderPhong* m_phongShader; - CGoGN::Utils::ShaderSimpleColor* m_simpleColorShader; - CGoGN::Utils::PointSprite* m_pointSprite; - -public slots: - void viewLinked(View* view, Plugin* plugin); - void viewUnlinked(View* view, Plugin* plugin); - void currentViewChanged(View* view); - - void mapLinked(MapHandlerGen* m); - void mapUnlinked(MapHandlerGen* m); - -protected: - void addManagedMap(View *v, MapHandlerGen* m); - void removeManagedMap(View *v, MapHandlerGen* m); - -public slots: - - void vboAdded(Utils::VBO* vbo); - void vboRemoved(Utils::VBO* vbo); - - void changeSelectedMap(View* view, MapHandlerGen* map); - - void changePositionVBO(View* view, MapHandlerGen* map, Utils::VBO* vbo, bool fromUI = false); - void changeNormalVBO(View* view, MapHandlerGen* map, Utils::VBO* vbo, bool fromUI = false); - void changeRenderVertices(View* view, MapHandlerGen* map, bool b, bool fromUI = false); - void changeVerticesScaleFactor(View* view, MapHandlerGen* map, float f, bool fromUI = false); - void changeRenderEdges(View* view, MapHandlerGen* map, bool b, bool fromUI = false); - void changeRenderFaces(View* view, MapHandlerGen* map, bool b, bool fromUI = false); - void changeFacesStyle(View* view, MapHandlerGen* map, FaceShadingStyle style, bool fromUI = false); -}; - -} // namespace SCHNApps - -} // namespace CGoGN - -#endif diff --git a/SCHNApps_old/Plugins/render/include/renderDockTab.h b/SCHNApps_old/Plugins/render/include/renderDockTab.h deleted file mode 100644 index c85911aaec4bf396f162f565494ef1756c25ef98..0000000000000000000000000000000000000000 --- a/SCHNApps_old/Plugins/render/include/renderDockTab.h +++ /dev/null @@ -1,50 +0,0 @@ -#ifndef _RENDER_DOCK_TAB_H_ -#define _RENDER_DOCK_TAB_H_ - -#include "ui_render.h" -#include "Utils/vbo.h" - -namespace CGoGN -{ - -namespace SCHNApps -{ - -class Window; -class RenderPlugin; -struct ParameterSet; - -class RenderDockTab : public QWidget, public Ui::RenderDockWidget -{ - Q_OBJECT - -public: - RenderDockTab(Window* w, RenderPlugin* p); - -private: - Window* m_window; - RenderPlugin* m_plugin; - ParameterSet* m_currentParams; - bool b_refreshingUI; - -public slots: - void refreshUI(ParameterSet* params); - - void selectedMapChanged(); - - void positionVBOChanged(int index); - void normalVBOChanged(int index); - void renderVerticesChanged(bool b); - void verticesScaleFactorChanged(int i); - void renderEdgesChanged(bool b); - void renderFacesChanged(bool b); - void faceStyleChanged(QAbstractButton* b); - - void addVBOToList(Utils::VBO* vbo); -}; - -} // namespace SCHNApps - -} // namespace CGoGN - -#endif diff --git a/SCHNApps_old/Plugins/render/src/render.cpp b/SCHNApps_old/Plugins/render/src/render.cpp deleted file mode 100644 index 86926324addc8cc5eb322e9db5c1ce1a0783485d..0000000000000000000000000000000000000000 --- a/SCHNApps_old/Plugins/render/src/render.cpp +++ /dev/null @@ -1,349 +0,0 @@ -#include "render.h" - -#include "mapHandler.h" - -namespace CGoGN -{ - -namespace SCHNApps -{ - -PerMapParameterSet::PerMapParameterSet(MapHandlerGen* map) : - positionVBO(NULL), - normalVBO(NULL), - verticesScaleFactor(1.0f), - renderVertices(false), - renderEdges(false), - renderFaces(true), - faceStyle(FLAT) -{ - bool positionFound = false; - bool normalFound = false; - - QList vbos = map->getVBOList(); - for(int i = 0; i < vbos.count(); ++i) - { - if(vbos[i]->dataSize() == 3) - { - if(!positionFound) positionVBO = vbos[i]; - if(vbos[i]->name() == "position") // try to select a VBO named "position" - { - positionVBO = vbos[i]; - positionFound = true; - } - - if(!normalFound) normalVBO = vbos[i]; - if(vbos[i]->name() == "normal") // try to select a VBO named "normal" - { - normalVBO = vbos[i]; - normalFound = true; - } - } - } -} - - -bool RenderPlugin::enable() -{ - m_dockTab = new RenderDockTab(m_window, this); - addTabInDock(m_dockTab, "Render"); - - m_flatShader = new CGoGN::Utils::ShaderFlat(); - m_flatShader->setAmbiant(CGoGN::Geom::Vec4f(0.2f, 0.2f, 0.2f, 0.1f)); - m_flatShader->setDiffuse(CGoGN::Geom::Vec4f(0.8f, 0.9f, 0.7f, 1.0f)); - m_flatShader->setExplode(1.0f); - - m_phongShader = new CGoGN::Utils::ShaderPhong() ; - m_phongShader->setAmbiant(CGoGN::Geom::Vec4f(0.2f, 0.2f, 0.2f, 0.1f)) ; - m_phongShader->setDiffuse(CGoGN::Geom::Vec4f(0.8f, 0.9f, 0.7f, 1.0f)) ; - m_phongShader->setSpecular(CGoGN::Geom::Vec4f(0.9f, 0.9f, 0.9f, 1.0f)) ; - m_phongShader->setShininess(80.0f) ; - - m_simpleColorShader = new CGoGN::Utils::ShaderSimpleColor(); - CGoGN::Geom::Vec4f c(0.1f, 0.1f, 0.1f, 1.0f); - m_simpleColorShader->setColor(c); - - m_pointSprite = new CGoGN::Utils::PointSprite(); - - registerShader(m_flatShader); - registerShader(m_phongShader); - registerShader(m_simpleColorShader); - registerShader(m_pointSprite); - - connect(m_window, SIGNAL(viewAndPluginLinked(View*, Plugin*)), this, SLOT(viewLinked(View*, Plugin*))); - connect(m_window, SIGNAL(viewAndPluginUnlinked(View*, Plugin*)), this, SLOT(viewUnlinked(View*, Plugin*))); - connect(m_window, SIGNAL(currentViewChanged(View*)), this, SLOT(currentViewChanged(View*))); - - return true; -} - -void RenderPlugin::disable() -{ - delete m_flatShader; - delete m_phongShader; - delete m_simpleColorShader; - delete m_pointSprite; -} - -void RenderPlugin::redraw(View* view) -{ - ParameterSet* params = h_viewParams[view]; - - const QList& maps = view->getLinkedMaps(); - foreach(MapHandlerGen* m, maps) - { - PerMapParameterSet* p = params->perMap[m->getName()]; - if(p->positionVBO != NULL) - { - if(p->renderVertices) - { - m_pointSprite->setSize(m->getBBdiagSize() / 200.0f * p->verticesScaleFactor); - m_pointSprite->setAttributePosition(p->positionVBO); - m_pointSprite->setColor(CGoGN::Geom::Vec4f(0.0f, 0.0f, 1.0f, 1.0f)); - m->draw(m_pointSprite, CGoGN::Algo::Render::GL2::POINTS); - } - if(p->renderEdges) - { - glLineWidth(1.0f); - m_simpleColorShader->setAttributePosition(p->positionVBO); - m->draw(m_simpleColorShader, CGoGN::Algo::Render::GL2::LINES); - } - if(p->renderFaces) - { - glPolygonMode(GL_FRONT_AND_BACK, GL_FILL); - glEnable(GL_LIGHTING); - glEnable(GL_POLYGON_OFFSET_FILL); - glPolygonOffset(1.0f, 1.0f); - switch(p->faceStyle) - { - case FLAT : - m_flatShader->setAttributePosition(p->positionVBO); - m->draw(m_flatShader, CGoGN::Algo::Render::GL2::TRIANGLES); - break ; - case PHONG : - if(p->normalVBO != NULL) - { - m_phongShader->setAttributePosition(p->positionVBO) ; - m_phongShader->setAttributeNormal(p->normalVBO) ; - m->draw(m_phongShader, CGoGN::Algo::Render::GL2::TRIANGLES); - } - break ; - } - glDisable(GL_POLYGON_OFFSET_FILL); - } - } - } -} - -void RenderPlugin::viewLinked(View* view, Plugin* plugin) -{ - if(plugin == this) - { - ParameterSet* params = new ParameterSet(); - h_viewParams.insert(view, params); - - const QList& maps = view->getLinkedMaps(); - foreach(MapHandlerGen* mh, maps) - addManagedMap(view, mh); - - connect(view, SIGNAL(mapLinked(MapHandlerGen*)), this, SLOT(mapLinked(MapHandlerGen*))); - connect(view, SIGNAL(mapUnlinked(MapHandlerGen*)), this, SLOT(mapUnlinked(MapHandlerGen*))); - - if(view->isCurrentView()) - m_dockTab->refreshUI(params); - } -} - -void RenderPlugin::viewUnlinked(View* view, Plugin* plugin) -{ - if(plugin == this) - { - const QList& maps = view->getLinkedMaps(); - foreach(MapHandlerGen* mh, maps) - removeManagedMap(view, mh); - - ParameterSet* params = h_viewParams[view]; - delete params; - h_viewParams.remove(view); - - disconnect(view, SIGNAL(mapLinked(MapHandlerGen*)), this, SLOT(mapLinked(MapHandlerGen*))); - disconnect(view, SIGNAL(mapUnlinked(MapHandlerGen*)), this, SLOT(mapUnlinked(MapHandlerGen*))); - } -} - -void RenderPlugin::currentViewChanged(View* view) -{ - if(isLinkedToView(view)) - m_dockTab->refreshUI(h_viewParams[view]); -} - -void RenderPlugin::mapLinked(MapHandlerGen* m) -{ - View* view = static_cast(QObject::sender()); - assert(isLinkedToView(view)); - addManagedMap(view, m); -} - -void RenderPlugin::mapUnlinked(MapHandlerGen* m) -{ - View* view = static_cast(QObject::sender()); - assert(isLinkedToView(view)); - removeManagedMap(view, m); -} - -void RenderPlugin::addManagedMap(View* v, MapHandlerGen *m) -{ -// connect(m, SIGNAL(attributeModified(unsigned int, QString)), this, SLOT(attributeModified(unsigned int, QString))); -// connect(m, SIGNAL(connectivityModified()), this, SLOT(connectivityModified())); - - ParameterSet* params = h_viewParams[v]; - PerMapParameterSet* perMap = new PerMapParameterSet(m); - - params->perMap.insert(m->getName(), perMap); - - if(params->selectedMap == NULL || params->perMap.count() == 1) - changeSelectedMap(v, m); - else - m_dockTab->refreshUI(params); -} - -void RenderPlugin::removeManagedMap(View *v, MapHandlerGen *m) -{ -// disconnect(m, SIGNAL(attributeModified(unsigned int, QString)), this, SLOT(attributeModified(unsigned int, QString))); -// disconnect(m, SIGNAL(connectivityModified()), this, SLOT(connectivityModified())); - - ParameterSet* params = h_viewParams[v]; - PerMapParameterSet* perMap = params->perMap[m->getName()]; - - delete perMap; - params->perMap.remove(m->getName()); - - if(params->selectedMap == m) - { - if(!params->perMap.empty()) - changeSelectedMap(v, m_window->getMap(params->perMap.begin().key())); - else - changeSelectedMap(v, NULL); - } - else - m_dockTab->refreshUI(params); -} - -void RenderPlugin::changeSelectedMap(View* view, MapHandlerGen* map) -{ - ParameterSet* params = h_viewParams[view]; - - MapHandlerGen* prev = params->selectedMap; - params->selectedMap = map; - - if(view->isCurrentView()) - { - if(prev) - disconnect(prev, SIGNAL(vboAdded(Utils::VBO*)), m_dockTab, SLOT(addVBOToList(Utils::VBO*))); - if(map) - connect(map, SIGNAL(vboAdded(Utils::VBO*)), m_dockTab, SLOT(addVBOToList(Utils::VBO*))); - - m_dockTab->refreshUI(params); - } -} - -void RenderPlugin::changePositionVBO(View* view, MapHandlerGen* map, Utils::VBO* vbo, bool fromUI) -{ - ParameterSet* params = h_viewParams[view]; - params->perMap[map->getName()]->positionVBO = vbo; - - if(view->isCurrentView()) - { - if(!fromUI) - m_dockTab->refreshUI(params); - view->updateGL(); - } -} - -void RenderPlugin::changeNormalVBO(View* view, MapHandlerGen* map, Utils::VBO* vbo, bool fromUI) -{ - ParameterSet* params = h_viewParams[view]; - params->perMap[map->getName()]->normalVBO = vbo; - - if(view->isCurrentView()) - { - if(!fromUI) - m_dockTab->refreshUI(params); - view->updateGL(); - } -} - -void RenderPlugin::changeRenderVertices(View* view, MapHandlerGen* map, bool b, bool fromUI) -{ - ParameterSet* params = h_viewParams[view]; - params->perMap[map->getName()]->renderVertices = b; - - if(view->isCurrentView()) - { - if(!fromUI) - m_dockTab->refreshUI(params); - view->updateGL(); - } -} - -void RenderPlugin::changeVerticesScaleFactor(View* view, MapHandlerGen* map, float f, bool fromUI) -{ - ParameterSet* params = h_viewParams[view]; - params->perMap[map->getName()]->verticesScaleFactor = f; - - if(view->isCurrentView()) - { - if(!fromUI) - m_dockTab->refreshUI(params); - view->updateGL(); - } -} - -void RenderPlugin::changeRenderEdges(View* view, MapHandlerGen* map, bool b, bool fromUI) -{ - ParameterSet* params = h_viewParams[view]; - params->perMap[map->getName()]->renderEdges = b; - - if(view->isCurrentView()) - { - if(!fromUI) - m_dockTab->refreshUI(params); - view->updateGL(); - } -} - -void RenderPlugin::changeRenderFaces(View* view, MapHandlerGen* map, bool b, bool fromUI) -{ - ParameterSet* params = h_viewParams[view]; - params->perMap[map->getName()]->renderFaces = b; - - if(view->isCurrentView()) - { - if(!fromUI) - m_dockTab->refreshUI(params); - view->updateGL(); - } -} - -void RenderPlugin::changeFacesStyle(View* view, MapHandlerGen* map, FaceShadingStyle style, bool fromUI) -{ - ParameterSet* params = h_viewParams[view]; - params->perMap[map->getName()]->faceStyle = style; - - if(view->isCurrentView()) - { - if(!fromUI) - m_dockTab->refreshUI(params); - view->updateGL(); - } -} - -#ifndef DEBUG -Q_EXPORT_PLUGIN2(RenderPlugin, RenderPlugin) -#else -Q_EXPORT_PLUGIN2(RenderPluginD, RenderPlugin) -#endif - -} // namespace SCHNApps - -} // namespace CGoGN diff --git a/SCHNApps_old/Plugins/render/src/renderDockTab.cpp b/SCHNApps_old/Plugins/render/src/renderDockTab.cpp deleted file mode 100644 index 469c15a2b497a31d778f2304c7a5b7d48de45fb6..0000000000000000000000000000000000000000 --- a/SCHNApps_old/Plugins/render/src/renderDockTab.cpp +++ /dev/null @@ -1,188 +0,0 @@ -#include "renderDockTab.h" - -#include "render.h" -#include "window.h" -#include "mapHandler.h" - -namespace CGoGN -{ - -namespace SCHNApps -{ - -RenderDockTab::RenderDockTab(Window* w, RenderPlugin* p) : - m_window(w), - m_plugin(p), - b_refreshingUI(false) -{ - setupUi(this); - - connect(mapList, SIGNAL(itemSelectionChanged()), this, SLOT(selectedMapChanged())); - connect(combo_positionVBO, SIGNAL(currentIndexChanged(int)), this, SLOT(positionVBOChanged(int))); - connect(combo_normalVBO, SIGNAL(currentIndexChanged(int)), this, SLOT(normalVBOChanged(int))); - connect(check_renderVertices, SIGNAL(toggled(bool)), this, SLOT(renderVerticesChanged(bool))); - connect(slider_verticesScaleFactor, SIGNAL(valueChanged(int)), this, SLOT(verticesScaleFactorChanged(int))); - connect(check_renderEdges, SIGNAL(toggled(bool)), this, SLOT(renderEdgesChanged(bool))); - connect(check_renderFaces, SIGNAL(toggled(bool)), this, SLOT(renderFacesChanged(bool))); - connect(group_faceShading, SIGNAL(buttonClicked(QAbstractButton*)), this, SLOT(faceStyleChanged(QAbstractButton*))); -} - -void RenderDockTab::refreshUI(ParameterSet* params) -{ - m_currentParams = params; - - b_refreshingUI = true; - - mapList->clear(); - combo_positionVBO->clear(); - combo_normalVBO->clear(); - - MapHandlerGen* map = params->selectedMap; - - QHash::const_iterator i = params->perMap.constBegin(); - while (i != params->perMap.constEnd()) - { - mapList->addItem(i.key()); - if(map != NULL && i.key() == map->getName()) - { - QList item = mapList->findItems(map->getName(), Qt::MatchExactly); - item[0]->setSelected(true); - - PerMapParameterSet* p = params->perMap[map->getName()]; - - QList vbos = map->getVBOList(); - unsigned int j = 0; - for(int i = 0; i < vbos.count(); ++i) - { - if(vbos[i]->dataSize() == 3) - { - combo_positionVBO->addItem(QString::fromStdString(vbos[i]->name())); - if(vbos[i] == p->positionVBO) - combo_positionVBO->setCurrentIndex(j); - - combo_normalVBO->addItem(QString::fromStdString(vbos[i]->name())); - if(vbos[i] == p->normalVBO) - combo_normalVBO->setCurrentIndex(j); - - ++j; - } - } - - check_renderVertices->setChecked(p->renderVertices); - slider_verticesScaleFactor->setSliderPosition(p->verticesScaleFactor * 50.0); - check_renderEdges->setChecked(p->renderEdges); - check_renderFaces->setChecked(p->renderFaces); - radio_flatShading->setChecked(p->faceStyle == FLAT); - radio_phongShading->setChecked(p->faceStyle == PHONG); - } - ++i; - } - - b_refreshingUI = false; -} - -void RenderDockTab::selectedMapChanged() -{ - if(!b_refreshingUI) - { - QList currentItems = mapList->selectedItems(); - if(!currentItems.empty()) - m_plugin->changeSelectedMap(m_window->getCurrentView(), m_window->getMap(currentItems[0]->text())); - } -} - -void RenderDockTab::positionVBOChanged(int index) -{ - if(!b_refreshingUI) - { - View* view = m_window->getCurrentView(); - MapHandlerGen* map = m_currentParams->selectedMap; - if(map) - m_plugin->changePositionVBO(view, map, map->getVBO(combo_positionVBO->currentText()), true); - } -} - -void RenderDockTab::normalVBOChanged(int index) -{ - if(!b_refreshingUI) - { - View* view = m_window->getCurrentView(); - MapHandlerGen* map = m_currentParams->selectedMap; - if(map) - m_plugin->changeNormalVBO(view, map, map->getVBO(combo_normalVBO->currentText()), true); - } -} - -void RenderDockTab::renderVerticesChanged(bool b) -{ - if(!b_refreshingUI) - { - View* view = m_window->getCurrentView(); - MapHandlerGen* map = m_currentParams->selectedMap; - if(map) - m_plugin->changeRenderVertices(view, map, b, true); - } -} - -void RenderDockTab::verticesScaleFactorChanged(int i) -{ - if(!b_refreshingUI) - { - View* view = m_window->getCurrentView(); - MapHandlerGen* map = m_currentParams->selectedMap; - if(map) - m_plugin->changeVerticesScaleFactor(view, map, i / 50.0, true); - } -} - -void RenderDockTab::renderEdgesChanged(bool b) -{ - if(!b_refreshingUI) - { - View* view = m_window->getCurrentView(); - MapHandlerGen* map = m_currentParams->selectedMap; - if(map) - m_plugin->changeRenderEdges(view, map, b, true); - } -} - -void RenderDockTab::renderFacesChanged(bool b) -{ - if(!b_refreshingUI) - { - View* view = m_window->getCurrentView(); - MapHandlerGen* map = m_currentParams->selectedMap; - if(map) - m_plugin->changeRenderFaces(view, map, b, true); - } -} - -void RenderDockTab::faceStyleChanged(QAbstractButton* b) -{ - if(!b_refreshingUI) - { - View* view = m_window->getCurrentView(); - MapHandlerGen* map = m_currentParams->selectedMap; - if(map) - { - if(radio_flatShading->isChecked()) - m_plugin->changeFacesStyle(view, map, FLAT, true); - else if(radio_phongShading->isChecked()) - m_plugin->changeFacesStyle(view, map, PHONG, true); - } - } -} - -void RenderDockTab::addVBOToList(Utils::VBO* vbo) -{ - if(vbo->dataSize() == 3) - { - QString name = QString::fromStdString(vbo->name()); - combo_positionVBO->addItem(name); - combo_normalVBO->addItem(name); - } -} - -} // namespace SCHNApps - -} // namespace CGoGN diff --git a/SCHNApps_old/Plugins/renderExplod/CMakeLists.txt b/SCHNApps_old/Plugins/renderExplod/CMakeLists.txt deleted file mode 100644 index 4843ef0ff26418494ecbac9f2872b324e741dd79..0000000000000000000000000000000000000000 --- a/SCHNApps_old/Plugins/renderExplod/CMakeLists.txt +++ /dev/null @@ -1,32 +0,0 @@ -cmake_minimum_required(VERSION 2.8) - -SET( PLUGIN_NAME RenderExplod ) - -SET( PLUGIN_ROOT_DIR ${SCHNApps_ROOT_DIR}/Plugins/renderExplod ) - -INCLUDE_DIRECTORIES( - ${PLUGIN_ROOT_DIR}/include - ${CMAKE_CURRENT_BINARY_DIR} -) - -file( - GLOB_RECURSE - PLUGIN_FILES - ${PLUGIN_ROOT_DIR}/src/*.cpp - ${PLUGIN_ROOT_DIR}/include/*.h - ${PLUGIN_ROOT_DIR}/include/*.hpp -) - -file( - GLOB_RECURSE - PLUGIN_UI_FILES - ${PLUGIN_ROOT_DIR}/forms/*.ui -) - -SET( - PLUGIN_QOBJECT_FILES - ${PLUGIN_ROOT_DIR}/include/renderExplod.h - ${PLUGIN_ROOT_DIR}/include/renderExplodDockTab.h -) - -include( ${SCHNApps_ROOT_DIR}/Plugins/plugins_cmake.txt ) diff --git a/SCHNApps_old/Plugins/renderExplod/forms/renderExplod.ui b/SCHNApps_old/Plugins/renderExplod/forms/renderExplod.ui deleted file mode 100644 index ff88a12d96bd0a809de1d1af51279a58437d3c84..0000000000000000000000000000000000000000 --- a/SCHNApps_old/Plugins/renderExplod/forms/renderExplod.ui +++ /dev/null @@ -1,147 +0,0 @@ - - - RenderExplodDockWidget - - - - 0 - 0 - 174 - 545 - - - - Form - - - - - - - - - QLayout::SetDefaultConstraint - - - - - Color : - - - - - - - Position : - - - - - - - - 0 - 0 - - - - - - - - - 0 - 0 - - - - - - - - - - Qt::Horizontal - - - - - - - render edges - - - - - - - render faces - - - true - - - - - - - - - Explod - - - - - - - faces : - - - - - - - 50 - - - Qt::Horizontal - - - - - - - volumes : - - - - - - - 50 - - - Qt::Horizontal - - - - - - - - - Qt::Vertical - - - - 156 - 161 - - - - - - - - - diff --git a/SCHNApps_old/Plugins/renderExplod/include/renderExplod.h b/SCHNApps_old/Plugins/renderExplod/include/renderExplod.h deleted file mode 100644 index dfccae96c7a5fff17b1864372ee7b1f75d5f2096..0000000000000000000000000000000000000000 --- a/SCHNApps_old/Plugins/renderExplod/include/renderExplod.h +++ /dev/null @@ -1,110 +0,0 @@ -#ifndef _RENDER_PLUGIN_H_ -#define _RENDER_PLUGIN_H_ - -#include "plugin.h" -#include "renderExplodDockTab.h" - -#include "Algo/Render/GL2/explodeVolumeRender.h" - -namespace CGoGN -{ - -namespace SCHNApps -{ - -enum FaceShadingStyle -{ - FLAT = 0, - SMOOTH = 1 -}; - -struct PerMapParameterSet -{ - PerMapParameterSet(MapHandlerGen* mh); - ~PerMapParameterSet(); - - void updateRender(); - - MapHandlerGen* mh; - Algo::Render::GL2::ExplodeVolumeRender* m_renderExplod; - VertexAttribute positionAttribute; - VolumeAttribute colorAttribute; - - float facesScaleFactor; - float volumesScaleFactor; - bool renderEdges; - bool renderFaces; - FaceShadingStyle faceStyle; -}; - -struct ParameterSet -{ - ParameterSet() : selectedMap(NULL) - {} - - QHash perMap; - MapHandlerGen* selectedMap; -}; - - -class RenderExplodPlugin : public Plugin -{ - Q_OBJECT - Q_INTERFACES(CGoGN::SCHNApps::Plugin) - -public: - RenderExplodPlugin() - { - setProvidesRendering(true); - } - - ~RenderExplodPlugin() - {} - - virtual bool enable(); - virtual void disable(); - - virtual void redraw(View *view); - - virtual void keyPress(View* view, QKeyEvent* event) {} - virtual void keyRelease(View* view, QKeyEvent* event) {} - virtual void mousePress(View* view, QMouseEvent* event) {} - virtual void mouseRelease(View* view, QMouseEvent* event) {} - virtual void mouseMove(View* view, QMouseEvent* event) {} - virtual void wheelEvent(View* view, QWheelEvent* event) {} - -protected: - RenderExplodDockTab* m_dockTab; - QHash h_viewParams; - -public slots: - void viewLinked(View* view, Plugin* plugin); - void viewUnlinked(View* view, Plugin* plugin); - void currentViewChanged(View* view); - - void mapLinked(MapHandlerGen* m); - void mapUnlinked(MapHandlerGen* m); - -protected: - void addManagedMap(View *v, MapHandlerGen* m); - void removeManagedMap(View *v, MapHandlerGen* m); - -public slots: - void changeSelectedMap(View* view, MapHandlerGen* map); - - void changePositionAttribute(View* view, MapHandlerGen* map, VertexAttribute attribute, bool fromUI = false); - void changeColorAttribute(View* view, MapHandlerGen* map, VertexAttribute attribute, bool fromUI = false); - void changeRenderEdges(View* view, MapHandlerGen* map, bool b, bool fromUI = false); - void changeRenderFaces(View* view, MapHandlerGen* map, bool b, bool fromUI = false); - void changeFacesScaleFactor(View* view, MapHandlerGen* map, int i, bool fromUI = false); - void changeVolumesScaleFactor(View* view, MapHandlerGen* map, int i, bool fromUI = false); - - void attributeModified(unsigned int orbit, QString nameAttr); - void connectivityModified(); -}; - -} // namespace SCHNApps - -} // namespace CGoGN - -#endif diff --git a/SCHNApps_old/Plugins/renderExplod/include/renderExplodDockTab.h b/SCHNApps_old/Plugins/renderExplod/include/renderExplodDockTab.h deleted file mode 100644 index da2fbd6362df1e3183055ad63d4920350776e89f..0000000000000000000000000000000000000000 --- a/SCHNApps_old/Plugins/renderExplod/include/renderExplodDockTab.h +++ /dev/null @@ -1,47 +0,0 @@ -#ifndef _RENDER_EXPLOD_DOCK_TAB_H_ -#define _RENDER_EXPLOD_DOCK_TAB_H_ - -#include "ui_renderExplod.h" - -namespace CGoGN -{ - -namespace SCHNApps -{ - -class Window; -class RenderExplodPlugin; -struct ParameterSet; - -class RenderExplodDockTab : public QWidget, public Ui::RenderExplodDockWidget -{ - Q_OBJECT - -public: - RenderExplodDockTab(Window* w, RenderExplodPlugin* p); - -private: - Window* m_window; - RenderExplodPlugin* m_plugin; - ParameterSet* m_currentParams; - bool b_refreshingUI; - -public slots: - void refreshUI(ParameterSet* params); - - void selectedMapChanged(); - void positionAttributeChanged(int index); - void colorAttributeChanged(int index); - void renderEdgesChanged(bool b); - void renderFacesChanged(bool b); - void facesScaleFactorChanged(int i); - void volumesScaleFactorChanged(int i); - - void addAttributeToList(unsigned int orbit, const QString& nameAttr); -}; - -} // namespace SCHNApps - -} // namespace CGoGN - -#endif diff --git a/SCHNApps_old/Plugins/renderExplod/src/renderExplod.cpp b/SCHNApps_old/Plugins/renderExplod/src/renderExplod.cpp deleted file mode 100644 index 7f4f70c36a480ba762a93bf30a97b805f0193d99..0000000000000000000000000000000000000000 --- a/SCHNApps_old/Plugins/renderExplod/src/renderExplod.cpp +++ /dev/null @@ -1,383 +0,0 @@ -#include "renderExplod.h" - -#include "mapHandler.h" - -namespace CGoGN -{ - -namespace SCHNApps -{ - -PerMapParameterSet::PerMapParameterSet(MapHandlerGen* m) : - mh(m), - facesScaleFactor(1.0f), - volumesScaleFactor(1.0f), - renderEdges(false), - renderFaces(true), - faceStyle(FLAT) -{ - m_renderExplod = new Algo::Render::GL2::ExplodeVolumeRender(false, false, false); - - m_renderExplod->setNoClippingPlane(); - m_renderExplod->setExplodeVolumes(1.0f); - m_renderExplod->setExplodeFaces(1.0f); - - QString positionName; - - QString vec3TypeName = QString::fromStdString(nameOfType(PFP3::VEC3())); - - const AttributeHash& attribs = mh->getAttributesList(VERTEX); - for(AttributeHash::const_iterator i = attribs.constBegin(); i != attribs.constEnd(); ++i) - { - if(i.value() == vec3TypeName) - { - if(positionName != "position") // try to select an attribute named "position" - positionName = i.key(); // or anything else if not found - } - } - positionAttribute = mh->getAttribute(positionName); - - colorAttribute = mh->getAttribute("color"); - - updateRender(); -} - -PerMapParameterSet::~PerMapParameterSet() -{ - delete m_renderExplod; -} - -void PerMapParameterSet::updateRender() -{ - PFP3::MAP* m = static_cast*>(mh)->getMap(); - //if(!color.isValid()) - m_renderExplod->updateData(*m, positionAttribute); -} - - -bool RenderExplodPlugin::enable() -{ - m_dockTab = new RenderExplodDockTab(m_window, this); - addTabInDock(m_dockTab, "RenderExplod"); - - connect(m_window, SIGNAL(viewAndPluginLinked(View*, Plugin*)), this, SLOT(viewLinked(View*, Plugin*))); - connect(m_window, SIGNAL(viewAndPluginUnlinked(View*, Plugin*)), this, SLOT(viewUnlinked(View*, Plugin*))); - connect(m_window, SIGNAL(currentViewChanged(View*)), this, SLOT(currentViewChanged(View*))); - - return true; -} - -void RenderExplodPlugin::disable() -{ - -} - -void RenderExplodPlugin::redraw(View* view) -{ - ParameterSet* params = h_viewParams[view]; - - const QList& maps = view->getLinkedMaps(); - foreach(MapHandlerGen* m, maps) - { - PerMapParameterSet* p = params->perMap[m->getName()]; - - p->m_renderExplod->setExplodeFaces(p->facesScaleFactor); - p->m_renderExplod->setExplodeVolumes(p->volumesScaleFactor); - - if(p->renderEdges) - { - p->m_renderExplod->drawEdges(); - } - if(p->renderFaces) - { - glPolygonMode(GL_FRONT_AND_BACK, GL_FILL); - glEnable(GL_LIGHTING); - glEnable(GL_POLYGON_OFFSET_FILL); - glPolygonOffset(1.0f, 1.0f) ; - p->m_renderExplod->drawFaces(); - glDisable(GL_POLYGON_OFFSET_FILL); - } - } -} - -void RenderExplodPlugin::viewLinked(View* view, Plugin* plugin) -{ - if(plugin == this) - { - ParameterSet* params = new ParameterSet(); - h_viewParams.insert(view, params); - - const QList& maps = view->getLinkedMaps(); - foreach(MapHandlerGen* mh, maps) - addManagedMap(view, mh); - - connect(view, SIGNAL(mapLinked(MapHandlerGen*)), this, SLOT(mapLinked(MapHandlerGen*))); - connect(view, SIGNAL(mapUnlinked(MapHandlerGen*)), this, SLOT(mapUnlinked(MapHandlerGen*))); - - if(view->isCurrentView()) - m_dockTab->refreshUI(params); - } -} - -void RenderExplodPlugin::viewUnlinked(View* view, Plugin* plugin) -{ - if(plugin == this) - { - const QList& maps = view->getLinkedMaps(); - foreach(MapHandlerGen* mh, maps) - removeManagedMap(view, mh); - - ParameterSet* params = h_viewParams[view]; - delete params; - h_viewParams.remove(view); - - disconnect(view, SIGNAL(mapLinked(MapHandlerGen*)), this, SLOT(mapLinked(MapHandlerGen*))); - disconnect(view, SIGNAL(mapUnlinked(MapHandlerGen*)), this, SLOT(mapUnlinked(MapHandlerGen*))); - } -} - -void RenderExplodPlugin::currentViewChanged(View* view) -{ - if(isLinkedToView(view)) - m_dockTab->refreshUI(h_viewParams[view]); -} - -void RenderExplodPlugin::mapLinked(MapHandlerGen* m) -{ - View* view = static_cast(QObject::sender()); - assert(isLinkedToView(view)); - addManagedMap(view, m); -} - -void RenderExplodPlugin::mapUnlinked(MapHandlerGen* m) -{ - View* view = static_cast(QObject::sender()); - assert(isLinkedToView(view)); - removeManagedMap(view, m); -} - -void RenderExplodPlugin::addManagedMap(View* v, MapHandlerGen *m) -{ - connect(m, SIGNAL(attributeModified(unsigned int, QString)), this, SLOT(attributeModified(unsigned int, QString))); - connect(m, SIGNAL(connectivityModified()), this, SLOT(connectivityModified())); - - ParameterSet* params = h_viewParams[v]; - PerMapParameterSet* perMap = new PerMapParameterSet(m); - - registerShader(perMap->m_renderExplod->shaderFaces()); - registerShader(perMap->m_renderExplod->shaderLines()); - - params->perMap.insert(m->getName(), perMap); - - if(params->selectedMap == NULL || params->perMap.count() == 1) - changeSelectedMap(v, m); - else - m_dockTab->refreshUI(params); -} - -void RenderExplodPlugin::removeManagedMap(View *v, MapHandlerGen *m) -{ - disconnect(m, SIGNAL(attributeModified(unsigned int, QString)), this, SLOT(attributeModified(unsigned int, QString))); - disconnect(m, SIGNAL(connectivityModified()), this, SLOT(connectivityModified())); - - ParameterSet* params = h_viewParams[v]; - PerMapParameterSet* perMap = params->perMap[m->getName()]; - - unregisterShader(perMap->m_renderExplod->shaderFaces()); - unregisterShader(perMap->m_renderExplod->shaderLines()); - - delete perMap; - params->perMap.remove(m->getName()); - - if(params->selectedMap == m) - { - if(!params->perMap.empty()) - changeSelectedMap(v, m_window->getMap(params->perMap.begin().key())); - else - changeSelectedMap(v, NULL); - } - else - m_dockTab->refreshUI(params); -} - -void RenderExplodPlugin::changeSelectedMap(View* view, MapHandlerGen* map) -{ - ParameterSet* params = h_viewParams[view]; - - MapHandlerGen* prev = params->selectedMap; - params->selectedMap = map; - - if(view->isCurrentView()) - { - if(prev) - disconnect(prev, SIGNAL(attributeAdded(unsigned int, const QString&)), m_dockTab, SLOT(addAttributeToList(unsigned int, const QString&))); - if(map) - connect(map, SIGNAL(attributeAdded(unsigned int, const QString&)), m_dockTab, SLOT(addAttributeToList(unsigned int, const QString&))); - - m_dockTab->refreshUI(params); - } -} - -void RenderExplodPlugin::changePositionAttribute(View* view, MapHandlerGen* map, VertexAttribute attribute, bool fromUI) -{ - ParameterSet* params = h_viewParams[view]; - PerMapParameterSet* perMap = params->perMap[map->getName()]; - perMap->positionAttribute = attribute; - perMap->updateRender(); - - if(view->isCurrentView()) - { - if(!fromUI) - m_dockTab->refreshUI(params); - view->updateGL(); - } -} - -void RenderExplodPlugin::changeColorAttribute(View* view, MapHandlerGen* map, VertexAttribute attribute, bool fromUI) -{ - ParameterSet* params = h_viewParams[view]; -// params->perMap[map->getName()].colorAttribute = attribute; - //perMap->colorAttribute = attribute; - - if(view->isCurrentView()) - { - if(!fromUI) - m_dockTab->refreshUI(params); - view->updateGL(); - } -} - -void RenderExplodPlugin::changeRenderEdges(View* view, MapHandlerGen* map, bool b, bool fromUI) -{ - ParameterSet* params = h_viewParams[view]; - params->perMap[map->getName()]->renderEdges = b; - - if(view->isCurrentView()) - { - if(!fromUI) - m_dockTab->refreshUI(params); - view->updateGL(); - } -} - -void RenderExplodPlugin::changeRenderFaces(View* view, MapHandlerGen* map, bool b, bool fromUI) -{ - ParameterSet* params = h_viewParams[view]; - params->perMap[map->getName()]->renderFaces = b; - - if(view->isCurrentView()) - { - if(!fromUI) - m_dockTab->refreshUI(params); - view->updateGL(); - } -} - -void RenderExplodPlugin::changeFacesScaleFactor(View* view, MapHandlerGen* map, int i, bool fromUI) -{ - ParameterSet* params = h_viewParams[view]; - params->perMap[map->getName()]->facesScaleFactor = i / 50.0; - - if(view->isCurrentView()) - { - if(!fromUI) - m_dockTab->refreshUI(params); - view->updateGL(); - } -} - -void RenderExplodPlugin::changeVolumesScaleFactor(View* view, MapHandlerGen* map, int i, bool fromUI) -{ - ParameterSet* params = h_viewParams[view]; - params->perMap[map->getName()]->volumesScaleFactor = i / 50.0; - - if(view->isCurrentView()) - { - if(!fromUI) - m_dockTab->refreshUI(params); - view->updateGL(); - } -} - - -void RenderExplodPlugin::attributeModified(unsigned int orbit, QString nameAttr) -{ - MapHandler* mh = static_cast*>(QObject::sender()); - - //On cherche la carte et on la met a jour puis updateGL(); - - //pour toutes les vues - //on va mettre a jour la carte QObject::senter() si elle est enregistree dans le parameterSet de cette vue - - - -// if(orbit == VERTEX) -// { -// MapHandler* mh = static_cast*>(QObject::sender()); -// if(mh == NULL) -// return; -// -// foreach(ParameterSet* params, h_viewParams) -// { -// QHash::const_iterator i = params->perMap.constBegin(); -// while (i != params->perMap.constEnd()) -// { -// PerMapParameterSet* p = params->perMap[mh->getName()]; -// -// p->updateRender(); -// -// ++i; -// } -// -// } - - - -// VertexAttribute position = mh->getAttribute(nameAttr); -// if(!position.isValid()) -// return; -// -// PFP3::MAP* map = mh->getMap(); -// -// m_renderExplod->updateData(*map,position); - -// if(computeNormalLastParameters.contains(map->getName())) -// { -// ComputeNormalParameters& params = computeNormalLastParameters[map->getName()]; -// if(params.positionName == nameAttr && params.autoUpdate) -// computeNormal(map->getName(), params.positionName, params.normalName); -// } -// } -} - -void RenderExplodPlugin::connectivityModified() -{ - //On cherche la carte et on la met a jour puis updateGL(); - - //pour toutes les vues - //on va mettre a jour la carte QObject::senter() si elle est enregistree dans le parameterSet de cette vue - - -// MapHandler* mh = static_cast*>(QObject::sender()); -// if(mh == NULL) -// return; -// -// VertexAttribute position = mh->getAttribute("position"); -// if(!position.isValid()) -// return; -// -// PFP3::MAP* map = mh->getMap(); -// -// m_renderExplod->updateData(*map,position); - -} - -#ifndef DEBUG -Q_EXPORT_PLUGIN2(RenderExplodPlugin, RenderExplodPlugin) -#else -Q_EXPORT_PLUGIN2(RenderExplodPluginD, RenderExplodPlugin) -#endif - -} // namespace SCHNApps - -} // namespace CGoGN diff --git a/SCHNApps_old/Plugins/renderExplod/src/renderExplodDockTab.cpp b/SCHNApps_old/Plugins/renderExplod/src/renderExplodDockTab.cpp deleted file mode 100644 index 4046a0d593e412eb3f39748be66d093208f6cd2c..0000000000000000000000000000000000000000 --- a/SCHNApps_old/Plugins/renderExplod/src/renderExplodDockTab.cpp +++ /dev/null @@ -1,177 +0,0 @@ -#include "renderExplodDockTab.h" - -#include "renderExplod.h" -#include "window.h" -#include "mapHandler.h" - -namespace CGoGN -{ - -namespace SCHNApps -{ - -RenderExplodDockTab::RenderExplodDockTab(Window* w, RenderExplodPlugin* p) : - m_window(w), - m_plugin(p), - b_refreshingUI(false) -{ - setupUi(this); - - connect(mapList, SIGNAL(itemSelectionChanged()), this, SLOT(selectedMapChanged())); - - connect(combo_positionAttribute, SIGNAL(currentIndexChanged(int)), this, SLOT(positionAttributeChanged(int))); - connect(combo_colorAttribute, SIGNAL(currentIndexChanged(int)), this, SLOT(colorAttributeChanged(int))); - - connect(check_renderEdges, SIGNAL(toggled(bool)), this, SLOT(renderEdgesChanged(bool))); - connect(check_renderFaces, SIGNAL(toggled(bool)), this, SLOT(renderFacesChanged(bool))); - - connect(slider_facesScaleFactor, SIGNAL(valueChanged(int)), this, SLOT(facesScaleFactorChanged(int))); - connect(slider_volumesScaleFactor, SIGNAL(valueChanged(int)), this, SLOT(volumesScaleFactorChanged(int))); -} - -void RenderExplodDockTab::refreshUI(ParameterSet* params) -{ - m_currentParams = params; - - b_refreshingUI = true; - - mapList->clear(); - combo_positionAttribute->clear(); - combo_colorAttribute->clear(); - - MapHandlerGen* mh = params->selectedMap; - - QHash::const_iterator i = params->perMap.constBegin(); - while (i != params->perMap.constEnd()) - { - mapList->addItem(i.key()); - if(mh != NULL && i.key() == mh->getName()) - { - QList item = mapList->findItems(mh->getName(), Qt::MatchExactly); - item[0]->setSelected(true); - - PerMapParameterSet* p = params->perMap[mh->getName()]; - - QString vec3TypeName = QString::fromStdString(nameOfType(PFP2::VEC3())); - - unsigned int j = 0; - const AttributeHash& attribs = mh->getAttributesList(VERTEX); - for(AttributeHash::const_iterator i = attribs.constBegin(); i != attribs.constEnd(); ++i) - { - if(i.value() == vec3TypeName) - { - combo_positionAttribute->addItem(i.key()); - if(i.key() == QString::fromStdString(p->positionAttribute.name())) - combo_positionAttribute->setCurrentIndex(j); - -// combo_colorAttribute->addItem(i.key()); -// if(i.key() == QString::fromStdString(p.colorAttribute.name())) -// combo_colorAttribute->setCurrentIndex(j); - - ++j; - } - } - - check_renderEdges->setChecked(p->renderEdges); - check_renderFaces->setChecked(p->renderFaces); - slider_facesScaleFactor->setSliderPosition(p->facesScaleFactor * 50.0); - slider_volumesScaleFactor->setSliderPosition(p->volumesScaleFactor * 50.0); - } - ++i; - } - - b_refreshingUI = false; -} - -void RenderExplodDockTab::selectedMapChanged() -{ - if(!b_refreshingUI) - { - QList currentItems = mapList->selectedItems(); - if(!currentItems.empty()) - m_plugin->changeSelectedMap(m_window->getCurrentView(), m_window->getMap(currentItems[0]->text())); - } -} - -void RenderExplodDockTab::positionAttributeChanged(int index) -{ - if(!b_refreshingUI) - { - View* view = m_window->getCurrentView(); - MapHandlerGen* map = m_currentParams->selectedMap; - if(map) - m_plugin->changePositionAttribute(view, map, map->getAttribute(combo_positionAttribute->currentText()), true); - } -} - -void RenderExplodDockTab::colorAttributeChanged(int index) -{ - if(!b_refreshingUI) - { - View* view = m_window->getCurrentView(); - MapHandlerGen* map = m_currentParams->selectedMap; - if(map) - m_plugin->changeColorAttribute(view, map, map->getAttribute(combo_colorAttribute->currentText()), true); - } -} - -void RenderExplodDockTab::renderEdgesChanged(bool b) -{ - if(!b_refreshingUI) - { - View* view = m_window->getCurrentView(); - MapHandlerGen* map = m_currentParams->selectedMap; - if(map) - m_plugin->changeRenderEdges(view, map, b, true); - } -} - -void RenderExplodDockTab::renderFacesChanged(bool b) -{ - if(!b_refreshingUI) - { - View* view = m_window->getCurrentView(); - MapHandlerGen* map = m_currentParams->selectedMap; - if(map) - m_plugin->changeRenderFaces(view, map, b, true); - } -} - -void RenderExplodDockTab::facesScaleFactorChanged(int i) -{ - if(!b_refreshingUI) - { - View* view = m_window->getCurrentView(); - MapHandlerGen* map = m_currentParams->selectedMap; - if(map) - m_plugin->changeFacesScaleFactor(view, map, i, true); - } -} - -void RenderExplodDockTab::volumesScaleFactorChanged(int i) -{ - if(!b_refreshingUI) - { - View* view = m_window->getCurrentView(); - MapHandlerGen* map = m_currentParams->selectedMap; - if(map) - m_plugin->changeVolumesScaleFactor(view, map, i, true); - } -} - -void RenderExplodDockTab::addAttributeToList(unsigned int orbit, const QString& nameAttr) -{ - QString vec3TypeName = QString::fromStdString(nameOfType(PFP2::VEC3())); - - const QString& typeAttr = m_currentParams->selectedMap->getAttributeTypeName(orbit, nameAttr); - - if(typeAttr == vec3TypeName) - { - combo_positionAttribute->addItem(nameAttr); - combo_colorAttribute->addItem(nameAttr); - } -} - -} // namespace SCHNApps - -} // namespace CGoGN diff --git a/SCHNApps_old/Plugins/renderScalar/CMakeLists.txt b/SCHNApps_old/Plugins/renderScalar/CMakeLists.txt deleted file mode 100644 index e65c0cbfbe8816290a7993d026d70360a3985a8d..0000000000000000000000000000000000000000 --- a/SCHNApps_old/Plugins/renderScalar/CMakeLists.txt +++ /dev/null @@ -1,32 +0,0 @@ -cmake_minimum_required(VERSION 2.8) - -SET( PLUGIN_NAME RenderScalar ) - -SET( PLUGIN_ROOT_DIR ${SCHNApps_ROOT_DIR}/Plugins/renderScalar ) - -INCLUDE_DIRECTORIES( - ${PLUGIN_ROOT_DIR}/include - ${CMAKE_CURRENT_BINARY_DIR} -) - -file( - GLOB_RECURSE - PLUGIN_FILES - ${PLUGIN_ROOT_DIR}/src/*.cpp - ${PLUGIN_ROOT_DIR}/include/*.h - ${PLUGIN_ROOT_DIR}/include/*.hpp -) - -file( - GLOB_RECURSE - PLUGIN_UI_FILES - ${PLUGIN_ROOT_DIR}/forms/*.ui -) - -SET( - PLUGIN_QOBJECT_FILES - ${PLUGIN_ROOT_DIR}/include/renderScalar.h - ${PLUGIN_ROOT_DIR}/include/renderScalarDockTab.h -) - -include( ${SCHNApps_ROOT_DIR}/Plugins/plugins_cmake.txt ) diff --git a/SCHNApps_old/Plugins/renderScalar/forms/renderScalar.ui b/SCHNApps_old/Plugins/renderScalar/forms/renderScalar.ui deleted file mode 100644 index 595e93cd6246ef96cd7ad58dadb4decfeefb5243..0000000000000000000000000000000000000000 --- a/SCHNApps_old/Plugins/renderScalar/forms/renderScalar.ui +++ /dev/null @@ -1,119 +0,0 @@ - - - RenderScalarDockWidget - - - - 0 - 0 - 181 - 545 - - - - Form - - - - - - - - - Position : - - - - - - - - 0 - 0 - - - - - - - - Scalar : - - - - - - - QAbstractItemView::MultiSelection - - - - - - - Expansion : - - - - - - - 10 - - - 1 - - - Qt::Horizontal - - - - - - - Qt::Vertical - - - - 156 - 161 - - - - - - - - Colormap : - - - - - - - - BlueWhiteRed - - - - - CyanWhiteRed - - - - - BlueCyanGreenYellowRed - - - - - BlueGreenRed - - - - - - - - - diff --git a/SCHNApps_old/Plugins/renderScalar/include/renderScalar.h b/SCHNApps_old/Plugins/renderScalar/include/renderScalar.h deleted file mode 100644 index c4abd6aa221342154557587937091bb394eed515..0000000000000000000000000000000000000000 --- a/SCHNApps_old/Plugins/renderScalar/include/renderScalar.h +++ /dev/null @@ -1,106 +0,0 @@ -#ifndef _RENDERSCALAR_PLUGIN_H_ -#define _RENDERSCALAR_PLUGIN_H_ - -#include "plugin.h" -#include "renderScalarDockTab.h" - -#include "Utils/Shaders/shaderScalarField.h" - -namespace CGoGN -{ - -namespace SCHNApps -{ - -enum ColorMap { - BlueWhiteRed = 0, - CyanWhiteRed = 1, - BlueCyanGreenYellowRed = 2, - BlueGreenRed = 3 -}; - -struct PerMapParameterSet -{ - PerMapParameterSet() : - positionVBO(NULL) - {} - - PerMapParameterSet(MapHandlerGen* map); - - Utils::VBO* positionVBO; - Utils::VBO* scalarVBO; - float scalarMin, scalarMax; - int colorMap; - int expansion; -}; - -struct ParameterSet -{ - ParameterSet() : selectedMap(NULL) - {} - - QHash perMap; - MapHandlerGen* selectedMap; -}; - - -class RenderScalarPlugin : public Plugin -{ - Q_OBJECT - Q_INTERFACES(CGoGN::SCHNApps::Plugin) - -public: - RenderScalarPlugin() - { - setProvidesRendering(true); - } - - ~RenderScalarPlugin() - {} - - virtual bool enable(); - virtual void disable(); - - virtual void redraw(View *view); - - virtual void keyPress(View* view, QKeyEvent* event) {} - virtual void keyRelease(View* view, QKeyEvent* event) {} - virtual void mousePress(View* view, QMouseEvent* event) {} - virtual void mouseRelease(View* view, QMouseEvent* event) {} - virtual void mouseMove(View* view, QMouseEvent* event) {} - virtual void wheelEvent(View* view, QWheelEvent* event) {} - -protected: - RenderScalarDockTab* m_dockTab; - QHash h_viewParams; - - CGoGN::Utils::ShaderScalarField* m_scalarShader; - -public slots: - void viewLinked(View* view, Plugin* plugin); - void viewUnlinked(View* view, Plugin* plugin); - void currentViewChanged(View* view); - - void mapLinked(MapHandlerGen* m); - void mapUnlinked(MapHandlerGen* m); - -protected: - void addManagedMap(View *v, MapHandlerGen* m); - void removeManagedMap(View *v, MapHandlerGen* m); - -public slots: - void changeSelectedMap(View* view, MapHandlerGen* map); - - void changePositionVBO(View* view, MapHandlerGen* map, Utils::VBO* vbo, bool fromUI = false); - void changeScalarVBO(View* view, MapHandlerGen* map, Utils::VBO* vbo, bool fromUI = false); - void changeColorMap(View* view, MapHandlerGen* map, int c, bool fromUI = false); - void changeExpansion(View* view, MapHandlerGen* map, int i, bool fromUI = false); - - void attributeModified(unsigned int orbit, QString nameAttr); -}; - -} // namespace SCHNApps - -} // namespace CGoGN - -#endif diff --git a/SCHNApps_old/Plugins/renderScalar/include/renderScalarDockTab.h b/SCHNApps_old/Plugins/renderScalar/include/renderScalarDockTab.h deleted file mode 100644 index 9749c99e7a2822410439aaee2465be36d5867002..0000000000000000000000000000000000000000 --- a/SCHNApps_old/Plugins/renderScalar/include/renderScalarDockTab.h +++ /dev/null @@ -1,47 +0,0 @@ -#ifndef _RENDERSCALAR_DOCK_TAB_H_ -#define _RENDERSCALAR_DOCK_TAB_H_ - -#include "ui_renderScalar.h" -#include "Utils/vbo.h" - -namespace CGoGN -{ - -namespace SCHNApps -{ - -class Window; -class RenderScalarPlugin; -struct ParameterSet; - -class RenderScalarDockTab : public QWidget, public Ui::RenderScalarDockWidget -{ - Q_OBJECT - -public: - RenderScalarDockTab(Window* w, RenderScalarPlugin* p); - -private: - Window* m_window; - RenderScalarPlugin* m_plugin; - ParameterSet* m_currentParams; - bool b_refreshingUI; - -public slots: - void refreshUI(ParameterSet* params); - - void selectedMapChanged(); - - void positionVBOChanged(int index); - void selectedScalarVBOChanged(); - void colorMapChanged(int index); - void expansionChanged(int i); - - void addVBOToList(Utils::VBO* vbo); -}; - -} // namespace SCHNApps - -} // namespace CGoGN - -#endif diff --git a/SCHNApps_old/Plugins/renderScalar/src/renderScalar.cpp b/SCHNApps_old/Plugins/renderScalar/src/renderScalar.cpp deleted file mode 100644 index 7f69f1d0f204691d1bcedf884ef08142a9fc0b10..0000000000000000000000000000000000000000 --- a/SCHNApps_old/Plugins/renderScalar/src/renderScalar.cpp +++ /dev/null @@ -1,294 +0,0 @@ -#include "renderScalar.h" - -#include "mapHandler.h" - -namespace CGoGN -{ - -namespace SCHNApps -{ - -PerMapParameterSet::PerMapParameterSet(MapHandlerGen* map) : - positionVBO(NULL), - scalarVBO(NULL), - colorMap(BlueWhiteRed), - expansion(0) -{ - bool positionFound = false; - - QList vbos = map->getVBOList(); - for(int i = 0; i < vbos.count(); ++i) - { - if(vbos[i]->dataSize() == 3) - { - if(!positionFound) positionVBO = vbos[i]; - if(vbos[i]->name() == "position") // try to select a VBO named "position" - { - positionVBO = vbos[i]; - positionFound = true; - } - } - } -} - - -bool RenderScalarPlugin::enable() -{ - m_dockTab = new RenderScalarDockTab(m_window, this); - addTabInDock(m_dockTab, "RenderScalar"); - - m_scalarShader = new Utils::ShaderScalarField(); - registerShader(m_scalarShader); - - connect(m_window, SIGNAL(viewAndPluginLinked(View*, Plugin*)), this, SLOT(viewLinked(View*, Plugin*))); - connect(m_window, SIGNAL(viewAndPluginUnlinked(View*, Plugin*)), this, SLOT(viewUnlinked(View*, Plugin*))); - connect(m_window, SIGNAL(currentViewChanged(View*)), this, SLOT(currentViewChanged(View*))); - - return true; -} - -void RenderScalarPlugin::disable() -{ - delete m_scalarShader; -} - -void RenderScalarPlugin::redraw(View* view) -{ - ParameterSet* params = h_viewParams[view]; - - const QList& maps = view->getLinkedMaps(); - foreach(MapHandlerGen* m, maps) - { - PerMapParameterSet* p = params->perMap[m->getName()]; - if(p->positionVBO && p->scalarVBO) - { - m_scalarShader->setAttributePosition(p->positionVBO); - m_scalarShader->setAttributeScalar(p->scalarVBO); - m_scalarShader->setMinValue(p->scalarMin); - m_scalarShader->setMaxValue(p->scalarMax); - m_scalarShader->setColorMap(p->colorMap); - m_scalarShader->setExpansion(p->expansion); - - glPolygonMode(GL_FRONT_AND_BACK, GL_FILL); - glEnable(GL_POLYGON_OFFSET_FILL); - glPolygonOffset(1.0f, 1.0f); - m->draw(m_scalarShader, Algo::Render::GL2::TRIANGLES); - glDisable(GL_POLYGON_OFFSET_FILL); - } - } -} - -void RenderScalarPlugin::viewLinked(View* view, Plugin* plugin) -{ - if(plugin == this) - { - ParameterSet* params = new ParameterSet(); - h_viewParams.insert(view, params); - - const QList& maps = view->getLinkedMaps(); - foreach(MapHandlerGen* mh, maps) - addManagedMap(view, mh); - - connect(view, SIGNAL(mapLinked(MapHandlerGen*)), this, SLOT(mapLinked(MapHandlerGen*))); - connect(view, SIGNAL(mapUnlinked(MapHandlerGen*)), this, SLOT(mapUnlinked(MapHandlerGen*))); - - if(view->isCurrentView()) - m_dockTab->refreshUI(params); - } -} - -void RenderScalarPlugin::viewUnlinked(View* view, Plugin* plugin) -{ - if(plugin == this) - { - const QList& maps = view->getLinkedMaps(); - foreach(MapHandlerGen* mh, maps) - removeManagedMap(view, mh); - - ParameterSet* params = h_viewParams[view]; - delete params; - h_viewParams.remove(view); - - disconnect(view, SIGNAL(mapLinked(MapHandlerGen*)), this, SLOT(mapLinked(MapHandlerGen*))); - disconnect(view, SIGNAL(mapUnlinked(MapHandlerGen*)), this, SLOT(mapUnlinked(MapHandlerGen*))); - } -} - -void RenderScalarPlugin::currentViewChanged(View* view) -{ - if(isLinkedToView(view)) - m_dockTab->refreshUI(h_viewParams[view]); -} - -void RenderScalarPlugin::mapLinked(MapHandlerGen* m) -{ - View* view = static_cast(QObject::sender()); - assert(isLinkedToView(view)); - addManagedMap(view, m); -} - -void RenderScalarPlugin::mapUnlinked(MapHandlerGen* m) -{ - View* view = static_cast(QObject::sender()); - assert(isLinkedToView(view)); - removeManagedMap(view, m); -} - -void RenderScalarPlugin::addManagedMap(View* v, MapHandlerGen *m) -{ - connect(m, SIGNAL(attributeModified(unsigned int, QString)), this, SLOT(attributeModified(unsigned int, QString))); -// connect(m, SIGNAL(connectivityModified()), this, SLOT(connectivityModified())); - - ParameterSet* params = h_viewParams[v]; - PerMapParameterSet* perMap = new PerMapParameterSet(m); - - params->perMap.insert(m->getName(), perMap); - - if(params->selectedMap == NULL || params->perMap.count() == 1) - changeSelectedMap(v, m); - else - m_dockTab->refreshUI(params); -} - -void RenderScalarPlugin::removeManagedMap(View *v, MapHandlerGen *m) -{ - disconnect(m, SIGNAL(attributeModified(unsigned int, QString)), this, SLOT(attributeModified(unsigned int, QString))); -// disconnect(m, SIGNAL(connectivityModified()), this, SLOT(connectivityModified())); - - ParameterSet* params = h_viewParams[v]; - PerMapParameterSet* perMap = params->perMap[m->getName()]; - - delete perMap; - params->perMap.remove(m->getName()); - - if(params->selectedMap == m) - { - if(!params->perMap.empty()) - changeSelectedMap(v, m_window->getMap(params->perMap.begin().key())); - else - changeSelectedMap(v, NULL); - } - else - m_dockTab->refreshUI(params); -} - -void RenderScalarPlugin::changeSelectedMap(View* view, MapHandlerGen* map) -{ - ParameterSet* params = h_viewParams[view]; - - MapHandlerGen* prev = params->selectedMap; - params->selectedMap = map; - - if(view->isCurrentView()) - { - if(prev) - disconnect(prev, SIGNAL(vboAdded(Utils::VBO*)), m_dockTab, SLOT(addVBOToList(Utils::VBO*))); - if(map) - connect(map, SIGNAL(vboAdded(Utils::VBO*)), m_dockTab, SLOT(addVBOToList(Utils::VBO*))); - - m_dockTab->refreshUI(params); - } -} - -void RenderScalarPlugin::changePositionVBO(View* view, MapHandlerGen* map, Utils::VBO* vbo, bool fromUI) -{ - ParameterSet* params = h_viewParams[view]; - params->perMap[map->getName()]->positionVBO = vbo; - - if(view->isCurrentView()) - { - if(!fromUI) - m_dockTab->refreshUI(params); - view->updateGL(); - } -} - -void RenderScalarPlugin::changeScalarVBO(View* view, MapHandlerGen* map, Utils::VBO* vbo, bool fromUI) -{ - ParameterSet* params = h_viewParams[view]; - PerMapParameterSet* perMap = params->perMap[map->getName()]; - - perMap->scalarVBO = vbo; - - if(vbo != NULL) - { - const VertexAttribute& attr = map->getAttribute(QString::fromStdString(vbo->name())); - perMap->scalarMin = 1e20; - perMap->scalarMax = -1e20; - for(unsigned int i = attr.begin(); i != attr.end(); attr.next(i)) - { - perMap->scalarMin = attr[i] < perMap->scalarMin ? attr[i] : perMap->scalarMin; - perMap->scalarMax = attr[i] > perMap->scalarMax ? attr[i] : perMap->scalarMax; - } - } - - if(view->isCurrentView()) - { - if(!fromUI) - m_dockTab->refreshUI(params); - view->updateGL(); - } -} - -void RenderScalarPlugin::changeColorMap(View* view, MapHandlerGen* map, int c, bool fromUI) -{ - ParameterSet* params = h_viewParams[view]; - params->perMap[map->getName()]->colorMap = c; - - if(view->isCurrentView()) - { - if(!fromUI) - m_dockTab->refreshUI(params); - view->updateGL(); - } -} - -void RenderScalarPlugin::changeExpansion(View* view, MapHandlerGen* map, int i, bool fromUI) -{ - ParameterSet* params = h_viewParams[view]; - params->perMap[map->getName()]->expansion = i; - - if(view->isCurrentView()) - { - if(!fromUI) - m_dockTab->refreshUI(params); - view->updateGL(); - } -} - -void RenderScalarPlugin::attributeModified(unsigned int orbit, QString nameAttr) -{ - if(orbit == VERTEX) - { - MapHandlerGen* map = static_cast(QObject::sender()); - foreach(View* view, l_views) - { - ParameterSet* params = h_viewParams[view]; - if(params->perMap.contains(map->getName())) - { - PerMapParameterSet* perMap = params->perMap[map->getName()]; - if(perMap->scalarVBO && nameAttr == QString::fromStdString(perMap->scalarVBO->name())) - { - const VertexAttribute& attr = map->getAttribute(nameAttr); - perMap->scalarMin = std::numeric_limits::max(); - perMap->scalarMax = std::numeric_limits::min(); - for(unsigned int i = attr.begin(); i != attr.end(); attr.next(i)) - { - perMap->scalarMin = attr[i] < perMap->scalarMin ? attr[i] : perMap->scalarMin; - perMap->scalarMax = attr[i] > perMap->scalarMax ? attr[i] : perMap->scalarMax; - } - } - } - } - } -} - -#ifndef DEBUG -Q_EXPORT_PLUGIN2(RenderScalarPlugin, RenderScalarPlugin) -#else -Q_EXPORT_PLUGIN2(RenderScalarPluginD, RenderScalarPlugin) -#endif - -} // namespace SCHNApps - -} // namespace CGoGN diff --git a/SCHNApps_old/Plugins/renderScalar/src/renderScalarDockTab.cpp b/SCHNApps_old/Plugins/renderScalar/src/renderScalarDockTab.cpp deleted file mode 100644 index dbddb4426c3ad3ebfc9c208cccb8f8086116dc50..0000000000000000000000000000000000000000 --- a/SCHNApps_old/Plugins/renderScalar/src/renderScalarDockTab.cpp +++ /dev/null @@ -1,160 +0,0 @@ -#include "renderScalarDockTab.h" - -#include "renderScalar.h" -#include "window.h" -#include "mapHandler.h" - -namespace CGoGN -{ - -namespace SCHNApps -{ - -RenderScalarDockTab::RenderScalarDockTab(Window* w, RenderScalarPlugin* p) : - m_window(w), - m_plugin(p), - b_refreshingUI(false) -{ - setupUi(this); - - connect(mapList, SIGNAL(itemSelectionChanged()), this, SLOT(selectedMapChanged())); - connect(combo_positionVBO, SIGNAL(currentIndexChanged(int)), this, SLOT(positionVBOChanged(int))); - connect(list_scalarVBO, SIGNAL(itemSelectionChanged()), this, SLOT(selectedScalarVBOChanged())); - connect(combo_colorMap, SIGNAL(currentIndexChanged(int)), this, SLOT(colorMapChanged(int))); - connect(slider_expansion, SIGNAL(valueChanged(int)), this, SLOT(expansionChanged(int))); -} - -void RenderScalarDockTab::refreshUI(ParameterSet* params) -{ - m_currentParams = params; - - b_refreshingUI = true; - - mapList->clear(); - combo_positionVBO->clear(); - list_scalarVBO->clear(); - - MapHandlerGen* map = params->selectedMap; - - QHash::const_iterator i = params->perMap.constBegin(); - while (i != params->perMap.constEnd()) - { - mapList->addItem(i.key()); - if(map != NULL && i.key() == map->getName()) - { - QList item = mapList->findItems(map->getName(), Qt::MatchExactly); - item[0]->setSelected(true); - - PerMapParameterSet* p = params->perMap[map->getName()]; - - QList vbos = map->getVBOList(); - unsigned int j = 0; - unsigned int k = 0; - for(int i = 0; i < vbos.count(); ++i) - { - unsigned int dataSize = vbos[i]->dataSize(); - if(dataSize == 3) - { - combo_positionVBO->addItem(QString::fromStdString(vbos[i]->name())); - if(vbos[i] == p->positionVBO) - combo_positionVBO->setCurrentIndex(j); - ++j; - } - else if(dataSize == 1) - { - list_scalarVBO->addItem(QString::fromStdString(vbos[i]->name())); - if(vbos[i] == p->scalarVBO) - list_scalarVBO->item(k)->setSelected(true); - ++k; - } - } - - combo_colorMap->setCurrentIndex(p->colorMap); - slider_expansion->setSliderPosition(p->expansion); - } - ++i; - } - - b_refreshingUI = false; -} - -void RenderScalarDockTab::selectedMapChanged() -{ - if(!b_refreshingUI) - { - QList currentItems = mapList->selectedItems(); - if(!currentItems.empty()) - m_plugin->changeSelectedMap(m_window->getCurrentView(), m_window->getMap(currentItems[0]->text())); - } -} - -void RenderScalarDockTab::positionVBOChanged(int index) -{ - if(!b_refreshingUI) - { - View* view = m_window->getCurrentView(); - MapHandlerGen* map = m_currentParams->selectedMap; - if(map) - m_plugin->changePositionVBO(view, map, map->getVBO(combo_positionVBO->currentText()), true); - } -} - -void RenderScalarDockTab::selectedScalarVBOChanged() -{ - if(!b_refreshingUI) - { - View* view = m_window->getCurrentView(); - MapHandlerGen* map = m_currentParams->selectedMap; - if(map) - { - QList selectedItems = list_scalarVBO->selectedItems(); - if(!selectedItems.empty()) - { - foreach(QListWidgetItem* item, selectedItems) - { - if(item != list_scalarVBO->currentItem()) - item->setSelected(false); - } - m_plugin->changeScalarVBO(view, map, map->getVBO(list_scalarVBO->currentItem()->text()), true); - } - else - m_plugin->changeScalarVBO(view, map, NULL, true); - } - } -} - -void RenderScalarDockTab::colorMapChanged(int index) -{ - if(!b_refreshingUI) - { - View* view = m_window->getCurrentView(); - MapHandlerGen* map = m_currentParams->selectedMap; - if(map) - m_plugin->changeColorMap(view, map, index, true); - } -} - -void RenderScalarDockTab::expansionChanged(int i) -{ - if(!b_refreshingUI) - { - View* view = m_window->getCurrentView(); - MapHandlerGen* map = m_currentParams->selectedMap; - if(map) - m_plugin->changeExpansion(view, map, i, true); - } -} - -void RenderScalarDockTab::addVBOToList(Utils::VBO* vbo) -{ - QString name = QString::fromStdString(vbo->name()); - unsigned int dataSize = vbo->dataSize(); - if(dataSize == 3) - combo_positionVBO->addItem(name); - else if(dataSize == 1) - list_scalarVBO->addItem(name); -} - -} // namespace SCHNApps - -} // namespace CGoGN diff --git a/SCHNApps_old/Plugins/renderTopoSurface/CMakeLists.txt b/SCHNApps_old/Plugins/renderTopoSurface/CMakeLists.txt deleted file mode 100644 index fb3c5e4446a71615fc4677b817f242ed40c437d3..0000000000000000000000000000000000000000 --- a/SCHNApps_old/Plugins/renderTopoSurface/CMakeLists.txt +++ /dev/null @@ -1,32 +0,0 @@ -cmake_minimum_required(VERSION 2.8) - -SET( PLUGIN_NAME RenderTopoSurface ) - -SET( PLUGIN_ROOT_DIR ${SCHNApps_ROOT_DIR}/Plugins/renderTopoSurface ) - -INCLUDE_DIRECTORIES( - ${PLUGIN_ROOT_DIR}/include - ${CMAKE_CURRENT_BINARY_DIR} -) - -file( - GLOB_RECURSE - PLUGIN_FILES - ${PLUGIN_ROOT_DIR}/src/*.cpp - ${PLUGIN_ROOT_DIR}/include/*.h - ${PLUGIN_ROOT_DIR}/include/*.hpp -) - -file( - GLOB_RECURSE - PLUGIN_UI_FILES - ${PLUGIN_ROOT_DIR}/forms/*.ui -) - -SET( - PLUGIN_QOBJECT_FILES - ${PLUGIN_ROOT_DIR}/include/renderTopoSurface.h - ${PLUGIN_ROOT_DIR}/include/renderTopoSurfaceDockTab.h -) - -include( ${SCHNApps_ROOT_DIR}/Plugins/plugins_cmake.txt ) diff --git a/SCHNApps_old/Plugins/renderTopoSurface/forms/renderTopoSurface.ui b/SCHNApps_old/Plugins/renderTopoSurface/forms/renderTopoSurface.ui deleted file mode 100644 index 434fbc7dfa1fd974c45796d0efb31f5ec04b5d5f..0000000000000000000000000000000000000000 --- a/SCHNApps_old/Plugins/renderTopoSurface/forms/renderTopoSurface.ui +++ /dev/null @@ -1,134 +0,0 @@ - - - RenderTopoSurfaceDockWidget - - - - 0 - 0 - 190 - 547 - - - - Form - - - - - - - - - Position : - - - - - - - - 0 - 0 - - - - - - - - draw darts - - - true - - - - - - - - - - draw phi1 - - - true - - - - - - - - - - draw phi2 - - - true - - - - - - - - - - explod edges - - - - - - - 50 - - - Qt::Horizontal - - - - - - - explod faces - - - - - - - 50 - - - Qt::Horizontal - - - - - - - Qt::Vertical - - - - 156 - 161 - - - - - - - - - ColorComboBox - QComboBox -
colorComboBox.h
-
-
- - -
diff --git a/SCHNApps_old/Plugins/renderTopoSurface/include/renderTopoSurface.h b/SCHNApps_old/Plugins/renderTopoSurface/include/renderTopoSurface.h deleted file mode 100644 index 4071fe56aeb8ea5a46724257330d31f411556a3b..0000000000000000000000000000000000000000 --- a/SCHNApps_old/Plugins/renderTopoSurface/include/renderTopoSurface.h +++ /dev/null @@ -1,112 +0,0 @@ -#ifndef _RENDERTOPO_SURFACE_PLUGIN_H_ -#define _RENDERTOPO_SURFACE_PLUGIN_H_ - -#include "plugin.h" -#include "renderTopoSurfaceDockTab.h" - -#include "Algo/Render/GL2/topoRender.h" - -namespace CGoGN -{ - -namespace SCHNApps -{ - -struct PerMapParameterSet -{ - PerMapParameterSet(MapHandlerGen* mh); - ~PerMapParameterSet(); - - void updateRender(); - - MapHandlerGen* mh; - Algo::Render::GL2::TopoRender* m_renderTopo; - VertexAttribute positionAttribute; - - bool drawDarts; - QColor dartsColor; - bool drawPhi1; - QColor phi1Color; - bool drawPhi2; - QColor phi2Color; - float edgesScaleFactor; - float facesScaleFactor; -}; - -struct ParameterSet -{ - ParameterSet() : selectedMap(NULL) - {} - - QHash perMap; - MapHandlerGen* selectedMap; -}; - - -class RenderTopoSurfacePlugin : public Plugin -{ - Q_OBJECT - Q_INTERFACES(CGoGN::SCHNApps::Plugin) - -public: - RenderTopoSurfacePlugin() - { - setProvidesRendering(true); - } - - ~RenderTopoSurfacePlugin() - {} - - virtual bool enable(); - virtual void disable(); - - virtual void redraw(View *view); - - virtual void keyPress(View* view, QKeyEvent* event) {} - virtual void keyRelease(View* view, QKeyEvent* event) {} - virtual void mousePress(View* view, QMouseEvent* event); - virtual void mouseRelease(View* view, QMouseEvent* event) {} - virtual void mouseMove(View* view, QMouseEvent* event) {} - virtual void wheelEvent(View* view, QWheelEvent* event) {} - -protected: - RenderTopoSurfaceDockTab* m_dockTab; - QHash h_viewParams; - -public slots: - void viewLinked(View* view, Plugin* plugin); - void viewUnlinked(View* view, Plugin* plugin); - void currentViewChanged(View* view); - - void mapLinked(MapHandlerGen* m); - void mapUnlinked(MapHandlerGen* m); - -protected: - void addManagedMap(View *v, MapHandlerGen* m); - void removeManagedMap(View *v, MapHandlerGen* m); - -public slots: - void changeSelectedMap(View* view, MapHandlerGen* map); - - void changePositionAttribute(View* view, MapHandlerGen* map, VertexAttribute attribute, bool fromUI = false); - void changeDrawDarts(View* view, MapHandlerGen* map, bool b, bool fromUI = false); - void changeDartsColor(View* view, MapHandlerGen* map, QColor c, bool fromUI = false); - void changeDrawPhi1(View* view, MapHandlerGen* map, bool b, bool fromUI = false); - void changePhi1Color(View* view, MapHandlerGen* map, QColor c, bool fromUI = false); - void changeDrawPhi2(View* view, MapHandlerGen* map, bool b, bool fromUI = false); - void changePhi2Color(View* view, MapHandlerGen* map, QColor c, bool fromUI = false); - void changeEdgesScaleFactor(View* view, MapHandlerGen* map, int i, bool fromUI = false); - void changeFacesScaleFactor(View* view, MapHandlerGen* map, int i, bool fromUI = false); - - void attributeModified(unsigned int orbit, QString nameAttr); - void connectivityModified(); - -signals: - void dartSelected(Dart d); -}; - -} // namespace SCHNApps - -} // namespace CGoGN - -#endif diff --git a/SCHNApps_old/Plugins/renderTopoSurface/include/renderTopoSurfaceDockTab.h b/SCHNApps_old/Plugins/renderTopoSurface/include/renderTopoSurfaceDockTab.h deleted file mode 100644 index 79ae75b47cc95a214efadcd0a980e1731d772fbe..0000000000000000000000000000000000000000 --- a/SCHNApps_old/Plugins/renderTopoSurface/include/renderTopoSurfaceDockTab.h +++ /dev/null @@ -1,50 +0,0 @@ -#ifndef _RENDER_TOPO_SURFACE_DOCK_TAB_H_ -#define _RENDER_TOPO_SURFACE_DOCK_TAB_H_ - -#include "ui_renderTopoSurface.h" - -namespace CGoGN -{ - -namespace SCHNApps -{ - -class Window; -class RenderTopoSurfacePlugin; -struct ParameterSet; - -class RenderTopoSurfaceDockTab : public QWidget, public Ui::RenderTopoSurfaceDockWidget -{ - Q_OBJECT - -public: - RenderTopoSurfaceDockTab(Window* w, RenderTopoSurfacePlugin* p); - -private: - Window* m_window; - RenderTopoSurfacePlugin* m_plugin; - ParameterSet* m_currentParams; - bool b_refreshingUI; - -public slots: - void refreshUI(ParameterSet* params); - - void selectedMapChanged(); - void positionAttributeChanged(int index); - void drawDartsChanged(bool b); - void dartsColorChanged(int); - void drawPhi1Changed(bool b); - void phi1ColorChanged(int); - void drawPhi2Changed(bool b); - void phi2ColorChanged(int); - void edgesScaleFactorChanged(int i); - void facesScaleFactorChanged(int i); - - void addAttributeToList(unsigned int orbit, const QString& nameAttr); -}; - -} // namespace SCHNApps - -} // namespace CGoGN - -#endif diff --git a/SCHNApps_old/Plugins/renderTopoSurface/src/renderTopoSurface.cpp b/SCHNApps_old/Plugins/renderTopoSurface/src/renderTopoSurface.cpp deleted file mode 100644 index 90e0c910bc4c243c3948e77f0c00070069327768..0000000000000000000000000000000000000000 --- a/SCHNApps_old/Plugins/renderTopoSurface/src/renderTopoSurface.cpp +++ /dev/null @@ -1,380 +0,0 @@ -#include "renderTopoSurface.h" - -#include "mapHandler.h" - -namespace CGoGN -{ - -namespace SCHNApps -{ - -PerMapParameterSet::PerMapParameterSet(MapHandlerGen* m) : - mh(m), - drawDarts(true), - dartsColor("white"), - drawPhi1(true), - phi1Color("cyan"), - drawPhi2(true), - phi2Color("red"), - edgesScaleFactor(1.0f), - facesScaleFactor(1.0f) -{ - m_renderTopo = new Algo::Render::GL2::TopoRender(); - - QString positionName; - - QString vec3TypeName = QString::fromStdString(nameOfType(PFP2::VEC3())); - - const AttributeHash& attribs = mh->getAttributesList(VERTEX); - for(AttributeHash::const_iterator i = attribs.constBegin(); i != attribs.constEnd(); ++i) - { - if(i.value() == vec3TypeName) - { - if(positionName != "position") // try to select an attribute named "position" - positionName = i.key(); // or anything else if not found - } - } - positionAttribute = mh->getAttribute(positionName); - - updateRender(); -} - -PerMapParameterSet::~PerMapParameterSet() -{ - delete m_renderTopo; -} - -void PerMapParameterSet::updateRender() -{ - PFP2::MAP* m = static_cast*>(mh)->getMap(); - m_renderTopo->updateData(*m, positionAttribute, edgesScaleFactor, facesScaleFactor); -} - - -bool RenderTopoSurfacePlugin::enable() -{ - m_dockTab = new RenderTopoSurfaceDockTab(m_window, this); - addTabInDock(m_dockTab, "RenderTopoSurface"); - - connect(m_window, SIGNAL(viewAndPluginLinked(View*, Plugin*)), this, SLOT(viewLinked(View*, Plugin*))); - connect(m_window, SIGNAL(viewAndPluginUnlinked(View*, Plugin*)), this, SLOT(viewUnlinked(View*, Plugin*))); - connect(m_window, SIGNAL(currentViewChanged(View*)), this, SLOT(currentViewChanged(View*))); - - return true; -} - -void RenderTopoSurfacePlugin::disable() -{ - -} - -void RenderTopoSurfacePlugin::redraw(View* view) -{ - ParameterSet* params = h_viewParams[view]; - - const QList& maps = view->getLinkedMaps(); - foreach(MapHandlerGen* m, maps) - { - PerMapParameterSet* p = params->perMap[m->getName()]; - - if(p->drawDarts) - p->m_renderTopo->drawDarts(); - if(p->drawPhi1) - p->m_renderTopo->drawRelation1(); - if(p->drawPhi2) - p->m_renderTopo->drawRelation2(); - } -} - -void RenderTopoSurfacePlugin::mousePress(View* view, QMouseEvent* event) -{ -// if (Shift()) -// { -// ParameterSet* params = h_viewParams[view]; - -// m_renderTopo->updateData(myMap, position, m_coeff_topo_explod[0], m_coeff_topo_explod[1], m_coeff_topo_explod[2], *m_selNoBoundary) ; - -// Dart d = m_renderTopo->picking(myMap, x, y, *m_selNoBoundary); -// if (d != Dart::nil()) -// { -// emit(dartSelected(d); -// } -// } -} - -void RenderTopoSurfacePlugin::viewLinked(View* view, Plugin* plugin) -{ - if(plugin == this) - { - ParameterSet* params = new ParameterSet(); - h_viewParams.insert(view, params); - - const QList& maps = view->getLinkedMaps(); - foreach(MapHandlerGen* mh, maps) - addManagedMap(view, mh); - - connect(view, SIGNAL(mapLinked(MapHandlerGen*)), this, SLOT(mapLinked(MapHandlerGen*))); - connect(view, SIGNAL(mapUnlinked(MapHandlerGen*)), this, SLOT(mapUnlinked(MapHandlerGen*))); - - if(view->isCurrentView()) - m_dockTab->refreshUI(params); - } -} - -void RenderTopoSurfacePlugin::viewUnlinked(View* view, Plugin* plugin) -{ - if(plugin == this) - { - const QList& maps = view->getLinkedMaps(); - foreach(MapHandlerGen* mh, maps) - removeManagedMap(view, mh); - - ParameterSet* params = h_viewParams[view]; - delete params; - h_viewParams.remove(view); - - disconnect(view, SIGNAL(mapLinked(MapHandlerGen*)), this, SLOT(mapLinked(MapHandlerGen*))); - disconnect(view, SIGNAL(mapUnlinked(MapHandlerGen*)), this, SLOT(mapUnlinked(MapHandlerGen*))); - } -} - -void RenderTopoSurfacePlugin::currentViewChanged(View* view) -{ - if(isLinkedToView(view)) - m_dockTab->refreshUI(h_viewParams[view]); -} - -void RenderTopoSurfacePlugin::mapLinked(MapHandlerGen* m) -{ - View* view = static_cast(QObject::sender()); - assert(isLinkedToView(view)); - addManagedMap(view, m); -} - -void RenderTopoSurfacePlugin::mapUnlinked(MapHandlerGen* m) -{ - View* view = static_cast(QObject::sender()); - assert(isLinkedToView(view)); - removeManagedMap(view, m); -} - -void RenderTopoSurfacePlugin::addManagedMap(View* v, MapHandlerGen *m) -{ - connect(m, SIGNAL(attributeModified(unsigned int, QString)), this, SLOT(attributeModified(unsigned int, QString))); - connect(m, SIGNAL(connectivityModified()), this, SLOT(connectivityModified())); - - ParameterSet* params = h_viewParams[v]; - PerMapParameterSet* perMap = new PerMapParameterSet(m); - - registerShader(perMap->m_renderTopo->shader1()); - registerShader(perMap->m_renderTopo->shader2()); - - params->perMap.insert(m->getName(), perMap); - - if(params->selectedMap == NULL || params->perMap.count() == 1) - changeSelectedMap(v, m); - else - m_dockTab->refreshUI(params); -} - -void RenderTopoSurfacePlugin::removeManagedMap(View *v, MapHandlerGen *m) -{ - disconnect(m, SIGNAL(attributeModified(unsigned int, QString)), this, SLOT(attributeModified(unsigned int, QString))); - disconnect(m, SIGNAL(connectivityModified()), this, SLOT(connectivityModified())); - - ParameterSet* params = h_viewParams[v]; - PerMapParameterSet* perMap = params->perMap[m->getName()]; - - unregisterShader(perMap->m_renderTopo->shader1()); - unregisterShader(perMap->m_renderTopo->shader2()); - - delete perMap; - params->perMap.remove(m->getName()); - - if(params->selectedMap == m) - { - if(!params->perMap.empty()) - changeSelectedMap(v, m_window->getMap(params->perMap.begin().key())); - else - changeSelectedMap(v, NULL); - } - else - m_dockTab->refreshUI(params); -} - -void RenderTopoSurfacePlugin::changeSelectedMap(View* view, MapHandlerGen* map) -{ - ParameterSet* params = h_viewParams[view]; - - MapHandlerGen* prev = params->selectedMap; - params->selectedMap = map; - - if(view->isCurrentView()) - { - if(prev) - disconnect(prev, SIGNAL(attributeAdded(unsigned int, const QString&)), m_dockTab, SLOT(addAttributeToList(unsigned int, const QString&))); - if(map) - connect(map, SIGNAL(attributeAdded(unsigned int, const QString&)), m_dockTab, SLOT(addAttributeToList(unsigned int, const QString&))); - - m_dockTab->refreshUI(params); - } -} - -void RenderTopoSurfacePlugin::changePositionAttribute(View* view, MapHandlerGen* map, VertexAttribute attribute, bool fromUI) -{ - ParameterSet* params = h_viewParams[view]; - PerMapParameterSet* perMap = params->perMap[map->getName()]; - perMap->positionAttribute = attribute; - perMap->updateRender(); - - if(view->isCurrentView()) - { - if(!fromUI) - m_dockTab->refreshUI(params); - view->updateGL(); - } -} - -void RenderTopoSurfacePlugin::changeDrawDarts(View* view, MapHandlerGen* map, bool b, bool fromUI) -{ - ParameterSet* params = h_viewParams[view]; - params->perMap[map->getName()]->drawDarts = b; - - if(view->isCurrentView()) - { - if(!fromUI) - m_dockTab->refreshUI(params); - view->updateGL(); - } -} - -void RenderTopoSurfacePlugin::changeDartsColor(View* view, MapHandlerGen* map, QColor c, bool fromUI) -{ - ParameterSet* params = h_viewParams[view]; - PerMapParameterSet* perMap = params->perMap[map->getName()]; - perMap->dartsColor = c; - perMap->m_renderTopo->setInitialDartsColor(c.redF(), c.greenF(), c.blueF()); - perMap->m_renderTopo->setAllDartsColor(c.redF(), c.greenF(), c.blueF()); - - if(view->isCurrentView()) - { - if(!fromUI) - m_dockTab->refreshUI(params); - view->updateGL(); - } -} - -void RenderTopoSurfacePlugin::changeDrawPhi1(View* view, MapHandlerGen* map, bool b, bool fromUI) -{ - ParameterSet* params = h_viewParams[view]; - params->perMap[map->getName()]->drawPhi1 = b; - - if(view->isCurrentView()) - { - if(!fromUI) - m_dockTab->refreshUI(params); - view->updateGL(); - } -} - -void RenderTopoSurfacePlugin::changePhi1Color(View* view, MapHandlerGen* map, QColor c, bool fromUI) -{ - ParameterSet* params = h_viewParams[view]; - params->perMap[map->getName()]->phi1Color = c; - - if(view->isCurrentView()) - { - if(!fromUI) - m_dockTab->refreshUI(params); - view->updateGL(); - } -} - -void RenderTopoSurfacePlugin::changeDrawPhi2(View* view, MapHandlerGen* map, bool b, bool fromUI) -{ - ParameterSet* params = h_viewParams[view]; - params->perMap[map->getName()]->drawPhi2 = b; - - if(view->isCurrentView()) - { - if(!fromUI) - m_dockTab->refreshUI(params); - view->updateGL(); - } -} - -void RenderTopoSurfacePlugin::changePhi2Color(View* view, MapHandlerGen* map, QColor c, bool fromUI) -{ - ParameterSet* params = h_viewParams[view]; - params->perMap[map->getName()]->phi2Color = c; - - if(view->isCurrentView()) - { - if(!fromUI) - m_dockTab->refreshUI(params); - view->updateGL(); - } -} - -void RenderTopoSurfacePlugin::changeEdgesScaleFactor(View* view, MapHandlerGen* map, int i, bool fromUI) -{ - ParameterSet* params = h_viewParams[view]; - PerMapParameterSet* perMap = params->perMap[map->getName()]; - perMap->edgesScaleFactor = i / 100.0; - perMap->updateRender(); - - if(view->isCurrentView()) - { - if(!fromUI) - m_dockTab->refreshUI(params); - view->updateGL(); - } -} - -void RenderTopoSurfacePlugin::changeFacesScaleFactor(View* view, MapHandlerGen* map, int i, bool fromUI) -{ - ParameterSet* params = h_viewParams[view]; - PerMapParameterSet* perMap = params->perMap[map->getName()]; - perMap->facesScaleFactor = i / 100.0; - perMap->updateRender(); - - if(view->isCurrentView()) - { - if(!fromUI) - m_dockTab->refreshUI(params); - view->updateGL(); - } -} - -void RenderTopoSurfacePlugin::attributeModified(unsigned int orbit, QString nameAttr) -{ - if(orbit == VERTEX) - { - MapHandlerGen* map = static_cast(QObject::sender()); - foreach(View* view, l_views) - { - ParameterSet* params = h_viewParams[view]; - if(params->perMap.contains(map->getName())) - { - PerMapParameterSet* perMap = params->perMap[map->getName()]; - if(nameAttr == QString::fromStdString(perMap->positionAttribute.name())) - perMap->updateRender(); - } - } - } -} - -void RenderTopoSurfacePlugin::connectivityModified() -{ - -} - -#ifndef DEBUG -Q_EXPORT_PLUGIN2(RenderTopoSurfacePlugin, RenderTopoSurfacePlugin) -#else -Q_EXPORT_PLUGIN2(RenderTopoSurfacePluginD, RenderTopoSurfacePlugin) -#endif - -} // namespace SCHNApps - -} // namespace CGoGN diff --git a/SCHNApps_old/Plugins/renderTopoSurface/src/renderTopoSurfaceDockTab.cpp b/SCHNApps_old/Plugins/renderTopoSurface/src/renderTopoSurfaceDockTab.cpp deleted file mode 100644 index 946604bedcc3757d0d1acf6d0ac2229bf78545d3..0000000000000000000000000000000000000000 --- a/SCHNApps_old/Plugins/renderTopoSurface/src/renderTopoSurfaceDockTab.cpp +++ /dev/null @@ -1,208 +0,0 @@ -#include "renderTopoSurfaceDockTab.h" - -#include "renderTopoSurface.h" -#include "window.h" -#include "mapHandler.h" - -namespace CGoGN -{ - -namespace SCHNApps -{ - -RenderTopoSurfaceDockTab::RenderTopoSurfaceDockTab(Window* w, RenderTopoSurfacePlugin* p) : - m_window(w), - m_plugin(p), - b_refreshingUI(false) -{ - setupUi(this); - - connect(mapList, SIGNAL(itemSelectionChanged()), this, SLOT(selectedMapChanged())); - connect(combo_positionAttribute, SIGNAL(currentIndexChanged(int)), this, SLOT(positionAttributeChanged(int))); - connect(check_drawDarts, SIGNAL(toggled(bool)), this, SLOT(drawDartsChanged(bool))); - connect(combo_dartsColor, SIGNAL(currentIndexChanged(int)), this, SLOT(dartsColorChanged(int))); - connect(check_drawPhi1, SIGNAL(toggled(bool)), this, SLOT(drawPhi1Changed(bool))); - connect(combo_phi1Color, SIGNAL(currentIndexChanged(int)), this, SLOT(phi1ColorChanged(int))); - connect(check_drawPhi2, SIGNAL(toggled(bool)), this, SLOT(drawPhi2Changed(bool))); - connect(combo_phi2Color, SIGNAL(currentIndexChanged(int)), this, SLOT(phi2ColorChanged(int))); - connect(slider_edgesScaleFactor, SIGNAL(valueChanged(int)), this, SLOT(edgesScaleFactorChanged(int))); - connect(slider_facesScaleFactor, SIGNAL(valueChanged(int)), this, SLOT(facesScaleFactorChanged(int))); -} - -void RenderTopoSurfaceDockTab::refreshUI(ParameterSet* params) -{ - m_currentParams = params; - - b_refreshingUI = true; - - mapList->clear(); - combo_positionAttribute->clear(); - - MapHandlerGen* mh = params->selectedMap; - - QHash::const_iterator i = params->perMap.constBegin(); - while (i != params->perMap.constEnd()) - { - mapList->addItem(i.key()); - if(mh != NULL && i.key() == mh->getName()) - { - QList item = mapList->findItems(mh->getName(), Qt::MatchExactly); - item[0]->setSelected(true); - - PerMapParameterSet* p = params->perMap[mh->getName()]; - - QString vec3TypeName = QString::fromStdString(nameOfType(PFP2::VEC3())); - - unsigned int j = 0; - const AttributeHash& attribs = mh->getAttributesList(VERTEX); - for(AttributeHash::const_iterator i = attribs.constBegin(); i != attribs.constEnd(); ++i) - { - if(i.value() == vec3TypeName) - { - combo_positionAttribute->addItem(i.key()); - if(i.key() == QString::fromStdString(p->positionAttribute.name())) - combo_positionAttribute->setCurrentIndex(j); - - ++j; - } - } - - check_drawDarts->setChecked(p->drawDarts); - combo_dartsColor->setColor(p->dartsColor); - check_drawPhi1->setChecked(p->drawPhi1); - combo_phi1Color->setColor(p->phi1Color); - check_drawPhi2->setChecked(p->drawPhi2); - combo_phi2Color->setColor(p->phi2Color); - slider_edgesScaleFactor->setSliderPosition(p->edgesScaleFactor * 100.0); - slider_facesScaleFactor->setSliderPosition(p->facesScaleFactor * 100.0); - } - ++i; - } - - b_refreshingUI = false; -} - -void RenderTopoSurfaceDockTab::selectedMapChanged() -{ - if(!b_refreshingUI) - { - QList currentItems = mapList->selectedItems(); - if(!currentItems.empty()) - m_plugin->changeSelectedMap(m_window->getCurrentView(), m_window->getMap(currentItems[0]->text())); - } -} - -void RenderTopoSurfaceDockTab::positionAttributeChanged(int index) -{ - if(!b_refreshingUI) - { - View* view = m_window->getCurrentView(); - MapHandlerGen* map = m_currentParams->selectedMap; - if(map) - m_plugin->changePositionAttribute(view, map, map->getAttribute(combo_positionAttribute->currentText()), true); - } -} - -void RenderTopoSurfaceDockTab::drawDartsChanged(bool b) -{ - if(!b_refreshingUI) - { - View* view = m_window->getCurrentView(); - MapHandlerGen* map = m_currentParams->selectedMap; - if(map) - m_plugin->changeDrawDarts(view, map, b, true); - } -} - -void RenderTopoSurfaceDockTab::dartsColorChanged(int i) -{ - if(!b_refreshingUI) - { - View* view = m_window->getCurrentView(); - MapHandlerGen* map = m_currentParams->selectedMap; - if(map) - m_plugin->changeDartsColor(view, map, combo_dartsColor->color(), true); - } -} - -void RenderTopoSurfaceDockTab::drawPhi1Changed(bool b) -{ - if(!b_refreshingUI) - { - View* view = m_window->getCurrentView(); - MapHandlerGen* map = m_currentParams->selectedMap; - if(map) - m_plugin->changeDrawPhi1(view, map, b, true); - } -} - -void RenderTopoSurfaceDockTab::phi1ColorChanged(int i) -{ - if(!b_refreshingUI) - { - View* view = m_window->getCurrentView(); - MapHandlerGen* map = m_currentParams->selectedMap; - if(map) - m_plugin->changePhi1Color(view, map, combo_phi1Color->color(), true); - } -} - -void RenderTopoSurfaceDockTab::drawPhi2Changed(bool b) -{ - if(!b_refreshingUI) - { - View* view = m_window->getCurrentView(); - MapHandlerGen* map = m_currentParams->selectedMap; - if(map) - m_plugin->changeDrawPhi2(view, map, b, true); - } -} - -void RenderTopoSurfaceDockTab::phi2ColorChanged(int i) -{ - if(!b_refreshingUI) - { - View* view = m_window->getCurrentView(); - MapHandlerGen* map = m_currentParams->selectedMap; - if(map) - m_plugin->changePhi2Color(view, map, combo_phi2Color->color(), true); - } -} - -void RenderTopoSurfaceDockTab::facesScaleFactorChanged(int i) -{ - if(!b_refreshingUI) - { - View* view = m_window->getCurrentView(); - MapHandlerGen* map = m_currentParams->selectedMap; - if(map) - m_plugin->changeEdgesScaleFactor(view, map, i, true); - } -} - -void RenderTopoSurfaceDockTab::edgesScaleFactorChanged(int i) -{ - if(!b_refreshingUI) - { - View* view = m_window->getCurrentView(); - MapHandlerGen* map = m_currentParams->selectedMap; - if(map) - m_plugin->changeFacesScaleFactor(view, map, i, true); - } -} - -void RenderTopoSurfaceDockTab::addAttributeToList(unsigned int orbit, const QString& nameAttr) -{ - QString vec3TypeName = QString::fromStdString(nameOfType(PFP2::VEC3())); - - const QString& typeAttr = m_currentParams->selectedMap->getAttributeTypeName(orbit, nameAttr); - - if(typeAttr == vec3TypeName) - { - combo_positionAttribute->addItem(nameAttr); - } -} - -} // namespace SCHNApps - -} // namespace CGoGN diff --git a/SCHNApps_old/Plugins/renderVector/CMakeLists.txt b/SCHNApps_old/Plugins/renderVector/CMakeLists.txt deleted file mode 100644 index de5e22201ff497f585d806c5b80d2d0cb18012ea..0000000000000000000000000000000000000000 --- a/SCHNApps_old/Plugins/renderVector/CMakeLists.txt +++ /dev/null @@ -1,32 +0,0 @@ -cmake_minimum_required(VERSION 2.8) - -SET( PLUGIN_NAME RenderVector ) - -SET( PLUGIN_ROOT_DIR ${SCHNApps_ROOT_DIR}/Plugins/renderVector ) - -INCLUDE_DIRECTORIES( - ${PLUGIN_ROOT_DIR}/include - ${CMAKE_CURRENT_BINARY_DIR} -) - -file( - GLOB_RECURSE - PLUGIN_FILES - ${PLUGIN_ROOT_DIR}/src/*.cpp - ${PLUGIN_ROOT_DIR}/include/*.h - ${PLUGIN_ROOT_DIR}/include/*.hpp -) - -file( - GLOB_RECURSE - PLUGIN_UI_FILES - ${PLUGIN_ROOT_DIR}/forms/*.ui -) - -SET( - PLUGIN_QOBJECT_FILES - ${PLUGIN_ROOT_DIR}/include/renderVector.h - ${PLUGIN_ROOT_DIR}/include/renderVectorDockTab.h -) - -include( ${SCHNApps_ROOT_DIR}/Plugins/plugins_cmake.txt ) diff --git a/SCHNApps_old/Plugins/renderVector/forms/renderVector.ui b/SCHNApps_old/Plugins/renderVector/forms/renderVector.ui deleted file mode 100644 index cba7d87d907b6874c96ad665c42c6f54dd64fe3e..0000000000000000000000000000000000000000 --- a/SCHNApps_old/Plugins/renderVector/forms/renderVector.ui +++ /dev/null @@ -1,89 +0,0 @@ - - - RenderVectorDockWidget - - - - 0 - 0 - 174 - 545 - - - - Form - - - - - - - - - - - Position : - - - - - - - - 0 - 0 - - - - - - - - - - Vectors : - - - - - - - QAbstractItemView::MultiSelection - - - - - - - Vectors Size : - - - - - - - 50 - - - Qt::Horizontal - - - - - - - Qt::Vertical - - - - 156 - 161 - - - - - - - - - diff --git a/SCHNApps_old/Plugins/renderVector/include/renderVector.h b/SCHNApps_old/Plugins/renderVector/include/renderVector.h deleted file mode 100644 index d67b1a53c3b67454d816f771e594f7a3d85bdc4c..0000000000000000000000000000000000000000 --- a/SCHNApps_old/Plugins/renderVector/include/renderVector.h +++ /dev/null @@ -1,95 +0,0 @@ -#ifndef _RENDERVECTOR_PLUGIN_H_ -#define _RENDERVECTOR_PLUGIN_H_ - -#include "plugin.h" -#include "renderVectorDockTab.h" - -#include "Utils/Shaders/shaderVectorPerVertex.h" - -namespace CGoGN -{ - -namespace SCHNApps -{ - -struct PerMapParameterSet -{ - PerMapParameterSet() : - positionVBO(NULL), - vectorsScaleFactor(1.0f) - {} - - PerMapParameterSet(MapHandlerGen* map); - - Utils::VBO* positionVBO; - std::vector vectorVBO; - float vectorsScaleFactor; -}; - -struct ParameterSet -{ - ParameterSet() : selectedMap(NULL) - {} - - QHash perMap; - MapHandlerGen* selectedMap; -}; - - -class RenderVectorPlugin : public Plugin -{ - Q_OBJECT - Q_INTERFACES(CGoGN::SCHNApps::Plugin) - -public: - RenderVectorPlugin() - { - setProvidesRendering(true); - } - - ~RenderVectorPlugin() - {} - - virtual bool enable(); - virtual void disable(); - - virtual void redraw(View *view); - - virtual void keyPress(View* view, QKeyEvent* event) {} - virtual void keyRelease(View* view, QKeyEvent* event) {} - virtual void mousePress(View* view, QMouseEvent* event) {} - virtual void mouseRelease(View* view, QMouseEvent* event) {} - virtual void mouseMove(View* view, QMouseEvent* event) {} - virtual void wheelEvent(View* view, QWheelEvent* event) {} - -protected: - RenderVectorDockTab* m_dockTab; - QHash h_viewParams; - - CGoGN::Utils::ShaderVectorPerVertex* m_vectorShader; - -public slots: - void viewLinked(View* view, Plugin* plugin); - void viewUnlinked(View* view, Plugin* plugin); - void currentViewChanged(View* view); - - void mapLinked(MapHandlerGen* m); - void mapUnlinked(MapHandlerGen* m); - -protected: - void addManagedMap(View *v, MapHandlerGen* m); - void removeManagedMap(View *v, MapHandlerGen* m); - -public slots: - void changeSelectedMap(View* view, MapHandlerGen* map); - - void changePositionVBO(View* view, MapHandlerGen* map, Utils::VBO* vbo, bool fromUI = false); - void changeSelectedVectorsVBO(View* view, MapHandlerGen* map, const std::vector& vbos, bool fromUI = false); - void changeVectorsScaleFactor(View* view, MapHandlerGen* map, int i, bool fromUI = false); -}; - -} // namespace SCHNApps - -} // namespace CGoGN - -#endif diff --git a/SCHNApps_old/Plugins/renderVector/include/renderVectorDockTab.h b/SCHNApps_old/Plugins/renderVector/include/renderVectorDockTab.h deleted file mode 100644 index b0f2e546669f65e8d807470076636331dd9a0e0f..0000000000000000000000000000000000000000 --- a/SCHNApps_old/Plugins/renderVector/include/renderVectorDockTab.h +++ /dev/null @@ -1,46 +0,0 @@ -#ifndef _RENDERVECTOR_DOCK_TAB_H_ -#define _RENDERVECTOR_DOCK_TAB_H_ - -#include "ui_renderVector.h" -#include "Utils/vbo.h" - -namespace CGoGN -{ - -namespace SCHNApps -{ - -class Window; -class RenderVectorPlugin; -struct ParameterSet; - -class RenderVectorDockTab : public QWidget, public Ui::RenderVectorDockWidget -{ - Q_OBJECT - -public: - RenderVectorDockTab(Window* w, RenderVectorPlugin* p); - -private: - Window* m_window; - RenderVectorPlugin* m_plugin; - ParameterSet* m_currentParams; - bool b_refreshingUI; - -public slots: - void refreshUI(ParameterSet* params); - - void selectedMapChanged(); - - void positionVBOChanged(int index); - void selectedVectorsVBOChanged(); - void vectorsScaleFactorChanged(int i); - - void addVBOToList(Utils::VBO* vbo); -}; - -} // namespace SCHNApps - -} // namespace CGoGN - -#endif diff --git a/SCHNApps_old/Plugins/renderVector/src/renderVector.cpp b/SCHNApps_old/Plugins/renderVector/src/renderVector.cpp deleted file mode 100644 index cd0d241352f910f2bbab217023b585b3a2456675..0000000000000000000000000000000000000000 --- a/SCHNApps_old/Plugins/renderVector/src/renderVector.cpp +++ /dev/null @@ -1,236 +0,0 @@ -#include "renderVector.h" - -#include "mapHandler.h" - -namespace CGoGN -{ - -namespace SCHNApps -{ - -PerMapParameterSet::PerMapParameterSet(MapHandlerGen* map) : - positionVBO(NULL), - vectorsScaleFactor(1.0f) -{ - bool positionFound = false; - - QList vbos = map->getVBOList(); - for(int i = 0; i < vbos.count(); ++i) - { - if(vbos[i]->dataSize() == 3) - { - if(!positionFound) positionVBO = vbos[i]; - if(vbos[i]->name() == "position") // try to select a VBO named "position" - { - positionVBO = vbos[i]; - positionFound = true; - } - } - } -} - - -bool RenderVectorPlugin::enable() -{ - m_dockTab = new RenderVectorDockTab(m_window, this); - addTabInDock(m_dockTab, "RenderVector"); - - m_vectorShader = new Utils::ShaderVectorPerVertex(); - m_vectorShader->setColor(Geom::Vec4f(1.0f, 0.0f, 0.0f, 1.0f)); - - registerShader(m_vectorShader); - - connect(m_window, SIGNAL(viewAndPluginLinked(View*, Plugin*)), this, SLOT(viewLinked(View*, Plugin*))); - connect(m_window, SIGNAL(viewAndPluginUnlinked(View*, Plugin*)), this, SLOT(viewUnlinked(View*, Plugin*))); - connect(m_window, SIGNAL(currentViewChanged(View*)), this, SLOT(currentViewChanged(View*))); - - return true; -} - -void RenderVectorPlugin::disable() -{ - delete m_vectorShader; -} - -void RenderVectorPlugin::redraw(View* view) -{ - ParameterSet* params = h_viewParams[view]; - - const QList& maps = view->getLinkedMaps(); - foreach(MapHandlerGen* m, maps) - { - PerMapParameterSet* p = params->perMap[m->getName()]; - m_vectorShader->setScale(m->getBBdiagSize() / 100.0f * p->vectorsScaleFactor) ; - if(p->positionVBO != NULL) - { - m_vectorShader->setAttributePosition(p->positionVBO) ; - for(std::vector::const_iterator it = p->vectorVBO.begin(); it != p->vectorVBO.end(); ++it) - { - m_vectorShader->setAttributeVector(*it) ; - glLineWidth(1.0f) ; - m->draw(m_vectorShader, Algo::Render::GL2::POINTS) ; - } - } - } -} - -void RenderVectorPlugin::viewLinked(View* view, Plugin* plugin) -{ - if(plugin == this) - { - ParameterSet* params = new ParameterSet(); - h_viewParams.insert(view, params); - - const QList& maps = view->getLinkedMaps(); - foreach(MapHandlerGen* mh, maps) - addManagedMap(view, mh); - - connect(view, SIGNAL(mapLinked(MapHandlerGen*)), this, SLOT(mapLinked(MapHandlerGen*))); - connect(view, SIGNAL(mapUnlinked(MapHandlerGen*)), this, SLOT(mapUnlinked(MapHandlerGen*))); - - if(view->isCurrentView()) - m_dockTab->refreshUI(params); - } -} - -void RenderVectorPlugin::viewUnlinked(View* view, Plugin* plugin) -{ - if(plugin == this) - { - const QList& maps = view->getLinkedMaps(); - foreach(MapHandlerGen* mh, maps) - removeManagedMap(view, mh); - - ParameterSet* params = h_viewParams[view]; - delete params; - h_viewParams.remove(view); - - disconnect(view, SIGNAL(mapLinked(MapHandlerGen*)), this, SLOT(mapLinked(MapHandlerGen*))); - disconnect(view, SIGNAL(mapUnlinked(MapHandlerGen*)), this, SLOT(mapUnlinked(MapHandlerGen*))); - } -} - -void RenderVectorPlugin::currentViewChanged(View* view) -{ - if(isLinkedToView(view)) - m_dockTab->refreshUI(h_viewParams[view]); -} - -void RenderVectorPlugin::mapLinked(MapHandlerGen* m) -{ - View* view = static_cast(QObject::sender()); - assert(isLinkedToView(view)); - addManagedMap(view, m); -} - -void RenderVectorPlugin::mapUnlinked(MapHandlerGen* m) -{ - View* view = static_cast(QObject::sender()); - assert(isLinkedToView(view)); - removeManagedMap(view, m); -} - -void RenderVectorPlugin::addManagedMap(View* v, MapHandlerGen *m) -{ -// connect(m, SIGNAL(attributeModified(unsigned int, QString)), this, SLOT(attributeModified(unsigned int, QString))); -// connect(m, SIGNAL(connectivityModified()), this, SLOT(connectivityModified())); - - ParameterSet* params = h_viewParams[v]; - PerMapParameterSet* perMap = new PerMapParameterSet(m); - - params->perMap.insert(m->getName(), perMap); - - if(params->selectedMap == NULL || params->perMap.count() == 1) - changeSelectedMap(v, m); - else - m_dockTab->refreshUI(params); -} - -void RenderVectorPlugin::removeManagedMap(View *v, MapHandlerGen *m) -{ -// disconnect(m, SIGNAL(attributeModified(unsigned int, QString)), this, SLOT(attributeModified(unsigned int, QString))); -// disconnect(m, SIGNAL(connectivityModified()), this, SLOT(connectivityModified())); - - ParameterSet* params = h_viewParams[v]; - PerMapParameterSet* perMap = params->perMap[m->getName()]; - - delete perMap; - params->perMap.remove(m->getName()); - - if(params->selectedMap == m) - { - if(!params->perMap.empty()) - changeSelectedMap(v, m_window->getMap(params->perMap.begin().key())); - else - changeSelectedMap(v, NULL); - } - else - m_dockTab->refreshUI(params); -} - -void RenderVectorPlugin::changeSelectedMap(View* view, MapHandlerGen* map) -{ - ParameterSet* params = h_viewParams[view]; - - MapHandlerGen* prev = params->selectedMap; - params->selectedMap = map; - - if(view->isCurrentView()) - { - if(prev) - disconnect(prev, SIGNAL(vboAdded(Utils::VBO*)), m_dockTab, SLOT(addVBOToList(Utils::VBO*))); - if(map) - connect(map, SIGNAL(vboAdded(Utils::VBO*)), m_dockTab, SLOT(addVBOToList(Utils::VBO*))); - - m_dockTab->refreshUI(params); - } -} - -void RenderVectorPlugin::changePositionVBO(View* view, MapHandlerGen* map, Utils::VBO* vbo, bool fromUI) -{ - ParameterSet* params = h_viewParams[view]; - params->perMap[map->getName()]->positionVBO = vbo; - - if(view->isCurrentView()) - { - if(!fromUI) - m_dockTab->refreshUI(params); - view->updateGL(); - } -} - -void RenderVectorPlugin::changeSelectedVectorsVBO(View* view, MapHandlerGen* map, const std::vector& vbos, bool fromUI) -{ - ParameterSet* params = h_viewParams[view]; - params->perMap[map->getName()]->vectorVBO = vbos; - - if(view->isCurrentView()) - { - if(!fromUI) - m_dockTab->refreshUI(params); - view->updateGL(); - } -} - -void RenderVectorPlugin::changeVectorsScaleFactor(View* view, MapHandlerGen* map, int i, bool fromUI) -{ - ParameterSet* params = h_viewParams[view]; - params->perMap[map->getName()]->vectorsScaleFactor = i / 50.0; - - if(view->isCurrentView()) - { - if(!fromUI) - m_dockTab->refreshUI(params); - view->updateGL(); - } -} - -#ifndef DEBUG -Q_EXPORT_PLUGIN2(RenderVectorPlugin, RenderVectorPlugin) -#else -Q_EXPORT_PLUGIN2(RenderVectorPluginD, RenderVectorPlugin) -#endif - -} // namespace SCHNApps - -} // namespace CGoGN diff --git a/SCHNApps_old/Plugins/renderVector/src/renderVectorDockTab.cpp b/SCHNApps_old/Plugins/renderVector/src/renderVectorDockTab.cpp deleted file mode 100644 index de91436c45386fb17fba32e10d4591ac6210af97..0000000000000000000000000000000000000000 --- a/SCHNApps_old/Plugins/renderVector/src/renderVectorDockTab.cpp +++ /dev/null @@ -1,136 +0,0 @@ -#include "renderVectorDockTab.h" - -#include "renderVector.h" -#include "window.h" -#include "mapHandler.h" - -namespace CGoGN -{ - -namespace SCHNApps -{ - -RenderVectorDockTab::RenderVectorDockTab(Window* w, RenderVectorPlugin* p) : - m_window(w), - m_plugin(p), - b_refreshingUI(false) -{ - setupUi(this); - - connect(mapList, SIGNAL(itemSelectionChanged()), this, SLOT(selectedMapChanged())); - connect(combo_positionVBO, SIGNAL(currentIndexChanged(int)), this, SLOT(positionVBOChanged(int))); - connect(list_vectorVBO, SIGNAL(itemSelectionChanged()), this, SLOT(selectedVectorsVBOChanged())); - connect(slider_vectorsScaleFactor, SIGNAL(valueChanged(int)), this, SLOT(vectorsScaleFactorChanged(int))); -} - -void RenderVectorDockTab::refreshUI(ParameterSet* params) -{ - m_currentParams = params; - - b_refreshingUI = true; - - mapList->clear(); - combo_positionVBO->clear(); - list_vectorVBO->clear(); - - MapHandlerGen* map = params->selectedMap; - - QHash::const_iterator i = params->perMap.constBegin(); - while (i != params->perMap.constEnd()) - { - mapList->addItem(i.key()); - if(map != NULL && i.key() == map->getName()) - { - QList item = mapList->findItems(map->getName(), Qt::MatchExactly); - item[0]->setSelected(true); - - PerMapParameterSet* p = params->perMap[map->getName()]; - - QList vbos = map->getVBOList(); - unsigned int j = 0; - for(int i = 0; i < vbos.count(); ++i) - { - if(vbos[i]->dataSize() == 3) - { - combo_positionVBO->addItem(QString::fromStdString(vbos[i]->name())); - if(vbos[i] == p->positionVBO) - combo_positionVBO->setCurrentIndex(j); - - list_vectorVBO->addItem(QString::fromStdString(vbos[i]->name())); - if(std::find(p->vectorVBO.begin(), p->vectorVBO.end(), vbos[i]) != p->vectorVBO.end()) - list_vectorVBO->item(j)->setSelected(true); - - ++j; - } - } - - slider_vectorsScaleFactor->setSliderPosition(p->vectorsScaleFactor * 50.0); - } - ++i; - } - - b_refreshingUI = false; -} - -void RenderVectorDockTab::selectedMapChanged() -{ - if(!b_refreshingUI) - { - QList currentItems = mapList->selectedItems(); - if(!currentItems.empty()) - m_plugin->changeSelectedMap(m_window->getCurrentView(), m_window->getMap(currentItems[0]->text())); - } -} - -void RenderVectorDockTab::positionVBOChanged(int index) -{ - if(!b_refreshingUI) - { - View* view = m_window->getCurrentView(); - MapHandlerGen* map = m_currentParams->selectedMap; - if(map) - m_plugin->changePositionVBO(view, map, map->getVBO(combo_positionVBO->currentText()), true); - } -} - -void RenderVectorDockTab::selectedVectorsVBOChanged() -{ - if(!b_refreshingUI) - { - View* view = m_window->getCurrentView(); - MapHandlerGen* map = m_currentParams->selectedMap; - if(map) - { - QList currentItems = list_vectorVBO->selectedItems(); - std::vector vbos; - foreach(QListWidgetItem* item, currentItems) - vbos.push_back(map->getVBO(item->text())); - m_plugin->changeSelectedVectorsVBO(view, map, vbos, true); - } - } -} - -void RenderVectorDockTab::vectorsScaleFactorChanged(int i) -{ - if(!b_refreshingUI) - { - View* view = m_window->getCurrentView(); - MapHandlerGen* map = m_currentParams->selectedMap; - if(map) - m_plugin->changeVectorsScaleFactor(view, map, i, true); - } -} - -void RenderVectorDockTab::addVBOToList(Utils::VBO* vbo) -{ - if(vbo->dataSize() == 3) - { - QString name = QString::fromStdString(vbo->name()); - combo_positionVBO->addItem(name); - list_vectorVBO->addItem(name); - } -} - -} // namespace SCHNApps - -} // namespace CGoGN diff --git a/SCHNApps_old/Plugins/subdivideSurface/CMakeLists.txt b/SCHNApps_old/Plugins/subdivideSurface/CMakeLists.txt deleted file mode 100644 index 030bbf60c5928e1c972aacbf12d9ac6b57c137aa..0000000000000000000000000000000000000000 --- a/SCHNApps_old/Plugins/subdivideSurface/CMakeLists.txt +++ /dev/null @@ -1,32 +0,0 @@ -cmake_minimum_required(VERSION 2.8) - -SET( PLUGIN_NAME SubdivideSurface ) - -SET( PLUGIN_ROOT_DIR ${SCHNApps_ROOT_DIR}/Plugins/subdivideSurface ) - -INCLUDE_DIRECTORIES( - ${PLUGIN_ROOT_DIR}/include - ${CMAKE_CURRENT_BINARY_DIR} -) - -file( - GLOB_RECURSE - PLUGIN_FILES - ${PLUGIN_ROOT_DIR}/src/*.cpp - ${PLUGIN_ROOT_DIR}/include/*.h - ${PLUGIN_ROOT_DIR}/include/*.hpp -) - -file( - GLOB_RECURSE - PLUGIN_UI_FILES - ${PLUGIN_ROOT_DIR}/forms/*.ui -) - -SET( - PLUGIN_QOBJECT_FILES - ${PLUGIN_ROOT_DIR}/include/subdivideSurface.h - ${PLUGIN_ROOT_DIR}/include/subdivideSurfaceDialog.h -) - -include( ${SCHNApps_ROOT_DIR}/Plugins/plugins_cmake.txt ) diff --git a/SCHNApps_old/Plugins/subdivideSurface/forms/subdivideSurfaceDialog.ui b/SCHNApps_old/Plugins/subdivideSurface/forms/subdivideSurfaceDialog.ui deleted file mode 100644 index a7d65ba6317da88bad35f634ccd2497331df6a12..0000000000000000000000000000000000000000 --- a/SCHNApps_old/Plugins/subdivideSurface/forms/subdivideSurfaceDialog.ui +++ /dev/null @@ -1,95 +0,0 @@ - - - SubdivideSurfaceDialog - - - - 0 - 0 - 314 - 230 - - - - Subdivide surface - - - - - - - - - - - Position attribute : - - - - - - - - 0 - 0 - - - - - - - - - - - - Loop - - - - - - - Catmull-Clark - - - - - - - Triangule faces - - - - - - - - - - - Cancel - - - - - - - Apply - - - - - - - OK - - - - - - - - - - diff --git a/SCHNApps_old/Plugins/subdivideSurface/include/subdivideSurface.h b/SCHNApps_old/Plugins/subdivideSurface/include/subdivideSurface.h deleted file mode 100644 index 46147165ff7293b1c732966e15a75b28b685c5a7..0000000000000000000000000000000000000000 --- a/SCHNApps_old/Plugins/subdivideSurface/include/subdivideSurface.h +++ /dev/null @@ -1,66 +0,0 @@ -#ifndef _SUBDIVIDESURFACE_PLUGIN_H_ -#define _SUBDIVIDESURFACE_PLUGIN_H_ - -#include "plugin.h" -#include "subdivideSurfaceDialog.h" - -namespace CGoGN -{ - -namespace SCHNApps -{ - -class SubdivideSurfacePlugin : public Plugin -{ - Q_OBJECT - Q_INTERFACES(CGoGN::SCHNApps::Plugin) - -public: - SubdivideSurfacePlugin() - { - setProvidesRendering(false); - } - - ~SubdivideSurfacePlugin() - {} - - virtual bool enable(); - virtual void disable() {} - - virtual void redraw(View *view) {} - - virtual void keyPress(View* view, QKeyEvent* event) {} - virtual void keyRelease(View* view, QKeyEvent* event) {} - virtual void mousePress(View* view, QMouseEvent* event) {} - virtual void mouseRelease(View* view, QMouseEvent* event) {} - virtual void mouseMove(View* view, QMouseEvent* event) {} - virtual void wheelEvent(View* view, QWheelEvent* event) {} - -public slots: - void openSubdivideSurfaceDialog(); - void subdivideSurfaceFromDialog(); - - void loopSubdivision( - const QString& mapName, - const QString& positionAttributeName = "position" - ); - void CCSubdivision( - const QString& mapName, - const QString& positionAttributeName = "position" - ); - void trianguleFaces( - const QString& mapName, - const QString& positionAttributeName = "position" - ); - -private: - SubdivideSurfaceDialog* m_subdivideSurfaceDialog; - - QAction* m_subdivideSurfaceAction; -}; - -} // namespace SCHNApps - -} // namespace CGoGN - -#endif diff --git a/SCHNApps_old/Plugins/subdivideSurface/include/subdivideSurfaceDialog.h b/SCHNApps_old/Plugins/subdivideSurface/include/subdivideSurfaceDialog.h deleted file mode 100644 index 69b3b81e04fae727a6d3bdbabefbe15a997b63a8..0000000000000000000000000000000000000000 --- a/SCHNApps_old/Plugins/subdivideSurface/include/subdivideSurfaceDialog.h +++ /dev/null @@ -1,37 +0,0 @@ -#ifndef _SUBDIVIDESURFACE_DIALOG_H_ -#define _SUBDIVIDESURFACE_DIALOG_H_ - -#include "ui_subdivideSurfaceDialog.h" - -namespace CGoGN -{ - -namespace SCHNApps -{ - -class Window; -class MapHandlerGen; - -class SubdivideSurfaceDialog : public QDialog, public Ui::SubdivideSurfaceDialog -{ - Q_OBJECT - -public: - SubdivideSurfaceDialog(Window* w); - -private: - Window* m_window; - MapHandlerGen* m_selectedMap; - -public slots: - void selectedMapChanged(); - void addMapToList(MapHandlerGen* m); - void removeMapFromList(MapHandlerGen* m); - void addAttributeToList(unsigned int orbit, const QString& name); -}; - -} // namespace SCHNApps - -} // namespace CGoGN - -#endif diff --git a/SCHNApps_old/Plugins/subdivideSurface/src/subdivideSurface.cpp b/SCHNApps_old/Plugins/subdivideSurface/src/subdivideSurface.cpp deleted file mode 100644 index 2328eb93485a4fa0f98d0bcff51ae2eb67399fa6..0000000000000000000000000000000000000000 --- a/SCHNApps_old/Plugins/subdivideSurface/src/subdivideSurface.cpp +++ /dev/null @@ -1,128 +0,0 @@ -#include "subdivideSurface.h" - -#include "mapHandler.h" - -#include "Algo/Modelisation/subdivision.h" - -namespace CGoGN -{ - -namespace SCHNApps -{ - -bool SubdivideSurfacePlugin::enable() -{ - m_subdivideSurfaceDialog = new SubdivideSurfaceDialog(m_window); - - m_subdivideSurfaceAction = new QAction("Subdivide surface", this); - - addMenuAction("Surface;Subdivide", m_subdivideSurfaceAction); - - connect(m_subdivideSurfaceAction, SIGNAL(triggered()), this, SLOT(openSubdivideSurfaceDialog())); - - connect(m_subdivideSurfaceDialog, SIGNAL(accepted()), this, SLOT(subdivideSurfaceFromDialog())); - connect(m_subdivideSurfaceDialog->button_apply, SIGNAL(clicked()), this, SLOT(subdivideSurfaceFromDialog())); - - return true; -} - -void SubdivideSurfacePlugin::openSubdivideSurfaceDialog() -{ - m_subdivideSurfaceDialog->show(); -} - -void SubdivideSurfacePlugin::subdivideSurfaceFromDialog() -{ - QList currentItems = m_subdivideSurfaceDialog->mapList->selectedItems(); - if(!currentItems.empty()) - { - const QString& mapName = currentItems[0]->text(); - const QString& positionName = m_subdivideSurfaceDialog->combo_positionAttribute->currentText(); - - if(m_subdivideSurfaceDialog->radio_Loop->isChecked()) - loopSubdivision(mapName, positionName); - else if(m_subdivideSurfaceDialog->radio_CC->isChecked()) - CCSubdivision(mapName, positionName); - else if(m_subdivideSurfaceDialog->radio_trianguleFaces->isChecked()) - trianguleFaces(mapName, positionName); - } -} - -void SubdivideSurfacePlugin::loopSubdivision( - const QString& mapName, - const QString& positionAttributeName) -{ - MapHandler* mh = static_cast*>(m_window->getMap(mapName)); - if(mh == NULL) - return; - - VertexAttribute position = mh->getAttribute(positionAttributeName); - if(!position.isValid()) - return; - - PFP2::MAP* map = mh->getMap(); - Algo::Surface::Modelisation::LoopSubdivision(*map, position); - - mh->notifyAttributeModification(position); - mh->notifyConnectivityModification(); - - QList views = mh->getLinkedViews(); - foreach(View* view, views) - view->updateGL(); -} - -void SubdivideSurfacePlugin::CCSubdivision( - const QString& mapName, - const QString& positionAttributeName) -{ - MapHandler* mh = static_cast*>(m_window->getMap(mapName)); - if(mh == NULL) - return; - - VertexAttribute position = mh->getAttribute(positionAttributeName); - if(!position.isValid()) - return; - - PFP2::MAP* map = mh->getMap(); - Algo::Surface::Modelisation::CatmullClarkSubdivision(*map, position); - - mh->notifyAttributeModification(position); - mh->notifyConnectivityModification(); - - QList views = mh->getLinkedViews(); - foreach(View* view, views) - view->updateGL(); -} - -void SubdivideSurfacePlugin::trianguleFaces( - const QString& mapName, - const QString& positionAttributeName) -{ - MapHandler* mh = static_cast*>(m_window->getMap(mapName)); - if(mh == NULL) - return; - - VertexAttribute position = mh->getAttribute(positionAttributeName); - if(!position.isValid()) - return; - - PFP2::MAP* map = mh->getMap(); - Algo::Surface::Modelisation::trianguleFaces(*map, position); - - mh->notifyAttributeModification(position); - mh->notifyConnectivityModification(); - - QList views = mh->getLinkedViews(); - foreach(View* view, views) - view->updateGL(); -} - -#ifndef DEBUG -Q_EXPORT_PLUGIN2(SubdivideSurfacePlugin, SubdivideSurfacePlugin) -#else -Q_EXPORT_PLUGIN2(SubdivideSurfacePluginD, SubdivideSurfacePlugin) -#endif - -} // namespace SCHNApps - -} // namespace CGoGN diff --git a/SCHNApps_old/Plugins/subdivideSurface/src/subdivideSurfaceDialog.cpp b/SCHNApps_old/Plugins/subdivideSurface/src/subdivideSurfaceDialog.cpp deleted file mode 100644 index 0f3aeacec99476ef50d8cdfb2ed4389695700a37..0000000000000000000000000000000000000000 --- a/SCHNApps_old/Plugins/subdivideSurface/src/subdivideSurfaceDialog.cpp +++ /dev/null @@ -1,97 +0,0 @@ -#include "subdivideSurfaceDialog.h" - -#include "subdivideSurface.h" -#include "window.h" -#include "mapHandler.h" - -namespace CGoGN -{ - -namespace SCHNApps -{ - -SubdivideSurfaceDialog::SubdivideSurfaceDialog(Window* w) : - m_window(w), - m_selectedMap(NULL) -{ - setupUi(this); - - 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& maps = m_window->getMapsList(); - foreach(MapHandlerGen* map, maps) - mapList->addItem(map->getName()); -} - -void SubdivideSurfaceDialog::selectedMapChanged() -{ - if(m_selectedMap) - disconnect(m_selectedMap, SIGNAL(attributeAdded(unsigned int, const QString&)), this, SLOT(addAttributeToList(unsigned int, const QString&))); - - QList currentItems = mapList->selectedItems(); - if(!currentItems.empty()) - { - combo_positionAttribute->clear(); - - const QString& mapname = currentItems[0]->text(); - MapHandlerGen* mh = m_window->getMap(mapname); - - QString vec3TypeName = QString::fromStdString(nameOfType(PFP2::VEC3())); - - unsigned int j = 0; - const AttributeHash& attribs = mh->getAttributesList(VERTEX); - for(AttributeHash::const_iterator i = attribs.constBegin(); i != attribs.constEnd(); ++i) - { - if(i.value() == vec3TypeName) - { - combo_positionAttribute->addItem(i.key()); - if(i.key() == "position") // try to select a position attribute named "position" - combo_positionAttribute->setCurrentIndex(j); - - ++j; - } - } - - m_selectedMap = mh; - connect(m_selectedMap, SIGNAL(attributeAdded(unsigned int, const QString&)), this, SLOT(addAttributeToList(unsigned int, const QString&))); - } - else - m_selectedMap = NULL; -} - -void SubdivideSurfaceDialog::addMapToList(MapHandlerGen* m) -{ - mapList->addItem(m->getName()); -} - -void SubdivideSurfaceDialog::removeMapFromList(MapHandlerGen* m) -{ - QList items = mapList->findItems(m->getName(), Qt::MatchExactly); - if(!items.empty()) - delete items[0]; - - if(m_selectedMap == m) - { - disconnect(m_selectedMap, SIGNAL(attributeAdded(unsigned int, const QString&)), this, SLOT(addAttributeToList(unsigned int, const QString&))); - m_selectedMap = NULL; - } -} - -void SubdivideSurfaceDialog::addAttributeToList(unsigned int orbit, const QString& nameAttr) -{ - QString vec3TypeName = QString::fromStdString(nameOfType(PFP2::VEC3())); - - const QString& typeAttr = m_selectedMap->getAttributeTypeName(orbit, nameAttr); - - if(typeAttr == vec3TypeName) - { - combo_positionAttribute->addItem(nameAttr); - } -} - -} // namespace SCHNApps - -} // namespace CGoGN diff --git a/SCHNApps_old/Plugins/surfaceDeformation/CMakeLists.txt b/SCHNApps_old/Plugins/surfaceDeformation/CMakeLists.txt deleted file mode 100644 index c0bada3c479b675aa4eea0931a2b825ac18f899c..0000000000000000000000000000000000000000 --- a/SCHNApps_old/Plugins/surfaceDeformation/CMakeLists.txt +++ /dev/null @@ -1,32 +0,0 @@ -cmake_minimum_required(VERSION 2.8) - -SET( PLUGIN_NAME SurfaceDeformation ) - -SET( PLUGIN_ROOT_DIR ${SCHNApps_ROOT_DIR}/Plugins/surfaceDeformation ) - -INCLUDE_DIRECTORIES( - ${PLUGIN_ROOT_DIR}/include - ${CMAKE_CURRENT_BINARY_DIR} -) - -file( - GLOB_RECURSE - PLUGIN_FILES - ${PLUGIN_ROOT_DIR}/src/*.cpp - ${PLUGIN_ROOT_DIR}/include/*.h - ${PLUGIN_ROOT_DIR}/include/*.hpp -) - -file( - GLOB_RECURSE - PLUGIN_UI_FILES - ${PLUGIN_ROOT_DIR}/forms/*.ui -) - -SET( - PLUGIN_QOBJECT_FILES - ${PLUGIN_ROOT_DIR}/include/surfaceDeformation.h - ${PLUGIN_ROOT_DIR}/include/surfaceDeformationDockTab.h -) - -include( ${SCHNApps_ROOT_DIR}/Plugins/plugins_cmake.txt ) diff --git a/SCHNApps_old/Plugins/surfaceDeformation/forms/surfaceDeformation.ui b/SCHNApps_old/Plugins/surfaceDeformation/forms/surfaceDeformation.ui deleted file mode 100644 index 1d71cc82fa0838bd6357ba138cbbbb316e300f15..0000000000000000000000000000000000000000 --- a/SCHNApps_old/Plugins/surfaceDeformation/forms/surfaceDeformation.ui +++ /dev/null @@ -1,88 +0,0 @@ - - - SurfaceDeformationWidget - - - - 0 - 0 - 189 - 545 - - - - Form - - - - - - - - - - - Position : - - - - - - - - 0 - 0 - - - - - - - - - - Select Vertices - - - - - - - - locked - - - - - - - handle - - - - - - - - - - - - Qt::Vertical - - - - 156 - 161 - - - - - - mapList - label_2 - groupBox - - - - diff --git a/SCHNApps_old/Plugins/surfaceDeformation/include/surfaceDeformation.h b/SCHNApps_old/Plugins/surfaceDeformation/include/surfaceDeformation.h deleted file mode 100644 index 090d71d7f921ad1e140288042c3066319c139a76..0000000000000000000000000000000000000000 --- a/SCHNApps_old/Plugins/surfaceDeformation/include/surfaceDeformation.h +++ /dev/null @@ -1,154 +0,0 @@ -#ifndef _SURFACEDEFORMATION_PLUGIN_H_ -#define _SURFACEDEFORMATION_PLUGIN_H_ - -#include "plugin.h" -#include "surfaceDeformationDockTab.h" - -#include "mapHandler.h" - -#include "Utils/pointSprite.h" - -#include "Container/fakeAttribute.h" - -#include "NL/nl.h" -#include "Algo/LinearSolving/basic.h" -#include "Eigen/Dense" - -namespace CGoGN -{ - -namespace SCHNApps -{ - - -enum SelectionMode -{ - LOCKED, - HANDLE -}; - - -typedef NoNameIOAttribute Eigen_Matrix3f ; - -struct PerMapParameterSet -{ - PerMapParameterSet(MapHandlerGen* mh); - ~PerMapParameterSet(); - - void initParameters(); - - MapHandlerGen* mh; - - VertexAttribute positionAttribute; - CellMarker* lockingMarker; - CellMarker* handleMarker; - SelectionMode verticesSelectionMode; - std::vector lockedVertices; - std::vector handleVertices; - std::vector handleVerticesId; - Utils::VBO* lockedVerticesVBO; - Utils::VBO* handleVerticesVBO; - - VertexAttribute positionInit; - VertexAttribute vertexNormal; - EdgeAttribute edgeAngle; - EdgeAttribute edgeWeight; - VertexAttribute vertexArea; - VertexAttribute diffCoord; - VertexAttribute vertexRotationMatrix; - VertexAttribute rotatedDiffCoord; - - VertexAttribute vIndex; - unsigned int nb_vertices; - NLContext nlContext; -}; - -struct ParameterSet -{ - ParameterSet() : selectedMap(NULL) - {} - - PerMapParameterSet* getCurrentMapParameterSet() - { - if(selectedMap) - return perMap[selectedMap->getName()]; - else - return NULL; - } - - QHash perMap; - MapHandlerGen* selectedMap; -}; - - -class SurfaceDeformationPlugin : public Plugin -{ - Q_OBJECT - Q_INTERFACES(CGoGN::SCHNApps::Plugin) - -public: - SurfaceDeformationPlugin() : - selecting(false), - dragging(false) - { - setProvidesRendering(true); - } - - ~SurfaceDeformationPlugin() - {} - - virtual bool enable(); - virtual void disable(); - - virtual void redraw(View *view); - - virtual void keyPress(View* view, QKeyEvent* event); - virtual void keyRelease(View* view, QKeyEvent* event); - virtual void mousePress(View* view, QMouseEvent* event); - virtual void mouseRelease(View* view, QMouseEvent* event); - virtual void mouseMove(View* view, QMouseEvent* event); - virtual void wheelEvent(View* view, QWheelEvent* event); - -protected: - SurfaceDeformationDockTab* m_dockTab; - QHash h_viewParams; - - Utils::PointSprite* m_pointSprite; - - Utils::VBO* selectionSphereVBO; - - bool selecting; - PFP2::VEC3 selectionCenter; - PFP2::REAL selectionRadius; - bool dragging; - PFP2::REAL dragZ; - qglviewer::Vec dragPrevious; - -public slots: - void viewLinked(View* view, Plugin* plugin); - void viewUnlinked(View* view, Plugin* plugin); - void currentViewChanged(View* view); - - void mapLinked(MapHandlerGen* m); - void mapUnlinked(MapHandlerGen* m); - -protected: - void addManagedMap(View *v, MapHandlerGen* m); - void removeManagedMap(View *v, MapHandlerGen* m); - -public slots: - void changeSelectedMap(View* view, MapHandlerGen* map); - - void changePositionAttribute(View* view, MapHandlerGen* map, VertexAttribute attribute, bool fromUI = false); - void changeVerticesSelectionMode(View* view, MapHandlerGen* map, SelectionMode m, bool fromUI = false); - -protected: - void matchDiffCoord(View* view, MapHandlerGen* map); - void asRigidAsPossible(View* view, MapHandlerGen* map); -}; - -} // namespace SCHNApps - -} // namespace CGoGN - -#endif diff --git a/SCHNApps_old/Plugins/surfaceDeformation/include/surfaceDeformationDockTab.h b/SCHNApps_old/Plugins/surfaceDeformation/include/surfaceDeformationDockTab.h deleted file mode 100644 index 34bd3923b30a8d20cdf4aa6897184d5b4051c2d2..0000000000000000000000000000000000000000 --- a/SCHNApps_old/Plugins/surfaceDeformation/include/surfaceDeformationDockTab.h +++ /dev/null @@ -1,45 +0,0 @@ -#ifndef _SURFACE_DEFORMATION_DOCK_TAB_H_ -#define _SURFACE_DEFORMATION_DOCK_TAB_H_ - -#include "ui_surfaceDeformation.h" - -namespace CGoGN -{ - -namespace SCHNApps -{ - -class Window; -class SurfaceDeformationPlugin; -struct ParameterSet; - -class SurfaceDeformationDockTab : public QWidget, public Ui::SurfaceDeformationWidget -{ - Q_OBJECT - -public: - SurfaceDeformationDockTab(Window* w, SurfaceDeformationPlugin* p); - -private: - Window* m_window; - SurfaceDeformationPlugin* m_plugin; - ParameterSet* m_currentParams; - bool b_refreshingUI; - -public slots: - void refreshUI(ParameterSet* params); - - void selectedMapChanged(); - - void positionAttributeChanged(int index); - void selectLockedVertices(bool b); - void selectHandleVertices(bool b); - - void addAttributeToList(unsigned int orbit, const QString& nameAttr); -}; - -} // namespace SCHNApps - -} // namespace CGoGN - -#endif diff --git a/SCHNApps_old/Plugins/surfaceDeformation/src/surfaceDeformation.cpp b/SCHNApps_old/Plugins/surfaceDeformation/src/surfaceDeformation.cpp deleted file mode 100644 index 629a9ea9d48b51e16caa1d2da55bc230736c22d6..0000000000000000000000000000000000000000 --- a/SCHNApps_old/Plugins/surfaceDeformation/src/surfaceDeformation.cpp +++ /dev/null @@ -1,682 +0,0 @@ -#include "surfaceDeformation.h" - -#include "Algo/Selection/raySelector.h" -#include "Algo/Selection/collector.h" - -#include "Algo/Geometry/normal.h" -#include "Algo/Geometry/laplacian.h" - -#include -#include - -namespace CGoGN -{ - -namespace SCHNApps -{ - -PerMapParameterSet::PerMapParameterSet(MapHandlerGen* m) : - mh(m), - verticesSelectionMode(LOCKED), - nlContext(NULL) -{ - QString positionName; - - QString vec3TypeName = QString::fromStdString(nameOfType(PFP2::VEC3())); - - const AttributeHash& attribs = mh->getAttributesList(VERTEX); - for(AttributeHash::const_iterator i = attribs.constBegin(); i != attribs.constEnd(); ++i) - { - if(i.value() == vec3TypeName) - { - if(positionName != "position") // try to select an attribute named "position" - positionName = i.key(); // or anything else if not found - } - } - positionAttribute = mh->getAttribute(positionName); - - PFP2::MAP* map = static_cast*>(mh)->getMap(); - lockingMarker = new CellMarker(*map); - handleMarker = new CellMarker(*map); - - lockedVerticesVBO = new Utils::VBO(); - handleVerticesVBO = new Utils::VBO(); - - positionInit = mh->getAttribute("positionInit", false) ; - if(!positionInit.isValid()) - positionInit = mh->addAttribute("positionInit", false) ; - - vIndex = mh->getAttribute("vIndex", false); - if(!vIndex.isValid()) - vIndex = mh->addAttribute("vIndex", false); - -// edgeWeight = mh->getAttribute("edgeWeight", false); -// if(!edgeWeight.isValid()) -// edgeWeight = mh->addAttribute("edgeWeight", false); - -// vertexArea = mh->getAttribute("vertexArea", false); -// if(!vertexArea.isValid()) -// vertexArea = mh->addAttribute("vertexArea", false); - - diffCoord = mh->getAttribute("diffCoord", false); - if(!diffCoord.isValid()) - diffCoord = mh->addAttribute("diffCoord", false); - - vertexRotationMatrix = mh->getAttribute("vertexRotationMatrix", false) ; - if(!vertexRotationMatrix.isValid()) - vertexRotationMatrix = mh->addAttribute("vertexRotationMatrix", false); - - rotatedDiffCoord = mh->getAttribute("rotatedDiffCoord", false) ; - if(!rotatedDiffCoord.isValid()) - rotatedDiffCoord = mh->addAttribute("rotatedDiffCoord", false); - - initParameters(); -} - -PerMapParameterSet::~PerMapParameterSet() -{ - delete lockingMarker; - delete handleMarker; - delete lockedVerticesVBO; - delete handleVerticesVBO; - nlDeleteContext(nlContext); -} - -void PerMapParameterSet::initParameters() -{ - if(positionAttribute.isValid()) - { - PFP2::MAP* map = static_cast*>(mh)->getMap(); - - map->copyAttribute(positionInit, positionAttribute) ; - - nb_vertices = static_cast(map)->computeIndexCells(vIndex); - -// Algo::Surface::Geometry::computeCotanWeightEdges(*map, positionAttribute, edgeWeight) ; -// Algo::Surface::Geometry::computeVoronoiAreaVertices(*map, positionAttribute, vertexArea) ; -// Algo::Surface::Geometry::computeLaplacianCotanVertices(*map, edgeWeight, vertexArea, positionAttribute, diffCoord) ; - Algo::Surface::Geometry::computeLaplacianTopoVertices(*map, positionAttribute, diffCoord) ; - - for(unsigned int i = vertexRotationMatrix.begin(); i != vertexRotationMatrix.end() ; vertexRotationMatrix.next(i)) - vertexRotationMatrix[i] = Eigen::Matrix3f::Identity(); - - if(nlContext) - nlDeleteContext(nlContext); - nlContext = nlNewContext(); - nlSolverParameteri(NL_NB_VARIABLES, nb_vertices); - nlSolverParameteri(NL_LEAST_SQUARES, NL_TRUE); - nlSolverParameteri(NL_SOLVER, NL_CHOLMOD_EXT); - } -} - - -bool SurfaceDeformationPlugin::enable() -{ - m_dockTab = new SurfaceDeformationDockTab(m_window, this); - addTabInDock(m_dockTab, "Surface Deformation"); - - selectionSphereVBO = new Utils::VBO(); - - m_pointSprite = new CGoGN::Utils::PointSprite(); - registerShader(m_pointSprite); - - connect(m_window, SIGNAL(viewAndPluginLinked(View*, Plugin*)), this, SLOT(viewLinked(View*, Plugin*))); - connect(m_window, SIGNAL(viewAndPluginUnlinked(View*, Plugin*)), this, SLOT(viewUnlinked(View*, Plugin*))); - connect(m_window, SIGNAL(currentViewChanged(View*)), this, SLOT(currentViewChanged(View*))); - - return true; -} - -void SurfaceDeformationPlugin::disable() -{ - delete m_pointSprite; -} - -void SurfaceDeformationPlugin::redraw(View* view) -{ - ParameterSet* params = h_viewParams[view]; - MapHandlerGen* mh = params->selectedMap; - if(mh) - { - PerMapParameterSet* perMap = params->perMap[mh->getName()]; - - if(!perMap->lockedVertices.empty() || !perMap->handleVertices.empty()) - { - m_pointSprite->setAttributePosition(perMap->lockedVerticesVBO); - m_pointSprite->setSize(mh->getBBdiagSize() / 250.0f); - m_pointSprite->setColor(CGoGN::Geom::Vec4f(1.0f, 0.0f, 0.0f, 0.75f)); - m_pointSprite->setLightPosition(CGoGN::Geom::Vec3f(0.0f, 0.0f, 1.0f)); - - m_pointSprite->enableVertexAttribs(); - glEnable(GL_BLEND); - glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); - glDrawArrays(GL_POINTS, 0, perMap->lockedVertices.size()); - glDisable(GL_BLEND); - m_pointSprite->disableVertexAttribs(); - - m_pointSprite->setAttributePosition(perMap->handleVerticesVBO); - m_pointSprite->setSize(mh->getBBdiagSize() / 250.0f); - m_pointSprite->setColor(CGoGN::Geom::Vec4f(0.0f, 1.0f, 0.0f, 0.75f)); - m_pointSprite->setLightPosition(CGoGN::Geom::Vec3f(0.0f, 0.0f, 1.0f)); - - m_pointSprite->enableVertexAttribs(); - glEnable(GL_BLEND); - glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); - glDrawArrays(GL_POINTS, 0, perMap->handleVertices.size()); - glDisable(GL_BLEND); - m_pointSprite->disableVertexAttribs(); - } - } - - if(selecting) - { - std::vector selectionPoint; - selectionPoint.push_back(selectionCenter); - selectionSphereVBO->updateData(selectionPoint); - - m_pointSprite->setAttributePosition(selectionSphereVBO); - m_pointSprite->setSize(selectionRadius); - m_pointSprite->setColor(CGoGN::Geom::Vec4f(0.0f, 0.0f, 1.0f, 0.5f)); - m_pointSprite->setLightPosition(CGoGN::Geom::Vec3f(0.0f, 0.0f, 1.0f)); - - m_pointSprite->enableVertexAttribs(); - glEnable(GL_BLEND); - glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); - glDrawArrays(GL_POINTS, 0, 1); - glDisable(GL_BLEND); - m_pointSprite->disableVertexAttribs(); - } -} - -void SurfaceDeformationPlugin::keyPress(View* view, QKeyEvent* event) -{ - if(event->key() == Qt::Key_Shift) - { - view->setMouseTracking(true); - selecting = true; - view->updateGL(); - } - else if(event->key() == Qt::Key_R) - { - ParameterSet* params = h_viewParams[view]; - MapHandlerGen* map = params->selectedMap; - if(map) - { - asRigidAsPossible(view, map); - PerMapParameterSet* perMap = params->perMap[map->getName()]; - params->selectedMap->notifyAttributeModification(perMap->positionAttribute); - view->updateGL(); - } - } -} - -void SurfaceDeformationPlugin::keyRelease(View* view, QKeyEvent* event) -{ - if(event->key() == Qt::Key_Shift) - { - view->setMouseTracking(false); - selecting = false; - view->updateGL(); - } -} - -void SurfaceDeformationPlugin::mousePress(View* view, QMouseEvent* event) -{ - if(event->button() == Qt::LeftButton && selecting) - { - ParameterSet* params = h_viewParams[view]; - PerMapParameterSet* perMap = params->getCurrentMapParameterSet(); - - if(perMap) - { - QPoint pixel(event->x(), event->y()); - qglviewer::Vec orig; - qglviewer::Vec dir; - view->camera()->convertClickToLine(pixel, orig, dir); - - PFP2::VEC3 rayA(orig.x, orig.y, orig.z); - PFP2::VEC3 AB(dir.x, dir.y, dir.z); - - Dart d; - PFP2::MAP* map = static_cast*>(params->selectedMap)->getMap(); - Algo::Selection::vertexRaySelection(*map, perMap->positionAttribute, rayA, AB, d); - - if(d != NIL) - { - Algo::Surface::Selection::Collector_WithinSphere neigh(*map, perMap->positionAttribute, selectionRadius); - neigh.collectAll(d); - const std::vector& insideV = neigh.getInsideVertices(); - - for(unsigned int i = 0; i < insideV.size(); ++i) - { - unsigned int v = map->getEmbedding(insideV[i]); - if (!perMap->lockingMarker->isMarked(v)) - { - if(perMap->verticesSelectionMode == LOCKED) - perMap->lockedVertices.push_back(perMap->positionAttribute[v]); - perMap->lockingMarker->mark(v); - } - if(perMap->verticesSelectionMode == HANDLE) - { - if(!perMap->handleMarker->isMarked(v)) - { - perMap->handleVertices.push_back(perMap->positionAttribute[v]); - perMap->handleVerticesId.push_back(v); - perMap->handleMarker->mark(v); - } - } - } - - nlMakeCurrent(perMap->nlContext) ; - nlReset(NL_FALSE) ; - - perMap->lockedVerticesVBO->updateData(perMap->lockedVertices); - if(perMap->verticesSelectionMode == HANDLE) - perMap->handleVerticesVBO->updateData(perMap->handleVertices); - - view->updateGL() ; - } - } - } - else if(event->button() == Qt::RightButton && event->modifiers() & Qt::ShiftModifier) - { - view->setMouseTracking(false) ; - - ParameterSet* params = h_viewParams[view]; - PerMapParameterSet* perMap = params->getCurrentMapParameterSet(); - - if(perMap) - { - selecting = false ; - dragging = true ; - - dragZ = 0; - for(unsigned int i = 0; i < perMap->handleVertices.size(); ++i) - { - const PFP2::VEC3& p = perMap->handleVertices[i] ; - qglviewer::Vec q = view->camera()->projectedCoordinatesOf(qglviewer::Vec(p[0],p[1],p[2])); - dragZ += q.z ; - } - dragZ /= perMap->handleVertices.size() ; - - qglviewer::Vec p(event->x(), event->y(), dragZ); - dragPrevious = view->camera()->unprojectedCoordinatesOf(p); - } - } -} - -void SurfaceDeformationPlugin::mouseRelease(View* view, QMouseEvent* event) -{ - if(event->button() == Qt::RightButton) - dragging = false; -} - -void SurfaceDeformationPlugin::mouseMove(View* view, QMouseEvent* event) -{ - ParameterSet* params = h_viewParams[view]; - PerMapParameterSet* perMap = params->getCurrentMapParameterSet(); - - if(perMap) - { - if(dragging) - { - qglviewer::Vec p(event->x(), event->y(), dragZ); - qglviewer::Vec q = view->camera()->unprojectedCoordinatesOf(p); - - qglviewer::Vec vec = q - dragPrevious; - PFP2::VEC3 t(vec.x, vec.y, vec.z); - for(unsigned int i = 0; i < perMap->handleVertices.size(); ++i) - { - perMap->handleVertices[i] += t; - perMap->positionAttribute[perMap->handleVerticesId[i]] += t; - } - perMap->handleVerticesVBO->updateData(perMap->handleVertices); - - dragPrevious = q; - -// matchDiffCoord(view, map); - asRigidAsPossible(view, params->selectedMap); - - params->selectedMap->notifyAttributeModification(perMap->positionAttribute); - - view->updateGL(); - } - else if(selecting) - { - QPoint pixel(event->x(), event->y()); - qglviewer::Vec orig; - qglviewer::Vec dir; - view->camera()->convertClickToLine(pixel, orig, dir); - - PFP2::VEC3 rayA(orig.x, orig.y, orig.z); - PFP2::VEC3 AB(dir.x, dir.y, dir.z); - - Dart d; - PFP2::MAP* map = static_cast*>(params->selectedMap)->getMap(); - Algo::Selection::vertexRaySelection(*map, perMap->positionAttribute, rayA, AB, d); - if(d != NIL) - { - selectionCenter = perMap->positionAttribute[d]; - view->updateGL(); - } - } - } -} - -void SurfaceDeformationPlugin::wheelEvent(View* view, QWheelEvent* event) -{ - if(selecting) - { - if(event->delta() > 0) - selectionRadius *= 0.9f ; - else - selectionRadius *= 1.1f ; - view->updateGL() ; - } -} - -void SurfaceDeformationPlugin::viewLinked(View* view, Plugin* plugin) -{ - if(plugin == this) - { - ParameterSet* params = new ParameterSet(); - h_viewParams.insert(view, params); - - const QList& maps = view->getLinkedMaps(); - foreach(MapHandlerGen* mh, maps) - addManagedMap(view, mh); - - connect(view, SIGNAL(mapLinked(MapHandlerGen*)), this, SLOT(mapLinked(MapHandlerGen*))); - connect(view, SIGNAL(mapUnlinked(MapHandlerGen*)), this, SLOT(mapUnlinked(MapHandlerGen*))); - - if(view->isCurrentView()) - m_dockTab->refreshUI(params); - } -} - -void SurfaceDeformationPlugin::viewUnlinked(View* view, Plugin* plugin) -{ - if(plugin == this) - { - const QList& maps = view->getLinkedMaps(); - foreach(MapHandlerGen* mh, maps) - removeManagedMap(view, mh); - - ParameterSet* params = h_viewParams[view]; - delete params; - h_viewParams.remove(view); - - disconnect(view, SIGNAL(mapLinked(MapHandlerGen*)), this, SLOT(mapLinked(MapHandlerGen*))); - disconnect(view, SIGNAL(mapUnlinked(MapHandlerGen*)), this, SLOT(mapUnlinked(MapHandlerGen*))); - } -} - -void SurfaceDeformationPlugin::currentViewChanged(View* view) -{ - if(isLinkedToView(view)) - { - ParameterSet* params = h_viewParams[view]; - changeSelectedMap(view, params->selectedMap); - m_dockTab->refreshUI(params); - } -} - -void SurfaceDeformationPlugin::mapLinked(MapHandlerGen* m) -{ - View* view = static_cast(QObject::sender()); - assert(isLinkedToView(view)); - addManagedMap(view, m); -} - -void SurfaceDeformationPlugin::mapUnlinked(MapHandlerGen* m) -{ - View* view = static_cast(QObject::sender()); - assert(isLinkedToView(view)); - removeManagedMap(view, m); -} - -void SurfaceDeformationPlugin::addManagedMap(View* v, MapHandlerGen *m) -{ -// connect(m, SIGNAL(attributeModified(unsigned int, QString)), this, SLOT(attributeModified(unsigned int, QString))); -// connect(m, SIGNAL(connectivityModified()), this, SLOT(connectivityModified())); - - ParameterSet* params = h_viewParams[v]; - PerMapParameterSet* perMap = new PerMapParameterSet(m); - - params->perMap.insert(m->getName(), perMap); - - if(params->selectedMap == NULL || params->perMap.count() == 1) - changeSelectedMap(v, m); - else - m_dockTab->refreshUI(params); -} - -void SurfaceDeformationPlugin::removeManagedMap(View *v, MapHandlerGen *m) -{ -// disconnect(m, SIGNAL(attributeModified(unsigned int, QString)), this, SLOT(attributeModified(unsigned int, QString))); -// disconnect(m, SIGNAL(connectivityModified()), this, SLOT(connectivityModified())); - - ParameterSet* params = h_viewParams[v]; - PerMapParameterSet* perMap = params->perMap[m->getName()]; - - delete perMap; - params->perMap.remove(m->getName()); - - if(params->selectedMap == m) - { - if(!params->perMap.empty()) - changeSelectedMap(v, m_window->getMap(params->perMap.begin().key())); - else - changeSelectedMap(v, NULL); - } - else - m_dockTab->refreshUI(params); -} - -void SurfaceDeformationPlugin::changeSelectedMap(View* view, MapHandlerGen* map) -{ - ParameterSet* params = h_viewParams[view]; - - MapHandlerGen* prev = params->selectedMap; - params->selectedMap = map; - - if(view->isCurrentView()) - { - if(prev) - disconnect(prev, SIGNAL(attributeAdded(unsigned int, const QString&)), m_dockTab, SLOT(addAttributeToList(unsigned int, const QString&))); - if(map) - { - connect(map, SIGNAL(attributeAdded(unsigned int, const QString&)), m_dockTab, SLOT(addAttributeToList(unsigned int, const QString&))); - selectionRadius = map->getBBdiagSize() / 50.0; - } - - m_dockTab->refreshUI(params); - } -} - -void SurfaceDeformationPlugin::changePositionAttribute(View* view, MapHandlerGen* map, VertexAttribute attribute, bool fromUI) -{ - ParameterSet* params = h_viewParams[view]; - PerMapParameterSet* perMap = params->perMap[map->getName()]; - perMap->positionAttribute = attribute; - perMap->initParameters(); - - if(view->isCurrentView()) - { - if(!fromUI) - m_dockTab->refreshUI(params); - } -} - -void SurfaceDeformationPlugin::changeVerticesSelectionMode(View* view, MapHandlerGen* map, SelectionMode m, bool fromUI) -{ - ParameterSet* params = h_viewParams[view]; - params->perMap[map->getName()]->verticesSelectionMode = m; - - if(view->isCurrentView()) - { - if(!fromUI) - m_dockTab->refreshUI(params); - } -} - -void SurfaceDeformationPlugin::matchDiffCoord(View* view, MapHandlerGen* mh) -{ - PFP2::MAP* map = static_cast*>(mh)->getMap(); - PerMapParameterSet* perMap = h_viewParams[view]->perMap[mh->getName()]; - - nlMakeCurrent(perMap->nlContext); - if(nlGetCurrentState() == NL_STATE_INITIAL) - nlBegin(NL_SYSTEM) ; - for(int coord = 0; coord < 3; ++coord) - { - LinearSolving::setupVariables(*map, perMap->vIndex, *perMap->lockingMarker, perMap->positionAttribute, coord) ; - nlBegin(NL_MATRIX) ; - LinearSolving::addRowsRHS_Laplacian_Topo(*map, perMap->vIndex, perMap->diffCoord, coord) ; -// LinearSolving::addRowsRHS_Laplacian_Cotan(*map, perMap->vIndex, perMap->edgeWeight, perMap->vertexArea, perMap->diffCoord, coord) ; - nlEnd(NL_MATRIX) ; - nlEnd(NL_SYSTEM) ; - nlSolve() ; - LinearSolving::getResult(*map, perMap->vIndex, perMap->positionAttribute, coord) ; - nlReset(NL_TRUE) ; - } -} - -void SurfaceDeformationPlugin::asRigidAsPossible(View* view, MapHandlerGen* mh) -{ - PFP2::MAP* map = static_cast*>(mh)->getMap(); - PerMapParameterSet* perMap = h_viewParams[view]->perMap[mh->getName()]; - - CellMarkerNoUnmark m(*map) ; - - for(Dart d = map->begin(); d != map->end(); map->next(d)) - { - if(!m.isMarked(d)) - { - m.mark(d) ; - - Eigen::Matrix3f cov = Eigen::Matrix3f::Zero() ; - PFP2::VEC3 p = perMap->positionAttribute[d] ; - PFP2::VEC3 pInit = perMap->positionInit[d] ; -// PFP2::REAL area = perMap->vertexArea[d] ; - Dart it = d ; - do - { - Dart neigh = map->phi1(it) ; - PFP2::VEC3 v = perMap->positionAttribute[neigh] - p ; - PFP2::VEC3 vv = perMap->positionInit[neigh] - pInit ; - for(unsigned int i = 0; i < 3; ++i) - for(unsigned int j = 0; j < 3; ++j) - cov(i,j) += v[i] * vv[j];// * perMap->edgeWeight[it] / area ; - Dart dboundary = map->phi_1(it) ; - if(map->phi2(dboundary) == dboundary) - { - v = perMap->positionAttribute[dboundary] - p ; - vv = perMap->positionInit[dboundary] - p ; - for(unsigned int i = 0; i < 3; ++i) - for(unsigned int j = 0; j < 3; ++j) - cov(i,j) += v[i] * vv[j];// * perMap->edgeWeight[dboundary] / area ; - } - it = map->alpha1(it) ; - } while(it != d) ; - - Eigen::JacobiSVD svd(cov, Eigen::ComputeFullU | Eigen::ComputeFullV) ; - Eigen::Matrix3f R = svd.matrixU() * svd.matrixV().transpose() ; - - if(R.determinant() < 0) - { - Eigen::Matrix3f U = svd.matrixU() ; - for(unsigned int i = 0; i < 3; ++i) - U(i,2) *= -1 ; - R = U * svd.matrixV().transpose() ; - } - - perMap->vertexRotationMatrix[d] = R ; - } - } - - for(Dart d = map->begin(); d != map->end(); map->next(d)) - { - if(m.isMarked(d)) - { - m.unmark(d) ; - - unsigned int degree = 0 ; - Eigen::Matrix3f r = Eigen::Matrix3f::Zero() ; - Dart it = d ; - do - { - r += perMap->vertexRotationMatrix[map->phi1(it)] ; - ++degree ; - Dart dboundary = map->phi_1(it) ; - if(map->phi2(dboundary) == dboundary) - { - r += perMap->vertexRotationMatrix[dboundary] ; - ++degree ; - } - it = map->alpha1(it) ; - } while(it != d) ; - r += perMap->vertexRotationMatrix[d] ; - r /= degree + 1 ; - PFP2::VEC3& dc = perMap->diffCoord[d] ; - Eigen::Vector3f rdc(dc[0], dc[1], dc[2]) ; - rdc = r * rdc ; - perMap->rotatedDiffCoord[d] = PFP2::VEC3(rdc[0], rdc[1], rdc[2]) ; - -// Eigen::Vector3f rdc = Eigen::Vector3f::Zero() ; -// Dart it = d ; -// PFP::REAL vArea = perMap->vertexArea[d] ; -// Eigen::Matrix3f& rotM = perMap->vertexRotationMatrix[d] ; -// PFP::REAL val = 0 ; -// do -// { -// Dart ddn = map->phi1(it) ; -// PFP::REAL w = perMap->edgeWeight[it] / vArea ; -// PFP::VEC3 vv = (perMap->positionInit[ddn] - perMap->positionInit[it]) * w ; -// val += w ; -// Eigen::Matrix3f r = 0.5f * (perMap->vertexRotationMatrix[ddn] + rotM) ; -// Eigen::Vector3f vvr = r * Eigen::Vector3f(vv[0], vv[1], vv[2]) ; -// rdc += vvr ; -// Dart dboundary = map->phi_1(it) ; -// if(map->phi2(dboundary) == dboundary) -// { -// w = perMap->edgeWeight[dboundary] / vArea ; -// vv = (perMap->positionInit[dboundary] - perMap->positionInit[it]) * w ; -// val += w ; -// r = 0.5f * (perMap->vertexRotationMatrix[dboundary] + rotM) ; -// vvr = r * Eigen::Vector3f(vv[0], vv[1], vv[2]) ; -// rdc += vvr ; -// } -// it = map->alpha1(it) ; -// } while(it != d) ; -// rdc /= val ; -// perMap->rotatedDiffCoord[d] = PFP::VEC3(rdc[0], rdc[1], rdc[2]) ; - } - } - - nlMakeCurrent(perMap->nlContext); - if(nlGetCurrentState() == NL_STATE_INITIAL) - nlBegin(NL_SYSTEM) ; - for(int coord = 0; coord < 3; ++coord) - { - LinearSolving::setupVariables(*map, perMap->vIndex, *perMap->lockingMarker, perMap->positionAttribute, coord) ; - nlBegin(NL_MATRIX) ; -// LinearSolving::addRowsRHS_Laplacian_Cotan(*map, perMap->vIndex, perMap->edgeWeight, perMap->vertexArea, perMap->rotatedDiffCoord, coord) ; - LinearSolving::addRowsRHS_Laplacian_Topo(*map, perMap->vIndex, perMap->rotatedDiffCoord, coord) ; - nlEnd(NL_MATRIX) ; - nlEnd(NL_SYSTEM) ; - nlSolve() ; - LinearSolving::getResult(*map, perMap->vIndex, perMap->positionAttribute, coord) ; - nlReset(NL_TRUE) ; - } -} - -#ifndef DEBUG -Q_EXPORT_PLUGIN2(SurfaceDeformationPlugin, SurfaceDeformationPlugin) -#else -Q_EXPORT_PLUGIN2(SurfaceDeformationPluginD, SurfaceDeformationPlugin) -#endif - -} // namespace SCHNApps - -} // namespace CGoGN diff --git a/SCHNApps_old/Plugins/surfaceDeformation/src/surfaceDeformationDockTab.cpp b/SCHNApps_old/Plugins/surfaceDeformation/src/surfaceDeformationDockTab.cpp deleted file mode 100644 index fe47a1c556824979d8ba662d82664cdec7f187fc..0000000000000000000000000000000000000000 --- a/SCHNApps_old/Plugins/surfaceDeformation/src/surfaceDeformationDockTab.cpp +++ /dev/null @@ -1,129 +0,0 @@ -#include "surfaceDeformationDockTab.h" - -#include "surfaceDeformation.h" -#include "window.h" -#include "mapHandler.h" - -namespace CGoGN -{ - -namespace SCHNApps -{ - -SurfaceDeformationDockTab::SurfaceDeformationDockTab(Window* w, SurfaceDeformationPlugin* p) : - m_window(w), - m_plugin(p), - b_refreshingUI(false) -{ - setupUi(this); - - connect(mapList, SIGNAL(itemSelectionChanged()), this, SLOT(selectedMapChanged())); - connect(combo_positionAttribute, SIGNAL(currentIndexChanged(int)), this, SLOT(positionAttributeChanged(int))); - connect(radio_locked, SIGNAL(toggled(bool)), this, SLOT(selectLockedVertices(bool))); - connect(radio_handle, SIGNAL(toggled(bool)), this, SLOT(selectHandleVertices(bool))); -} - -void SurfaceDeformationDockTab::refreshUI(ParameterSet* params) -{ - m_currentParams = params; - - b_refreshingUI = true; - - mapList->clear(); - combo_positionAttribute->clear(); - - MapHandlerGen* mh = params->selectedMap; - - QHash::const_iterator i = params->perMap.constBegin(); - while (i != params->perMap.constEnd()) - { - mapList->addItem(i.key()); - if(mh != NULL && i.key() == mh->getName()) - { - QList item = mapList->findItems(mh->getName(), Qt::MatchExactly); - item[0]->setSelected(true); - - PerMapParameterSet* p = params->perMap[mh->getName()]; - - QString vec3TypeName = QString::fromStdString(nameOfType(PFP2::VEC3())); - - unsigned int j = 0; - const AttributeHash& attribs = mh->getAttributesList(VERTEX); - for(AttributeHash::const_iterator i = attribs.constBegin(); i != attribs.constEnd(); ++i) - { - if(i.value() == vec3TypeName) - { - combo_positionAttribute->addItem(i.key()); - if(i.key() == QString::fromStdString(p->positionAttribute.name())) - combo_positionAttribute->setCurrentIndex(j); - ++j; - } - } - - radio_locked->setChecked(p->verticesSelectionMode == LOCKED); - radio_handle->setChecked(p->verticesSelectionMode == HANDLE); - } - ++i; - } - - b_refreshingUI = false; -} - -void SurfaceDeformationDockTab::selectedMapChanged() -{ - if(!b_refreshingUI) - { - QList currentItems = mapList->selectedItems(); - if(!currentItems.empty()) - m_plugin->changeSelectedMap(m_window->getCurrentView(), m_window->getMap(currentItems[0]->text())); - } -} - -void SurfaceDeformationDockTab::positionAttributeChanged(int index) -{ - if(!b_refreshingUI) - { - View* view = m_window->getCurrentView(); - MapHandlerGen* map = m_currentParams->selectedMap; - if(map) - m_plugin->changePositionAttribute(view, map, map->getAttribute(combo_positionAttribute->currentText()), true); - } -} - -void SurfaceDeformationDockTab::selectLockedVertices(bool b) -{ - if(!b_refreshingUI) - { - View* view = m_window->getCurrentView(); - MapHandlerGen* map = m_currentParams->selectedMap; - if(map) - m_plugin->changeVerticesSelectionMode(view, map, LOCKED, true); - } -} - -void SurfaceDeformationDockTab::selectHandleVertices(bool b) -{ - if(!b_refreshingUI) - { - View* view = m_window->getCurrentView(); - MapHandlerGen* map = m_currentParams->selectedMap; - if(map) - m_plugin->changeVerticesSelectionMode(view, map, HANDLE, true); - } -} - -void SurfaceDeformationDockTab::addAttributeToList(unsigned int orbit, const QString& nameAttr) -{ - QString vec3TypeName = QString::fromStdString(nameOfType(PFP2::VEC3())); - - const QString& typeAttr = m_currentParams->selectedMap->getAttributeTypeName(orbit, nameAttr); - - if(typeAttr == vec3TypeName) - { - combo_positionAttribute->addItem(nameAttr); - } -} - -} // namespace SCHNApps - -} // namespace CGoGN diff --git a/SCHNApps_old/Release/CMakeLists.txt b/SCHNApps_old/Release/CMakeLists.txt deleted file mode 100644 index 98f8368b38615a40ec187b22b1c85a4d746c2684..0000000000000000000000000000000000000000 --- a/SCHNApps_old/Release/CMakeLists.txt +++ /dev/null @@ -1,44 +0,0 @@ -cmake_minimum_required(VERSION 2.8) - -SET(CMAKE_BUILD_TYPE Release) - -IF(WIN32) - link_directories( ${CGoGN_ROOT_DIR}/lib/Release ) -ELSE (WIN32) - link_directories( ${CGoGN_ROOT_DIR}/lib/Release ) -ENDIF (WIN32) - -INCLUDE_DIRECTORIES( - ${CGoGN_ROOT_DIR}/include - ${SCHNApps_ROOT_DIR}/include - ${EXT_INCLUDES} - ${CMAKE_CURRENT_SOURCE_DIR} - ${CMAKE_CURRENT_BINARY_DIR} -) - -QT4_WRAP_UI( UIC_FILES - ${SCHNApps_UI_FILES} -) - -QT4_WRAP_CPP( MOC_FILES - ${SCHNApps_QOBJECT_FILES} -) - -QT4_ADD_RESOURCES( RCC_FILES - ${SCHNApps_ROOT_DIR}/resources/resources.qrc -) - -ADD_EXECUTABLE( SCHNApps - ${SCHNApps_FILES} - ${UIC_FILES} - ${MOC_FILES} - ${RCC_FILES} -) - -TARGET_LINK_LIBRARIES( SCHNApps - ${CGoGN_LIBS_R} - ${EXT_LIBS} -) - - -ADD_SUBDIRECTORY(${SCHNApps_ROOT_DIR}/Plugins Plugins) diff --git a/SCHNApps_old/bin/schnappsInit.py b/SCHNApps_old/bin/schnappsInit.py deleted file mode 100644 index dfdef94a052589995dd8bfdda922f2a04bcf0393..0000000000000000000000000000000000000000 --- a/SCHNApps_old/bin/schnappsInit.py +++ /dev/null @@ -1,2 +0,0 @@ -importPlugin = schnapps.loadPlugin("ImportSurface"); -renderPlugin = schnapps.loadPlugin("Render"); \ No newline at end of file diff --git a/SCHNApps_old/build/.gitignore b/SCHNApps_old/build/.gitignore deleted file mode 100644 index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000 diff --git a/SCHNApps_old/doc/Doxyfile.in b/SCHNApps_old/doc/Doxyfile.in deleted file mode 100644 index ef66f9d63d6e380888232f4c01a8beac0a0f5cde..0000000000000000000000000000000000000000 --- a/SCHNApps_old/doc/Doxyfile.in +++ /dev/null @@ -1,1716 +0,0 @@ -# Doxyfile 1.7.4 - -# This file describes the settings to be used by the documentation system -# doxygen (www.doxygen.org) for a project. -# -# All text after a hash (#) is considered a comment and will be ignored. -# The format is: -# TAG = value [value, ...] -# For lists items can also be appended using: -# TAG += value [value, ...] -# Values that contain spaces should be placed between quotes (" "). - -#--------------------------------------------------------------------------- -# Project related configuration options -#--------------------------------------------------------------------------- - -# This tag specifies the encoding used for all characters in the config file -# that follow. The default is UTF-8 which is also the encoding used for all -# text before the first occurrence of this tag. Doxygen uses libiconv (or the -# iconv built into libc) for the transcoding. See -# http://www.gnu.org/software/libiconv for the list of possible encodings. - -DOXYFILE_ENCODING = UTF-8 - -# The PROJECT_NAME tag is a single word (or a sequence of words surrounded -# by quotes) that should identify the project. - -PROJECT_NAME = - -# The PROJECT_NUMBER tag can be used to enter a project or revision number. -# This could be handy for archiving the generated documentation or -# if some version control system is used. - -PROJECT_NUMBER = - -# Using the PROJECT_BRIEF tag one can provide an optional one line description -# for a project that appears at the top of each page and should give viewer -# a quick idea about the purpose of the project. Keep the description short. - -PROJECT_BRIEF = - -# With the PROJECT_LOGO tag one can specify an logo or icon that is -# included in the documentation. The maximum height of the logo should not -# exceed 55 pixels and the maximum width should not exceed 200 pixels. -# Doxygen will copy the logo to the output directory. - -PROJECT_LOGO = - -# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) -# base path where the generated documentation will be put. -# If a relative path is entered, it will be relative to the location -# where doxygen was started. If left blank the current directory will be used. - -OUTPUT_DIRECTORY = - -# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create -# 4096 sub-directories (in 2 levels) under the output directory of each output -# format and will distribute the generated files over these directories. -# Enabling this option can be useful when feeding doxygen a huge amount of -# source files, where putting all generated files in the same directory would -# otherwise cause performance problems for the file system. - -CREATE_SUBDIRS = NO - -# The OUTPUT_LANGUAGE tag is used to specify the language in which all -# documentation generated by doxygen is written. Doxygen will use this -# information to generate all constant output in the proper language. -# The default language is English, other supported languages are: -# Afrikaans, Arabic, Brazilian, Catalan, Chinese, Chinese-Traditional, -# Croatian, Czech, Danish, Dutch, Esperanto, Farsi, Finnish, French, German, -# Greek, Hungarian, Italian, Japanese, Japanese-en (Japanese with English -# messages), Korean, Korean-en, Lithuanian, Norwegian, Macedonian, Persian, -# Polish, Portuguese, Romanian, Russian, Serbian, Serbian-Cyrillic, Slovak, -# Slovene, Spanish, Swedish, Ukrainian, and Vietnamese. - -OUTPUT_LANGUAGE = English - -# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will -# include brief member descriptions after the members that are listed in -# the file and class documentation (similar to JavaDoc). -# Set to NO to disable this. - -BRIEF_MEMBER_DESC = YES - -# If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend -# the brief description of a member or function before the detailed description. -# Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the -# brief descriptions will be completely suppressed. - -REPEAT_BRIEF = YES - -# This tag implements a quasi-intelligent brief description abbreviator -# that is used to form the text in various listings. Each string -# in this list, if found as the leading text of the brief description, will be -# stripped from the text and the result after processing the whole list, is -# used as the annotated text. Otherwise, the brief description is used as-is. -# If left blank, the following values are used ("$name" is automatically -# replaced with the name of the entity): "The $name class" "The $name widget" -# "The $name file" "is" "provides" "specifies" "contains" -# "represents" "a" "an" "the" - -ABBREVIATE_BRIEF = - -# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then -# Doxygen will generate a detailed section even if there is only a brief -# description. - -ALWAYS_DETAILED_SEC = NO - -# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all -# inherited members of a class in the documentation of that class as if those -# members were ordinary class members. Constructors, destructors and assignment -# operators of the base classes will not be shown. - -INLINE_INHERITED_MEMB = NO - -# If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full -# path before files name in the file list and in the header files. If set -# to NO the shortest path that makes the file name unique will be used. - -FULL_PATH_NAMES = YES - -# If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag -# can be used to strip a user-defined part of the path. Stripping is -# only done if one of the specified strings matches the left-hand part of -# the path. The tag can be used to show relative paths in the file list. -# If left blank the directory from which doxygen is run is used as the -# path to strip. - -STRIP_FROM_PATH = - -# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of -# the path mentioned in the documentation of a class, which tells -# the reader which header file to include in order to use a class. -# If left blank only the name of the header file containing the class -# definition is used. Otherwise one should specify the include paths that -# are normally passed to the compiler using the -I flag. - -STRIP_FROM_INC_PATH = - -# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter -# (but less readable) file names. This can be useful if your file system -# doesn't support long names like on DOS, Mac, or CD-ROM. - -SHORT_NAMES = NO - -# If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen -# will interpret the first line (until the first dot) of a JavaDoc-style -# comment as the brief description. If set to NO, the JavaDoc -# comments will behave just like regular Qt-style comments -# (thus requiring an explicit @brief command for a brief description.) - -JAVADOC_AUTOBRIEF = NO - -# If the QT_AUTOBRIEF tag is set to YES then Doxygen will -# interpret the first line (until the first dot) of a Qt-style -# comment as the brief description. If set to NO, the comments -# will behave just like regular Qt-style comments (thus requiring -# an explicit \brief command for a brief description.) - -QT_AUTOBRIEF = NO - -# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen -# treat a multi-line C++ special comment block (i.e. a block of //! or /// -# comments) as a brief description. This used to be the default behaviour. -# The new default is to treat a multi-line C++ comment block as a detailed -# description. Set this tag to YES if you prefer the old behaviour instead. - -MULTILINE_CPP_IS_BRIEF = NO - -# If the INHERIT_DOCS tag is set to YES (the default) then an undocumented -# member inherits the documentation from any documented member that it -# re-implements. - -INHERIT_DOCS = YES - -# If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce -# a new page for each member. If set to NO, the documentation of a member will -# be part of the file/class/namespace that contains it. - -SEPARATE_MEMBER_PAGES = NO - -# The TAB_SIZE tag can be used to set the number of spaces in a tab. -# Doxygen uses this value to replace tabs by spaces in code fragments. - -TAB_SIZE = 8 - -# This tag can be used to specify a number of aliases that acts -# as commands in the documentation. An alias has the form "name=value". -# For example adding "sideeffect=\par Side Effects:\n" will allow you to -# put the command \sideeffect (or @sideeffect) in the documentation, which -# will result in a user-defined paragraph with heading "Side Effects:". -# You can put \n's in the value part of an alias to insert newlines. - -ALIASES = - -# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C -# sources only. Doxygen will then generate output that is more tailored for C. -# For instance, some of the names that are used will be different. The list -# of all members will be omitted, etc. - -OPTIMIZE_OUTPUT_FOR_C = NO - -# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java -# sources only. Doxygen will then generate output that is more tailored for -# Java. For instance, namespaces will be presented as packages, qualified -# scopes will look different, etc. - -OPTIMIZE_OUTPUT_JAVA = NO - -# Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran -# sources only. Doxygen will then generate output that is more tailored for -# Fortran. - -OPTIMIZE_FOR_FORTRAN = NO - -# Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL -# sources. Doxygen will then generate output that is tailored for -# VHDL. - -OPTIMIZE_OUTPUT_VHDL = NO - -# Doxygen selects the parser to use depending on the extension of the files it -# parses. With this tag you can assign which parser to use for a given extension. -# Doxygen has a built-in mapping, but you can override or extend it using this -# tag. The format is ext=language, where ext is a file extension, and language -# is one of the parsers supported by doxygen: IDL, Java, Javascript, CSharp, C, -# C++, D, PHP, Objective-C, Python, Fortran, VHDL, C, C++. For instance to make -# doxygen treat .inc files as Fortran files (default is PHP), and .f files as C -# (default is Fortran), use: inc=Fortran f=C. Note that for custom extensions -# you also need to set FILE_PATTERNS otherwise the files are not read by doxygen. - -EXTENSION_MAPPING = - -# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want -# to include (a tag file for) the STL sources as input, then you should -# set this tag to YES in order to let doxygen match functions declarations and -# definitions whose arguments contain STL classes (e.g. func(std::string); v.s. -# func(std::string) {}). This also makes the inheritance and collaboration -# diagrams that involve STL classes more complete and accurate. - -BUILTIN_STL_SUPPORT = NO - -# If you use Microsoft's C++/CLI language, you should set this option to YES to -# enable parsing support. - -CPP_CLI_SUPPORT = NO - -# Set the SIP_SUPPORT tag to YES if your project consists of sip sources only. -# Doxygen will parse them like normal C++ but will assume all classes use public -# instead of private inheritance when no explicit protection keyword is present. - -SIP_SUPPORT = NO - -# For Microsoft's IDL there are propget and propput attributes to indicate getter -# and setter methods for a property. Setting this option to YES (the default) -# will make doxygen replace the get and set methods by a property in the -# documentation. This will only work if the methods are indeed getting or -# setting a simple type. If this is not the case, or you want to show the -# methods anyway, you should set this option to NO. - -IDL_PROPERTY_SUPPORT = YES - -# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC -# tag is set to YES, then doxygen will reuse the documentation of the first -# member in the group (if any) for the other members of the group. By default -# all members of a group must be documented explicitly. - -DISTRIBUTE_GROUP_DOC = NO - -# Set the SUBGROUPING tag to YES (the default) to allow class member groups of -# the same type (for instance a group of public functions) to be put as a -# subgroup of that type (e.g. under the Public Functions section). Set it to -# NO to prevent subgrouping. Alternatively, this can be done per class using -# the \nosubgrouping command. - -SUBGROUPING = YES - -# When the INLINE_GROUPED_CLASSES tag is set to YES, classes, structs and -# unions are shown inside the group in which they are included (e.g. using -# @ingroup) instead of on a separate page (for HTML and Man pages) or -# section (for LaTeX and RTF). - -INLINE_GROUPED_CLASSES = NO - -# When TYPEDEF_HIDES_STRUCT is enabled, a typedef of a struct, union, or enum -# is documented as struct, union, or enum with the name of the typedef. So -# typedef struct TypeS {} TypeT, will appear in the documentation as a struct -# with name TypeT. When disabled the typedef will appear as a member of a file, -# namespace, or class. And the struct will be named TypeS. This can typically -# be useful for C code in case the coding convention dictates that all compound -# types are typedef'ed and only the typedef is referenced, never the tag name. - -TYPEDEF_HIDES_STRUCT = NO - -# The SYMBOL_CACHE_SIZE determines the size of the internal cache use to -# determine which symbols to keep in memory and which to flush to disk. -# When the cache is full, less often used symbols will be written to disk. -# For small to medium size projects (<1000 input files) the default value is -# probably good enough. For larger projects a too small cache size can cause -# doxygen to be busy swapping symbols to and from disk most of the time -# causing a significant performance penalty. -# If the system has enough physical memory increasing the cache will improve the -# performance by keeping more symbols in memory. Note that the value works on -# a logarithmic scale so increasing the size by one will roughly double the -# memory usage. The cache size is given by this formula: -# 2^(16+SYMBOL_CACHE_SIZE). The valid range is 0..9, the default is 0, -# corresponding to a cache size of 2^16 = 65536 symbols - -SYMBOL_CACHE_SIZE = 0 - -#--------------------------------------------------------------------------- -# Build related configuration options -#--------------------------------------------------------------------------- - -# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in -# documentation are documented, even if no documentation was available. -# Private class members and static file members will be hidden unless -# the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES - -EXTRACT_ALL = NO - -# If the EXTRACT_PRIVATE tag is set to YES all private members of a class -# will be included in the documentation. - -EXTRACT_PRIVATE = NO - -# If the EXTRACT_STATIC tag is set to YES all static members of a file -# will be included in the documentation. - -EXTRACT_STATIC = NO - -# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) -# defined locally in source files will be included in the documentation. -# If set to NO only classes defined in header files are included. - -EXTRACT_LOCAL_CLASSES = YES - -# This flag is only useful for Objective-C code. When set to YES local -# methods, which are defined in the implementation section but not in -# the interface are included in the documentation. -# If set to NO (the default) only methods in the interface are included. - -EXTRACT_LOCAL_METHODS = NO - -# If this flag is set to YES, the members of anonymous namespaces will be -# extracted and appear in the documentation as a namespace called -# 'anonymous_namespace{file}', where file will be replaced with the base -# name of the file that contains the anonymous namespace. By default -# anonymous namespaces are hidden. - -EXTRACT_ANON_NSPACES = NO - -# If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all -# undocumented members of documented classes, files or namespaces. -# If set to NO (the default) these members will be included in the -# various overviews, but no documentation section is generated. -# This option has no effect if EXTRACT_ALL is enabled. - -HIDE_UNDOC_MEMBERS = NO - -# If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all -# undocumented classes that are normally visible in the class hierarchy. -# If set to NO (the default) these classes will be included in the various -# overviews. This option has no effect if EXTRACT_ALL is enabled. - -HIDE_UNDOC_CLASSES = NO - -# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all -# friend (class|struct|union) declarations. -# If set to NO (the default) these declarations will be included in the -# documentation. - -HIDE_FRIEND_COMPOUNDS = NO - -# If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any -# documentation blocks found inside the body of a function. -# If set to NO (the default) these blocks will be appended to the -# function's detailed documentation block. - -HIDE_IN_BODY_DOCS = NO - -# The INTERNAL_DOCS tag determines if documentation -# that is typed after a \internal command is included. If the tag is set -# to NO (the default) then the documentation will be excluded. -# Set it to YES to include the internal documentation. - -INTERNAL_DOCS = NO - -# If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate -# file names in lower-case letters. If set to YES upper-case letters are also -# allowed. This is useful if you have classes or files whose names only differ -# in case and if your file system supports case sensitive file names. Windows -# and Mac users are advised to set this option to NO. - -CASE_SENSE_NAMES = YES - -# If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen -# will show members with their full class and namespace scopes in the -# documentation. If set to YES the scope will be hidden. - -HIDE_SCOPE_NAMES = NO - -# If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen -# will put a list of the files that are included by a file in the documentation -# of that file. - -SHOW_INCLUDE_FILES = YES - -# If the FORCE_LOCAL_INCLUDES tag is set to YES then Doxygen -# will list include files with double quotes in the documentation -# rather than with sharp brackets. - -FORCE_LOCAL_INCLUDES = NO - -# If the INLINE_INFO tag is set to YES (the default) then a tag [inline] -# is inserted in the documentation for inline members. - -INLINE_INFO = YES - -# If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen -# will sort the (detailed) documentation of file and class members -# alphabetically by member name. If set to NO the members will appear in -# declaration order. - -SORT_MEMBER_DOCS = YES - -# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the -# brief documentation of file, namespace and class members alphabetically -# by member name. If set to NO (the default) the members will appear in -# declaration order. - -SORT_BRIEF_DOCS = NO - -# If the SORT_MEMBERS_CTORS_1ST tag is set to YES then doxygen -# will sort the (brief and detailed) documentation of class members so that -# constructors and destructors are listed first. If set to NO (the default) -# the constructors will appear in the respective orders defined by -# SORT_MEMBER_DOCS and SORT_BRIEF_DOCS. -# This tag will be ignored for brief docs if SORT_BRIEF_DOCS is set to NO -# and ignored for detailed docs if SORT_MEMBER_DOCS is set to NO. - -SORT_MEMBERS_CTORS_1ST = NO - -# If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the -# hierarchy of group names into alphabetical order. If set to NO (the default) -# the group names will appear in their defined order. - -SORT_GROUP_NAMES = NO - -# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be -# sorted by fully-qualified names, including namespaces. If set to -# NO (the default), the class list will be sorted only by class name, -# not including the namespace part. -# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES. -# Note: This option applies only to the class list, not to the -# alphabetical list. - -SORT_BY_SCOPE_NAME = NO - -# If the STRICT_PROTO_MATCHING option is enabled and doxygen fails to -# do proper type resolution of all parameters of a function it will reject a -# match between the prototype and the implementation of a member function even -# if there is only one candidate or it is obvious which candidate to choose -# by doing a simple string match. By disabling STRICT_PROTO_MATCHING doxygen -# will still accept a match between prototype and implementation in such cases. - -STRICT_PROTO_MATCHING = NO - -# The GENERATE_TODOLIST tag can be used to enable (YES) or -# disable (NO) the todo list. This list is created by putting \todo -# commands in the documentation. - -GENERATE_TODOLIST = YES - -# The GENERATE_TESTLIST tag can be used to enable (YES) or -# disable (NO) the test list. This list is created by putting \test -# commands in the documentation. - -GENERATE_TESTLIST = YES - -# The GENERATE_BUGLIST tag can be used to enable (YES) or -# disable (NO) the bug list. This list is created by putting \bug -# commands in the documentation. - -GENERATE_BUGLIST = YES - -# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or -# disable (NO) the deprecated list. This list is created by putting -# \deprecated commands in the documentation. - -GENERATE_DEPRECATEDLIST= YES - -# The ENABLED_SECTIONS tag can be used to enable conditional -# documentation sections, marked by \if sectionname ... \endif. - -ENABLED_SECTIONS = - -# The MAX_INITIALIZER_LINES tag determines the maximum number of lines -# the initial value of a variable or macro consists of for it to appear in -# the documentation. If the initializer consists of more lines than specified -# here it will be hidden. Use a value of 0 to hide initializers completely. -# The appearance of the initializer of individual variables and macros in the -# documentation can be controlled using \showinitializer or \hideinitializer -# command in the documentation regardless of this setting. - -MAX_INITIALIZER_LINES = 30 - -# Set the SHOW_USED_FILES tag to NO to disable the list of files generated -# at the bottom of the documentation of classes and structs. If set to YES the -# list will mention the files that were used to generate the documentation. - -SHOW_USED_FILES = YES - -# If the sources in your project are distributed over multiple directories -# then setting the SHOW_DIRECTORIES tag to YES will show the directory hierarchy -# in the documentation. The default is NO. - -SHOW_DIRECTORIES = NO - -# Set the SHOW_FILES tag to NO to disable the generation of the Files page. -# This will remove the Files entry from the Quick Index and from the -# Folder Tree View (if specified). The default is YES. - -SHOW_FILES = YES - -# Set the SHOW_NAMESPACES tag to NO to disable the generation of the -# Namespaces page. -# This will remove the Namespaces entry from the Quick Index -# and from the Folder Tree View (if specified). The default is YES. - -SHOW_NAMESPACES = YES - -# The FILE_VERSION_FILTER tag can be used to specify a program or script that -# doxygen should invoke to get the current version for each file (typically from -# the version control system). Doxygen will invoke the program by executing (via -# popen()) the command , where is the value of -# the FILE_VERSION_FILTER tag, and is the name of an input file -# provided by doxygen. Whatever the program writes to standard output -# is used as the file version. See the manual for examples. - -FILE_VERSION_FILTER = - -# The LAYOUT_FILE tag can be used to specify a layout file which will be parsed -# by doxygen. The layout file controls the global structure of the generated -# output files in an output format independent way. The create the layout file -# that represents doxygen's defaults, run doxygen with the -l option. -# You can optionally specify a file name after the option, if omitted -# DoxygenLayout.xml will be used as the name of the layout file. - -LAYOUT_FILE = - -#--------------------------------------------------------------------------- -# configuration options related to warning and progress messages -#--------------------------------------------------------------------------- - -# The QUIET tag can be used to turn on/off the messages that are generated -# by doxygen. Possible values are YES and NO. If left blank NO is used. - -QUIET = NO - -# The WARNINGS tag can be used to turn on/off the warning messages that are -# generated by doxygen. Possible values are YES and NO. If left blank -# NO is used. - -WARNINGS = YES - -# If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings -# for undocumented members. If EXTRACT_ALL is set to YES then this flag will -# automatically be disabled. - -WARN_IF_UNDOCUMENTED = YES - -# If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for -# potential errors in the documentation, such as not documenting some -# parameters in a documented function, or documenting parameters that -# don't exist or using markup commands wrongly. - -WARN_IF_DOC_ERROR = YES - -# The WARN_NO_PARAMDOC option can be enabled to get warnings for -# functions that are documented, but have no documentation for their parameters -# or return value. If set to NO (the default) doxygen will only warn about -# wrong or incomplete parameter documentation, but not about the absence of -# documentation. - -WARN_NO_PARAMDOC = NO - -# The WARN_FORMAT tag determines the format of the warning messages that -# doxygen can produce. The string should contain the $file, $line, and $text -# tags, which will be replaced by the file and line number from which the -# warning originated and the warning text. Optionally the format may contain -# $version, which will be replaced by the version of the file (if it could -# be obtained via FILE_VERSION_FILTER) - -WARN_FORMAT = "$file:$line: $text" - -# The WARN_LOGFILE tag can be used to specify a file to which warning -# and error messages should be written. If left blank the output is written -# to stderr. - -WARN_LOGFILE = - -#--------------------------------------------------------------------------- -# configuration options related to the input files -#--------------------------------------------------------------------------- - -# The INPUT tag can be used to specify the files and/or directories that contain -# documented source files. You may enter file names like "myfile.cpp" or -# directories like "/usr/src/myproject". Separate the files or directories -# with spaces. - -INPUT = @CMAKE_SOURCE_DIR@/src @CMAKE_SOURCE_DIR@/include - -# This tag can be used to specify the character encoding of the source files -# that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is -# also the default input encoding. Doxygen uses libiconv (or the iconv built -# into libc) for the transcoding. See http://www.gnu.org/software/libiconv for -# the list of possible encodings. - -INPUT_ENCODING = UTF-8 - -# If the value of the INPUT tag contains directories, you can use the -# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp -# and *.h) to filter out the source-files in the directories. If left -# blank the following patterns are tested: -# *.c *.cc *.cxx *.cpp *.c++ *.d *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh -# *.hxx *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm *.dox *.py -# *.f90 *.f *.for *.vhd *.vhdl - -FILE_PATTERNS = - -# The RECURSIVE tag can be used to turn specify whether or not subdirectories -# should be searched for input files as well. Possible values are YES and NO. -# If left blank NO is used. - -RECURSIVE = NO - -# The EXCLUDE tag can be used to specify files and/or directories that should -# excluded from the INPUT source files. This way you can easily exclude a -# subdirectory from a directory tree whose root is specified with the INPUT tag. - -EXCLUDE = - -# The EXCLUDE_SYMLINKS tag can be used select whether or not files or -# directories that are symbolic links (a Unix file system feature) are excluded -# from the input. - -EXCLUDE_SYMLINKS = NO - -# If the value of the INPUT tag contains directories, you can use the -# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude -# certain files from those directories. Note that the wildcards are matched -# against the file with absolute path, so to exclude all test directories -# for example use the pattern */test/* - -EXCLUDE_PATTERNS = - -# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names -# (namespaces, classes, functions, etc.) that should be excluded from the -# output. The symbol name can be a fully qualified name, a word, or if the -# wildcard * is used, a substring. Examples: ANamespace, AClass, -# AClass::ANamespace, ANamespace::*Test - -EXCLUDE_SYMBOLS = - -# The EXAMPLE_PATH tag can be used to specify one or more files or -# directories that contain example code fragments that are included (see -# the \include command). - -EXAMPLE_PATH = - -# If the value of the EXAMPLE_PATH tag contains directories, you can use the -# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp -# and *.h) to filter out the source-files in the directories. If left -# blank all files are included. - -EXAMPLE_PATTERNS = - -# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be -# searched for input files to be used with the \include or \dontinclude -# commands irrespective of the value of the RECURSIVE tag. -# Possible values are YES and NO. If left blank NO is used. - -EXAMPLE_RECURSIVE = NO - -# The IMAGE_PATH tag can be used to specify one or more files or -# directories that contain image that are included in the documentation (see -# the \image command). - -IMAGE_PATH = - -# The INPUT_FILTER tag can be used to specify a program that doxygen should -# invoke to filter for each input file. Doxygen will invoke the filter program -# by executing (via popen()) the command , where -# is the value of the INPUT_FILTER tag, and is the name of an -# input file. Doxygen will then use the output that the filter program writes -# to standard output. -# If FILTER_PATTERNS is specified, this tag will be -# ignored. - -INPUT_FILTER = - -# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern -# basis. -# Doxygen will compare the file name with each pattern and apply the -# filter if there is a match. -# The filters are a list of the form: -# pattern=filter (like *.cpp=my_cpp_filter). See INPUT_FILTER for further -# info on how filters are used. If FILTER_PATTERNS is empty or if -# non of the patterns match the file name, INPUT_FILTER is applied. - -FILTER_PATTERNS = - -# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using -# INPUT_FILTER) will be used to filter the input files when producing source -# files to browse (i.e. when SOURCE_BROWSER is set to YES). - -FILTER_SOURCE_FILES = NO - -# The FILTER_SOURCE_PATTERNS tag can be used to specify source filters per file -# pattern. A pattern will override the setting for FILTER_PATTERN (if any) -# and it is also possible to disable source filtering for a specific pattern -# using *.ext= (so without naming a filter). This option only has effect when -# FILTER_SOURCE_FILES is enabled. - -FILTER_SOURCE_PATTERNS = - -#--------------------------------------------------------------------------- -# configuration options related to source browsing -#--------------------------------------------------------------------------- - -# If the SOURCE_BROWSER tag is set to YES then a list of source files will -# be generated. Documented entities will be cross-referenced with these sources. -# Note: To get rid of all source code in the generated output, make sure also -# VERBATIM_HEADERS is set to NO. - -SOURCE_BROWSER = NO - -# Setting the INLINE_SOURCES tag to YES will include the body -# of functions and classes directly in the documentation. - -INLINE_SOURCES = NO - -# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct -# doxygen to hide any special comment blocks from generated source code -# fragments. Normal C and C++ comments will always remain visible. - -STRIP_CODE_COMMENTS = YES - -# If the REFERENCED_BY_RELATION tag is set to YES -# then for each documented function all documented -# functions referencing it will be listed. - -REFERENCED_BY_RELATION = NO - -# If the REFERENCES_RELATION tag is set to YES -# then for each documented function all documented entities -# called/used by that function will be listed. - -REFERENCES_RELATION = NO - -# If the REFERENCES_LINK_SOURCE tag is set to YES (the default) -# and SOURCE_BROWSER tag is set to YES, then the hyperlinks from -# functions in REFERENCES_RELATION and REFERENCED_BY_RELATION lists will -# link to the source code. -# Otherwise they will link to the documentation. - -REFERENCES_LINK_SOURCE = YES - -# If the USE_HTAGS tag is set to YES then the references to source code -# will point to the HTML generated by the htags(1) tool instead of doxygen -# built-in source browser. The htags tool is part of GNU's global source -# tagging system (see http://www.gnu.org/software/global/global.html). You -# will need version 4.8.6 or higher. - -USE_HTAGS = NO - -# If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen -# will generate a verbatim copy of the header file for each class for -# which an include is specified. Set to NO to disable this. - -VERBATIM_HEADERS = YES - -#--------------------------------------------------------------------------- -# configuration options related to the alphabetical class index -#--------------------------------------------------------------------------- - -# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index -# of all compounds will be generated. Enable this if the project -# contains a lot of classes, structs, unions or interfaces. - -ALPHABETICAL_INDEX = YES - -# If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then -# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns -# in which this list will be split (can be a number in the range [1..20]) - -COLS_IN_ALPHA_INDEX = 5 - -# In case all classes in a project start with a common prefix, all -# classes will be put under the same header in the alphabetical index. -# The IGNORE_PREFIX tag can be used to specify one or more prefixes that -# should be ignored while generating the index headers. - -IGNORE_PREFIX = - -#--------------------------------------------------------------------------- -# configuration options related to the HTML output -#--------------------------------------------------------------------------- - -# If the GENERATE_HTML tag is set to YES (the default) Doxygen will -# generate HTML output. - -GENERATE_HTML = YES - -# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. -# If a relative path is entered the value of OUTPUT_DIRECTORY will be -# put in front of it. If left blank `html' will be used as the default path. - -HTML_OUTPUT = html - -# The HTML_FILE_EXTENSION tag can be used to specify the file extension for -# each generated HTML page (for example: .htm,.php,.asp). If it is left blank -# doxygen will generate files with .html extension. - -HTML_FILE_EXTENSION = .html - -# The HTML_HEADER tag can be used to specify a personal HTML header for -# each generated HTML page. If it is left blank doxygen will generate a -# standard header. Note that when using a custom header you are responsible -# for the proper inclusion of any scripts and style sheets that doxygen -# needs, which is dependent on the configuration options used. -# It is adviced to generate a default header using "doxygen -w html -# header.html footer.html stylesheet.css YourConfigFile" and then modify -# that header. Note that the header is subject to change so you typically -# have to redo this when upgrading to a newer version of doxygen or when changing the value of configuration settings such as GENERATE_TREEVIEW! - -HTML_HEADER = - -# The HTML_FOOTER tag can be used to specify a personal HTML footer for -# each generated HTML page. If it is left blank doxygen will generate a -# standard footer. - -HTML_FOOTER = - -# The HTML_STYLESHEET tag can be used to specify a user-defined cascading -# style sheet that is used by each HTML page. It can be used to -# fine-tune the look of the HTML output. If the tag is left blank doxygen -# will generate a default style sheet. Note that doxygen will try to copy -# the style sheet file to the HTML output directory, so don't put your own -# stylesheet in the HTML output directory as well, or it will be erased! - -HTML_STYLESHEET = - -# The HTML_EXTRA_FILES tag can be used to specify one or more extra images or -# other source files which should be copied to the HTML output directory. Note -# that these files will be copied to the base HTML output directory. Use the -# $relpath$ marker in the HTML_HEADER and/or HTML_FOOTER files to load these -# files. In the HTML_STYLESHEET file, use the file name only. Also note that -# the files will be copied as-is; there are no commands or markers available. - -HTML_EXTRA_FILES = - -# The HTML_COLORSTYLE_HUE tag controls the color of the HTML output. -# Doxygen will adjust the colors in the stylesheet and background images -# according to this color. Hue is specified as an angle on a colorwheel, -# see http://en.wikipedia.org/wiki/Hue for more information. -# For instance the value 0 represents red, 60 is yellow, 120 is green, -# 180 is cyan, 240 is blue, 300 purple, and 360 is red again. -# The allowed range is 0 to 359. - -HTML_COLORSTYLE_HUE = 220 - -# The HTML_COLORSTYLE_SAT tag controls the purity (or saturation) of -# the colors in the HTML output. For a value of 0 the output will use -# grayscales only. A value of 255 will produce the most vivid colors. - -HTML_COLORSTYLE_SAT = 100 - -# The HTML_COLORSTYLE_GAMMA tag controls the gamma correction applied to -# the luminance component of the colors in the HTML output. Values below -# 100 gradually make the output lighter, whereas values above 100 make -# the output darker. The value divided by 100 is the actual gamma applied, -# so 80 represents a gamma of 0.8, The value 220 represents a gamma of 2.2, -# and 100 does not change the gamma. - -HTML_COLORSTYLE_GAMMA = 80 - -# If the HTML_TIMESTAMP tag is set to YES then the footer of each generated HTML -# page will contain the date and time when the page was generated. Setting -# this to NO can help when comparing the output of multiple runs. - -HTML_TIMESTAMP = YES - -# If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes, -# files or namespaces will be aligned in HTML using tables. If set to -# NO a bullet list will be used. - -HTML_ALIGN_MEMBERS = YES - -# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML -# documentation will contain sections that can be hidden and shown after the -# page has loaded. For this to work a browser that supports -# JavaScript and DHTML is required (for instance Mozilla 1.0+, Firefox -# Netscape 6.0+, Internet explorer 5.0+, Konqueror, or Safari). - -HTML_DYNAMIC_SECTIONS = NO - -# If the GENERATE_DOCSET tag is set to YES, additional index files -# will be generated that can be used as input for Apple's Xcode 3 -# integrated development environment, introduced with OSX 10.5 (Leopard). -# To create a documentation set, doxygen will generate a Makefile in the -# HTML output directory. Running make will produce the docset in that -# directory and running "make install" will install the docset in -# ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find -# it at startup. -# See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html -# for more information. - -GENERATE_DOCSET = NO - -# When GENERATE_DOCSET tag is set to YES, this tag determines the name of the -# feed. A documentation feed provides an umbrella under which multiple -# documentation sets from a single provider (such as a company or product suite) -# can be grouped. - -DOCSET_FEEDNAME = "Doxygen generated docs" - -# When GENERATE_DOCSET tag is set to YES, this tag specifies a string that -# should uniquely identify the documentation set bundle. This should be a -# reverse domain-name style string, e.g. com.mycompany.MyDocSet. Doxygen -# will append .docset to the name. - -DOCSET_BUNDLE_ID = org.doxygen.Project - -# When GENERATE_PUBLISHER_ID tag specifies a string that should uniquely identify -# the documentation publisher. This should be a reverse domain-name style -# string, e.g. com.mycompany.MyDocSet.documentation. - -DOCSET_PUBLISHER_ID = org.doxygen.Publisher - -# The GENERATE_PUBLISHER_NAME tag identifies the documentation publisher. - -DOCSET_PUBLISHER_NAME = Publisher - -# If the GENERATE_HTMLHELP tag is set to YES, additional index files -# will be generated that can be used as input for tools like the -# Microsoft HTML help workshop to generate a compiled HTML help file (.chm) -# of the generated HTML documentation. - -GENERATE_HTMLHELP = NO - -# If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can -# be used to specify the file name of the resulting .chm file. You -# can add a path in front of the file if the result should not be -# written to the html output directory. - -CHM_FILE = - -# If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can -# be used to specify the location (absolute path including file name) of -# the HTML help compiler (hhc.exe). If non-empty doxygen will try to run -# the HTML help compiler on the generated index.hhp. - -HHC_LOCATION = - -# If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag -# controls if a separate .chi index file is generated (YES) or that -# it should be included in the master .chm file (NO). - -GENERATE_CHI = NO - -# If the GENERATE_HTMLHELP tag is set to YES, the CHM_INDEX_ENCODING -# is used to encode HtmlHelp index (hhk), content (hhc) and project file -# content. - -CHM_INDEX_ENCODING = - -# If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag -# controls whether a binary table of contents is generated (YES) or a -# normal table of contents (NO) in the .chm file. - -BINARY_TOC = NO - -# The TOC_EXPAND flag can be set to YES to add extra items for group members -# to the contents of the HTML help documentation and to the tree view. - -TOC_EXPAND = NO - -# If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and -# QHP_VIRTUAL_FOLDER are set, an additional index file will be generated -# that can be used as input for Qt's qhelpgenerator to generate a -# Qt Compressed Help (.qch) of the generated HTML documentation. - -GENERATE_QHP = NO - -# If the QHG_LOCATION tag is specified, the QCH_FILE tag can -# be used to specify the file name of the resulting .qch file. -# The path specified is relative to the HTML output folder. - -QCH_FILE = - -# The QHP_NAMESPACE tag specifies the namespace to use when generating -# Qt Help Project output. For more information please see -# http://doc.trolltech.com/qthelpproject.html#namespace - -QHP_NAMESPACE = org.doxygen.Project - -# The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating -# Qt Help Project output. For more information please see -# http://doc.trolltech.com/qthelpproject.html#virtual-folders - -QHP_VIRTUAL_FOLDER = doc - -# If QHP_CUST_FILTER_NAME is set, it specifies the name of a custom filter to -# add. For more information please see -# http://doc.trolltech.com/qthelpproject.html#custom-filters - -QHP_CUST_FILTER_NAME = - -# The QHP_CUST_FILT_ATTRS tag specifies the list of the attributes of the -# custom filter to add. For more information please see -# -# Qt Help Project / Custom Filters. - -QHP_CUST_FILTER_ATTRS = - -# The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this -# project's -# filter section matches. -# -# Qt Help Project / Filter Attributes. - -QHP_SECT_FILTER_ATTRS = - -# If the GENERATE_QHP tag is set to YES, the QHG_LOCATION tag can -# be used to specify the location of Qt's qhelpgenerator. -# If non-empty doxygen will try to run qhelpgenerator on the generated -# .qhp file. - -QHG_LOCATION = - -# If the GENERATE_ECLIPSEHELP tag is set to YES, additional index files -# will be generated, which together with the HTML files, form an Eclipse help -# plugin. To install this plugin and make it available under the help contents -# menu in Eclipse, the contents of the directory containing the HTML and XML -# files needs to be copied into the plugins directory of eclipse. The name of -# the directory within the plugins directory should be the same as -# the ECLIPSE_DOC_ID value. After copying Eclipse needs to be restarted before -# the help appears. - -GENERATE_ECLIPSEHELP = NO - -# A unique identifier for the eclipse help plugin. When installing the plugin -# the directory name containing the HTML and XML files should also have -# this name. - -ECLIPSE_DOC_ID = org.doxygen.Project - -# The DISABLE_INDEX tag can be used to turn on/off the condensed index at -# top of each HTML page. The value NO (the default) enables the index and -# the value YES disables it. - -DISABLE_INDEX = NO - -# The ENUM_VALUES_PER_LINE tag can be used to set the number of enum values -# (range [0,1..20]) that doxygen will group on one line in the generated HTML -# documentation. Note that a value of 0 will completely suppress the enum -# values from appearing in the overview section. - -ENUM_VALUES_PER_LINE = 4 - -# The GENERATE_TREEVIEW tag is used to specify whether a tree-like index -# structure should be generated to display hierarchical information. -# If the tag value is set to YES, a side panel will be generated -# containing a tree-like index structure (just like the one that -# is generated for HTML Help). For this to work a browser that supports -# JavaScript, DHTML, CSS and frames is required (i.e. any modern browser). -# Windows users are probably better off using the HTML help feature. - -GENERATE_TREEVIEW = NO - -# By enabling USE_INLINE_TREES, doxygen will generate the Groups, Directories, -# and Class Hierarchy pages using a tree view instead of an ordered list. - -USE_INLINE_TREES = NO - -# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be -# used to set the initial width (in pixels) of the frame in which the tree -# is shown. - -TREEVIEW_WIDTH = 250 - -# When the EXT_LINKS_IN_WINDOW option is set to YES doxygen will open -# links to external symbols imported via tag files in a separate window. - -EXT_LINKS_IN_WINDOW = NO - -# Use this tag to change the font size of Latex formulas included -# as images in the HTML documentation. The default is 10. Note that -# when you change the font size after a successful doxygen run you need -# to manually remove any form_*.png images from the HTML output directory -# to force them to be regenerated. - -FORMULA_FONTSIZE = 10 - -# Use the FORMULA_TRANPARENT tag to determine whether or not the images -# generated for formulas are transparent PNGs. Transparent PNGs are -# not supported properly for IE 6.0, but are supported on all modern browsers. -# Note that when changing this option you need to delete any form_*.png files -# in the HTML output before the changes have effect. - -FORMULA_TRANSPARENT = YES - -# Enable the USE_MATHJAX option to render LaTeX formulas using MathJax -# (see http://www.mathjax.org) which uses client side Javascript for the -# rendering instead of using prerendered bitmaps. Use this if you do not -# have LaTeX installed or if you want to formulas look prettier in the HTML -# output. When enabled you also need to install MathJax separately and -# configure the path to it using the MATHJAX_RELPATH option. - -USE_MATHJAX = NO - -# When MathJax is enabled you need to specify the location relative to the -# HTML output directory using the MATHJAX_RELPATH option. The destination -# directory should contain the MathJax.js script. For instance, if the mathjax -# directory is located at the same level as the HTML output directory, then -# MATHJAX_RELPATH should be ../mathjax. The default value points to the -# mathjax.org site, so you can quickly see the result without installing -# MathJax, but it is strongly recommended to install a local copy of MathJax -# before deployment. - -MATHJAX_RELPATH = http://www.mathjax.org/mathjax - -# When the SEARCHENGINE tag is enabled doxygen will generate a search box -# for the HTML output. The underlying search engine uses javascript -# and DHTML and should work on any modern browser. Note that when using -# HTML help (GENERATE_HTMLHELP), Qt help (GENERATE_QHP), or docsets -# (GENERATE_DOCSET) there is already a search function so this one should -# typically be disabled. For large projects the javascript based search engine -# can be slow, then enabling SERVER_BASED_SEARCH may provide a better solution. - -SEARCHENGINE = YES - -# When the SERVER_BASED_SEARCH tag is enabled the search engine will be -# implemented using a PHP enabled web server instead of at the web client -# using Javascript. Doxygen will generate the search PHP script and index -# file to put on the web server. The advantage of the server -# based approach is that it scales better to large projects and allows -# full text search. The disadvantages are that it is more difficult to setup -# and does not have live searching capabilities. - -SERVER_BASED_SEARCH = NO - -#--------------------------------------------------------------------------- -# configuration options related to the LaTeX output -#--------------------------------------------------------------------------- - -# If the GENERATE_LATEX tag is set to YES (the default) Doxygen will -# generate Latex output. - -GENERATE_LATEX = YES - -# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. -# If a relative path is entered the value of OUTPUT_DIRECTORY will be -# put in front of it. If left blank `latex' will be used as the default path. - -LATEX_OUTPUT = latex - -# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be -# invoked. If left blank `latex' will be used as the default command name. -# Note that when enabling USE_PDFLATEX this option is only used for -# generating bitmaps for formulas in the HTML output, but not in the -# Makefile that is written to the output directory. - -LATEX_CMD_NAME = latex - -# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to -# generate index for LaTeX. If left blank `makeindex' will be used as the -# default command name. - -MAKEINDEX_CMD_NAME = makeindex - -# If the COMPACT_LATEX tag is set to YES Doxygen generates more compact -# LaTeX documents. This may be useful for small projects and may help to -# save some trees in general. - -COMPACT_LATEX = NO - -# The PAPER_TYPE tag can be used to set the paper type that is used -# by the printer. Possible values are: a4, letter, legal and -# executive. If left blank a4wide will be used. - -PAPER_TYPE = a4 - -# The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX -# packages that should be included in the LaTeX output. - -EXTRA_PACKAGES = - -# The LATEX_HEADER tag can be used to specify a personal LaTeX header for -# the generated latex document. The header should contain everything until -# the first chapter. If it is left blank doxygen will generate a -# standard header. Notice: only use this tag if you know what you are doing! - -LATEX_HEADER = - -# The LATEX_FOOTER tag can be used to specify a personal LaTeX footer for -# the generated latex document. The footer should contain everything after -# the last chapter. If it is left blank doxygen will generate a -# standard footer. Notice: only use this tag if you know what you are doing! - -LATEX_FOOTER = - -# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated -# is prepared for conversion to pdf (using ps2pdf). The pdf file will -# contain links (just like the HTML output) instead of page references -# This makes the output suitable for online browsing using a pdf viewer. - -PDF_HYPERLINKS = YES - -# If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of -# plain latex in the generated Makefile. Set this option to YES to get a -# higher quality PDF documentation. - -USE_PDFLATEX = YES - -# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode. -# command to the generated LaTeX files. This will instruct LaTeX to keep -# running if errors occur, instead of asking the user for help. -# This option is also used when generating formulas in HTML. - -LATEX_BATCHMODE = NO - -# If LATEX_HIDE_INDICES is set to YES then doxygen will not -# include the index chapters (such as File Index, Compound Index, etc.) -# in the output. - -LATEX_HIDE_INDICES = NO - -# If LATEX_SOURCE_CODE is set to YES then doxygen will include -# source code with syntax highlighting in the LaTeX output. -# Note that which sources are shown also depends on other settings -# such as SOURCE_BROWSER. - -LATEX_SOURCE_CODE = NO - -#--------------------------------------------------------------------------- -# configuration options related to the RTF output -#--------------------------------------------------------------------------- - -# If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output -# The RTF output is optimized for Word 97 and may not look very pretty with -# other RTF readers or editors. - -GENERATE_RTF = NO - -# The RTF_OUTPUT tag is used to specify where the RTF docs will be put. -# If a relative path is entered the value of OUTPUT_DIRECTORY will be -# put in front of it. If left blank `rtf' will be used as the default path. - -RTF_OUTPUT = rtf - -# If the COMPACT_RTF tag is set to YES Doxygen generates more compact -# RTF documents. This may be useful for small projects and may help to -# save some trees in general. - -COMPACT_RTF = NO - -# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated -# will contain hyperlink fields. The RTF file will -# contain links (just like the HTML output) instead of page references. -# This makes the output suitable for online browsing using WORD or other -# programs which support those fields. -# Note: wordpad (write) and others do not support links. - -RTF_HYPERLINKS = NO - -# Load stylesheet definitions from file. Syntax is similar to doxygen's -# config file, i.e. a series of assignments. You only have to provide -# replacements, missing definitions are set to their default value. - -RTF_STYLESHEET_FILE = - -# Set optional variables used in the generation of an rtf document. -# Syntax is similar to doxygen's config file. - -RTF_EXTENSIONS_FILE = - -#--------------------------------------------------------------------------- -# configuration options related to the man page output -#--------------------------------------------------------------------------- - -# If the GENERATE_MAN tag is set to YES (the default) Doxygen will -# generate man pages - -GENERATE_MAN = NO - -# The MAN_OUTPUT tag is used to specify where the man pages will be put. -# If a relative path is entered the value of OUTPUT_DIRECTORY will be -# put in front of it. If left blank `man' will be used as the default path. - -MAN_OUTPUT = man - -# The MAN_EXTENSION tag determines the extension that is added to -# the generated man pages (default is the subroutine's section .3) - -MAN_EXTENSION = .3 - -# If the MAN_LINKS tag is set to YES and Doxygen generates man output, -# then it will generate one additional man file for each entity -# documented in the real man page(s). These additional files -# only source the real man page, but without them the man command -# would be unable to find the correct page. The default is NO. - -MAN_LINKS = NO - -#--------------------------------------------------------------------------- -# configuration options related to the XML output -#--------------------------------------------------------------------------- - -# If the GENERATE_XML tag is set to YES Doxygen will -# generate an XML file that captures the structure of -# the code including all documentation. - -GENERATE_XML = NO - -# The XML_OUTPUT tag is used to specify where the XML pages will be put. -# If a relative path is entered the value of OUTPUT_DIRECTORY will be -# put in front of it. If left blank `xml' will be used as the default path. - -XML_OUTPUT = xml - -# The XML_SCHEMA tag can be used to specify an XML schema, -# which can be used by a validating XML parser to check the -# syntax of the XML files. - -XML_SCHEMA = - -# The XML_DTD tag can be used to specify an XML DTD, -# which can be used by a validating XML parser to check the -# syntax of the XML files. - -XML_DTD = - -# If the XML_PROGRAMLISTING tag is set to YES Doxygen will -# dump the program listings (including syntax highlighting -# and cross-referencing information) to the XML output. Note that -# enabling this will significantly increase the size of the XML output. - -XML_PROGRAMLISTING = YES - -#--------------------------------------------------------------------------- -# configuration options for the AutoGen Definitions output -#--------------------------------------------------------------------------- - -# If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will -# generate an AutoGen Definitions (see autogen.sf.net) file -# that captures the structure of the code including all -# documentation. Note that this feature is still experimental -# and incomplete at the moment. - -GENERATE_AUTOGEN_DEF = NO - -#--------------------------------------------------------------------------- -# configuration options related to the Perl module output -#--------------------------------------------------------------------------- - -# If the GENERATE_PERLMOD tag is set to YES Doxygen will -# generate a Perl module file that captures the structure of -# the code including all documentation. Note that this -# feature is still experimental and incomplete at the -# moment. - -GENERATE_PERLMOD = NO - -# If the PERLMOD_LATEX tag is set to YES Doxygen will generate -# the necessary Makefile rules, Perl scripts and LaTeX code to be able -# to generate PDF and DVI output from the Perl module output. - -PERLMOD_LATEX = NO - -# If the PERLMOD_PRETTY tag is set to YES the Perl module output will be -# nicely formatted so it can be parsed by a human reader. -# This is useful -# if you want to understand what is going on. -# On the other hand, if this -# tag is set to NO the size of the Perl module output will be much smaller -# and Perl will parse it just the same. - -PERLMOD_PRETTY = YES - -# The names of the make variables in the generated doxyrules.make file -# are prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX. -# This is useful so different doxyrules.make files included by the same -# Makefile don't overwrite each other's variables. - -PERLMOD_MAKEVAR_PREFIX = - -#--------------------------------------------------------------------------- -# Configuration options related to the preprocessor -#--------------------------------------------------------------------------- - -# If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will -# evaluate all C-preprocessor directives found in the sources and include -# files. - -ENABLE_PREPROCESSING = YES - -# If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro -# names in the source code. If set to NO (the default) only conditional -# compilation will be performed. Macro expansion can be done in a controlled -# way by setting EXPAND_ONLY_PREDEF to YES. - -MACRO_EXPANSION = NO - -# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES -# then the macro expansion is limited to the macros specified with the -# PREDEFINED and EXPAND_AS_DEFINED tags. - -EXPAND_ONLY_PREDEF = NO - -# If the SEARCH_INCLUDES tag is set to YES (the default) the includes files -# pointed to by INCLUDE_PATH will be searched when a #include is found. - -SEARCH_INCLUDES = YES - -# The INCLUDE_PATH tag can be used to specify one or more directories that -# contain include files that are not input files but should be processed by -# the preprocessor. - -INCLUDE_PATH = - -# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard -# patterns (like *.h and *.hpp) to filter out the header-files in the -# directories. If left blank, the patterns specified with FILE_PATTERNS will -# be used. - -INCLUDE_FILE_PATTERNS = - -# The PREDEFINED tag can be used to specify one or more macro names that -# are defined before the preprocessor is started (similar to the -D option of -# gcc). The argument of the tag is a list of macros of the form: name -# or name=definition (no spaces). If the definition and the = are -# omitted =1 is assumed. To prevent a macro definition from being -# undefined via #undef or recursively expanded use the := operator -# instead of the = operator. - -PREDEFINED = - -# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then -# this tag can be used to specify a list of macro names that should be expanded. -# The macro definition that is found in the sources will be used. -# Use the PREDEFINED tag if you want to use a different macro definition that -# overrules the definition found in the source code. - -EXPAND_AS_DEFINED = - -# If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then -# doxygen's preprocessor will remove all references to function-like macros -# that are alone on a line, have an all uppercase name, and do not end with a -# semicolon, because these will confuse the parser if not removed. - -SKIP_FUNCTION_MACROS = YES - -#--------------------------------------------------------------------------- -# Configuration::additions related to external references -#--------------------------------------------------------------------------- - -# The TAGFILES option can be used to specify one or more tagfiles. -# Optionally an initial location of the external documentation -# can be added for each tagfile. The format of a tag file without -# this location is as follows: -# -# TAGFILES = file1 file2 ... -# Adding location for the tag files is done as follows: -# -# TAGFILES = file1=loc1 "file2 = loc2" ... -# where "loc1" and "loc2" can be relative or absolute paths or -# URLs. If a location is present for each tag, the installdox tool -# does not have to be run to correct the links. -# Note that each tag file must have a unique name -# (where the name does NOT include the path) -# If a tag file is not located in the directory in which doxygen -# is run, you must also specify the path to the tagfile here. - -TAGFILES = - -# When a file name is specified after GENERATE_TAGFILE, doxygen will create -# a tag file that is based on the input files it reads. - -GENERATE_TAGFILE = - -# If the ALLEXTERNALS tag is set to YES all external classes will be listed -# in the class index. If set to NO only the inherited external classes -# will be listed. - -ALLEXTERNALS = NO - -# If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed -# in the modules index. If set to NO, only the current project's groups will -# be listed. - -EXTERNAL_GROUPS = YES - -# The PERL_PATH should be the absolute path and name of the perl script -# interpreter (i.e. the result of `which perl'). - -PERL_PATH = /usr/bin/perl - -#--------------------------------------------------------------------------- -# Configuration options related to the dot tool -#--------------------------------------------------------------------------- - -# If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will -# generate a inheritance diagram (in HTML, RTF and LaTeX) for classes with base -# or super classes. Setting the tag to NO turns the diagrams off. Note that -# this option also works with HAVE_DOT disabled, but it is recommended to -# install and use dot, since it yields more powerful graphs. - -CLASS_DIAGRAMS = YES - -# You can define message sequence charts within doxygen comments using the \msc -# command. Doxygen will then run the mscgen tool (see -# http://www.mcternan.me.uk/mscgen/) to produce the chart and insert it in the -# documentation. The MSCGEN_PATH tag allows you to specify the directory where -# the mscgen tool resides. If left empty the tool is assumed to be found in the -# default search path. - -MSCGEN_PATH = - -# If set to YES, the inheritance and collaboration graphs will hide -# inheritance and usage relations if the target is undocumented -# or is not a class. - -HIDE_UNDOC_RELATIONS = YES - -# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is -# available from the path. This tool is part of Graphviz, a graph visualization -# toolkit from AT&T and Lucent Bell Labs. The other options in this section -# have no effect if this option is set to NO (the default) - -HAVE_DOT = NO - -# The DOT_NUM_THREADS specifies the number of dot invocations doxygen is -# allowed to run in parallel. When set to 0 (the default) doxygen will -# base this on the number of processors available in the system. You can set it -# explicitly to a value larger than 0 to get control over the balance -# between CPU load and processing speed. - -DOT_NUM_THREADS = 0 - -# By default doxygen will write a font called Helvetica to the output -# directory and reference it in all dot files that doxygen generates. -# When you want a differently looking font you can specify the font name -# using DOT_FONTNAME. You need to make sure dot is able to find the font, -# which can be done by putting it in a standard location or by setting the -# DOTFONTPATH environment variable or by setting DOT_FONTPATH to the directory -# containing the font. - -DOT_FONTNAME = Helvetica - -# The DOT_FONTSIZE tag can be used to set the size of the font of dot graphs. -# The default size is 10pt. - -DOT_FONTSIZE = 10 - -# By default doxygen will tell dot to use the output directory to look for the -# FreeSans.ttf font (which doxygen will put there itself). If you specify a -# different font using DOT_FONTNAME you can set the path where dot -# can find it using this tag. - -DOT_FONTPATH = - -# If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen -# will generate a graph for each documented class showing the direct and -# indirect inheritance relations. Setting this tag to YES will force the -# the CLASS_DIAGRAMS tag to NO. - -CLASS_GRAPH = YES - -# If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen -# will generate a graph for each documented class showing the direct and -# indirect implementation dependencies (inheritance, containment, and -# class references variables) of the class with other documented classes. - -COLLABORATION_GRAPH = YES - -# If the GROUP_GRAPHS and HAVE_DOT tags are set to YES then doxygen -# will generate a graph for groups, showing the direct groups dependencies - -GROUP_GRAPHS = YES - -# If the UML_LOOK tag is set to YES doxygen will generate inheritance and -# collaboration diagrams in a style similar to the OMG's Unified Modeling -# Language. - -UML_LOOK = NO - -# If set to YES, the inheritance and collaboration graphs will show the -# relations between templates and their instances. - -TEMPLATE_RELATIONS = NO - -# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT -# tags are set to YES then doxygen will generate a graph for each documented -# file showing the direct and indirect include dependencies of the file with -# other documented files. - -INCLUDE_GRAPH = YES - -# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and -# HAVE_DOT tags are set to YES then doxygen will generate a graph for each -# documented header file showing the documented files that directly or -# indirectly include this file. - -INCLUDED_BY_GRAPH = YES - -# If the CALL_GRAPH and HAVE_DOT options are set to YES then -# doxygen will generate a call dependency graph for every global function -# or class method. Note that enabling this option will significantly increase -# the time of a run. So in most cases it will be better to enable call graphs -# for selected functions only using the \callgraph command. - -CALL_GRAPH = NO - -# If the CALLER_GRAPH and HAVE_DOT tags are set to YES then -# doxygen will generate a caller dependency graph for every global function -# or class method. Note that enabling this option will significantly increase -# the time of a run. So in most cases it will be better to enable caller -# graphs for selected functions only using the \callergraph command. - -CALLER_GRAPH = NO - -# If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen -# will generate a graphical hierarchy of all classes instead of a textual one. - -GRAPHICAL_HIERARCHY = YES - -# If the DIRECTORY_GRAPH, SHOW_DIRECTORIES and HAVE_DOT tags are set to YES -# then doxygen will show the dependencies a directory has on other directories -# in a graphical way. The dependency relations are determined by the #include -# relations between the files in the directories. - -DIRECTORY_GRAPH = YES - -# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images -# generated by dot. Possible values are svg, png, jpg, or gif. -# If left blank png will be used. - -DOT_IMAGE_FORMAT = png - -# The tag DOT_PATH can be used to specify the path where the dot tool can be -# found. If left blank, it is assumed the dot tool can be found in the path. - -DOT_PATH = - -# The DOTFILE_DIRS tag can be used to specify one or more directories that -# contain dot files that are included in the documentation (see the -# \dotfile command). - -DOTFILE_DIRS = - -# The MSCFILE_DIRS tag can be used to specify one or more directories that -# contain msc files that are included in the documentation (see the -# \mscfile command). - -MSCFILE_DIRS = - -# The DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of -# nodes that will be shown in the graph. If the number of nodes in a graph -# becomes larger than this value, doxygen will truncate the graph, which is -# visualized by representing a node as a red box. Note that doxygen if the -# number of direct children of the root node in a graph is already larger than -# DOT_GRAPH_MAX_NODES then the graph will not be shown at all. Also note -# that the size of a graph can be further restricted by MAX_DOT_GRAPH_DEPTH. - -DOT_GRAPH_MAX_NODES = 50 - -# The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the -# graphs generated by dot. A depth value of 3 means that only nodes reachable -# from the root by following a path via at most 3 edges will be shown. Nodes -# that lay further from the root node will be omitted. Note that setting this -# option to 1 or 2 may greatly reduce the computation time needed for large -# code bases. Also note that the size of a graph can be further restricted by -# DOT_GRAPH_MAX_NODES. Using a depth of 0 means no depth restriction. - -MAX_DOT_GRAPH_DEPTH = 0 - -# Set the DOT_TRANSPARENT tag to YES to generate images with a transparent -# background. This is disabled by default, because dot on Windows does not -# seem to support this out of the box. Warning: Depending on the platform used, -# enabling this option may lead to badly anti-aliased labels on the edges of -# a graph (i.e. they become hard to read). - -DOT_TRANSPARENT = NO - -# Set the DOT_MULTI_TARGETS tag to YES allow dot to generate multiple output -# files in one run (i.e. multiple -o and -T options on the command line). This -# makes dot run faster, but since only newer versions of dot (>1.8.10) -# support this, this feature is disabled by default. - -DOT_MULTI_TARGETS = YES - -# If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will -# generate a legend page explaining the meaning of the various boxes and -# arrows in the dot generated graphs. - -GENERATE_LEGEND = YES - -# If the DOT_CLEANUP tag is set to YES (the default) Doxygen will -# remove the intermediate dot files that are used to generate -# the various graphs. - -DOT_CLEANUP = YES diff --git a/SCHNApps_old/doc/LaTeX/images/callBacks.png b/SCHNApps_old/doc/LaTeX/images/callBacks.png deleted file mode 100644 index 7c01fd30ca92ca5e6abae4b61f69dd746d708b70..0000000000000000000000000000000000000000 Binary files a/SCHNApps_old/doc/LaTeX/images/callBacks.png and /dev/null differ diff --git a/SCHNApps_old/doc/LaTeX/images/callBacks.svg b/SCHNApps_old/doc/LaTeX/images/callBacks.svg deleted file mode 100644 index 79fae637a113e100f784f5da19a2a1ea42e2055d..0000000000000000000000000000000000000000 --- a/SCHNApps_old/doc/LaTeX/images/callBacks.svg +++ /dev/null @@ -1,507 +0,0 @@ - - - - - - - - - - - - - - image/svg+xml - - - - - - - - Main app - - loadPlugin() - - constructor() - Plugin - - - linkPluginWith(Scene) - activate() - - - cb_initGL(Scene) - cb_recieved(Scene) - - - - - updateGL(Scene) - cb_redraw(Scene) - cb_updateMatrix(View) - - - foreach (View in Scene) - - - - - - - unloadPlugin() - disable() - - - - *methods that needs to be overloaded * - * - * - * - - - destructor() - unlinkPluginWith(Scene) - - - - cb_removingScene(Scene) - [actually removes scene] - - diff --git a/SCHNApps_old/doc/LaTeX/images/plugins.png b/SCHNApps_old/doc/LaTeX/images/plugins.png deleted file mode 100644 index 0e762add46ed782f9bedb47fba2f6224fbb0648f..0000000000000000000000000000000000000000 Binary files a/SCHNApps_old/doc/LaTeX/images/plugins.png and /dev/null differ diff --git a/SCHNApps_old/doc/LaTeX/images/screenshot1.png b/SCHNApps_old/doc/LaTeX/images/screenshot1.png deleted file mode 100644 index d999a45b94d470a1245af42297846c72b04ada29..0000000000000000000000000000000000000000 Binary files a/SCHNApps_old/doc/LaTeX/images/screenshot1.png and /dev/null differ diff --git a/SCHNApps_old/doc/LaTeX/images/screenshot10.png b/SCHNApps_old/doc/LaTeX/images/screenshot10.png deleted file mode 100644 index 1948816cfdb266b287d180464a0a9c2c52fa076c..0000000000000000000000000000000000000000 Binary files a/SCHNApps_old/doc/LaTeX/images/screenshot10.png and /dev/null differ diff --git a/SCHNApps_old/doc/LaTeX/images/screenshot11.png b/SCHNApps_old/doc/LaTeX/images/screenshot11.png deleted file mode 100644 index 87d5cfb2ae322e8a080dc259487afbaee032beb2..0000000000000000000000000000000000000000 Binary files a/SCHNApps_old/doc/LaTeX/images/screenshot11.png and /dev/null differ diff --git a/SCHNApps_old/doc/LaTeX/images/screenshot12.png b/SCHNApps_old/doc/LaTeX/images/screenshot12.png deleted file mode 100644 index acf4ec87057f0d0f71285555bde8f80edde0f9b1..0000000000000000000000000000000000000000 Binary files a/SCHNApps_old/doc/LaTeX/images/screenshot12.png and /dev/null differ diff --git a/SCHNApps_old/doc/LaTeX/images/screenshot13.png b/SCHNApps_old/doc/LaTeX/images/screenshot13.png deleted file mode 100644 index 9c54007295537a9ab2b37a9e1ac24b1362da0308..0000000000000000000000000000000000000000 Binary files a/SCHNApps_old/doc/LaTeX/images/screenshot13.png and /dev/null differ diff --git a/SCHNApps_old/doc/LaTeX/images/screenshot14.png b/SCHNApps_old/doc/LaTeX/images/screenshot14.png deleted file mode 100644 index 47053298906d81cd9167e1e772a6a58fb14b56d8..0000000000000000000000000000000000000000 Binary files a/SCHNApps_old/doc/LaTeX/images/screenshot14.png and /dev/null differ diff --git a/SCHNApps_old/doc/LaTeX/images/screenshot15.png b/SCHNApps_old/doc/LaTeX/images/screenshot15.png deleted file mode 100644 index 7bea13ed73b3b5e142257b0e5390e34a701181f3..0000000000000000000000000000000000000000 Binary files a/SCHNApps_old/doc/LaTeX/images/screenshot15.png and /dev/null differ diff --git a/SCHNApps_old/doc/LaTeX/images/screenshot16.png b/SCHNApps_old/doc/LaTeX/images/screenshot16.png deleted file mode 100644 index 08d3d63d056f46a87d27dafd4863c38f6d5fa960..0000000000000000000000000000000000000000 Binary files a/SCHNApps_old/doc/LaTeX/images/screenshot16.png and /dev/null differ diff --git a/SCHNApps_old/doc/LaTeX/images/screenshot17.png b/SCHNApps_old/doc/LaTeX/images/screenshot17.png deleted file mode 100644 index 03c6746229a049b03209066a4d1c317b1c6952ce..0000000000000000000000000000000000000000 Binary files a/SCHNApps_old/doc/LaTeX/images/screenshot17.png and /dev/null differ diff --git a/SCHNApps_old/doc/LaTeX/images/screenshot18.png b/SCHNApps_old/doc/LaTeX/images/screenshot18.png deleted file mode 100644 index cdccd44f489a05ddb41eb9075cb311fb24e9bcf2..0000000000000000000000000000000000000000 Binary files a/SCHNApps_old/doc/LaTeX/images/screenshot18.png and /dev/null differ diff --git a/SCHNApps_old/doc/LaTeX/images/screenshot19.png b/SCHNApps_old/doc/LaTeX/images/screenshot19.png deleted file mode 100644 index c20698cfe8c6ff4ca86f89273d79848915f6d6f7..0000000000000000000000000000000000000000 Binary files a/SCHNApps_old/doc/LaTeX/images/screenshot19.png and /dev/null differ diff --git a/SCHNApps_old/doc/LaTeX/images/screenshot2.png b/SCHNApps_old/doc/LaTeX/images/screenshot2.png deleted file mode 100644 index d9e477e99f960b10aa96927039f3f8312e6c5a5d..0000000000000000000000000000000000000000 Binary files a/SCHNApps_old/doc/LaTeX/images/screenshot2.png and /dev/null differ diff --git a/SCHNApps_old/doc/LaTeX/images/screenshot20.png b/SCHNApps_old/doc/LaTeX/images/screenshot20.png deleted file mode 100644 index 8ca122e425233333170e612dc9474de3981a7e83..0000000000000000000000000000000000000000 Binary files a/SCHNApps_old/doc/LaTeX/images/screenshot20.png and /dev/null differ diff --git a/SCHNApps_old/doc/LaTeX/images/screenshot21.png b/SCHNApps_old/doc/LaTeX/images/screenshot21.png deleted file mode 100644 index 2d2389b2863c04b80ce334db55452dfe86d72215..0000000000000000000000000000000000000000 Binary files a/SCHNApps_old/doc/LaTeX/images/screenshot21.png and /dev/null differ diff --git a/SCHNApps_old/doc/LaTeX/images/screenshot22.png b/SCHNApps_old/doc/LaTeX/images/screenshot22.png deleted file mode 100644 index fce24d9aa69f54395c9c9f9cb583c48a9b9ac2bb..0000000000000000000000000000000000000000 Binary files a/SCHNApps_old/doc/LaTeX/images/screenshot22.png and /dev/null differ diff --git a/SCHNApps_old/doc/LaTeX/images/screenshot23.png b/SCHNApps_old/doc/LaTeX/images/screenshot23.png deleted file mode 100644 index a85f96cb4f33bbeac0538e424fbf5a71fd9eb6e2..0000000000000000000000000000000000000000 Binary files a/SCHNApps_old/doc/LaTeX/images/screenshot23.png and /dev/null differ diff --git a/SCHNApps_old/doc/LaTeX/images/screenshot24.png b/SCHNApps_old/doc/LaTeX/images/screenshot24.png deleted file mode 100644 index dfc27e06e645634b75b72dcae93e438c8d6eaeb1..0000000000000000000000000000000000000000 Binary files a/SCHNApps_old/doc/LaTeX/images/screenshot24.png and /dev/null differ diff --git a/SCHNApps_old/doc/LaTeX/images/screenshot25.png b/SCHNApps_old/doc/LaTeX/images/screenshot25.png deleted file mode 100644 index 242d1b555aa0f444010ce3cd563691ec81a3ef32..0000000000000000000000000000000000000000 Binary files a/SCHNApps_old/doc/LaTeX/images/screenshot25.png and /dev/null differ diff --git a/SCHNApps_old/doc/LaTeX/images/screenshot26.png b/SCHNApps_old/doc/LaTeX/images/screenshot26.png deleted file mode 100644 index eb75c5b1b5296a40ef06fb446775caeade9679b3..0000000000000000000000000000000000000000 Binary files a/SCHNApps_old/doc/LaTeX/images/screenshot26.png and /dev/null differ diff --git a/SCHNApps_old/doc/LaTeX/images/screenshot28.png b/SCHNApps_old/doc/LaTeX/images/screenshot28.png deleted file mode 100644 index 0881de66f783f5dd423e05ac37721e87579e8c44..0000000000000000000000000000000000000000 Binary files a/SCHNApps_old/doc/LaTeX/images/screenshot28.png and /dev/null differ diff --git a/SCHNApps_old/doc/LaTeX/images/screenshot3.png b/SCHNApps_old/doc/LaTeX/images/screenshot3.png deleted file mode 100644 index bbfcef0511d364506058fa179d44b835dd37af55..0000000000000000000000000000000000000000 Binary files a/SCHNApps_old/doc/LaTeX/images/screenshot3.png and /dev/null differ diff --git a/SCHNApps_old/doc/LaTeX/images/screenshot4.png b/SCHNApps_old/doc/LaTeX/images/screenshot4.png deleted file mode 100644 index dbe30956ac2b607d4c2046a91e27dfdbbd04b7a2..0000000000000000000000000000000000000000 Binary files a/SCHNApps_old/doc/LaTeX/images/screenshot4.png and /dev/null differ diff --git a/SCHNApps_old/doc/LaTeX/images/screenshot5.png b/SCHNApps_old/doc/LaTeX/images/screenshot5.png deleted file mode 100644 index ad41d8b6750191be7355d6bfac61093c5dbe9508..0000000000000000000000000000000000000000 Binary files a/SCHNApps_old/doc/LaTeX/images/screenshot5.png and /dev/null differ diff --git a/SCHNApps_old/doc/LaTeX/images/screenshot6.png b/SCHNApps_old/doc/LaTeX/images/screenshot6.png deleted file mode 100644 index 9cc4b9338dd290ca7d7a021ce5ba8324db227850..0000000000000000000000000000000000000000 Binary files a/SCHNApps_old/doc/LaTeX/images/screenshot6.png and /dev/null differ diff --git a/SCHNApps_old/doc/LaTeX/images/screenshot7.png b/SCHNApps_old/doc/LaTeX/images/screenshot7.png deleted file mode 100644 index 55d66f1b50d7fc19a044487409d27daa68f51354..0000000000000000000000000000000000000000 Binary files a/SCHNApps_old/doc/LaTeX/images/screenshot7.png and /dev/null differ diff --git a/SCHNApps_old/doc/LaTeX/images/screenshot8.png b/SCHNApps_old/doc/LaTeX/images/screenshot8.png deleted file mode 100644 index c38ca96ec5ea898e68362e6300cb582fe8a24744..0000000000000000000000000000000000000000 Binary files a/SCHNApps_old/doc/LaTeX/images/screenshot8.png and /dev/null differ diff --git a/SCHNApps_old/doc/LaTeX/images/screenshot9.png b/SCHNApps_old/doc/LaTeX/images/screenshot9.png deleted file mode 100644 index 4acccaef3a2eac492107a626992eccecebed2cd0..0000000000000000000000000000000000000000 Binary files a/SCHNApps_old/doc/LaTeX/images/screenshot9.png and /dev/null differ diff --git a/SCHNApps_old/doc/LaTeX/images/systemMap1.png b/SCHNApps_old/doc/LaTeX/images/systemMap1.png deleted file mode 100644 index 35e10d7b230506a65a3ab0584cea980ff75c1df5..0000000000000000000000000000000000000000 Binary files a/SCHNApps_old/doc/LaTeX/images/systemMap1.png and /dev/null differ diff --git a/SCHNApps_old/doc/LaTeX/images/systemMap2.png b/SCHNApps_old/doc/LaTeX/images/systemMap2.png deleted file mode 100644 index 24f09245d25b4d5a82b00b443f19b4ff908d2027..0000000000000000000000000000000000000000 Binary files a/SCHNApps_old/doc/LaTeX/images/systemMap2.png and /dev/null differ diff --git a/SCHNApps_old/doc/LaTeX/overview.aux b/SCHNApps_old/doc/LaTeX/overview.aux deleted file mode 100644 index 082a454f887a76b81e1f42eccf65a2cf1b42a806..0000000000000000000000000000000000000000 --- a/SCHNApps_old/doc/LaTeX/overview.aux +++ /dev/null @@ -1,119 +0,0 @@ -\relax -\providecommand\HyperFirstAtBeginDocument{\AtBeginDocument} -\HyperFirstAtBeginDocument{\ifx\hyper@anchor\@undefined -\global\let\oldcontentsline\contentsline -\gdef\contentsline#1#2#3#4{\oldcontentsline{#1}{#2}{#3}} -\global\let\oldnewlabel\newlabel -\gdef\newlabel#1#2{\newlabelxx{#1}#2} -\gdef\newlabelxx#1#2#3#4#5#6{\oldnewlabel{#1}{{#2}{#3}}} -\AtEndDocument{\ifx\hyper@anchor\@undefined -\let\contentsline\oldcontentsline -\let\newlabel\oldnewlabel -\fi} -\fi} -\global\let\hyper@last\relax -\gdef\HyperFirstAtBeginDocument#1{#1} -\providecommand\HyField@AuxAddToFields[1]{} -\select@language{english} -\@writefile{toc}{\select@language{english}} -\@writefile{lof}{\select@language{english}} -\@writefile{lot}{\select@language{english}} -\@writefile{toc}{\contentsline {chapter}{\numberline {1}Introduction and purposes}{3}{chapter.1}} -\@writefile{lof}{\addvspace {10\p@ }} -\@writefile{lot}{\addvspace {10\p@ }} -\@writefile{lol}{\addvspace {10\p@ }} -\@writefile{toc}{\contentsline {section}{\numberline {1.1}CGoGN}{3}{section.1.1}} -\@writefile{toc}{\contentsline {subsection}{\numberline {1.1.1}What is CGoGN library ?}{3}{subsection.1.1.1}} -\@writefile{toc}{\contentsline {subsection}{\numberline {1.1.2}CGoGN and visualization?}{3}{subsection.1.1.2}} -\@writefile{toc}{\contentsline {section}{\numberline {1.2}The project}{3}{section.1.2}} -\@writefile{toc}{\contentsline {subsection}{\numberline {1.2.1}CGoGN in space?}{3}{subsection.1.2.1}} -\@writefile{toc}{\contentsline {subsection}{\numberline {1.2.2}Plugins and CGoGN?}{4}{subsection.1.2.2}} -\@writefile{toc}{\contentsline {chapter}{\numberline {2}The project}{5}{chapter.2}} -\@writefile{lof}{\addvspace {10\p@ }} -\@writefile{lot}{\addvspace {10\p@ }} -\@writefile{lol}{\addvspace {10\p@ }} -\@writefile{toc}{\contentsline {section}{\numberline {2.1}Work}{5}{section.2.1}} -\@writefile{toc}{\contentsline {subsection}{\numberline {2.1.1}Specifications}{5}{subsection.2.1.1}} -\@writefile{toc}{\contentsline {subsection}{\numberline {2.1.2}Additional features}{5}{subsection.2.1.2}} -\@writefile{toc}{\contentsline {subsection}{\numberline {2.1.3}Third party libraries}{6}{subsection.2.1.3}} -\@writefile{toc}{\contentsline {section}{\numberline {2.2}Quick presentation}{6}{section.2.2}} -\@writefile{toc}{\contentsline {subsection}{\numberline {2.2.1}The main application}{6}{subsection.2.2.1}} -\@writefile{lof}{\contentsline {figure}{\numberline {2.1}{\ignorespaces The main window application without any plugin loaded or used.\relax }}{6}{figure.caption.16}} -\@writefile{lof}{\contentsline {figure}{\numberline {2.2}{\ignorespaces Load the plugin button.\relax }}{7}{figure.caption.17}} -\@writefile{lof}{\contentsline {figure}{\numberline {2.3}{\ignorespaces Load plugins interface.\relax }}{7}{figure.caption.18}} -\@writefile{lof}{\contentsline {figure}{\numberline {2.4}{\ignorespaces Adding scenes button.\relax }}{8}{figure.caption.19}} -\@writefile{lof}{\contentsline {figure}{\numberline {2.5}{\ignorespaces Adding scenes interface.\relax }}{8}{figure.caption.20}} -\@writefile{lof}{\contentsline {figure}{\numberline {2.6}{\ignorespaces A scene associated to a drawing plugin.\relax }}{9}{figure.caption.21}} -\providecommand*\caption@xref[2]{\@setref\relax\@undefined{#1}} -\newlabel{fig:tuto5GeomView}{{2.6}{9}{A scene associated to a drawing plugin.\relax \relax }{figure.caption.21}{}} -\@writefile{lof}{\contentsline {figure}{\numberline {2.7}{\ignorespaces View's camera gesture for this scene.\relax }}{9}{figure.caption.22}} -\@writefile{lof}{\contentsline {figure}{\numberline {2.8}{\ignorespaces Creating and naming a new camera.\relax }}{10}{figure.caption.23}} -\@writefile{lof}{\contentsline {figure}{\numberline {2.9}{\ignorespaces View management button.\relax }}{10}{figure.caption.24}} -\@writefile{lof}{\contentsline {figure}{\numberline {2.10}{\ignorespaces 1 plugin drawing in one scene with 2 cameras and split into 2 view.\relax }}{12}{figure.caption.26}} -\newlabel{fig:tuto5GeomDoubleView}{{2.10}{12}{1 plugin drawing in one scene with 2 cameras and split into 2 view.\relax \relax }{figure.caption.26}{}} -\@writefile{toc}{\contentsline {subsection}{\numberline {2.2.2}The import plugin}{13}{subsection.2.2.2}} -\@writefile{lof}{\contentsline {figure}{\numberline {2.11}{\ignorespaces Loading the «importMap» plugin.\relax }}{13}{figure.caption.28}} -\@writefile{lof}{\contentsline {figure}{\numberline {2.12}{\ignorespaces A wild menu entry appears!\relax }}{13}{figure.caption.29}} -\@writefile{lof}{\contentsline {figure}{\numberline {2.13}{\ignorespaces File dialog.\relax }}{13}{figure.caption.30}} -\@writefile{lof}{\contentsline {figure}{\numberline {2.14}{\ignorespaces Link map and plugin menu entry\relax }}{14}{figure.caption.31}} -\newlabel{fig:linkMapPlugin}{{2.14}{14}{Link map and plugin menu entry\relax \relax }{figure.caption.31}{}} -\@writefile{lof}{\contentsline {figure}{\numberline {2.15}{\ignorespaces Link map and plugin menu entry\relax }}{14}{figure.caption.32}} -\@writefile{lof}{\contentsline {figure}{\numberline {2.16}{\ignorespaces Moo moo mooo.\relax }}{14}{figure.caption.33}} -\@writefile{toc}{\contentsline {subsection}{\numberline {2.2.3}The camera path plugin}{15}{subsection.2.2.3}} -\@writefile{lof}{\contentsline {figure}{\numberline {2.17}{\ignorespaces Two moos are better than none.\relax }}{15}{figure.caption.35}} -\@writefile{lof}{\contentsline {figure}{\numberline {2.18}{\ignorespaces Regular plugin load.\relax }}{15}{figure.caption.36}} -\@writefile{lof}{\contentsline {figure}{\numberline {2.19}{\ignorespaces Linking the existing view with the ``\textit {cameraPath}'' plugin.\relax }}{16}{figure.caption.37}} -\@writefile{lof}{\contentsline {figure}{\numberline {2.20}{\ignorespaces A wild new icon appears!\relax }}{16}{figure.caption.38}} -\@writefile{lof}{\contentsline {figure}{\numberline {2.21}{\ignorespaces The camera path editor dialog.\relax }}{16}{figure.caption.39}} -\@writefile{lof}{\contentsline {figure}{\numberline {2.22}{\ignorespaces The path of the second camera viewed by the first.\relax }}{17}{figure.caption.40}} -\@writefile{toc}{\contentsline {chapter}{\numberline {3}How to write plugins?}{19}{chapter.3}} -\@writefile{lof}{\addvspace {10\p@ }} -\@writefile{lot}{\addvspace {10\p@ }} -\@writefile{lol}{\addvspace {10\p@ }} -\@writefile{toc}{\contentsline {section}{\numberline {3.1}Basics and concepts}{19}{section.3.1}} -\@writefile{toc}{\contentsline {subsection}{\numberline {3.1.1}Visualization concepts}{19}{subsection.3.1.1}} -\@writefile{toc}{\contentsline {paragraph}{Plugin:}{19}{section*.44}} -\@writefile{toc}{\contentsline {paragraph}{Scene:}{19}{section*.45}} -\@writefile{toc}{\contentsline {paragraph}{View:}{19}{section*.46}} -\@writefile{toc}{\contentsline {paragraph}{Camera:}{19}{section*.47}} -\@writefile{lof}{\contentsline {figure}{\numberline {3.1}{\ignorespaces 1 plugin drawing in 1 scene made of 1 view that has 1 camera.\relax }}{20}{figure.caption.49}} -\@writefile{lof}{\contentsline {figure}{\numberline {3.2}{\ignorespaces 1 plugin drawing in 1 scene made of 2 views each one working with their own camera.\relax }}{20}{figure.caption.51}} -\@writefile{toc}{\contentsline {subsection}{\numberline {3.1.2}The first plugin}{20}{subsection.3.1.2}} -\@writefile{toc}{\contentsline {subsubsection}{How to write the plugin}{20}{section*.52}} -\@writefile{toc}{\contentsline {paragraph}{firstPlugin.h}{21}{section*.55}} -\@writefile{toc}{\contentsline {paragraph}{firstPlugin.cpp}{23}{section*.57}} -\@writefile{toc}{\contentsline {subsubsection}{Compilation}{25}{section*.58}} -\@writefile{toc}{\contentsline {paragraph}{CMakeLists.txt}{25}{section*.61}} -\@writefile{toc}{\contentsline {subsubsection}{Using the plugin}{26}{section*.63}} -\@writefile{lof}{\contentsline {figure}{\numberline {3.3}{\ignorespaces Add a plugin and add a plugin directory buttons.\relax }}{27}{figure.caption.65}} -\@writefile{lof}{\contentsline {figure}{\numberline {3.4}{\ignorespaces We select our plugin.\relax }}{27}{figure.caption.66}} -\@writefile{lof}{\contentsline {figure}{\numberline {3.5}{\ignorespaces Tadaaaa!\relax }}{27}{figure.caption.67}} -\@writefile{toc}{\contentsline {subsection}{\numberline {3.1.3}Tricks and advice}{28}{subsection.3.1.3}} -\@writefile{toc}{\contentsline {subsubsection}{Understanding the callBacks}{28}{section*.68}} -\@writefile{lof}{\contentsline {figure}{\numberline {3.6}{\ignorespaces The main call backs between the main application and a plugin.\relax }}{28}{figure.caption.69}} -\newlabel{fig:callBacks}{{3.6}{28}{The main call backs between the main application and a plugin.\relax \relax }{figure.caption.69}{}} -\@writefile{toc}{\contentsline {subsubsection}{Bug \& Debug}{29}{section*.70}} -\@writefile{toc}{\contentsline {paragraph}{Common bug:}{29}{section*.71}} -\@writefile{toc}{\contentsline {paragraph}{Debug:}{29}{section*.72}} -\@writefile{toc}{\contentsline {section}{\numberline {3.2}Going further\dots }{30}{section.3.2}} -\@writefile{toc}{\contentsline {subsection}{\numberline {3.2.1}Few words on plugins}{30}{subsection.3.2.1}} -\@writefile{lof}{\contentsline {figure}{\numberline {3.7}{\ignorespaces The plugins inheritence graph.\relax }}{30}{figure.caption.75}} -\newlabel{fig:plugins}{{3.7}{30}{The plugins inheritence graph.\relax \relax }{figure.caption.75}{}} -\@writefile{toc}{\contentsline {subsection}{\numberline {3.2.2}Objects and visualization plugins}{30}{subsection.3.2.2}} -\@writefile{toc}{\contentsline {subsubsection}{Scene:}{30}{section*.77}} -\@writefile{toc}{\contentsline {paragraph}{Automatic creation:}{31}{section*.79}} -\@writefile{toc}{\contentsline {paragraph}{Call-back on scene linking:}{31}{section*.80}} -\@writefile{toc}{\contentsline {subsubsection}{View:}{32}{section*.82}} -\@writefile{toc}{\contentsline {subsubsection}{Camera:}{33}{section*.85}} -\@writefile{toc}{\contentsline {subsection}{\numberline {3.2.3}GUI and user interactions}{34}{subsection.3.2.3}} -\@writefile{toc}{\contentsline {subsubsection}{Custom widgets and menu entries}{34}{section*.87}} -\@writefile{toc}{\contentsline {paragraph}{Custom menu entries:}{34}{section*.89}} -\@writefile{toc}{\contentsline {paragraph}{Custom toolbar buttons:}{35}{section*.90}} -\@writefile{toc}{\contentsline {paragraph}{Custom widgets:}{35}{section*.91}} -\@writefile{toc}{\contentsline {subsubsection}{User interactions}{36}{section*.92}} -\@writefile{toc}{\contentsline {subsection}{\numberline {3.2.4}Maps and VBOs}{36}{subsection.3.2.4}} -\@writefile{toc}{\contentsline {subsubsection}{Map and VBO handling types}{36}{section*.95}} -\@writefile{toc}{\contentsline {paragraph}{MapHandler:}{37}{section*.98}} -\@writefile{toc}{\contentsline {paragraph}{VBOHandler:}{38}{section*.99}} -\@writefile{toc}{\contentsline {subsubsection}{Sharing maps}{39}{section*.100}} -\@writefile{toc}{\contentsline {subsubsection}{Plugins maps callback}{40}{section*.103}} diff --git a/SCHNApps_old/doc/LaTeX/overview.fdb_latexmk b/SCHNApps_old/doc/LaTeX/overview.fdb_latexmk deleted file mode 100644 index 2b64adfc8ff87b349e1eb2638804800cb506ff01..0000000000000000000000000000000000000000 --- a/SCHNApps_old/doc/LaTeX/overview.fdb_latexmk +++ /dev/null @@ -1,96 +0,0 @@ -# Fdb version 3 -["pdflatex"] 1352124812 "overview.tex" "overview.pdf" "overview" - "/usr/share/texlive/texmf-dist/tex/context/base/supp-pdf.mkii" 1337017135 71627 94eb9990bed73c364d7f53f960cc8c5b "" - "/usr/share/texlive/texmf-dist/tex/generic/babel/babel.def" 1312409092 29228 2fe939254f4b17ac18a8c0fb8aa39dff "" - "/usr/share/texlive/texmf-dist/tex/generic/babel/babel.sty" 1312409092 9157 414843659be58197b1510e2317ef76d9 "" - "/usr/share/texlive/texmf-dist/tex/generic/babel/english.ldf" 1137109563 6608 fe33acefb75a26ad10c2c6f09d423415 "" - "/usr/share/texlive/texmf-dist/tex/generic/ifxetex/ifxetex.sty" 1284331290 1458 43ab4710dc82f3edeabecd0d099626b2 "" - "/usr/share/texlive/texmf-dist/tex/generic/oberdiek/gettitlestring.sty" 1303254447 8237 52810bdb4db2270e717422560a104aea "" - "/usr/share/texlive/texmf-dist/tex/generic/oberdiek/hobsub-generic.sty" 1338332114 189108 8b3553a56c83ff61acecb36b75d817e2 "" - "/usr/share/texlive/texmf-dist/tex/generic/oberdiek/hobsub-hyperref.sty" 1338332114 70752 45fa392800e07da61fa13446ad46b34d "" - "/usr/share/texlive/texmf-dist/tex/generic/oberdiek/infwarerr.sty" 1335995445 8253 3bdedc8409aa5d290a2339be6f09af03 "" - "/usr/share/texlive/texmf-dist/tex/generic/oberdiek/ltxcmds.sty" 1335995445 18425 775b341047ce304520cc7c11ca41392e "" - "/usr/share/texlive/texmf-dist/tex/latex/base/omlcmr.fd" 1254151887 2110 b6dc71ab969a2e72071817ffae72fb63 "" - "/usr/share/texlive/texmf-dist/tex/latex/base/omscmr.fd" 1254151887 2109 c400bd6c901edc4a09e4d53fcffd3b3c "" - "/usr/share/texlive/texmf-dist/tex/latex/base/textcomp.sty" 1312312491 15509 394096bec6a284398e0b3ead6d33977e "" - "/usr/share/texlive/texmf-dist/tex/latex/base/ts1cmr.fd" 1254151887 2070 a9b43c0e3cee84bb3927d80d70ee10ce "" - "/usr/share/texlive/texmf-dist/tex/latex/base/ts1cmtt.fd" 1254151887 1927 5f4ba4f425e43896e1e8f257d7cef09f "" - "/usr/share/texlive/texmf-dist/tex/latex/base/ts1enc.def" 1254151887 7630 8f51e48866ebfd08b8299888bbe81549 "" - "/usr/share/texlive/texmf-dist/tex/latex/caption/caption.sty" 1331852109 64617 3e595e89cb20089970940faf5347edb4 "" - "/usr/share/texlive/texmf-dist/tex/latex/caption/caption3.sty" 1331852109 59928 5bdbc848cc19ace34fb8f06975f2d198 "" - "/usr/share/texlive/texmf-dist/tex/latex/caption/subcaption.sty" 1331852109 4225 ba79cf1a7e9cbc04e4b417232de4aab9 "" - "/usr/share/texlive/texmf-dist/tex/latex/float/float.sty" 1137110151 6749 16d2656a1984957e674b149555f1ea1d "" - "/usr/share/texlive/texmf-dist/tex/latex/graphics/color.sty" 1156702488 6406 6f55214ce374a5b186b8781f4796f1f9 "" - "/usr/share/texlive/texmf-dist/tex/latex/graphics/graphics.sty" 1254151804 14183 42a8fc761b806986eef292369afc2988 "" - "/usr/share/texlive/texmf-dist/tex/latex/graphics/graphicx.sty" 1156702488 7882 3bd78469d444e8d494e27cfd7ca92719 "" - "/usr/share/texlive/texmf-dist/tex/latex/graphics/keyval.sty" 1156702488 2266 7054435e4584a41cf53b0a7ca624d0cb "" - "/usr/share/texlive/texmf-dist/tex/latex/graphics/trig.sty" 1156702488 3153 c50e6bd54d2dd3933fc52bcf369bec4a "" - "/usr/share/texlive/texmf-dist/tex/latex/hyperref/hpdftex.def" 1336949684 46827 aa71bcb51439ad95a1a3bf6a562edb81 "" - "/usr/share/texlive/texmf-dist/tex/latex/hyperref/hyperref.sty" 1336949684 214680 dcb1cf0d694984ac45356529aefbe1dc "" - "/usr/share/texlive/texmf-dist/tex/latex/hyperref/nameref.sty" 1272755529 12492 22b3864ec821d6b950df3dc0de961f18 "" - "/usr/share/texlive/texmf-dist/tex/latex/hyperref/pd1enc.def" 1336949684 13744 71c3a9768074852e3f36d5b4ddc409b9 "" - "/usr/share/texlive/texmf-dist/tex/latex/koma-script/scrbase.sty" 1337209970 26726 7220a93a6aad619f49719a3fdca71011 "" - "/usr/share/texlive/texmf-dist/tex/latex/koma-script/scrkbase.sty" 1337209970 12005 a4d317920e7c529bffad897e5f9df167 "" - "/usr/share/texlive/texmf-dist/tex/latex/koma-script/scrlfile.sty" 1302044766 12322 59acf0cdb2556c7af7da9763f6812d35 "" - "/usr/share/texlive/texmf-dist/tex/latex/koma-script/scrreprt.cls" 1337209970 123071 7774e12cded59af0bbf4954a6674c09f "" - "/usr/share/texlive/texmf-dist/tex/latex/koma-script/scrsize11pt.clo" 1337209970 6102 d2cb8955334fbb39d8882e6a37400caf "" - "/usr/share/texlive/texmf-dist/tex/latex/koma-script/tocbasic.sty" 1337209970 22069 4c40ce7c06c12a7113018f191a260d53 "" - "/usr/share/texlive/texmf-dist/tex/latex/koma-script/typearea.sty" 1337209970 37506 a9f59c8cf6ac1f3a2570e2c0c4e72d80 "" - "/usr/share/texlive/texmf-dist/tex/latex/latexconfig/color.cfg" 1254097189 802 7b8c8d72c24d795ed7720e4dfd29bff3 "" - "/usr/share/texlive/texmf-dist/tex/latex/latexconfig/epstopdf-sys.cfg" 1279039959 678 4792914a8f45be57bb98413425e4c7af "" - "/usr/share/texlive/texmf-dist/tex/latex/latexconfig/graphics.cfg" 1278958963 3563 d35e897cae3b8c6848f6677b73370b54 "" - "/usr/share/texlive/texmf-dist/tex/latex/latexconfig/hyperref.cfg" 1254097189 235 6031e5765137be07eed51a510b2b8fb7 "" - "/usr/share/texlive/texmf-dist/tex/latex/listings/listings.cfg" 1213130811 1745 ae6fbed3255376b850f8b4ef89faef50 "" - "/usr/share/texlive/texmf-dist/tex/latex/listings/listings.sty" 1213130811 80175 a550732aef92a278ec9bed572025bd8e "" - "/usr/share/texlive/texmf-dist/tex/latex/listings/lstlang1.sty" 1172701948 89800 23131e8521c9ca0a050cd6d5e609c6a0 "" - "/usr/share/texlive/texmf-dist/tex/latex/listings/lstlang2.sty" 1172701948 80494 51df1c54f35a0415deff6872b7dba2d9 "" - "/usr/share/texlive/texmf-dist/tex/latex/listings/lstmisc.sty" 1213130811 76974 d9d4762e984ff3346653b91fbcf676e9 "" - "/usr/share/texlive/texmf-dist/tex/latex/multirow/multirow.sty" 1137110401 7374 f7c1f13fc632dd5c9b220a247d233082 "" - "/usr/share/texlive/texmf-dist/tex/latex/oberdiek/epstopdf-base.sty" 1303254447 12029 04d7fdf76e0464c23b5aa3a727952d7c "" - "/usr/share/texlive/texmf-dist/tex/latex/oberdiek/grfext.sty" 1335995445 7075 bd0c34fbf1ae8fd1debd2a554e41b2d5 "" - "/usr/share/texlive/texmf-dist/tex/latex/oberdiek/kvoptions.sty" 1335995445 22417 c74ff4af6a1aa2b65d1924020edbbe11 "" - "/usr/share/texlive/texmf-dist/tex/latex/oberdiek/rerunfilecheck.sty" 1303254447 9581 1158efc648bc09d5064db5703c882159 "" - "/usr/share/texlive/texmf-dist/tex/latex/pdftex-def/pdftex.def" 1306616590 55368 3c8a0d99822330f2dfabc0dfb09ce897 "" - "/usr/share/texlive/texmf-dist/tex/latex/placeins/placeins.sty" 1137110565 4087 636308456f60d2b31cbf97867db5708d "" - "/usr/share/texlive/texmf-dist/tex/latex/url/url.sty" 1264379145 21932 e3a9cf32ee9b853b42be14c2f25b873c "" - "images/callBacks.png" 1352123537 79305 37054f9a8a284db3195522b7ca1dc36b "" - "images/plugins.png" 1352123537 11276 f6e48505624671f9bdb063dd7cd4dfaa "" - "images/screenshot1.png" 1352123537 15157 5a7fe83f8197683fd35017eb7690ee03 "" - "images/screenshot10.png" 1352123537 17675 b0014dbd0acdc5ae0e23e3a6d78ecf7d "" - "images/screenshot11.png" 1352123537 14885 839f92bfc8b5487ecd816b613d345887 "" - "images/screenshot12.png" 1352123537 30102 45bba256a76366eeb619e69839985a84 "" - "images/screenshot13.png" 1352123537 13443 7ef8965c828709dd14058ae3f911dbb1 "" - "images/screenshot14.png" 1352123537 10605 49546a098a634d08f3271714512c347f "" - "images/screenshot15.png" 1352123537 20024 ef80bd95b089afd4d8e887669660b436 "" - "images/screenshot16.png" 1352123537 9670 0b53d5554b4e6ad268bed69da16a473f "" - "images/screenshot17.png" 1352123537 12758 ace4f050b45e74bf37b9541d3e80cb5e "" - "images/screenshot18.png" 1352123537 75321 db85ba7a46c3dbb1d37d14096833307d "" - "images/screenshot19.png" 1352123537 113725 65d44d1095667ec8493f4101f8ff09db "" - "images/screenshot2.png" 1352123537 12802 b52b68b476db74db61a2927a47bb1c8e "" - "images/screenshot20.png" 1352123537 18039 8bfe092dccc73327736db0fee6994d42 "" - "images/screenshot21.png" 1352123537 12304 ffd2aa7bde4e9b39c7c8d636a7e480e1 "" - "images/screenshot22.png" 1352123537 4605 488ad67641c3d8f06b6dbebb98425f42 "" - "images/screenshot23.png" 1352123537 93573 f0a6d130a4149f632ed09dfd9ea80b2c "" - "images/screenshot24.png" 1352123537 54687 66258386b5b5e166491926cdf5146da5 "" - "images/screenshot25.png" 1352123537 20359 36aa53d5acceb685d9505435bd9139da "" - "images/screenshot26.png" 1352123537 18896 5415a3374fb4835023fcddfaadc061c4 "" - "images/screenshot28.png" 1352123537 20601 b06931d45031a10d1cad1763f012f43f "" - "images/screenshot3.png" 1352123537 75229 d531710e7f8bbd418b3b0b77687b8556 "" - "images/screenshot4.png" 1352123537 13550 ab3c7c0ea6032dcc5dd40ced5577de29 "" - "images/screenshot5.png" 1352123537 19390 92578f6c2b7d6e618d9a6b8f991a4b74 "" - "images/screenshot6.png" 1352123537 21064 b48c88dd50bd2a1043fb9d8239e7fe38 "" - "images/screenshot7.png" 1352123537 4981 e1cc96efb529935f17325fcd71425f78 "" - "images/screenshot8.png" 1352123537 17286 3e89b2d88db0914ce0a0f1324dd105c5 "" - "images/screenshot9.png" 1352123537 6343 46116427a86d4e50d3b2e55cecdd926f "" - "images/systemMap1.png" 1352123537 9713 e9d536e6d5856a86c8d0cd2500dae614 "" - "images/systemMap2.png" 1352123537 16235 e4d5baf82e385bcf291fa1ca2e650d1b "" - "overview.aux" 1352124813 10811 0f63f12542a9d3d5a526c601cbaec886 "" - "overview.out" 1352124813 1769 ee952f43e41b232a1aa515b0515497fd "" - "overview.tex" 1352123537 56420 441909f6d0a71de30b03df67243b80ac "" - "overview.toc" 1352124813 3986 51b08e47dbdf3c7385c005e6bf9584ed "" - (generated) - "overview.aux" - "overview.pdf" - "overview.log" - "overview.toc" - "overview.out" diff --git a/SCHNApps_old/doc/LaTeX/overview.log b/SCHNApps_old/doc/LaTeX/overview.log deleted file mode 100644 index 279989bd80c9ab0d2b409ea83b54be76dc5d6a18..0000000000000000000000000000000000000000 --- a/SCHNApps_old/doc/LaTeX/overview.log +++ /dev/null @@ -1,959 +0,0 @@ -This is pdfTeX, Version 3.1415926-2.4-1.40.13 (TeX Live 2012/Debian) (format=pdflatex 2012.11.5) 5 NOV 2012 15:13 -entering extended mode - restricted \write18 enabled. - %&-line parsing enabled. -**overview.tex -(./overview.tex -LaTeX2e <2011/06/27> -Babel and hyphenation patterns for english, dumylang, nohyphenation, lo -aded. -(/usr/share/texlive/texmf-dist/tex/latex/koma-script/scrreprt.cls -Document Class: scrreprt 2012/05/15 v3.11 KOMA-Script document class (report) -(/usr/share/texlive/texmf-dist/tex/latex/koma-script/scrkbase.sty -Package: scrkbase 2012/05/15 v3.11 KOMA-Script package (KOMA-Script-dependent b -asics and keyval usage) - -(/usr/share/texlive/texmf-dist/tex/latex/koma-script/scrbase.sty -Package: scrbase 2012/05/15 v3.11 KOMA-Script package (KOMA-Script-independent -basics and keyval usage) - -(/usr/share/texlive/texmf-dist/tex/latex/graphics/keyval.sty -Package: keyval 1999/03/16 v1.13 key=value parser (DPC) -\KV@toks@=\toks14 -) -(/usr/share/texlive/texmf-dist/tex/latex/koma-script/scrlfile.sty -Package: scrlfile 2011/03/09 v3.09 KOMA-Script package (loading files) - -Package scrlfile, 2011/03/09 v3.09 KOMA-Script package (loading files) - Copyright (C) Markus Kohm - -))) (/usr/share/texlive/texmf-dist/tex/latex/koma-script/tocbasic.sty -Package: tocbasic 2012/04/04 v3.10b KOMA-Script package (handling toc-files) -) -Package tocbasic Info: omitting babel extension for `toc' -(tocbasic) because of feature `nobabel' available -(tocbasic) for `toc' on input line 117. -Package tocbasic Info: omitting babel extension for `lof' -(tocbasic) because of feature `nobabel' available -(tocbasic) for `lof' on input line 118. -Package tocbasic Info: omitting babel extension for `lot' -(tocbasic) because of feature `nobabel' available -(tocbasic) for `lot' on input line 119. -Class scrreprt Info: File `scrsize11pt.clo' used instead of -(scrreprt) file `scrsize11.clo' to setup font sizes on input line 136 -5. - -(/usr/share/texlive/texmf-dist/tex/latex/koma-script/scrsize11pt.clo -File: scrsize11pt.clo 2012/05/15 v3.11 KOMA-Script font size class option (11pt -) -) -(/usr/share/texlive/texmf-dist/tex/latex/koma-script/typearea.sty -Package: typearea 2012/05/15 v3.11 KOMA-Script package (type area) - -Package typearea, 2012/05/15 v3.11 KOMA-Script package (type area) - Copyright (C) Frank Neukam, 1992-1994 - Copyright (C) Markus Kohm, 1994- - -\ta@bcor=\skip41 -\ta@div=\count79 -Package typearea Info: You've used standard option `a4paper'. -(typearea) This is correct! -(typearea) Internally I'm using `paper=a4'. -(typearea) If you'd like to set the option with \KOMAoptions, -(typearea) you'd have to use `paper=a4' there -(typearea) instead of `a4paper', too. -\ta@hblk=\skip42 -\ta@vblk=\skip43 -\ta@temp=\skip44 -Package typearea Info: These are the values describing the layout: -(typearea) DIV = 10 -(typearea) BCOR = 0.0pt -(typearea) \paperwidth = 597.50793pt -(typearea) \textwidth = 418.25555pt -(typearea) DIV departure = -6% -(typearea) \evensidemargin = 17.3562pt -(typearea) \oddsidemargin = 17.3562pt -(typearea) \paperheight = 845.04694pt -(typearea) \textheight = 595.80026pt -(typearea) \topmargin = -25.16531pt -(typearea) \headheight = 17.0pt -(typearea) \headsep = 20.40001pt -(typearea) \topskip = 11.0pt -(typearea) \footskip = 47.60002pt -(typearea) \baselineskip = 13.6pt -(typearea) on input line 1211. -) -\c@part=\count80 -\c@chapter=\count81 -\c@section=\count82 -\c@subsection=\count83 -\c@subsubsection=\count84 -\c@paragraph=\count85 -\c@subparagraph=\count86 -\abovecaptionskip=\skip45 -\belowcaptionskip=\skip46 -\c@pti@nb@sid@b@x=\box26 -\c@figure=\count87 -\c@table=\count88 -\bibindent=\dimen102 -) (/usr/share/texlive/texmf-dist/tex/latex/listings/listings.sty -\lst@mode=\count89 -\lst@gtempboxa=\box27 -\lst@token=\toks15 -\lst@length=\count90 -\lst@currlwidth=\dimen103 -\lst@column=\count91 -\lst@pos=\count92 -\lst@lostspace=\dimen104 -\lst@width=\dimen105 -\lst@newlines=\count93 -\lst@lineno=\count94 -\lst@maxwidth=\dimen106 - -(/usr/share/texlive/texmf-dist/tex/latex/listings/lstmisc.sty -File: lstmisc.sty 2007/02/22 1.4 (Carsten Heinz) -\c@lstnumber=\count95 -\lst@skipnumbers=\count96 -\lst@framebox=\box28 -) -(/usr/share/texlive/texmf-dist/tex/latex/listings/listings.cfg -File: listings.cfg 2007/02/22 1.4 listings configuration -)) -Package: listings 2007/02/22 1.4 (Carsten Heinz) - -(/usr/share/texlive/texmf-dist/tex/latex/graphics/color.sty -Package: color 2005/11/14 v1.0j Standard LaTeX Color (DPC) - -(/usr/share/texlive/texmf-dist/tex/latex/latexconfig/color.cfg -File: color.cfg 2007/01/18 v1.5 color configuration of teTeX/TeXLive -) -Package color Info: Driver file: pdftex.def on input line 130. - -(/usr/share/texlive/texmf-dist/tex/latex/pdftex-def/pdftex.def -File: pdftex.def 2011/05/27 v0.06d Graphics/color for pdfTeX - -(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/infwarerr.sty -Package: infwarerr 2010/04/08 v1.3 Providing info/warning/error messages (HO) -) -(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/ltxcmds.sty -Package: ltxcmds 2011/11/09 v1.22 LaTeX kernel commands for general use (HO) -) -\Gread@gobject=\count97 -)) -(/usr/share/texlive/texmf-dist/tex/latex/base/textcomp.sty -Package: textcomp 2005/09/27 v1.99g Standard LaTeX package -Package textcomp Info: Sub-encoding information: -(textcomp) 5 = only ISO-Adobe without \textcurrency -(textcomp) 4 = 5 + \texteuro -(textcomp) 3 = 4 + \textohm -(textcomp) 2 = 3 + \textestimated + \textcurrency -(textcomp) 1 = TS1 - \textcircled - \t -(textcomp) 0 = TS1 (full) -(textcomp) Font families with sub-encoding setting implement -(textcomp) only a restricted character set as indicated. -(textcomp) Family '?' is the default used for unknown fonts. -(textcomp) See the documentation for details. -Package textcomp Info: Setting ? sub-encoding to TS1/1 on input line 71. - -(/usr/share/texlive/texmf-dist/tex/latex/base/ts1enc.def -File: ts1enc.def 2001/06/05 v3.0e (jk/car/fm) Standard LaTeX file -) -LaTeX Info: Redefining \oldstylenums on input line 266. -Package textcomp Info: Setting cmr sub-encoding to TS1/0 on input line 281. -Package textcomp Info: Setting cmss sub-encoding to TS1/0 on input line 282. -Package textcomp Info: Setting cmtt sub-encoding to TS1/0 on input line 283. -Package textcomp Info: Setting cmvtt sub-encoding to TS1/0 on input line 284. -Package textcomp Info: Setting cmbr sub-encoding to TS1/0 on input line 285. -Package textcomp Info: Setting cmtl sub-encoding to TS1/0 on input line 286. -Package textcomp Info: Setting ccr sub-encoding to TS1/0 on input line 287. -Package textcomp Info: Setting ptm sub-encoding to TS1/4 on input line 288. -Package textcomp Info: Setting pcr sub-encoding to TS1/4 on input line 289. -Package textcomp Info: Setting phv sub-encoding to TS1/4 on input line 290. -Package textcomp Info: Setting ppl sub-encoding to TS1/3 on input line 291. -Package textcomp Info: Setting pag sub-encoding to TS1/4 on input line 292. -Package textcomp Info: Setting pbk sub-encoding to TS1/4 on input line 293. -Package textcomp Info: Setting pnc sub-encoding to TS1/4 on input line 294. -Package textcomp Info: Setting pzc sub-encoding to TS1/4 on input line 295. -Package textcomp Info: Setting bch sub-encoding to TS1/4 on input line 296. -Package textcomp Info: Setting put sub-encoding to TS1/5 on input line 297. -Package textcomp Info: Setting uag sub-encoding to TS1/5 on input line 298. -Package textcomp Info: Setting ugq sub-encoding to TS1/5 on input line 299. -Package textcomp Info: Setting ul8 sub-encoding to TS1/4 on input line 300. -Package textcomp Info: Setting ul9 sub-encoding to TS1/4 on input line 301. -Package textcomp Info: Setting augie sub-encoding to TS1/5 on input line 302. -Package textcomp Info: Setting dayrom sub-encoding to TS1/3 on input line 303. -Package textcomp Info: Setting dayroms sub-encoding to TS1/3 on input line 304. - -Package textcomp Info: Setting pxr sub-encoding to TS1/0 on input line 305. -Package textcomp Info: Setting pxss sub-encoding to TS1/0 on input line 306. -Package textcomp Info: Setting pxtt sub-encoding to TS1/0 on input line 307. -Package textcomp Info: Setting txr sub-encoding to TS1/0 on input line 308. -Package textcomp Info: Setting txss sub-encoding to TS1/0 on input line 309. -Package textcomp Info: Setting txtt sub-encoding to TS1/0 on input line 310. -Package textcomp Info: Setting lmr sub-encoding to TS1/0 on input line 311. -Package textcomp Info: Setting lmdh sub-encoding to TS1/0 on input line 312. -Package textcomp Info: Setting lmss sub-encoding to TS1/0 on input line 313. -Package textcomp Info: Setting lmssq sub-encoding to TS1/0 on input line 314. -Package textcomp Info: Setting lmvtt sub-encoding to TS1/0 on input line 315. -Package textcomp Info: Setting qhv sub-encoding to TS1/0 on input line 316. -Package textcomp Info: Setting qag sub-encoding to TS1/0 on input line 317. -Package textcomp Info: Setting qbk sub-encoding to TS1/0 on input line 318. -Package textcomp Info: Setting qcr sub-encoding to TS1/0 on input line 319. -Package textcomp Info: Setting qcs sub-encoding to TS1/0 on input line 320. -Package textcomp Info: Setting qpl sub-encoding to TS1/0 on input line 321. -Package textcomp Info: Setting qtm sub-encoding to TS1/0 on input line 322. -Package textcomp Info: Setting qzc sub-encoding to TS1/0 on input line 323. -Package textcomp Info: Setting qhvc sub-encoding to TS1/0 on input line 324. -Package textcomp Info: Setting futs sub-encoding to TS1/4 on input line 325. -Package textcomp Info: Setting futx sub-encoding to TS1/4 on input line 326. -Package textcomp Info: Setting futj sub-encoding to TS1/4 on input line 327. -Package textcomp Info: Setting hlh sub-encoding to TS1/3 on input line 328. -Package textcomp Info: Setting hls sub-encoding to TS1/3 on input line 329. -Package textcomp Info: Setting hlst sub-encoding to TS1/3 on input line 330. -Package textcomp Info: Setting hlct sub-encoding to TS1/5 on input line 331. -Package textcomp Info: Setting hlx sub-encoding to TS1/5 on input line 332. -Package textcomp Info: Setting hlce sub-encoding to TS1/5 on input line 333. -Package textcomp Info: Setting hlcn sub-encoding to TS1/5 on input line 334. -Package textcomp Info: Setting hlcw sub-encoding to TS1/5 on input line 335. -Package textcomp Info: Setting hlcf sub-encoding to TS1/5 on input line 336. -Package textcomp Info: Setting pplx sub-encoding to TS1/3 on input line 337. -Package textcomp Info: Setting pplj sub-encoding to TS1/3 on input line 338. -Package textcomp Info: Setting ptmx sub-encoding to TS1/4 on input line 339. -Package textcomp Info: Setting ptmj sub-encoding to TS1/4 on input line 340. -) -(/usr/share/texlive/texmf-dist/tex/latex/hyperref/hyperref.sty -Package: hyperref 2012/05/13 v6.82q Hypertext links for LaTeX - -(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/hobsub-hyperref.sty -Package: hobsub-hyperref 2012/05/28 v1.13 Bundle oberdiek, subset hyperref (HO) - - -(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/hobsub-generic.sty -Package: hobsub-generic 2012/05/28 v1.13 Bundle oberdiek, subset generic (HO) -Package: hobsub 2012/05/28 v1.13 Construct package bundles (HO) -Package hobsub Info: Skipping package `infwarerr' (already loaded). -Package hobsub Info: Skipping package `ltxcmds' (already loaded). -Package: ifluatex 2010/03/01 v1.3 Provides the ifluatex switch (HO) -Package ifluatex Info: LuaTeX not detected. -Package: ifvtex 2010/03/01 v1.5 Detect VTeX and its facilities (HO) -Package ifvtex Info: VTeX not detected. -Package: intcalc 2007/09/27 v1.1 Expandable calculations with integers (HO) -Package: ifpdf 2011/01/30 v2.3 Provides the ifpdf switch (HO) -Package ifpdf Info: pdfTeX in PDF mode is detected. -Package: etexcmds 2011/02/16 v1.5 Avoid name clashes with e-TeX commands (HO) -Package etexcmds Info: Could not find \expanded. -(etexcmds) That can mean that you are not using pdfTeX 1.50 or -(etexcmds) that some package has redefined \expanded. -(etexcmds) In the latter case, load this package earlier. -Package: kvsetkeys 2012/04/25 v1.16 Key value parser (HO) -Package: kvdefinekeys 2011/04/07 v1.3 Define keys (HO) -Package: pdftexcmds 2011/11/29 v0.20 Utility functions of pdfTeX for LuaTeX (HO -) -Package pdftexcmds Info: LuaTeX not detected. -Package pdftexcmds Info: \pdf@primitive is available. -Package pdftexcmds Info: \pdf@ifprimitive is available. -Package pdftexcmds Info: \pdfdraftmode found. -Package: pdfescape 2011/11/25 v1.13 Implements pdfTeX's escape features (HO) -Package: bigintcalc 2012/04/08 v1.3 Expandable calculations on big integers (HO -) -Package: bitset 2011/01/30 v1.1 Handle bit-vector datatype (HO) -Package: uniquecounter 2011/01/30 v1.2 Provide unlimited unique counter (HO) -) -Package hobsub Info: Skipping package `hobsub' (already loaded). -Package: letltxmacro 2010/09/02 v1.4 Let assignment for LaTeX macros (HO) -Package: hopatch 2012/05/28 v1.2 Wrapper for package hooks (HO) -Package: xcolor-patch 2011/01/30 xcolor patch -Package: atveryend 2011/06/30 v1.8 Hooks at the very end of document (HO) -Package atveryend Info: \enddocument detected (standard20110627). -Package: atbegshi 2011/10/05 v1.16 At begin shipout hook (HO) -Package: refcount 2011/10/16 v3.4 Data extraction from label references (HO) -Package: hycolor 2011/01/30 v1.7 Color options for hyperref/bookmark (HO) -) -(/usr/share/texlive/texmf-dist/tex/generic/ifxetex/ifxetex.sty -Package: ifxetex 2010/09/12 v0.6 Provides ifxetex conditional -) -(/usr/share/texlive/texmf-dist/tex/latex/oberdiek/kvoptions.sty -Package: kvoptions 2011/06/30 v3.11 Key value format for package options (HO) -) -\@linkdim=\dimen107 -\Hy@linkcounter=\count98 -\Hy@pagecounter=\count99 - -(/usr/share/texlive/texmf-dist/tex/latex/hyperref/pd1enc.def -File: pd1enc.def 2012/05/13 v6.82q Hyperref: PDFDocEncoding definition (HO) -) -\Hy@SavedSpaceFactor=\count100 - -(/usr/share/texlive/texmf-dist/tex/latex/latexconfig/hyperref.cfg -File: hyperref.cfg 2002/06/06 v1.2 hyperref configuration of TeXLive -) -Package hyperref Info: Hyper figures OFF on input line 4062. -Package hyperref Info: Link nesting OFF on input line 4067. -Package hyperref Info: Hyper index ON on input line 4070. -Package hyperref Info: Plain pages OFF on input line 4077. -Package hyperref Info: Backreferencing OFF on input line 4082. -Package hyperref Info: Implicit mode ON; LaTeX internals redefined. -Package hyperref Info: Bookmarks ON on input line 4300. -\c@Hy@tempcnt=\count101 - -(/usr/share/texlive/texmf-dist/tex/latex/url/url.sty -\Urlmuskip=\muskip10 -Package: url 2006/04/12 ver 3.3 Verb mode for urls, etc. -) -LaTeX Info: Redefining \url on input line 4653. -\Fld@menulength=\count102 -\Field@Width=\dimen108 -\Fld@charsize=\dimen109 -Package hyperref Info: Hyper figures OFF on input line 5773. -Package hyperref Info: Link nesting OFF on input line 5778. -Package hyperref Info: Hyper index ON on input line 5781. -Package hyperref Info: backreferencing OFF on input line 5788. -Package hyperref Info: Link coloring OFF on input line 5793. -Package hyperref Info: Link coloring with OCG OFF on input line 5798. -Package hyperref Info: PDF/A mode OFF on input line 5803. -LaTeX Info: Redefining \ref on input line 5843. -LaTeX Info: Redefining \pageref on input line 5847. -\Hy@abspage=\count103 -\c@Item=\count104 -\c@Hfootnote=\count105 -) - -Package hyperref Message: Driver (autodetected): hpdftex. - -(/usr/share/texlive/texmf-dist/tex/latex/hyperref/hpdftex.def -File: hpdftex.def 2012/05/13 v6.82q Hyperref driver for pdfTeX -\Fld@listcount=\count106 -\c@bookmark@seq@number=\count107 - -(/usr/share/texlive/texmf-dist/tex/latex/oberdiek/rerunfilecheck.sty -Package: rerunfilecheck 2011/04/15 v1.7 Rerun checks for auxiliary files (HO) -Package uniquecounter Info: New unique counter `rerunfilecheck' on input line 2 -82. -) -\Hy@SectionHShift=\skip47 -) -(/usr/share/texlive/texmf-dist/tex/generic/babel/babel.sty -Package: babel 2008/07/08 v3.8m The Babel package - -(/usr/share/texlive/texmf-dist/tex/generic/babel/english.ldf -Language: english 2005/03/30 v3.3o English support from the babel system - -(/usr/share/texlive/texmf-dist/tex/generic/babel/babel.def -File: babel.def 2008/07/08 v3.8m Babel common definitions -\babel@savecnt=\count108 -\U@D=\dimen110 -) -\l@british = a dialect from \language\l@english -\l@UKenglish = a dialect from \language\l@english -\l@canadian = a dialect from \language\l@american -\l@australian = a dialect from \language\l@british -\l@newzealand = a dialect from \language\l@british -)) -(/usr/share/texlive/texmf-dist/tex/latex/graphics/graphicx.sty -Package: graphicx 1999/02/16 v1.0f Enhanced LaTeX Graphics (DPC,SPQR) - -(/usr/share/texlive/texmf-dist/tex/latex/graphics/graphics.sty -Package: graphics 2009/02/05 v1.0o Standard LaTeX Graphics (DPC,SPQR) - -(/usr/share/texlive/texmf-dist/tex/latex/graphics/trig.sty -Package: trig 1999/03/16 v1.09 sin cos tan (DPC) -) -(/usr/share/texlive/texmf-dist/tex/latex/latexconfig/graphics.cfg -File: graphics.cfg 2010/04/23 v1.9 graphics configuration of TeX Live -) -Package graphics Info: Driver file: pdftex.def on input line 91. -) -\Gin@req@height=\dimen111 -\Gin@req@width=\dimen112 -) -(/usr/share/texlive/texmf-dist/tex/latex/float/float.sty -Package: float 2001/11/08 v1.3d Float enhancements (AL) -\c@float@type=\count109 -\float@exts=\toks16 -\float@box=\box29 -\@float@everytoks=\toks17 -\@floatcapt=\box30 -) -(/usr/share/texlive/texmf-dist/tex/latex/caption/caption.sty -Package: caption 2012/02/19 v3.2f Customizing captions (AR) - -(/usr/share/texlive/texmf-dist/tex/latex/caption/caption3.sty -Package: caption3 2012/01/12 v1.4b caption3 kernel (AR) -\captionmargin=\dimen113 -\captionmargin@=\dimen114 -\captionwidth=\dimen115 -\caption@indent=\dimen116 -\caption@parindent=\dimen117 -\caption@hangindent=\dimen118 -) -Package caption Info: KOMA-Script document class. -\c@ContinuedFloat=\count110 -Package caption Info: float package is loaded. -Package caption Info: hyperref package is loaded. -Package caption Info: listings package is loaded. -) -(/usr/share/texlive/texmf-dist/tex/latex/caption/subcaption.sty -Package: subcaption 2012/01/12 v1.1d Sub-captions (AR) -\c@subfigure=\count111 -\c@subtable=\count112 -) -(/usr/share/texlive/texmf-dist/tex/latex/placeins/placeins.sty -Package: placeins 2005/04/18 v 2.2 -) -(/usr/share/texlive/texmf-dist/tex/latex/multirow/multirow.sty -\bigstrutjot=\dimen119 -) -(/usr/share/texlive/texmf-dist/tex/latex/listings/lstlang1.sty -File: lstlang1.sty 2004/09/05 1.3 listings language file -) -(/usr/share/texlive/texmf-dist/tex/latex/listings/lstlang1.sty -File: lstlang1.sty 2004/09/05 1.3 listings language file -) -(/usr/share/texlive/texmf-dist/tex/latex/listings/lstmisc.sty -File: lstmisc.sty 2007/02/22 1.4 (Carsten Heinz) -) (./overview.aux) -\openout1 = `overview.aux'. - -LaTeX Font Info: Checking defaults for OML/cmm/m/it on input line 44. -LaTeX Font Info: ... okay on input line 44. -LaTeX Font Info: Checking defaults for T1/cmr/m/n on input line 44. -LaTeX Font Info: ... okay on input line 44. -LaTeX Font Info: Checking defaults for OT1/cmr/m/n on input line 44. -LaTeX Font Info: ... okay on input line 44. -LaTeX Font Info: Checking defaults for OMS/cmsy/m/n on input line 44. -LaTeX Font Info: ... okay on input line 44. -LaTeX Font Info: Checking defaults for OMX/cmex/m/n on input line 44. -LaTeX Font Info: ... okay on input line 44. -LaTeX Font Info: Checking defaults for U/cmr/m/n on input line 44. -LaTeX Font Info: ... okay on input line 44. -LaTeX Font Info: Checking defaults for TS1/cmr/m/n on input line 44. -LaTeX Font Info: Try loading font information for TS1+cmr on input line 44. -(/usr/share/texlive/texmf-dist/tex/latex/base/ts1cmr.fd -File: ts1cmr.fd 1999/05/25 v2.5h Standard LaTeX font definitions -) -LaTeX Font Info: ... okay on input line 44. -LaTeX Font Info: Checking defaults for PD1/pdf/m/n on input line 44. -LaTeX Font Info: ... okay on input line 44. -\c@lstlisting=\count113 - -(/usr/share/texlive/texmf-dist/tex/context/base/supp-pdf.mkii -[Loading MPS to PDF converter (version 2006.09.02).] -\scratchcounter=\count114 -\scratchdimen=\dimen120 -\scratchbox=\box31 -\nofMPsegments=\count115 -\nofMParguments=\count116 -\everyMPshowfont=\toks18 -\MPscratchCnt=\count117 -\MPscratchDim=\dimen121 -\MPnumerator=\count118 -\makeMPintoPDFobject=\count119 -\everyMPtoPDFconversion=\toks19 -) -\AtBeginShipoutBox=\box32 -Package hyperref Info: Link coloring OFF on input line 44. - (/usr/share/texlive/texmf-dist/tex/latex/hyperref/nameref.sty -Package: nameref 2010/04/30 v2.40 Cross-referencing by name of section - -(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/gettitlestring.sty -Package: gettitlestring 2010/12/03 v1.4 Cleanup title references (HO) -) -\c@section@level=\count120 -) -LaTeX Info: Redefining \ref on input line 44. -LaTeX Info: Redefining \pageref on input line 44. -LaTeX Info: Redefining \nameref on input line 44. - -(./overview.out) (./overview.out) -\@outlinefile=\write3 -\openout3 = `overview.out'. - - -(/usr/share/texlive/texmf-dist/tex/latex/oberdiek/epstopdf-base.sty -Package: epstopdf-base 2010/02/09 v2.5 Base part for package epstopdf - -(/usr/share/texlive/texmf-dist/tex/latex/oberdiek/grfext.sty -Package: grfext 2010/08/19 v1.1 Manage graphics extensions (HO) -) -Package grfext Info: Graphics extension search list: -(grfext) [.png,.pdf,.jpg,.mps,.jpeg,.jbig2,.jb2,.PNG,.PDF,.JPG,.JPE -G,.JBIG2,.JB2,.eps] -(grfext) \AppendGraphicsExtensions on input line 452. - -(/usr/share/texlive/texmf-dist/tex/latex/latexconfig/epstopdf-sys.cfg -File: epstopdf-sys.cfg 2010/07/13 v1.3 Configuration of (r)epstopdf for TeX Liv -e -)) -Package caption Info: Begin \AtBeginDocument code. -Package caption Info: End \AtBeginDocument code. -LaTeX Font Info: External font `cmex10' loaded for size -(Font) <14.4> on input line 47. -LaTeX Font Info: External font `cmex10' loaded for size -(Font) <7> on input line 47. - -[1 - - - -{/var/lib/texmf/fonts/map/pdftex/updmap/pdftex.map}] (./overview.toc -LaTeX Font Info: External font `cmex10' loaded for size -(Font) <10.95> on input line 3. -LaTeX Font Info: External font `cmex10' loaded for size -(Font) <8> on input line 3. -LaTeX Font Info: External font `cmex10' loaded for size -(Font) <6> on input line 3. -) -\tf@toc=\write4 -\openout4 = `overview.toc'. - - -[2 - -] -Chapter 1. - -Class scrreprt Warning: \float@addtolists detected! -(scrreprt) You should use the features of package `tocbasic' -(scrreprt) instead of \float@addtolists. -(scrreprt) Support for \float@addtolists may be removed from -(scrreprt) `scrreprt' soon . - -[3 - -] [4] -Chapter 2. -[5 - -] -File: images/screenshot1.png Graphic file (type png) - - -Package pdftex.def Info: images/screenshot1.png used on input line 187. -(pdftex.def) Requested size: 292.7776pt x 237.8143pt. - - -File: images/screenshot2.png Graphic file (type png) - - -Package pdftex.def Info: images/screenshot2.png used on input line 193. -(pdftex.def) Requested size: 209.12778pt x 117.40904pt. - - -File: images/screenshot3.png Graphic file (type png) - - -Package pdftex.def Info: images/screenshot3.png used on input line 203. -(pdftex.def) Requested size: 397.34149pt x 216.59286pt. - - -File: images/screenshot4.png Graphic file (type png) - - -Package pdftex.def Info: images/screenshot4.png used on input line 214. -(pdftex.def) Requested size: 250.95587pt x 98.86363pt. - - -File: images/screenshot5.png Graphic file (type png) - - -Package pdftex.def Info: images/screenshot5.png used on input line 222. -(pdftex.def) Requested size: 397.34149pt x 341.90166pt. - - -File: images/screenshot6.png Graphic file (type png) - - -Package pdftex.def Info: images/screenshot6.png used on input line 228. -(pdftex.def) Requested size: 418.25555pt x 335.45164pt. - - -File: images/screenshot7.png Graphic file (type png) - - -Package pdftex.def Info: images/screenshot7.png used on input line 236. -(pdftex.def) Requested size: 125.47794pt x 55.93555pt. - - -File: images/screenshot8.png Graphic file (type png) - - -Package pdftex.def Info: images/screenshot8.png used on input line 241. -(pdftex.def) Requested size: 209.12778pt x 279.08302pt. - - -File: images/screenshot9.png Graphic file (type png) - - -Package pdftex.def Info: images/screenshot9.png used on input line 249. -(pdftex.def) Requested size: 125.47794pt x 50.19173pt. - - -LaTeX Warning: No positions in optional float specifier. - Default added (so using `!tbp') on input line 252. - - -File: images/screenshot10.png Graphic file (type png) - - -Package pdftex.def Info: images/screenshot10.png used on input line 257. -(pdftex.def) Requested size: 250.95587pt x 188.21692pt. - - -File: images/screenshot11.png Graphic file (type png) - - -Package pdftex.def Info: images/screenshot11.png used on input line 262. -(pdftex.def) Requested size: 209.12778pt x 253.15059pt. - -Overfull \hbox (49.1281pt too wide) in paragraph at lines 253--264 -[]$ $[]$ - [] - - -File: images/screenshot12.png Graphic file (type png) - - -Package pdftex.def Info: images/screenshot12.png used on input line 269. -(pdftex.def) Requested size: 397.34149pt x 315.97977pt. - [6 <./images/screenshot1.png>] [7 <./images/screenshot2.png> <./images/screens -hot3.png>] [8 <./images/screenshot4.png> <./images/screenshot5.png (PNG copy)>] - [9 <./images/screenshot6.png (PNG copy)> <./images/screenshot7.png>] [10 <./im -ages/screenshot8.png> <./images/screenshot9.png>] -[11 <./images/screenshot10.png> <./images/screenshot11.png (PNG copy)>] -[12 <./images/screenshot12.png (PNG copy)>] - -File: images/screenshot13.png Graphic file (type png) - - -Package pdftex.def Info: images/screenshot13.png used on input line 284. -(pdftex.def) Requested size: 376.42744pt x 42.00612pt. -Missing character: There is no  in font cmr10! -Missing character: There is no « in font cmr10! -Missing character: There is no  in font cmr10! -Missing character: There is no » in font cmr10! -Missing character: There is no  in font cmr10! -Missing character: There is no « in font cmr10! -Missing character: There is no  in font cmr10! -Missing character: There is no » in font cmr10! - - -File: images/screenshot14.png Graphic file (type png) - - -Package pdftex.def Info: images/screenshot14.png used on input line 292. -(pdftex.def) Requested size: 167.29967pt x 88.26671pt. - - -File: images/screenshot15.png Graphic file (type png) - - -Package pdftex.def Info: images/screenshot15.png used on input line 298. -(pdftex.def) Requested size: 376.42744pt x 107.62831pt. - - -File: images/screenshot16.png Graphic file (type png) - - -Package pdftex.def Info: images/screenshot16.png used on input line 307. -(pdftex.def) Requested size: 250.95587pt x 121.04288pt. - - -File: images/screenshot17.png Graphic file (type png) - - -Package pdftex.def Info: images/screenshot17.png used on input line 316. -(pdftex.def) Requested size: 397.34149pt x 67.03346pt. - - -File: images/screenshot18.png Graphic file (type png) - - -Package pdftex.def Info: images/screenshot18.png used on input line 322. -(pdftex.def) Requested size: 292.7776pt x 232.61086pt. - [13 - - <./images/screenshot13.png (PNG copy)> <./images/screenshot14.png (PNG copy)> -<./images/screenshot15.png (PNG copy)>] -[14 <./images/screenshot16.png (PNG copy)> <./images/screenshot17.png (PNG copy -)> <./images/screenshot18.png (PNG copy)>] - -File: images/screenshot19.png Graphic file (type png) - - -Package pdftex.def Info: images/screenshot19.png used on input line 337. -(pdftex.def) Requested size: 376.42744pt x 261.49626pt. - - -File: images/screenshot20.png Graphic file (type png) - - -Package pdftex.def Info: images/screenshot20.png used on input line 343. -(pdftex.def) Requested size: 418.25555pt x 50.14807pt. - - -File: images/screenshot21.png Graphic file (type png) - - -Package pdftex.def Info: images/screenshot21.png used on input line 349. -(pdftex.def) Requested size: 292.7776pt x 57.9179pt. - - -File: images/screenshot22.png Graphic file (type png) - - -Package pdftex.def Info: images/screenshot22.png used on input line 355. -(pdftex.def) Requested size: 125.47794pt x 49.57277pt. - - -File: images/screenshot23.png Graphic file (type png) - - -Package pdftex.def Info: images/screenshot23.png used on input line 365. -(pdftex.def) Requested size: 376.42744pt x 238.71014pt. - - -File: images/screenshot24.png Graphic file (type png) - - -Package pdftex.def Info: images/screenshot24.png used on input line 372. -(pdftex.def) Requested size: 418.25555pt x 355.46225pt. - [15 <./images/screenshot19.png (PNG copy)> <./images/screenshot20.png>] [16 <. -/images/screenshot21.png> <./images/screenshot22.png (PNG copy)> <./images/scre -enshot23.png>] [17 <./images/screenshot24.png>] -[18] -Chapter 3. -[19 - -] -File: images/systemMap1.png Graphic file (type png) - - -Package pdftex.def Info: images/systemMap1.png used on input line 435. -(pdftex.def) Requested size: 418.25555pt x 95.70105pt. - - -File: images/systemMap2.png Graphic file (type png) - - -Package pdftex.def Info: images/systemMap2.png used on input line 442. -(pdftex.def) Requested size: 418.25555pt x 152.73944pt. - [20 <./images/systemMap1.png> <./images/systemMap2.png>] -LaTeX Font Info: External font `cmex10' loaded for size -(Font) <5> on input line 464. -LaTeX Font Info: Font shape `OT1/cmtt/bx/n' in size <10> not available -(Font) Font shape `OT1/cmtt/m/n' tried instead on input line 480. -LaTeX Font Info: Try loading font information for OMS+cmr on input line 496. - - (/usr/share/texlive/texmf-dist/tex/latex/base/omscmr.fd -File: omscmr.fd 1999/05/25 v2.5h Standard LaTeX font definitions -) -LaTeX Font Info: Font shape `OMS/cmr/m/n' in size <10> not available -(Font) Font shape `OMS/cmsy/m/n' tried instead on input line 496. - [21] [22] -LaTeX Font Info: Try loading font information for OML+cmr on input line 571. - - -(/usr/share/texlive/texmf-dist/tex/latex/base/omlcmr.fd -File: omlcmr.fd 1999/05/25 v2.5h Standard LaTeX font definitions -) -LaTeX Font Info: Font shape `OML/cmr/m/n' in size <10> not available -(Font) Font shape `OML/cmm/m/it' tried instead on input line 571. - [23] [24] -(/usr/share/texlive/texmf-dist/tex/latex/listings/lstlang1.sty -File: lstlang1.sty 2004/09/05 1.3 listings language file -) -(/usr/share/texlive/texmf-dist/tex/latex/listings/lstlang2.sty -File: lstlang2.sty 2004/09/05 1.3 listings language file -) -(/usr/share/texlive/texmf-dist/tex/latex/listings/lstmisc.sty -File: lstmisc.sty 2007/02/22 1.4 (Carsten Heinz) -) -LaTeX Font Info: Try loading font information for TS1+cmtt on input line 682 -. - -(/usr/share/texlive/texmf-dist/tex/latex/base/ts1cmtt.fd -File: ts1cmtt.fd 1999/05/25 v2.5h Standard LaTeX font definitions -) [25] - -File: images/screenshot25.png Graphic file (type png) - - -Package pdftex.def Info: images/screenshot25.png used on input line 744. -(pdftex.def) Requested size: 418.25555pt x 92.05461pt. - - -File: images/screenshot26.png Graphic file (type png) - - -Package pdftex.def Info: images/screenshot26.png used on input line 750. -(pdftex.def) Requested size: 418.25555pt x 121.22566pt. - - -File: images/screenshot28.png Graphic file (type png) - - -Package pdftex.def Info: images/screenshot28.png used on input line 756. -(pdftex.def) Requested size: 292.7776pt x 232.39987pt. - [26] [27 <./images/screenshot25.png> <./images/screenshot26.png> <./images/scr -eenshot28.png>] - -File: images/callBacks.png Graphic file (type png) - - -Package pdftex.def Info: images/callBacks.png used on input line 770. -(pdftex.def) Requested size: 376.42744pt x 450.4227pt. - [28 <./images/callBacks.png>] -Overfull \hbox (32.73502pt too wide) in paragraph at lines 786--788 -[]\OT1/cmr/m/n/10.95 in the plu-gin's im-ple-men-ta-tion file: \OT1/cmtt/m/n/10 -.95 Q[]EXPORT[]PLUGIN2(ProgName, MainClassName) - [] - -(/usr/share/texlive/texmf-dist/tex/latex/listings/lstlang1.sty -File: lstlang1.sty 2004/09/05 1.3 listings language file -) -(/usr/share/texlive/texmf-dist/tex/latex/listings/lstlang1.sty -File: lstlang1.sty 2004/09/05 1.3 listings language file -) [29] - -File: images/plugins.png Graphic file (type png) - - -Package pdftex.def Info: images/plugins.png used on input line 846. -(pdftex.def) Requested size: 125.47794pt x 141.98985pt. - [30 <./images/plugins.png>] -Underfull \hbox (badness 10000) in paragraph at lines 883--887 - - [] - - -Underfull \hbox (badness 1158) in paragraph at lines 896--898 -[]\OT1/cmr/m/n/10.95 Once the scene is cre-ated, this - [] - - -Underfull \hbox (badness 10000) in paragraph at lines 916--918 - - [] - -[31] [32] [33] -Overfull \hbox (10.98329pt too wide) in paragraph at lines 1060--1065 -\OT1/cmr/m/n/10.95 The class \OT1/cmr/bx/n/10.95 Cam-era \OT1/cmr/m/n/10.95 in- -her-its the class []\OT1/cmr/bx/n/10.95 qglviewer::Camera[] \OT1/cmr/m/n/10.95 -pro-vided by the \OT1/cmr/bx/n/10.95 libQGLViewer - [] - - -Overfull \hbox (39.96172pt too wide) in paragraph at lines 1078--1101 - [] - [] - - -Overfull \hbox (31.35384pt too wide) in paragraph at lines 1107--1127 - [] - [] - -[34] -Underfull \hbox (badness 3525) in paragraph at lines 1139--1142 -\OT1/cmr/m/n/10.95 ``\OT1/cmtt/m/n/10.95 exportImage()\OT1/cmr/m/n/10.95 '' to -be called when the cus- - [] - - -Underfull \hbox (badness 1668) in paragraph at lines 1139--1142 -\OT1/cmr/m/n/10.95 tom en-try is clicked, this ar-gu-ment should be - [] - - -Overfull \hbox (27.33882pt too wide) in paragraph at lines 1133--1151 - [] - [] - - -Overfull \hbox (11.73509pt too wide) in paragraph at lines 1155--1167 - [] - [] - - -Overfull \hbox (57.96846pt too wide) in paragraph at lines 1177--1193 - [] - [] - -[35] [36] -Overfull \hbox (28.86978pt too wide) in paragraph at lines 1246--1255 - [] - [] - - -Overfull \hbox (11.4944pt too wide) in paragraph at lines 1256--1265 - [] - [] - - -Overfull \hbox (30.16762pt too wide) in paragraph at lines 1270--1283 - [] - [] - - -Overfull \hbox (35.97722pt too wide) in paragraph at lines 1284--1296 - [] - [] - - -Underfull \hbox (badness 1953) in paragraph at lines 1307--1308 -[]\OT1/cmr/m/n/10.95 A boolean whether or not the - [] - -[37] -Overfull \hbox (5.4154pt too wide) in paragraph at lines 1356--1362 -\OT1/cmr/m/n/10.95 niz-able name. Ac-tu-ally this class ex-tends \OT1/cmr/bx/n/ -10.95 CGoGN\OT1/cmr/m/n/10.95 's VBO class (\OT1/cmr/bx/n/10.95 CGoGN::Utils::V -BO\OT1/cmr/m/n/10.95 ) - [] - -[38] -Overfull \hbox (10.07529pt too wide) in paragraph at lines 1429--1446 - [] - [] - -[39] -Overfull \hbox (10.07529pt too wide) in paragraph at lines 1447--1461 - [] - [] - -Package atveryend Info: Empty hook `BeforeClearDocument' on input line 1489. -[40] -Package atveryend Info: Empty hook `AfterLastShipout' on input line 1489. - (./overview.aux) -Package atveryend Info: Executing hook `AtVeryEndDocument' on input line 1489. -Package atveryend Info: Executing hook `AtEndAfterFileList' on input line 1489. - -Package rerunfilecheck Info: File `overview.out' has not changed. -(rerunfilecheck) Checksum: EE952F43E41B232A1AA515B0515497FD;1769. -Package atveryend Info: Empty hook `AtVeryVeryEnd' on input line 1489. - ) -Here is how much of TeX's memory you used: - 10500 strings out of 495059 - 163274 string characters out of 3182030 - 565675 words of memory out of 3000000 - 13080 multiletter control sequences out of 15000+200000 - 11343 words of font info for 40 fonts, out of 3000000 for 9000 - 14 hyphenation exceptions out of 8191 - 40i,8n,58p,225b,1829s stack positions out of 5000i,500n,10000p,200000b,50000s - -Output written on overview.pdf (40 pages, 989590 bytes). -PDF statistics: - 918 PDF objects out of 1000 (max. 8388607) - 810 compressed objects within 9 object streams - 451 named destinations out of 1000 (max. 500000) - 364 words of extra memory for PDF output out of 10000 (max. 10000000) - diff --git a/SCHNApps_old/doc/LaTeX/overview.out b/SCHNApps_old/doc/LaTeX/overview.out deleted file mode 100644 index be2b2dbaf2167f39c6c8cba6dbe2aa7f4b7b4ac7..0000000000000000000000000000000000000000 --- a/SCHNApps_old/doc/LaTeX/overview.out +++ /dev/null @@ -1,26 +0,0 @@ -\BOOKMARK [0][-]{chapter.1}{Introduction and purposes}{}% 1 -\BOOKMARK [1][-]{section.1.1}{CGoGN}{chapter.1}% 2 -\BOOKMARK [2][-]{subsection.1.1.1}{What is CGoGN library ?}{section.1.1}% 3 -\BOOKMARK [2][-]{subsection.1.1.2}{CGoGN and visualization?}{section.1.1}% 4 -\BOOKMARK [1][-]{section.1.2}{The project}{chapter.1}% 5 -\BOOKMARK [2][-]{subsection.1.2.1}{CGoGN in space?}{section.1.2}% 6 -\BOOKMARK [2][-]{subsection.1.2.2}{Plugins and CGoGN?}{section.1.2}% 7 -\BOOKMARK [0][-]{chapter.2}{The project}{}% 8 -\BOOKMARK [1][-]{section.2.1}{Work}{chapter.2}% 9 -\BOOKMARK [2][-]{subsection.2.1.1}{Specifications}{section.2.1}% 10 -\BOOKMARK [2][-]{subsection.2.1.2}{Additional features}{section.2.1}% 11 -\BOOKMARK [2][-]{subsection.2.1.3}{Third party libraries}{section.2.1}% 12 -\BOOKMARK [1][-]{section.2.2}{Quick presentation}{chapter.2}% 13 -\BOOKMARK [2][-]{subsection.2.2.1}{The main application}{section.2.2}% 14 -\BOOKMARK [2][-]{subsection.2.2.2}{The import plugin}{section.2.2}% 15 -\BOOKMARK [2][-]{subsection.2.2.3}{The camera path plugin}{section.2.2}% 16 -\BOOKMARK [0][-]{chapter.3}{How to write plugins?}{}% 17 -\BOOKMARK [1][-]{section.3.1}{Basics and concepts}{chapter.3}% 18 -\BOOKMARK [2][-]{subsection.3.1.1}{Visualization concepts}{section.3.1}% 19 -\BOOKMARK [2][-]{subsection.3.1.2}{The first plugin}{section.3.1}% 20 -\BOOKMARK [2][-]{subsection.3.1.3}{Tricks and advice}{section.3.1}% 21 -\BOOKMARK [1][-]{section.3.2}{Going further\203}{chapter.3}% 22 -\BOOKMARK [2][-]{subsection.3.2.1}{Few words on plugins}{section.3.2}% 23 -\BOOKMARK [2][-]{subsection.3.2.2}{Objects and visualization plugins}{section.3.2}% 24 -\BOOKMARK [2][-]{subsection.3.2.3}{GUI and user interactions}{section.3.2}% 25 -\BOOKMARK [2][-]{subsection.3.2.4}{Maps and VBOs}{section.3.2}% 26 diff --git a/SCHNApps_old/doc/LaTeX/overview.pdf b/SCHNApps_old/doc/LaTeX/overview.pdf deleted file mode 100644 index 11a74929ef8ddb15049a0977446e1f48c64c7045..0000000000000000000000000000000000000000 Binary files a/SCHNApps_old/doc/LaTeX/overview.pdf and /dev/null differ diff --git a/SCHNApps_old/doc/LaTeX/overview.synctex.gz b/SCHNApps_old/doc/LaTeX/overview.synctex.gz deleted file mode 100644 index bbea6c9b6d96154e2fc3762e174cf73d1c61db3f..0000000000000000000000000000000000000000 Binary files a/SCHNApps_old/doc/LaTeX/overview.synctex.gz and /dev/null differ diff --git a/SCHNApps_old/doc/LaTeX/overview.tex b/SCHNApps_old/doc/LaTeX/overview.tex deleted file mode 100644 index 3d9d6beae898b5c31b09577afe9ab4448662bdc5..0000000000000000000000000000000000000000 --- a/SCHNApps_old/doc/LaTeX/overview.tex +++ /dev/null @@ -1,1489 +0,0 @@ -\documentclass[a4paper]{scrreprt} - -\usepackage{listings} -\usepackage{color} -\usepackage{textcomp} -\usepackage{hyperref} -\usepackage[english]{babel} -\usepackage{graphicx} -\usepackage{float} -\usepackage{caption} -\usepackage{subcaption} -\usepackage[section]{placeins} -\usepackage{multirow} - -\definecolor{listinggray}{gray}{0.9} -\definecolor{lbcolor}{rgb}{0.9,0.9,0.9} -\lstset{ - language=C++, - keywordstyle=\bfseries\ttfamily\color[rgb]{0,0,1}, - identifierstyle=\ttfamily, - commentstyle=\color[rgb]{0.133,0.545,0.133}, - stringstyle=\ttfamily\color[rgb]{0.627,0.126,0.941}, - showstringspaces=false, - basicstyle=\small, - numberstyle=\footnotesize, - numbers=left, - stepnumber=1, - numbersep=10pt, - tabsize=2, - breaklines=true, - prebreak = \raisebox{0ex}[0ex][0ex]{\ensuremath{\hookleftarrow}}, - breakatwhitespace=false, - aboveskip={1.5\baselineskip}, - columns=fixed, - upquote=true, - extendedchars=true, -% frame=single, -% backgroundcolor=\color{lbcolor}, -} - -\title{CGoGN plug} -\author{Hurstel Alexandre} -\subtitle{A quick SOCIC2012 project overview\\+\\how to use} -\begin{document} - -\maketitle - -\tableofcontents - -\chapter{Introduction and purposes} - -\section{CGoGN} -\subsection{What is CGoGN library ?} - \paragraph{} - \textbf{CGoGN} is a C++ topological geometric modeling kernel that provides - efficient and generic data structures based on n-dimensional combinatorial maps. - - \paragraph{} - The main purpose of \textbf{CGoGN} is to provide a strong separation between - the description of the topology of the mesh (the cells and their adjacency - relationships) and the space in which the cells are embedded (attributes - associated to the cells) in the meantime the library also provides efficiency - (more contiguous tables, less pointers), low memory consumption, genericity - (models, dimensions). - - \paragraph{} - A good start to get familiar with \textbf{CGoGN} and all of its features is to - get familiar with \href{http://en.wikipedia.org/wiki/Topology}{topology} and - check the \href{http://cgogn.u-strasbg.fr/Wiki/index.php/CGoGN}{\textbf{CGoGN} - project page}. - -\subsection{CGoGN and visualization?} - \paragraph{} - Since \textbf{CGoGN} is a topological library, it has to provide graphical - tools to visualize the topological models it allows to generate although it's - not quite its priority concern. - - \paragraph{} - That's why the \textbf{CGoGN} library provides some useful tools of - visualization that take forms of C++ classes that are actually inheritance or - implementation of \href{http://qt-project.org/}{\textbf{Qt} framework}'s C++ - classes. Within the same state of mind, the library also provides easy to use - C++ rendering functions and classes that operate several - \href{http://www.opengl.org/}{\textbf{OpenGL}} features and functions. - -\section{The project} -\subsection{CGoGN in space?} - \paragraph{} - The aim of this project is not to replace or improve any of the \textbf{CGoGN} - rendering classes of functions, but to use these provided features to create - and implement a new approach to provide visualization for \textbf{CGoGN}'s - objects. - - \paragraph{} - With the current GUI tools provided by \textbf{CGoGN}, the programmer using the - library generally has to inherit some classes that are themselves inheritance of - some \textbf{Qt} GUI classes (see the - \href{http://cgogn.u-strasbg.fr/Wiki/index.php/Doc_qt}{SimpleQt example}). - Doing so, he will create a new and independent application. - The main idea of the project is to allow the coder, not to create his own - application, but to write code and add it dynamically to a main application, - already containing basics GUI features. - -\subsection{Plugins and CGoGN?} - \paragraph{} - In order to offer such a system, the goal of the project was to provide CGoGN - with an application that integrates a \textbf{plugin system}. This means that - any coder could develop is own third party code as a compatible plugin and add - it to the main application as a new feature, without ever touching the main - application's inner code or even without having to recompile it. - - \paragraph{} - The function of the main application is to provide visualization (with several - functionalities) of CGoGN generated objects combined with a few possibilities - of GUI to interact with these. However, the application itself, without any plugin attached to it, - doesn't give any visualization or relevant interface. Although the application - provide this functionalities, they have to be activated and called by the - plugins that will be attached to the application. As a metaphor, the main - application is like an empty house with electricity and running water, but that - has to be filled with various furniture, appliance, decoration, etc\ldots - - - -\chapter{The project} - -\section{Work} -\subsection{Specifications} - \paragraph{} - The project was developed to meet several specifications: - \begin{itemize} - \item The plugins can provide a drawing function for the application to show - \item Several cameras can show at the same time a 3D visualization from a - different point of view. - \item The application can show several different visualization at the same - time. - \item A plugin draw function can complete another plugin's draw function. - \item The plugins can add entries in the application menus - \item The plugins can add their own widgets in a dedicated area of the - application (typically a dock). - \item A plugin can provide a map - (\href{http://en.wikipedia.org/wiki/Topological_map}{see topological maps} - and - \href{http://cgogn.u-strasbg.fr/Wiki/index.php/Topological_models}{CGoGN's - map}) that could be shared/reused by other plugins. - \end{itemize} - -\subsection{Additional features} - \paragraph{} - In addition to the previous specifications it was also appreciate that the - project could be completed with some features that are: - \begin{itemize} - \item A path for the cameras in a 3D scene could be interpolated from - successive camera positions so that the camera could follow that path while - she saves snapshots during its movement. - \item A map could be imported from external files. - \end{itemize} - Those additional features, were developed as plugins for the application - since they are not primary needed features. - -\subsection{Third party libraries} - \paragraph{} - In order to implement the required features of the project in an easy and - effective way, the project naturally uses third party libraries. Without - considering the many third party libraries already used in \textbf{CGoGN}, the - work was done using mainly two libraries: - \begin{itemize} - \item \textbf{\href{http://qt-project.org/}{Qt}}: the effective and popular - framework, which, thus providing all the GUI features, provides the kernel - for our project's plugin system using - \href{http://qt-project.org/doc/qt-4.8/plugins-howto.html#the-lower-level-api-extending-qt-applications}{Qt's - plugin framework}. - \item \textbf{\href{http://www.libqglviewer.com/}{libQGLviewer}}: A library - that is also based on Qt, but that provides interesting efficient visualization - features especially regarding camera gesture. - \end{itemize} - -\section{Quick presentation} - \paragraph{} - This section quickly presents the main application interface then the use of - the \textit{importMap} and the \textit{cameraPath} plugin. - -\subsection{The main application} - \paragraph{} - \begin{figure}[h!p] - Here's the main application after a first launch. - \centering - \includegraphics[width=0.7\textwidth]{images/screenshot1} - \caption{The main window application without any plugin loaded or used.} - \end{figure} - \begin{figure}[h!p] - Now we need to load a plugin.\\ - \centering - \includegraphics[width=0.5\textwidth]{images/screenshot2} - \caption{Load the plugin button.} - \end{figure} - \begin{figure}[h!p] - We then choose a plugin to load. Plugins are particular C++ dynamic libraries, - they take the form of \textit{lib*.so} files. For example, here we want to load - a plugin called \textit{tuto5Geom} so we select he file \textit{libTuto5Geom.so}. - Custom plugin directories or, individual plugin files can be specified from - this interface.\\ - \centering - \includegraphics[width=0.95\textwidth]{images/screenshot3} - \caption{Load plugins interface.} - \end{figure} - \begin{figure}[h!p] - Our plugin is loaded, but nothing happened. This plugin is a visualization - plugin: it provides a visualization of a grid cube. We don't have yet any - visualization because, most plugins generally wait to be associated with a - scene to draw in, so we still have to create a scene manually. (Note that - plugins could create their own scene automatically, if the plugin creator - wants to, but this approach is discouraged)\\ - \centering - \includegraphics[width=0.6\textwidth]{images/screenshot4} - \caption{Adding scenes button.} - \end{figure} - \begin{figure}[h!p] - We now chose a name for our view, and chose to link it with an existing - previously load plugin. Note that a view can be linked to a plugin even after - its creation.\\ - \centering - \includegraphics[width=0.95\textwidth]{images/screenshot5} - \caption{Adding scenes interface.} - \end{figure} - \begin{figure}[h!p] - And here's the view with our drawing.\\ - \centering - \includegraphics[width=1\textwidth]{images/screenshot6} - \caption{A scene associated to a drawing plugin.} - \label{fig:tuto5GeomView} - \end{figure} - \begin{figure}[h!p] - Let's now watch this scene from two different points of view. Several step have - to be made: first we have to create a new camera.\\ - \centering - \includegraphics[width=0.3\textwidth]{images/screenshot7} - \caption{View's camera gesture for this scene.} - \end{figure} - \begin{figure}[h!p] - \centering - \includegraphics[width=0.5\textwidth]{images/screenshot8} - \caption{Creating and naming a new camera.} - \end{figure} - \begin{figure}[h!p] - We now have a single view with two cameras. We're going to separate these two - cameras into two different views, and by doing so splitting this scene into - two views.\\ - \centering - \includegraphics[width=0.3\textwidth]{images/screenshot9} - \caption{View management button.} - \end{figure} - \begin{figure}[!] - We create a new view for this scene, then we drag'n drop one of the two cameras - into this new view.\\ - \begin{subfigure}[h!p]{0.6\textwidth} - \centering - \includegraphics[width=\textwidth]{images/screenshot10} - \end{subfigure} - ~ - \begin{subfigure}[h!p]{0.5\textwidth} - \centering - \includegraphics[width=\textwidth]{images/screenshot11} - \end{subfigure} - \end{figure} - \begin{figure}[h!p] - We now have the same scene that can be viewed by two different points of - view.\\ - \centering - \includegraphics[width=0.95\textwidth]{images/screenshot12} - \caption{1 plugin drawing in one scene with 2 cameras and split into 2 - view.} - \label{fig:tuto5GeomDoubleView} - \end{figure} - - \FloatBarrier -\subsection{The import plugin} - \paragraph{} - The import plugin is a plugin that loads a map form a \textit{.off} file, and - then references it within the main application so that it can be given to other - plugins and reused by them. - \begin{figure}[h!p] - Loading the \textit{importMap} plugin. - \centering - \includegraphics[width=0.9\textwidth]{images/screenshot13} - \caption{Loading the «importMap» plugin.} - \end{figure} - \begin{figure}[h!p] - This plugin doesn't provide any visualization function, it just loads map into - memory, that's why we don't (and can't) link it to any view. Once loaded the - plugin adds an ``\textit{import map}'' option to the menu and/or toolbar.\\ - \centering - \includegraphics[width=0.4\textwidth]{images/screenshot14} - \caption{A wild menu entry appears!} - \end{figure} - \begin{figure}[h!p] - We now chose an \textit{.off} file to load.\\ - \centering - \includegraphics[width=0.9\textwidth]{images/screenshot15} - \caption{File dialog.} - \end{figure} - \begin{figure}[h!p] - The map is now loaded in memory, but we need a tool to visualize it. Skipping - the procedure that is the same as before, we load the ``\textit{simpleVisu}'' - plugin, and link a new scene to it. But we still have to tell the - ``\textit{simpleVisu}'' plugin, to use this map.\\ - \centering - \includegraphics[width=0.6\textwidth]{images/screenshot16} - \caption{Link map and plugin menu entry} - \label{fig:linkMapPlugin} - \end{figure} - \begin{figure}[h!p] - We select the concerned plugin, then we double click on the available maps - list. The green icon indicates that the map is linked with the selected - plugin.\\ - \centering - \includegraphics[width=0.95\textwidth]{images/screenshot17} - \caption{Link map and plugin menu entry} - \end{figure} - \begin{figure}[h!p] - And we have a visualization of our loaded map. - \centering - \includegraphics[width=0.7\textwidth]{images/screenshot18} - \caption{Moo moo mooo.} - \end{figure} - \FloatBarrier - -\subsection{The camera path plugin} - \paragraph{} - Another requirement for this project was to be able, given the multiple camera - gesture, to interpolate a path for a camera from it's successive position - defined by the user as ``keyframes'', so that the camera could move along this - path and ``replay'' this movement on the user's demand. Additionally this path - could be visible for other cameras. - \begin{figure}[h!p] - We start with this double visualization of a same scene.\\ - \centering - \includegraphics[width=0.9\textwidth]{images/screenshot19} - \caption{Two moos are better than none.} - \end{figure} - \begin{figure}[h!p] - We now load the ``\textit{cameraPath}'' plugin.\\ - \centering - \includegraphics[width=1.0\textwidth]{images/screenshot20} - \caption{Regular plugin load.} - \end{figure} - \begin{figure}[h!p] - Linking the existing scene with the plugin.\\ - \centering - \includegraphics[width=0.7\textwidth]{images/screenshot21} - \caption{Linking the existing view with the ``\textit{cameraPath}'' plugin.} - \end{figure} - \begin{figure}[h!p] - A new icon appears on both views.\\ - \centering - \includegraphics[width=0.3\textwidth]{images/screenshot22} - \caption{A wild new icon appears!} - \end{figure} - \begin{figure}[h!p] - This opens a new dialog where a path can be created using successive - positions of the camera. Each time the user hits the ``create keyFrame" - button, a new keyframe, which is the current position of the view's current - camera, is added to the path. The path is interpolated from this keyframe - list.\\ - \centering - \includegraphics[width=0.9\textwidth]{images/screenshot23} - \caption{The camera path editor dialog.} - \end{figure} - \begin{figure}[h!p] - The camera and its interpolated path can both be made visible by other - cameras from the same scene.\\ - \centering - \includegraphics[width=1\textwidth]{images/screenshot24} - \caption{The path of the second camera viewed by the first.} - \end{figure} - - \FloatBarrier - - \paragraph{} - A demo video showing how this plugin works may have been joined with this - document, or may be found in the project's documentation. - - -\chapter{How to write plugins?} -\section{Basics and concepts} - \paragraph{} - This sections intends to explain the basis to write a visualization plugin. It - assumes you have knowledge about compilation of C++ \textbf{Qt} files, and also - uses \href{http://www.cmake.org/}{\textbf{CMake}}, a powerful Makefile - generating tool. The goal of this section is to write a plugin version of this - simple \textbf{CGoGN} example: - \url{http://cgogn.u-strasbg.fr/Wiki/index.php/Tuto_1} - -\subsection{Visualization concepts} - \paragraph{} - Before writing visual plugins there are some main application inner mechanisms - that need to be understood, that is to say, the way the main application - manages the different objects of interest and their relations between each - other: \textbf{Camera}, \textbf{View}, \textbf{Scene} and \textbf{Plugin}. - \paragraph{Plugin:} - A plugin is a piece of code written independently to the main application, - that are loaded and referenced from the main application, and that are - instantiated as a new object: \textbf{Plugin}. If a plugin has an active - drawing method, it can draw any visualization but it needs to be linked to - another object that exists within the main application: a \textbf{Scene}. Note - that a plugin does not need to be linked to a scene, if it doesn't provide any - drawing. - \paragraph{Scene:} - It's an object that is created by the main application, generally on user's - demand. A scene isn't actually a drawing object, its aim is to make the link - between two types of objects: the \textbf{View} and the \textbf{Plugin}. A - scene can be defined as a set of plugins. A scene exists only for the - visualization of the plugin drawing methods, so it has to contain at least one - \textbf{View}. A scene can be linked to several plugins, and a plugin can be - linked to several scenes. - \paragraph{View:} - It's the visualization object that renders the drawings of the plugin that are - associated to it's parent's \textbf{Scene}. Whereas a scene can have several - views, a view only have one parent scene. The views can switch between several - point of views, using \textbf{Camera} objects. A view has at least one camera. - \paragraph{Camera:} - This objects can be seen as a point of view. A \textbf{View} has a least one - camera, and has necessarily an unique ``current'' camera, that is it's current - point of view. A \textbf{View} can switch between several camera, and it also - can be considered as a collection of cameras. A \textbf{Camera} can belong to - several views (from different scenes) at the same time, it is then a ``shared'' - camera. - \FloatBarrier - \paragraph{} - Here is a simple representation of a simple situation: a drawing - \textbf{Plugin} that is linked to a \textbf{Scene} that is made of an unique - \textbf{View} containing only one \textbf{Camera} (ie: - \ref{fig:tuto5GeomView}): - \begin{figure}[h!p] - \centering - \includegraphics[width=1\textwidth]{images/systemMap1} - \caption{1 plugin drawing in 1 scene made of 1 view that has 1 camera.} - \end{figure} - \paragraph{} - Furthermore, a representation of (~\ref{fig:tuto5GeomDoubleView}) would be: - \begin{figure}[h!p] - \centering - \includegraphics[width=1\textwidth]{images/systemMap2} - \caption{1 plugin drawing in 1 scene made of 2 views each one working with - their own camera.} - \end{figure} - \FloatBarrier - -\subsection{The first plugin} - \subsubsection{How to write the plugin} - \paragraph{} - A good way to comprehend the plugin mechanism is to check the - \href{http://qt-project.org/doc/qt-4.8/plugins-howto.html}{\textbf{Qt} plugin - mechanism}, which our plugin system relies on. - \paragraph{} - Our plugin is based on a \textbf{CGoGN} tutorial: - \url{http://cgogn.u-strasbg.fr/Wiki/index.php/Tuto_1}. Here, we will create a - single visualization plugin that creates in a map a triangle, a square, - connect them, affect positions to vertices and visualize it. The plugin - will be called ``\textit{FirstPlugin}", and will be compiled as a - dynamic C++ library, that will consequently result in a file called - ``\textbf{libFirstPlugin.so}''. Here's the skeleton for such a plugin: - \paragraph{firstPlugin.h}~ - \begin{lstlisting} - #ifndef FIRSTPLUGIN_H_ - #define FIRSTPLUGIN_H_ - - - - #include "visualPlugin.h" - - - /**---CGoGN includes **/ - #include "Utils/Qt/qtSimple.h" - #include "Utils/cgognStream.h" - - #include "Topology/generic/parameters.h" - - #ifdef USE_GMAP - #include "Topology/gmap/embeddedGMap2.h" - #else - #include "Topology/map/embeddedMap2.h" - #endif - - #include "Algo/Render/GL2/topoRender.h" - /**---CGoGN includes **/ - - - /**---Definitions specific to CGoGN ---*/ - using namespace CGoGN ; - - /** - * Struct that contains some information about the types of the manipulated objects - * Mainly here to be used by the algorithms that are parameterized by it - */ - struct PFP: public PFP_STANDARD - { - // definition of the type of the map - #ifdef USE_GMAP - typedef EmbeddedGMap2 MAP; - #else - typedef EmbeddedMap2 MAP; - #endif - }; - - typedef PFP::MAP MAP; - typedef PFP::VEC3 VEC3; - /**---Definitions specific to CGoGN ---*/ - - /** - * This class is a basic minimal plugin. - * All the methods in this class are overloaded methods. - * In order to create a valid plugin, all the method in this - * needs to be declared (they are actually overloaded methods - * from VisualPlugin), even if your plugin doesn't make any - * drawing. - */ - - /** - * Our plugin must inherit from VisualPlugin, - * that is a class that itself is an implementation - * of the Plugin interface (virtual class). It contains - * many useful and essential methods. - */ - class FirstPlugin : public VisualPlugin{ - /** - * Essential Qt macros. - */ - Q_OBJECT - Q_INTERFACES(Plugin) - public: - FirstPlugin(){} - ~FirstPlugin(){} - - /** - * The classical call back for the initGL method - * When a scene will be link to this plugin, it will call - * back this method with itself as a parameter. - */ - void cb_initGL(Scene* scene); - - /** - * The drawing method that needs to be overloaded. - * Each time a scene (that is to say, at least one of the - * views that is contains) needs to be refresh, it calls back - * this method with itself as a parameter - */ - void cb_redraw(Scene* scene); - - /** - * The plugin's activation method - * Each time the main application loads this plugin, - * it call this method. Writing this method is - * the occasion to initialize the plugin and check certain - * conditions. - * If this methods return 'false', the plugin load will be aborted. - */ - bool activate(); - /** - * The plugin's disabling method - * Each time the main application will unload the plugin - * it will call this method. - */ - void disable(); - - - protected: - /** Attributes that are specific to this plugin **/ - MAP myMap; - - // attribute for vertices positions - VertexAttribute position; - - // render (for the topo) - Algo::Render::GL2::TopoRender* m_render_topo; - - // just for more compact writing - inline Dart PHI1(Dart d) { return myMap.phi1(d); } - inline Dart PHI_1(Dart d) { return myMap.phi_1(d); } - inline Dart PHI2(Dart d) { return myMap.phi2(d); } - template - Dart PHI(Dart d) { return myMap.phi(d); } - /** Attributes that are specific to this plugin **/ - }; - - #endif /* FIRSTPLUGIN_H_ */ - \end{lstlisting} - \paragraph{} - And here is the \textit{.cpp} file, that implements these methods: - \paragraph{firstPlugin.cpp}~ - \begin{lstlisting} - #include "firstPlugin.h" - - #include "Algo/Geometry/boundingbox.h" - - - bool FirstPlugin::activate(){ - // creation of 2 new faces: 1 triangle and 1 square - Dart d1 = myMap.newFace(3); - Dart d2 = myMap.newFace(4); - - // sew these faces along one of their edge - myMap.sewFaces(d1, d2); - - // creation of a new attribute on vertices of type 3D vector for position. - // a handler to this attribute is returned - position = myMap.addAttribute("position"); - - // affect position by moving in the map - position[d1] = VEC3(0, 0, 0); - position[PHI1(d1)] = VEC3(2, 0, 0); - position[PHI_1(d1)] = VEC3(1, 2, 0); - position[PHI<11>(d2)] = VEC3(0, -2, 0); - position[PHI_1(d2)] = VEC3(2, -2, 0); - - m_render_topo=NULL; - - return true; - } - - void FirstPlugin::disable(){ - if(m_render_topo){ - delete m_render_topo; - } - } - - void FirstPlugin::cb_redraw(Scene* scene){ - m_render_topo->drawTopo(); - } - - void FirstPlugin::cb_initGL(Scene* scene){ - if(scene){ - //we fit the first (possibly the only) view - //of the newly linked scene to the content - //of our map - - // bounding box of scene - Geom::BoundingBox bb = Algo::Geometry::computeBoundingBox(myMap, position); - - scene->firstViewFitSphere(bb.center()[0], bb.center()[1], bb.center()[2], bb.maxSize()); - - - - m_render_topo = new Algo::Render::GL2::TopoRender() ; - - // render the topo of the map without boundary darts - SelectorDartNoBoundary nb(myMap); - m_render_topo->updateData(myMap, position, 0.9f, 0.9f, nb); - - } - } - - - /** - * If we want to compile this plugin in debug mode, - * we also define a DEBUG macro at the compilation - */ - #ifndef DEBUG - //essential Qt function: - //arguments are - // - the complied name of the plugin - // - the main class of our plugin (that extends VisualPlugin) - Q_EXPORT_PLUGIN2(FirstPlugin, FirstPlugin) - #else - Q_EXPORT_PLUGIN2(FirstPluginD, FirstPlugin) - #endif - \end{lstlisting} - - - \subsubsection{Compilation} - \paragraph{} - To compile a plugin, the files must be compiled into a C++ dynamic library with - the plugin's main class compiled as a \textbf{Qt} object using the \textbf{Qt} - tools. - \paragraph{} - Assuming that you are already familiar with \textbf{CMake} and compiling - \textbf{CGoGN} apps, here's a cmake example, compiling the plugin written - above: - \paragraph{CMakeLists.txt}~ - \begin{lstlisting}[language=make] - #assuming that ${QGLVIEWER_PATH} is the directory - #where QGLViewer was compiled - SET(QGLVIEWER_INCLUDE_DIR ${QGLVIEWER_PATH}/QGLViewer) - - #the include directories for CGoGN, common libraries - #and QGLViewer - INCLUDE_DIRECTORIES( - ${CGoGN_ROOT_DIR}/include - ${COMMON_INCLUDES} - ${CMAKE_CURRENT_SOURCE_DIR} - ${CMAKE_CURRENT_BINARY_DIR} - ${QGLVIEWER_INCLUDE_DIR} - ) - - #assuming that ${CGoGN_PLUG_DIR} is the directory - #of main application project was compiled - SET(VISUALPLUGIN_CPP_PATH - ${CGoGN_PLUG_DIR}/plugin/visualPlugin.cpp - ) - SET(VISUALPLUGIN_H_PATH - ${CGoGN_PLUG_DIR}/plugin/visualPlugin.h - ) - - SET( FIRSTPLUGIN_SRC - ${VISUALPLUGIN_CPP_PATH} - firstPlugin.cpp - ) - SET( FIRSTPLUGIN_H - ${VISUALPLUGIN_H_PATH} - firstPlugin.h - ) - - #using Qt tools to generate the "moc" file for the - #plugin Q_OBJECT - QT4_WRAP_CPP(FIRSTPLUGIN_MOC ${FIRSTPLUGIN_H}) - - #compiling as a dynamic library - ADD_LIBRARY(FirstPlugin SHARED - ${FIRSTPLUGIN_SRC} - ${FIRSTPLUGIN_MOC} - ) - - #linking with the CGoGN and QGLViewers libraries - TARGET_LINK_LIBRARIES(FirstPlugin - ${CGoGN_LIBS_R} - ${COMMON_LIBS} - ${QGLVIEWER_INCLUDE_LIBRARY} - ) - \end{lstlisting} - - \paragraph{} - The compilation should generate our plugin file: - ``\textit{libFirstPlugin.so}''. - - \subsubsection{Using the plugin} - \paragraph{} - Before using our plugin, we must add it to the main application's plugin - location list. First we have to open the ``plugin interface''. - \FloatBarrier - \begin{figure}[h!p] - On the left the two first button are respectively to add and individual - plugin's location, and to add a plugin directory location so that all the - ``\textit{lib*.so}'' files in this directory will be listed.\\ - \centering - \includegraphics[width=1\textwidth]{images/screenshot25} - \caption{Add a plugin and add a plugin directory buttons.} - \end{figure} - \begin{figure}[h!p] - We choose the first option, and our load plugin individually.\\ - \centering - \includegraphics[width=1\textwidth]{images/screenshot26} - \caption{We select our plugin.} - \end{figure} - \begin{figure}[h!p] - We can now load our plugin and link it to a view.\\ - \centering - \includegraphics[width=0.7\textwidth]{images/screenshot28} - \caption{Tadaaaa!} - \end{figure} - - - - \FloatBarrier -\subsection{Tricks and advice} - \subsubsection{Understanding the callBacks} - To avoid segmentation faults it may be of a good help to understand how the - plugin's call back methods are called. The figure (~\ref{fig:callBacks}) should - be of an help. - \begin{figure}[h!p] - \centering - \includegraphics[width=0.9\textwidth]{images/callBacks} - \caption{The main call backs between the main application and a plugin.} - \label{fig:callBacks} - \end{figure} - - \subsubsection{Bug \& Debug} - \paragraph{Common bug:} - As said before, the compiled are ``\textit{lib*.so}'' files. But sometimes, - when you try to load one of these files as a plugin, the program may tell you - that the plugin isn't compatible. Several simple mistakes can be the cause of - this inconvenience. Here's some advice to avoid it: - \begin{itemize} - \item make sure that all the necessary Qt macros are correctly used: - \begin{itemize} - \item in the plugin's main class declaration: - \texttt{Q\_OBJECT} and \texttt{Q\_INTERFACES(Plugin)} - \item in the plugin's implementation file: - \texttt{Q\_EXPORT\_PLUGIN2(ProgName, MainClassName)} - \end{itemize} - \item make sure that you have overloaded each of the four obligatory - \textbf{VisualPlugin} pure virtual methods: - \begin{itemize} - \item \texttt{bool activate()} - \item \texttt{void cb\_initGL()} - \item \texttt{void cb\_redraw()} - \item \texttt{void disable()} - \end{itemize} - \item make sure that the files containing the declaration and implementation - of the plugin's main class are compiled as \textbf{Qt} object files. - \item make sure that each method you declare or overload is - implemented. - \item {\em{do not}} redefine (change signature) any of the - \textbf{VisualPlugin}'s inherited method. - \end{itemize} - - \paragraph{Debug:} - Naturally a coder will want to test and debug its plugin. If you want to use - \href{http://www.gnu.org/software/gdb/}{\textbf{GDB}} on your own plugin their - are a few steps you need to follow: - \begin{itemize} - \item Compile your plugin in debug mode. Be sure that you use the - \textbf{debug} version of the CGoGN library. If you have a normal built - plugin and a debug built plugin with different names, in your plugin code, be - sure to use: - \begin{lstlisting}[language=make] - #ifndef DEBUG - Q_EXPORT_PLUGIN2(FirstPlugin, FirstPlugin) - #else - Q_EXPORT_PLUGIN2(FirstPluginD, FirstPlugin) - #endif - \end{lstlisting} - and to define the \texttt{DEBUG} macro in your debug compilation. - \item Use a debug compiled version of the main application with \textbf{GDB} - \item In \textbf{GDB} before using the \texttt{run} command don't forget to - use: - \begin{lstlisting}[language=bash] - directory [path_to/the_directory/containing/the_plugin] - \end{lstlisting} - \end{itemize} - If you follow these steps you should be able to debug your plugin using - \textbf{GDB}. - - -\section{Going further\ldots} - \paragraph{} - This section aims to present and explain more plugin features and methods in - order to write more advanced plugins. - - \FloatBarrier -\subsection{Few words on plugins} - \paragraph{} - As seen in the previous plugin example, a plugin must be an inheritance of a - virtual class, \textbf{VisualPlugin}, that is itself an inheritance of a - pure virtual class, considered as a plugin interface (~\ref{fig:plugins}). - \begin{figure}[h!p] - \centering - \includegraphics[width=0.3\textwidth]{images/plugins} - \caption{The plugins inheritence graph.} - \label{fig:plugins} - \end{figure} - \paragraph{} - The point of inheriting an halfway class is that \textbf{VisualPlugin} already - declares some empty virtual call-back methods so that the plugin coder doesn't - have to declare the ones he doesn't want to use, but it also provides several - \textit{ready-to-use} methods that offer many easy to use features, for - example, add GUI interface, adjust some plugins properties. Many of these methods are - presented and explained further. -\subsection{Objects and visualization plugins} - As you know, one of the main goals of this project is to provide a main - application that is a mere kernel that needs to be completed with third party - plugins. The main application provides several objects for visualization and - interface creation. As told earlier, this application and the plugin systems - uses \href{http://qt-project.org/}{\textbf{Qt}} and another library - (also Qt based) \textbf{\href{http://www.libqglviewer.com/}{libQGLviewer}}. - Here are some precision about the objects of interest that you may have to - consider for plugin writing. - - \subsubsection{Scene:} - \paragraph{} - A scene is a drawing that can be made by one or several plugin at the same - time. A scene can be scene from several point of views (View objects) at the - same time. That is why a scene is both a collection of plugins and a collection - of views. - \paragraph{Automatic creation: } - As seen earlier, a scene is meant to be created empty (with one view, and - linked to no plugin) by user, then be linked by the user to an active drawing - plugin. Although a plugin can automatically create a scene if he calls the - method: - \begin{center} - \texttt{bool addNewScene(QString name, Scene* \&scene)}\\ - or\\ - \texttt{bool addNewSceneDialog(QString name, Scene* \&scene)} - \end{center} - The only difference between two methods is that the first automatically places - the first view of the scene, and the second one opens a dialog to ask the user - where to place it on the ``view area'' of the application. The effects and - signatures for these methods use are the same:\\ - \begin{center} - \begin{tabular}{|l|c|c|p{0.4\textwidth}|} - \hline - ~ & name & type & description - \\ \hline - \textbf{argument:} & name & QString & - The name under witch the scene will be referenced in the main application. - \\ \cline{2-4} - ~ & scene & Scene* \& & - Once the scene is created, this pointer will be affected with it's memory - address: it's an out parameter. - \\ \hline - \textbf{return:} & ~ & bool & - A boolean whether the creation of the scene has succeeded or not. - \\ \hline - \end{tabular} - \end{center} - \textbf{Notes:} - \begin{itemize} - \item A call to the plugin's \texttt{cb\_intGL()} call back method will be - made but not to \texttt{cb\_recieveScene()}. - \item When the plugin will be unload, this scene will be destroyed. - \item Creating a scene automatically \em{is not recommended}. - \end{itemize} - \paragraph{Call-back on scene linking:} We've mentioned several time the - call-back method: - \begin{center} - \texttt{void cb\_recievedScene(Scene* scene)} - \end{center} - As you may have guessed, it's a call-back method that is called each time a - scene is linked to the plugin by the user.\\ - \begin{center} - \begin{tabular}{|l|c|c|p{0.4\textwidth}|} - \hline - ~ & name & type & description - \\ \hline - \textbf{argument:} & scene & Scene* & - A pointer on the scene that was linked by the user to the plugin. - \\ \hline - \end{tabular} - \end{center} - The plugin maintains a list attribute \texttt{l\_recievedScene} that contains - all the references to the received scene. The \texttt{cb\_recievedScene} method - is called {\em after} the scene has been added to this list. You do not have - to, and should not, operate on this list (the only operations that could be - allowed are sorting or re-ordering the list). Overload this method each time - you want a specific action to be done, when a scene is linked to your plugin. - - \paragraph{} - Of course their's also a call-back method that is called when the scene is - unlinked and that works in a similar way: - \begin{center} - \texttt{void cb\_removingScene(Scene* scene)} - \end{center} - However, be sure to note that this method is called {\em before} the - scene is removed from the \texttt{l\_recievedScene} list. Once again - you do not have to, and should not, operate on this list. Overload this method - each time you want a specific action to be done, when a scene is unlinked from - your plugin. - - \subsubsection{View:} - \paragraph{} - The \textbf{View} object is the object that renders the drawing (drawn by one - or more plugins) that characterize a scene. A view can be considered as a point - of view, and so a scene can have multiple view, although a view belongs to a - one and only scene. The view inherits the - \href{http://www.libqglviewer.com/refManual/classQGLViewer.html} - {\textbf{QGLViewer}} class (from the - \textbf{\href{http://www.libqglviewer.com/}{libQGLviewer}} library). So if you - want to operate directly on a view, be sure to check the library's documentation. - - \paragraph{} - You can access to a scene's views using some of \textbf{Scene}'s public - methods: - \begin{center} - \texttt{int countViews()} \\ - \begin{tabular}{|l|c|c|p{0.4\textwidth}|} - \hline - ~ & name & type & description - \\ \hline - \textbf{return:} & ~ & int & - The current number of views of a scene. - \\ \hline - \end{tabular} - \\~\\~\\ - \texttt{View* getView(int num)} \\ - \begin{tabular}{|l|c|c|p{0.4\textwidth}|} - \hline - ~ & name & type & description - \\ \hline - \textbf{argument:} & num & int & - the scene's \textit{num}-th view you want to access. - \\ \hline - \textbf{return:} & ~ & View* & - A pointer to the \textit{num}-th view of the plugin, NULL if the view can't - be accessed or doesn't exists. - \\ \hline - \end{tabular} - \\~\\~\\ - \texttt{QList views()} - \begin{tabular}{|l|c|c|p{0.4\textwidth}|} - \hline - ~ & name & type & description - \\ \hline - \textbf{return:} & ~ & QList$<$View*$>$ & - A list containing references to all of the scene's views. - \\ \hline - \end{tabular} - \end{center} - Accessing and operating directly on a scene's view can be critical: be very - cautious. Although this might be useful in some cases, especially when you - want to access the current camera's matrices, which is common when you overload - the callback method \texttt{cb\_updateMatrix(View*)}; if you are already - familiar with \textbf{CGoGN}'s shaders implementation, the default implementation of the - method may enlighten you: - \begin{lstlisting} - void VisualPlugin::cb_updateMatrix(View* view){ - if(view){ - glm::mat4 model(view->getCurrentModelViewMatrice()); - glm::mat4 proj(view->getCurrentProjectionMatrice()); - - for(std::set< std::pair >::iterator it = Utils::GLSLShader::m_registeredShaders.begin(); - it != Utils::GLSLShader::m_registeredShaders.end(); - ++it) - { - if ((it->first == NULL) || (it->first == this)) - { - it->second->updateMatrices(proj, model); - } - } - } - } - \end{lstlisting} - - \subsubsection{Camera:} - \paragraph{} - As explained earlier the \textbf{View} object has a collection of - \textit{Camera} objects. These cameras can be considered as different point of - views available for a view, of course only one camera is considered current - for a given view. A camera can be shared by several views, so it's modification - moreover it's suppression can be critical. Several public methods of the - \textbf{View} class can be called. - \begin{center} - \texttt{Camera* currentCamera()}\\ - \begin{tabular}{|l|c|c|p{0.4\textwidth}|} - \hline - ~ & name & type & description - \\ \hline - \textbf{return:} & ~ & Camera* & - A pointer to the view's current camera. - \\ \hline - \end{tabular} - \\~\\~\\ - \texttt{QList cameras()}\\ - \begin{tabular}{|l|c|c|p{0.4\textwidth}|} - \hline - ~ & name & type & description - \\ \hline - \textbf{return:} & ~ & QList$<$Camera*$>$ & - A list containing references to all the cameras of the view. - \\ \hline - \end{tabular} - \\~\\~\\ - \texttt{int countCameras()}\\ - \begin{tabular}{|l|c|c|p{0.4\textwidth}|} - \hline - ~ & name & type & description - \\ \hline - \textbf{return:} & ~ & int & - The number of cameras for the view. - \\ \hline - \end{tabular} - \end{center} - The class \textbf{Camera} inherits the class - \href{http://www.libqglviewer.com/refManual/classqglviewer_1_1Camera.html} - {\textbf{qglviewer::Camera}} provided by the \textbf{libQGLViewer} library. If - you want to operate correctly on cameras you might want to check it's - documentation, but again, it also might be critical. - -\subsection{GUI and user interactions} - \subsubsection{Custom widgets and menu entries} - \paragraph{} - Of course the plugins also offers the possibility to add you own menu entries, - buttons in the toolbar and custom widget in the main application's dock. - Although these features requires the basics of \textbf{Qt}'s custom slots and - custom widget creation. - - \paragraph{Custom menu entries:} - Their are two usable methods provided by the inheritance to - \textbf{VisualPlugin} that allows you to add your custom menu entries: - \begin{center} - \texttt{QAction* addMenuAction(QString menuPath, const char* method)} - \begin{tabular}{|l|c|c|p{0.6\textwidth}|} - \hline - ~ & name & type & description - \\ \hline - \textbf{argument:} & menuPath & QString & - The ``menu path'' for your custom entry matching this pattern: - \textit{:menu/submenu1/submenu2/myEntry}. For example if your menu path is - \textit{:file/export/image}, in will create a submenu ``export'', in the - ``file'' menu, that contain the entry image. Any non existing menu or submenu - is created by this method. - \\ - \cline{2-4} - ~ & method & const char* & - The \textbf{Qt} slot you want to connect to your menu entry. For example if - you want the slot ``\texttt{exportImage()}'' to be called when the custom - entry is clicked, this argument should be ``SLOT(exportImage())''. - \\ \hline - \textbf{return:} & ~ & QAction* & - A reference to the Qt's ``action'' object that has been created by this - method. NULL if the method fails. - \\ \hline - \end{tabular} - \end{center} - This method creates automatically your ``action'' object that is used to - connect your entry with one of your slots. Although you might want to connect a - same action to several menu entries or a to a toolbar button. In that case you - you can declare your own QAction instance, and use this method: - \begin{center} - \texttt{bool addMenuAction(QString menuPath, QAction* action)} - \begin{tabular}{|l|c|c|p{0.6\textwidth}|} - \hline - ~ & name & type & description - \\ \hline - \textbf{argument:} & menuPath & QString & - The ``menu path'' for your custom entry matching this pattern: - \textit{:menu/submenu1/submenu2/myEntry}. For exemple if your menu path is - \textit{:file/export/image}, in will create a submenu ``export'', in the - ``file'' menu, that contain the entry image. Any non existing menu or submenu - is created by this method. - \\ - \cline{2-4} - ~ & method & QAction* & - A pointer on the QAction you want to connect to your custom entry. - \\ \hline - \textbf{return:} & ~ & bool & - True if the method succeeded, false otherwise. - \\ \hline - \end{tabular} - \end{center} - - \paragraph{Custom toolbar buttons:} - In a similar way \textbf{VisualPlugin} provides inherited methods that can be - used to add custom toolbar buttons: - \begin{center} - \texttt{QAction* addToolbarAction(const char* method, QIcon icon= QIcon())} - \begin{tabular}{|l|c|c|p{0.6\textwidth}|} - \hline - ~ & name & type & description - \\ \hline - \textbf{argument:} & method & const char* & - The \textbf{Qt} slot you want to connect to your toolbar button. For example - if you want the slot ``\texttt{exportImage()}'' to be called when the custom - entry is clicked, this argument should be ``SLOT(exportImage())'' - \\ \cline{2-4} - ~ & icon & QIcon & - The \textbf{Qt}'s icon of your custom button, an empty icon by default. - \\ \hline - \textbf{return:} & ~ & QAction* & - A reference to the Qt's ``action'' object that has been created by this - method. NULL if the method fails. - \\ \hline - \end{tabular} - \end{center} - In the same way than before, there's also a method where you passes an already - created QAction instance: - \begin{center} - \texttt{bool addToolbarAction(QAction* action)} - \begin{tabular}{|l|c|c|p{0.6\textwidth}|} - \hline - ~ & name & type & description - \\ \hline - \textbf{argument:} & action & QAction* & - A pointer on the QAction you want to connect to your custom entry. - \\ \hline - \textbf{return:} & ~ & bool & - True if the method succeeded, false otherwise. - \\ \hline - \end{tabular} - \end{center} - This last method considers that their's already a QIcon object associated with - you the QAction object you passed as parameter. - - \paragraph{Custom widgets:} - The following method supposes that you are already familiar with how to create - (and compile) custom \textbf{Qt} widgets. The main application possesses a dock - where widgets can be add as new tabs in the dock's area. This method allows - you to add such widgets: - \begin{center} - \texttt{bool addWidgetInDockTab(QWidget* newTabWidget, QString tabText)} - \begin{tabular}{|l|c|c|p{0.6\textwidth}|} - \hline - ~ & name & type & description - \\ \hline - \textbf{argument:} & newTabWidget & QWidget* & - A reference to the custom widget you want to add as a new tab in the main - application's dock. - \\ \cline{2-4} - ~ & tabText & QString & - The text that appears on the tab that contains your custom widget. - \\ \hline - \textbf{return:} & ~ & bool & - True if the method succeeded, false otherwise. - \\ \hline - \end{tabular} - \end{center} - - \subsubsection{User interactions} - \paragraph{} - Of course a plugin coder will want to control the behavior when mouse or - keyboard actions are detected on a view of a scene. Naturally the - \textbf{VisualPlugin} class that your plugin must inherit provides - callback methods that you can overload. It is believe that these methods names - are explicit enough so that they don't need to be described: - \begin{itemize} - \item \texttt{bool cb\_keyPress(Scene* scene, int event)} - \item \texttt{bool cb\_keyRelease(Scene* scene, int event)} - \item \texttt{bool cb\_mousePress(Scene* scene, int button, int x, int y)} - \item \texttt{bool cb\_mouseRelease(Scene* scene, int button, int x, int y)} - \item \texttt{bool cb\_mouseClick(Scene* scene, int button, int x, int y)} - \item \texttt{bool cb\_mouseMove(Scene* scene, int buttons, int x, int y)} - \item \texttt{bool cb\_wheelEvent(Scene* scene, int delta, int x, int y)} - \end{itemize} - You will notice that all of these callback methods must return a boolean. If - they return false, then the default behavior of a - \href{http://www.libqglviewer.com/refManual/classQGLViewer.html} - {\textbf{QGLViewer}} object (\textbf{View} inherits the QGLViewer class) will - be adopted. - -\subsection{Maps and VBOs} - \paragraph{} - Their is a last feature that has already been shown in a previous example - (~\ref{fig:linkMapPlugin}) but hasn't been detailed yet: sharing between - plugins through the main application. This subsection explains how to make the - \textbf{CGoGN} maps created within a plugin available for other and how to - attach VBOs to them. Once again, the following assumes that you are already - familiar with the \textbf{CGoGN} maps and VBO implementation. - - \subsubsection{Map and VBO handling types} - \paragraph{} - Maps are the main object of interest of the \textbf{CGoGN} library. Plugins are - supposed to offer functionalities, and specific treatments on the geometric - object provided by CGoGN. This is why it is necessary that several plugins can - work on a same map. - - \paragraph{} - VBOs are essential datas if you want to render maps and thus their number is - limited within \textbf{OpenGL} application. This is why it is interesting to - allow maps to carry their VBOs so they can also provide them to other plugins - and not to let each plugin create and allocate their own VBO objects for - rendering one and only map. - - \paragraph{MapHandler:} - It's the type that handles CGoGN's map. It basicaly is a class that associate a - reference to a generic map type (\textbf{CGoGN::GenericMap}) with a list of VBO - references. Here are the constructor and the main useful methods of the - \textbf{MapHandler} class: - \begin{center} - \texttt{MapHandler(CGoGN::GenericMap* map)} - \begin{tabular}{|l|c|c|p{0.5\textwidth}|} - \hline - ~ & name & type & description - \\ \hline - \textbf{argument:} & map & CGoGN::GenericMap* & - A reference to an allocated CGoGN generic map - \\ \hline - \end{tabular} - \\~\\~\\ - \texttt{CGoGN::GenericMap* map()} - \begin{tabular}{|l|c|c|p{0.5\textwidth}|} - \hline - ~ & name & type & description - \\ \hline - \textbf{return:} & ~ & CGoGN::GenericMap* & - A reference to the CGoGN map contained by the current MapHandler. - \\ \hline - \end{tabular} - \end{center} - The VBO also possess their own handling type \textbf{VBOHandler} that will be - detailed further. Here are how to access these object from a - \textbf{MapHandler} instance. - \begin{center} - \texttt{VBOHandler* findVBO(QString name)} - \begin{tabular}{|l|c|c|p{0.6\textwidth}|} - \hline - ~ & name & type & description - \\ \hline - \textbf{argument:} & name & QString & - The name of the VBO you want to access. - \\ \hline - \textbf{return:} & ~ & VBOHandler* & - A reference to the VBO associate to the given name, NULL if such a VBO isn't - associated with the generic map handled by this object. - \\ \hline - \end{tabular} - \\~\\~\\ - \texttt{QList findVBOsMatching(QRegExp regexp)} - \begin{tabular}{|l|c|c|p{0.6\textwidth}|} - \hline - ~ & name & type & description - \\ \hline - \textbf{argument:} & regexp & QRegExp & - A regular expression to match the names of the VBOs you want to access. - \\ \hline - \textbf{return:} & ~ & VBOHandler* & - A reference to the VBO associate matching the regular expression. - \\ \hline - \end{tabular} - \\~\\~\\ - \texttt{bool addVBO(VBOHandler* vboH)} - \begin{tabular}{|l|c|c|p{0.4\textwidth}|} - \hline - ~ & name & type & description - \\ \hline - \textbf{argument:} & vboH & VBOHandler* & - A reference to an handled vbo you want want to associate with the map handled - by this object. - \\ \hline - \textbf{return:} & ~ & bool & - A boolean whether or not the method has succeeded. - \\ \hline - \end{tabular} - \\~\\~\\ - \texttt{VBOHandler* addNewVBO(QString vboName)} - \begin{tabular}{|l|c|c|p{0.5\textwidth}|} - \hline - ~ & name & type & description - \\ \hline - \textbf{argument:} & vboName & QString & - A name for the VBO you want to create and associate with the map handled by - this object. Typically the name matches this pattern: - ``\textit{[function]VBO}''. For example, for a position VBO the name should - be ``\textit{positionVBO}'', for a normal VBO ``\textit{normalVBO}''. - \\ \hline - \textbf{return:} & ~ & bool & - A reference to the handler of the newly created VBO, NULL if the method - fails, typically if a VBO with a same name as the given name already exists. - \\ \hline - \end{tabular} - \\~\\~\\ - \texttt{VBOHandler* takeVBO(VBOHandler* vbo)} - \begin{tabular}{|l|c|c|p{0.5\textwidth}|} - \hline - ~ & name & type & description - \\ \hline - \textbf{argument:} & vbo & VBOHandler* & - A pointer to the handler VBO you want to disassociate to the map handled by - the current object. - \\ \hline - \textbf{return:} & ~ & bool & - A reference to the handler no longer associate to the map handled by - the current object, NULL if failure. - \\ \hline - \end{tabular} - \\~\\~\\ - \texttt{int countVBO()} - \begin{tabular}{|l|c|c|p{0.5\textwidth}|} - \hline - ~ & name & type & description - \\ \hline - \textbf{return:} & ~ & int & - The number of VBOs associated to the map handled by - the current object. - \\ \hline - \end{tabular} - \end{center} - - \paragraph{VBOHandler:} - Basically it's the type that handles VBO by associating them to a recognizable - name. Actually this class extends \textbf{CGoGN}'s VBO class - (\textbf{CGoGN::Utils::VBO}) and contains attributes such as his name and a - list of reference to instances of \textbf{MapRender} class the VBO is - associated with. Here are \textbf{VBOHandler}'s useful constructors and public - methods you'll have to use if you want to render shared maps using VBOs: - \begin{center} - \texttt{VBOHandler(QString name)} - \begin{tabular}{|l|c|c|p{0.5\textwidth}|} - \hline - ~ & name & type & description - \\ \hline - \textbf{argument:} & name & QString & - The name associated to the newly created VBO this object will handle. - \\ \hline - \end{tabular} - \\~\\~\\ - \texttt{VBOHandler(VBO vbo, QString name)} - \begin{tabular}{|l|c|c|p{0.5\textwidth}|} - \hline - ~ & name & type & description - \\ \hline - \textbf{argument:} & vbo & VBO & - A CGoGN vbo that will be handled by this object - \\ \cline{2-4} - ~ & name & QString & - The name associated to the VBO this object will handle. - \\ \hline - \end{tabular} - \\~\\~\\ - \texttt{bool isShared()} - \begin{tabular}{|l|c|c|p{0.5\textwidth}|} - \hline - ~ & name & type & description - \\ \hline - \textbf{return:} & ~ & bool & - A boolean whether or not this handled VBO is shared between two or more - instance of \textbf{MapHandler}. - \\ \hline - \end{tabular} - \\~\\~\\ - \texttt{QString getName()} - \begin{tabular}{|l|c|c|p{0.5\textwidth}|} - \hline - ~ & name & type & description - \\ \hline - \textbf{return:} & ~ & QString & - The name which is associated to the handled VBO. - \\ \hline - \end{tabular} - \end{center} - \textbf{Important note:} Be sure to remember that VBO object \textbf{must} be - created withing an \textbf{OpenGL} context, that is to say either within the - \texttt{cb\_initGL(Scene*)} method either within \texttt{cb\_redraw(Scene*)}. - - \subsubsection{Sharing maps} - \paragraph{} - The idea is that any plugin can create a map and then - reference it into the main application that can then share it with other - plugins on user's demand. The procedure within a plugin is: - \begin{enumerate} - \item create a \textbf{CGoGN} map - \item handle the map with a \textbf{MapHandler} class instance. - \item create and handle VBO using the \textbf{VBO} handler class. - \item associate the handled VBOs to the map - \item send the \textbf{MapHandler} object to the main application so that it - will reference it and make it available for other plugins. - \end{enumerate} - \paragraph{} - Here are the methods provided by - \textbf{VisualPlugin} that you'll have to call in order to send a - \textbf{MapHandler} object to the main application: - \begin{center} - \texttt{bool addReferencedMap(QString map\_name, MapHandler* map)} - \begin{tabular}{|l|c|c|p{0.5\textwidth}|} - \hline - ~ & name & type & description - \\ \hline - \textbf{argument:} & map\_name & QString & - The name under which the main application will reference the - handled map. - \\ \cline{2-4} - ~ & map & MapHandler* & - The reference to handler of the map you want to made available for sharing. - \\ \hline - \textbf{return:} & ~ & bool & - A boolean whether or not the method succeeds. For example, failure if - another map is already referenced under the same name. - \\ \hline - \end{tabular} - \\~\\~\\ - \texttt{MapHandler* getReferencedMap(QString map\_name)} - \begin{tabular}{|l|c|c|p{0.5\textwidth}|} - \hline - ~ & name & type & description - \\ \hline - \textbf{argument:} & map\_name & QString & - The name of the map handler referenced by the main application. - \\ \hline - \textbf{return:} & ~ & MapHandler* & - A pointer to the map handler referenced by the main application under the - given name, NULL is failure, for example if no map handler is referenced - under this name - \\ \hline - \end{tabular} - \end{center} - \textbf{Note: } Since the map are meant to be shared manually between plugins - by the user, the last method shouldn't be useful. - - \subsubsection{Plugins maps callback} - \paragraph{} - In a similar way than callbacks methods are called when a user links a scene to - a plugin, callbacks methods are called when maps are shared with plugins.A - coder will probably want to runs specific code when the user share a map with - his plugin. To do so, \textbf{VisualPlugin} provides the following callback - methods that the code only have to overload: - \begin{itemize} - \item \texttt{void cb\_recievedMap(MapHandler* map)} - \item \texttt{void cb\_removingMap(MapHandler* map)} - \end{itemize} - The two methods are respectively called when the user shares the map handled by - the map handler given as a parameter with the current plugin. - \paragraph{} - The \textbf{VisualPlugin} class maintains a list \texttt{l\_map} containing the - references to all the map handlers that handle the map shared with the plugin. - Be sure \textbf{not to} remove any element of this list with you own code. The - only permitted operation that could be allowed are sorting or re-ordering the - list. - \paragraph{} - Finally it's important that you know that the \texttt{cb\_recievedMap()} is - called \textbf{after} the map handler is added to \texttt{l\_map} and that - \texttt{cb\_removingMap()} is called \textbf{before} the map handler is removed - from this list. -\end{document} \ No newline at end of file diff --git a/SCHNApps_old/doc/LaTeX/overview.toc b/SCHNApps_old/doc/LaTeX/overview.toc deleted file mode 100644 index 539d96071291b2697ec84ee63ced39ee319c0c86..0000000000000000000000000000000000000000 --- a/SCHNApps_old/doc/LaTeX/overview.toc +++ /dev/null @@ -1,56 +0,0 @@ -\select@language {english} -\contentsline {chapter}{\numberline {1}Introduction and purposes}{3}{chapter.1} -\contentsline {section}{\numberline {1.1}CGoGN}{3}{section.1.1} -\contentsline {subsection}{\numberline {1.1.1}What is CGoGN library ?}{3}{subsection.1.1.1} -\contentsline {subsection}{\numberline {1.1.2}CGoGN and visualization?}{3}{subsection.1.1.2} -\contentsline {section}{\numberline {1.2}The project}{3}{section.1.2} -\contentsline {subsection}{\numberline {1.2.1}CGoGN in space?}{3}{subsection.1.2.1} -\contentsline {subsection}{\numberline {1.2.2}Plugins and CGoGN?}{4}{subsection.1.2.2} -\contentsline {chapter}{\numberline {2}The project}{5}{chapter.2} -\contentsline {section}{\numberline {2.1}Work}{5}{section.2.1} -\contentsline {subsection}{\numberline {2.1.1}Specifications}{5}{subsection.2.1.1} -\contentsline {subsection}{\numberline {2.1.2}Additional features}{5}{subsection.2.1.2} -\contentsline {subsection}{\numberline {2.1.3}Third party libraries}{6}{subsection.2.1.3} -\contentsline {section}{\numberline {2.2}Quick presentation}{6}{section.2.2} -\contentsline {subsection}{\numberline {2.2.1}The main application}{6}{subsection.2.2.1} -\contentsline {subsection}{\numberline {2.2.2}The import plugin}{13}{subsection.2.2.2} -\contentsline {subsection}{\numberline {2.2.3}The camera path plugin}{15}{subsection.2.2.3} -\contentsline {chapter}{\numberline {3}How to write plugins?}{19}{chapter.3} -\contentsline {section}{\numberline {3.1}Basics and concepts}{19}{section.3.1} -\contentsline {subsection}{\numberline {3.1.1}Visualization concepts}{19}{subsection.3.1.1} -\contentsline {paragraph}{Plugin:}{19}{section*.44} -\contentsline {paragraph}{Scene:}{19}{section*.45} -\contentsline {paragraph}{View:}{19}{section*.46} -\contentsline {paragraph}{Camera:}{19}{section*.47} -\contentsline {subsection}{\numberline {3.1.2}The first plugin}{20}{subsection.3.1.2} -\contentsline {subsubsection}{How to write the plugin}{20}{section*.52} -\contentsline {paragraph}{firstPlugin.h}{21}{section*.55} -\contentsline {paragraph}{firstPlugin.cpp}{23}{section*.57} -\contentsline {subsubsection}{Compilation}{25}{section*.58} -\contentsline {paragraph}{CMakeLists.txt}{25}{section*.61} -\contentsline {subsubsection}{Using the plugin}{26}{section*.63} -\contentsline {subsection}{\numberline {3.1.3}Tricks and advice}{28}{subsection.3.1.3} -\contentsline {subsubsection}{Understanding the callBacks}{28}{section*.68} -\contentsline {subsubsection}{Bug \& Debug}{29}{section*.70} -\contentsline {paragraph}{Common bug:}{29}{section*.71} -\contentsline {paragraph}{Debug:}{29}{section*.72} -\contentsline {section}{\numberline {3.2}Going further\dots }{30}{section.3.2} -\contentsline {subsection}{\numberline {3.2.1}Few words on plugins}{30}{subsection.3.2.1} -\contentsline {subsection}{\numberline {3.2.2}Objects and visualization plugins}{30}{subsection.3.2.2} -\contentsline {subsubsection}{Scene:}{30}{section*.77} -\contentsline {paragraph}{Automatic creation:}{31}{section*.79} -\contentsline {paragraph}{Call-back on scene linking:}{31}{section*.80} -\contentsline {subsubsection}{View:}{32}{section*.82} -\contentsline {subsubsection}{Camera:}{33}{section*.85} -\contentsline {subsection}{\numberline {3.2.3}GUI and user interactions}{34}{subsection.3.2.3} -\contentsline {subsubsection}{Custom widgets and menu entries}{34}{section*.87} -\contentsline {paragraph}{Custom menu entries:}{34}{section*.89} -\contentsline {paragraph}{Custom toolbar buttons:}{35}{section*.90} -\contentsline {paragraph}{Custom widgets:}{35}{section*.91} -\contentsline {subsubsection}{User interactions}{36}{section*.92} -\contentsline {subsection}{\numberline {3.2.4}Maps and VBOs}{36}{subsection.3.2.4} -\contentsline {subsubsection}{Map and VBO handling types}{36}{section*.95} -\contentsline {paragraph}{MapHandler:}{37}{section*.98} -\contentsline {paragraph}{VBOHandler:}{38}{section*.99} -\contentsline {subsubsection}{Sharing maps}{39}{section*.100} -\contentsline {subsubsection}{Plugins maps callback}{40}{section*.103} diff --git a/SCHNApps_old/doc/Video/cameraQuickPathDemo.webm b/SCHNApps_old/doc/Video/cameraQuickPathDemo.webm deleted file mode 100644 index ead7fb0bf6c3392c9fb1ebea5ea0c6c1f7612b5d..0000000000000000000000000000000000000000 Binary files a/SCHNApps_old/doc/Video/cameraQuickPathDemo.webm and /dev/null differ diff --git a/SCHNApps_old/forms/cameraViewDialog.ui b/SCHNApps_old/forms/cameraViewDialog.ui deleted file mode 100644 index 8df40ace61ba8ecc713ccdfff9c1326115dad50e..0000000000000000000000000000000000000000 --- a/SCHNApps_old/forms/cameraViewDialog.ui +++ /dev/null @@ -1,52 +0,0 @@ - - - CameraViewDialog - - - - 0 - 0 - 168 - 331 - - - - CameraViewDialog - - - - - - true - - - - - - - OK - - - - - - - - - OKButton - clicked() - CameraViewDialog - accept() - - - 115 - 407 - - - 115 - 214 - - - - - diff --git a/SCHNApps_old/forms/camerasDialog.ui b/SCHNApps_old/forms/camerasDialog.ui deleted file mode 100644 index f14cda8c8a5a494cc925ff51bd9feaacfd8cc5af..0000000000000000000000000000000000000000 --- a/SCHNApps_old/forms/camerasDialog.ui +++ /dev/null @@ -1,87 +0,0 @@ - - - CamerasDialog - - - - 0 - 0 - 287 - 332 - - - - CamerasDialog - - - - - - - - Add - - - - - - - Remove - - - - - - - - - - Name - - - - - Ortho - - - - - Draw - - - - - Draw path - - - - - - - - OK - - - - - - - - - OKButton - clicked() - CamerasDialog - accept() - - - 115 - 407 - - - 115 - 214 - - - - - diff --git a/SCHNApps_old/forms/mapsDialog.ui b/SCHNApps_old/forms/mapsDialog.ui deleted file mode 100644 index 85aaec5725d2b6cf080ba4a55ce559e0d8dcf6be..0000000000000000000000000000000000000000 --- a/SCHNApps_old/forms/mapsDialog.ui +++ /dev/null @@ -1,226 +0,0 @@ - - - MapsDialog - - - - 0 - 0 - 558 - 418 - - - - MapsDialog - - - - - - - - - 0 - 0 - - - - - - - - Refresh info - - - - - - - Remove - - - - - - - - - 0 - - - - DART - - - - - - - - Nb orbits : - - - - - - - - - - Nb cells : - - - - - - - - - - - - - - - - VERTEX - - - - - - - - Nb orbits : - - - - - - - - - - Nb cells : - - - - - - - - - - - - - - - - EDGE - - - - - - - - Nb orbits : - - - - - - - - - - Nb cells : - - - - - - - - - - - - - - - - FACE - - - - - - - - Nb orbits : - - - - - - - - - - Nb cells : - - - - - - - - - - - - - - - - VOLUME - - - - - - - - Nb orbits : - - - - - - - - - - Nb cells : - - - - - - - - - - - - - - - - - - - - diff --git a/SCHNApps_old/forms/mapsViewDialog.ui b/SCHNApps_old/forms/mapsViewDialog.ui deleted file mode 100644 index f176d3e7a8395d95ee1328ad0738cc8bab18f8f8..0000000000000000000000000000000000000000 --- a/SCHNApps_old/forms/mapsViewDialog.ui +++ /dev/null @@ -1,58 +0,0 @@ - - - MapsViewDialog - - - - 0 - 0 - 168 - 331 - - - - MapsViewDialog - - - - - - true - - - QAbstractItemView::MultiSelection - - - QListView::ListMode - - - - - - - OK - - - - - - - - - OKButton - clicked() - MapsViewDialog - accept() - - - 115 - 407 - - - 115 - 214 - - - - - diff --git a/SCHNApps_old/forms/pluginsDialog.ui b/SCHNApps_old/forms/pluginsDialog.ui deleted file mode 100644 index 31dd34ec49c66d38f2e1ff3a4ed51044e8b8ca1a..0000000000000000000000000000000000000000 --- a/SCHNApps_old/forms/pluginsDialog.ui +++ /dev/null @@ -1,83 +0,0 @@ - - - PluginsDialog - - - - 0 - 0 - 301 - 434 - - - - PluginsDialog - - - - - - Register plugin directory - - - - - - - - - - - 0 - 0 - - - - - 100 - 0 - - - - OK - - - - - - - - - button_OK - pressed() - PluginsDialog - accept() - - - 339 - 276 - - - 199 - 149 - - - - - PluginsDialog - rejected() - PluginsDialog - accept() - - - 332 - 180 - - - 332 - 180 - - - - - diff --git a/SCHNApps_old/forms/pluginsViewDialog.ui b/SCHNApps_old/forms/pluginsViewDialog.ui deleted file mode 100644 index 2183a31d2572aaa62af56b0fa28acd6796848a90..0000000000000000000000000000000000000000 --- a/SCHNApps_old/forms/pluginsViewDialog.ui +++ /dev/null @@ -1,55 +0,0 @@ - - - PluginsViewDialog - - - - 0 - 0 - 168 - 331 - - - - PluginsViewDialog - - - - - - true - - - QAbstractItemView::MultiSelection - - - - - - - OK - - - - - - - - - OKButton - clicked() - PluginsViewDialog - accept() - - - 115 - 407 - - - 115 - 214 - - - - - diff --git a/SCHNApps_old/forms/window.ui b/SCHNApps_old/forms/window.ui deleted file mode 100644 index ce4825f9d413eae9d71c92088c556e2f70b90689..0000000000000000000000000000000000000000 --- a/SCHNApps_old/forms/window.ui +++ /dev/null @@ -1,150 +0,0 @@ - - - Window - - - - 0 - 0 - 1000 - 800 - - - - SCHNApps - - - - :/icons/cgogn/cgogn2.png:/icons/cgogn/cgogn2.png - - - - - - 0 - 0 - 1000 - 23 - - - - - File - - - - - - - - - - Help - - - - - - - - - - - toolBar - - - TopToolBarArea - - - false - - - - - - - - About CGoGN - - - - - About SCHNApps - - - - - Quit - - - - - - :/icons/icons/plugins.png:/icons/icons/plugins.png - - - Manage plugins - - - - - - :/icons/icons/cameras.png:/icons/icons/cameras.png - - - Manage cameras - - - - - Show/Hide Plugins Dock - - - - - - :/icons/icons/maps.png:/icons/icons/maps.png - - - ManageMaps - - - Manage maps - - - - - Show/Hide Python Dock - - - - - Load Python Script - - - Ctrl+P - - - - - - - - - actionQuit - triggered() - Window - close() - - - -1 - -1 - - - 399 - 299 - - - - - diff --git a/SCHNApps_old/include/camera.h b/SCHNApps_old/include/camera.h deleted file mode 100644 index 7abbcc4ae2cbc5b69f1698873b440b47a58cbdbe..0000000000000000000000000000000000000000 --- a/SCHNApps_old/include/camera.h +++ /dev/null @@ -1,83 +0,0 @@ -#ifndef _CAMERA_H_ -#define _CAMERA_H_ - -#include "view.h" -#include "QGLViewer/camera.h" - -namespace CGoGN -{ - -namespace SCHNApps -{ - -class Window; - -class Camera : public qglviewer::Camera -{ - Q_OBJECT - -public: - static unsigned int cameraCount; - - Camera(const QString& name, Window* window); - ~Camera(); - const QString& getName() const { return m_name; } - -public slots: - QString getName() { return m_name; } - void setName(const QString& name) { m_name = name; } - - Window* getWindow() const { return m_window; } - void setWindow(Window* w) { m_window = w; } - - bool isUsed() const { return !l_views.empty(); } - bool isShared() const { return l_views.size() > 1; } - - qglviewer::Camera::Type getType() { return type(); } - void changeType(qglviewer::Camera::Type type); - - /********************************************************* - * CAMERA DRAWING - *********************************************************/ - - bool getDraw() const { return m_draw; } - void setDraw(bool b); - - bool getDrawPath() const { return m_drawPath; } - void setDrawPath(bool b); - - /********************************************************* - * MANAGE LINKED VIEWS - *********************************************************/ - -public: - void linkView(View* view); - void unlinkView(View* view); - const QList& getLinkedViews() const { return l_views; } - bool isLinkedToView(View* view) const { return l_views.contains(view); } - - /********************************************************* - * SNAPSHOTS - *********************************************************/ - -public slots: - void resetSnapCount() { m_snapCount = 0; } - void saveSnapshot(QString snapPathName); - -protected: - QString m_name; - Window* m_window; - - QList l_views; - - bool m_draw; - bool m_drawPath; - - int m_snapCount; -}; - -} // namespace SCHNApps - -} // namespace CGoGN - -#endif diff --git a/SCHNApps_old/include/colorComboBox.h b/SCHNApps_old/include/colorComboBox.h deleted file mode 100644 index 6d8da3967310f15b722be800fc03ce8426f7b9b9..0000000000000000000000000000000000000000 --- a/SCHNApps_old/include/colorComboBox.h +++ /dev/null @@ -1,28 +0,0 @@ -#ifndef COLORCOMBOBOX_H -#define COLORCOMBOBOX_H - -#include - -class QColor; -class QWidget; - -class ColorComboBox : public QComboBox -{ - Q_OBJECT - Q_PROPERTY(QColor color READ color WRITE setColor USER true) - -public: - QColor color() const; - void setColor(QColor c); - -public: - ColorComboBox(QWidget *widget = 0); - -private: - void populateList(); - -public slots: - void slotHighlight(int index); -}; - -#endif diff --git a/SCHNApps_old/include/dialogs/cameraViewDialog.h b/SCHNApps_old/include/dialogs/cameraViewDialog.h deleted file mode 100644 index 35608135ff2d4af4e2854adccea45128c54f66cf..0000000000000000000000000000000000000000 --- a/SCHNApps_old/include/dialogs/cameraViewDialog.h +++ /dev/null @@ -1,43 +0,0 @@ -#ifndef _CAMERAVIEWDIALOG_H_ -#define _CAMERAVIEWDIALOG_H_ - -#include "ui_cameraViewDialog.h" - -namespace CGoGN -{ - -namespace SCHNApps -{ - -class Window; -class Camera; -class View; - -class CameraViewDialog : public QDialog, Ui::CameraViewDialog -{ - Q_OBJECT - -public: - CameraViewDialog(Window* window, View* view); - ~CameraViewDialog(); - -private: - Window* m_window; - View* m_view; - bool b_refreshingUI; - - void selectCurrentCamera(); - -public slots: - void selectedCameraChanged(); - void selectCamera(View* view, Camera* camera); - void deselectCamera(View* view, Camera* camera); - void addCameraToList(Camera* c); - void removeCameraFromList(Camera* c); -}; - -} // namespace SCHNApps - -} // namespace CGoGN - -#endif diff --git a/SCHNApps_old/include/dialogs/camerasDialog.h b/SCHNApps_old/include/dialogs/camerasDialog.h deleted file mode 100644 index 4b3439729f56454bf5110e84d866ed721e47f60a..0000000000000000000000000000000000000000 --- a/SCHNApps_old/include/dialogs/camerasDialog.h +++ /dev/null @@ -1,44 +0,0 @@ -#ifndef _CAMERASDIALOG_H_ -#define _CAMERASDIALOG_H_ - -#include "ui_camerasDialog.h" -#include "view.h" - -namespace CGoGN -{ - -namespace SCHNApps -{ - -class Window; -class Camera; - -class CamerasDialog : public QDialog, Ui::CamerasDialog -{ - Q_OBJECT - -public: - CamerasDialog(Window* window); - ~CamerasDialog(); - -private: - Window* m_window; - bool b_refreshingUI; - -public slots: - void setCameraType(const QString& name, qglviewer::Camera::Type type); - void setDrawCamera(const QString& name, bool b); - void setDrawCameraPath(const QString& name, bool b); - - void cb_addCamera(); - void cb_removeCameras(); - void cb_addCameraToList(Camera* c); - void cb_removeCameraFromList(Camera* c); - void cb_itemChanged(QTreeWidgetItem* item, int column); -}; - -} // namespace SCHNApps - -} // namespace CGoGN - -#endif diff --git a/SCHNApps_old/include/dialogs/mapsDialog.h b/SCHNApps_old/include/dialogs/mapsDialog.h deleted file mode 100644 index f8e131f064747bd87b204abf0b9de4ad66155bff..0000000000000000000000000000000000000000 --- a/SCHNApps_old/include/dialogs/mapsDialog.h +++ /dev/null @@ -1,40 +0,0 @@ -#ifndef _MAPSDIALOG_H_ -#define _MAPSDIALOG_H_ - -#include "ui_mapsDialog.h" - -namespace CGoGN -{ - -namespace SCHNApps -{ - -class Window; -class MapHandlerGen; - -class MapsDialog : public QDialog, Ui::MapsDialog -{ - Q_OBJECT - -public: - MapsDialog(Window* window); - ~MapsDialog(); - -private: - Window* m_window; - - void clearInfo(); - -public slots: - void removeMap(); - void selectedMapChanged(); - void toggleVBO(QListWidgetItem* item); - void addMapToList(MapHandlerGen* m); - void removeMapFromList(MapHandlerGen* m); -}; - -} // namespace SCHNApps - -} // namespace CGoGN - -#endif diff --git a/SCHNApps_old/include/dialogs/mapsViewDialog.h b/SCHNApps_old/include/dialogs/mapsViewDialog.h deleted file mode 100644 index 6bc77567fb4cfa55205557c2283b7aafc611f434..0000000000000000000000000000000000000000 --- a/SCHNApps_old/include/dialogs/mapsViewDialog.h +++ /dev/null @@ -1,41 +0,0 @@ -#ifndef _MAPSVIEWDIALOG_H_ -#define _MAPSVIEWDIALOG_H_ - -#include "ui_mapsViewDialog.h" - -namespace CGoGN -{ - -namespace SCHNApps -{ - -class Window; -class View; -class MapHandlerGen; - -class MapsViewDialog : public QDialog, Ui::MapsViewDialog -{ - Q_OBJECT - -public: - MapsViewDialog(Window* window, View* view); - ~MapsViewDialog(); - -private: - Window* m_window; - View* m_view; - bool b_refreshingUI; - -public slots: - void selectedMapsChanged(); - void selectMap(View* view, MapHandlerGen* m); - void deselectMap(View* view, MapHandlerGen* m); - void addMapToList(MapHandlerGen* m); - void removeMapFromList(MapHandlerGen* m); -}; - -} // namespace SCHNApps - -} // namespace CGoGN - -#endif diff --git a/SCHNApps_old/include/dialogs/pluginsDialog.h b/SCHNApps_old/include/dialogs/pluginsDialog.h deleted file mode 100644 index 2f3b08008ecec33679fa013afd07dfcb99784966..0000000000000000000000000000000000000000 --- a/SCHNApps_old/include/dialogs/pluginsDialog.h +++ /dev/null @@ -1,43 +0,0 @@ -#ifndef _PLUGINSDIALOG_H_ -#define _PLUGINSDIALOG_H_ - -#include "ui_pluginsDialog.h" - -#include "types.h" - -namespace CGoGN -{ - -namespace SCHNApps -{ - -class Window; - -class PluginsDialog : public QDialog, public Ui::PluginsDialog -{ - Q_OBJECT - -public: - PluginsDialog(Window* window); - ~PluginsDialog(); - - void refreshPluginsList(); - -protected: - Window* m_window; - - bool b_refreshingUI; - -protected slots: - void registerPluginsDirectory(); - void togglePlugin(QListWidgetItem* item); - - void checkPlugin(Plugin* plugin); - void uncheckPlugin(Plugin* plugin); -}; - -} // namespace SCHNApps - -} // namespace CGoGN - -#endif diff --git a/SCHNApps_old/include/dialogs/pluginsViewDialog.h b/SCHNApps_old/include/dialogs/pluginsViewDialog.h deleted file mode 100644 index 76a3f578dcf930294104150ddd95d8cc246febfe..0000000000000000000000000000000000000000 --- a/SCHNApps_old/include/dialogs/pluginsViewDialog.h +++ /dev/null @@ -1,41 +0,0 @@ -#ifndef _PLUGINSVIEWDIALOG_H_ -#define _PLUGINSVIEWDIALOG_H_ - -#include "ui_pluginsViewDialog.h" - -namespace CGoGN -{ - -namespace SCHNApps -{ - -class Window; -class View; -class Plugin; - -class PluginsViewDialog : public QDialog, Ui::PluginsViewDialog -{ - Q_OBJECT - -public: - PluginsViewDialog(Window* window, View* view); - ~PluginsViewDialog(); - -private: - Window* m_window; - View* m_view; - bool b_refreshingUI; - -public slots: - void selectedPluginsChanged(); - void selectPlugin(View* view, Plugin* plugin); - void deselectPlugin(View* view, Plugin* plugin); - void addPluginToList(Plugin* p); - void removePluginFromList(Plugin* p); -}; - -} // namespace SCHNApps - -} // namespace CGoGN - -#endif diff --git a/SCHNApps_old/include/mapHandler.h b/SCHNApps_old/include/mapHandler.h deleted file mode 100644 index 7787cf1e0878b73e5689923034ce2fe9da9558cf..0000000000000000000000000000000000000000 --- a/SCHNApps_old/include/mapHandler.h +++ /dev/null @@ -1,172 +0,0 @@ -#ifndef _MAPHANDLER_H_ -#define _MAPHANDLER_H_ - -#include - -#include "types.h" -#include "view.h" -#include "plugin.h" - -#include "Topology/generic/genericmap.h" -#include "Topology/generic/attribmap.h" -#include "Topology/generic/functor.h" -#include "Topology/generic/attributeHandler.h" -#include "Utils/vbo.h" -#include "Algo/Render/GL2/mapRender.h" -#include "Algo/Geometry/boundingbox.h" - -namespace CGoGN -{ - -namespace SCHNApps -{ - -class MapHandlerGen : public QObject -{ - Q_OBJECT - -public: - MapHandlerGen(const QString& name, Window* window, GenericMap* map); - virtual ~MapHandlerGen(); - - inline const QString& getName() const { return m_name; } - -public slots: - inline QString getName() { return m_name; } - inline void setName(const QString& name) { m_name = name; } - - inline Window* getWindow() const { return m_window; } - inline void setWindow(Window* w) { m_window = w; } - - inline GenericMap* getGenericMap() const { return m_map; } - - inline const qglviewer::Vec& getBBmin() const { return m_bbMin; } - inline const qglviewer::Vec& getBBmax() const { return m_bbMax; } - inline float getBBdiagSize() const { return m_bbDiagSize; } - - inline bool isUsed() const { return !l_views.empty(); } - -public: - virtual void draw(Utils::GLSLShader* shader, int primitive) = 0; - - inline void setPrimitiveDirty(int primitive) { m_render->setPrimitiveDirty(primitive); } - - /********************************************************* - * MANAGE ATTRIBUTES - *********************************************************/ - - template - AttributeHandler getAttribute(const QString& nameAttr, bool onlyRegistered = true) const; - - template - AttributeHandler addAttribute(const QString& nameAttr, bool registerAttr = true); - - template - inline void registerAttribute(const AttributeHandler& ah); - - inline QString getAttributeTypeName(unsigned int orbit, const QString& nameAttr) const; - - inline const AttributeHash& getAttributesList(unsigned int orbit) const { return h_attribs[orbit]; } - - template - inline void notifyAttributeModification(const AttributeHandler& attr) - { - QString nameAttr = QString::fromStdString(attr.name()); - if(h_vbo.contains(nameAttr)) - h_vbo[nameAttr]->updateData(attr); - - emit(attributeModified(ORBIT, nameAttr)); - - foreach(View* view, l_views) - view->updateGL(); - } - - inline void notifyConnectivityModification() - { - m_render->setPrimitiveDirty(Algo::Render::GL2::POINTS); - m_render->setPrimitiveDirty(Algo::Render::GL2::LINES); - m_render->setPrimitiveDirty(Algo::Render::GL2::TRIANGLES); - - emit(connectivityModified()); - - foreach(View* view, l_views) - view->updateGL(); - } - - /********************************************************* - * MANAGE VBOs - *********************************************************/ - - template - Utils::VBO* createVBO(const ATTR_HANDLER& attr); - - template - void updateVBO(const ATTR_HANDLER& attr); - - Utils::VBO* getVBO(const QString& name) const; - inline QList getVBOList() const { return h_vbo.values(); } - void deleteVBO(const QString& name); - - /********************************************************* - * MANAGE LINKED VIEWS - *********************************************************/ - - void linkView(View* view); - void unlinkView(View* view); - inline const QList& getLinkedViews() const { return l_views; } - inline bool isLinkedToView(View* view) const { return l_views.contains(view); } - -protected: - QString m_name; - Window* m_window; - GenericMap* m_map; - - Algo::Render::GL2::MapRender* m_render; - - qglviewer::Vec m_bbMin; - qglviewer::Vec m_bbMax; - float m_bbDiagSize; - - QList l_views; - - VBOHash h_vbo; - AttributeHash h_attribs[NB_ORBITS]; - -signals: - void connectivityModified(); - - void attributeAdded(unsigned int orbit, const QString& nameAttr); - void attributeModified(unsigned int orbit, QString nameAttr); - - void vboAdded(Utils::VBO* vbo); - void vboRemoved(Utils::VBO* vbo); -}; - -template -class MapHandler : public MapHandlerGen -{ -public: - MapHandler(const QString& name, Window* window, typename PFP::MAP* map) : - MapHandlerGen(name, window, map) - {} - - ~MapHandler() - { - if (m_map) - delete m_map; - } - - void draw(Utils::GLSLShader* shader, int primitive); - - inline typename PFP::MAP* getMap() { return static_cast(m_map); } - - void updateBB(const VertexAttribute& position); -}; - -} // namespace SCHNApps - -} // namespace CGoGN - -#include "mapHandler.hpp" - -#endif diff --git a/SCHNApps_old/include/mapHandler.hpp b/SCHNApps_old/include/mapHandler.hpp deleted file mode 100644 index 049ec6238b0a45491bca9be26661824d2efa3284..0000000000000000000000000000000000000000 --- a/SCHNApps_old/include/mapHandler.hpp +++ /dev/null @@ -1,92 +0,0 @@ - -namespace CGoGN -{ - -namespace SCHNApps -{ - -template -AttributeHandler MapHandlerGen::getAttribute(const QString& nameAttr, bool onlyRegistered) const -{ - if(onlyRegistered) - { - if(h_attribs[ORBIT].contains(nameAttr)) - return static_cast(m_map)->getAttribute(nameAttr.toStdString()); - else - return AttributeHandler(); - } - else - return static_cast(m_map)->getAttribute(nameAttr.toStdString()); -} - -template -AttributeHandler MapHandlerGen::addAttribute(const QString& nameAttr, bool registerAttr) -{ - AttributeHandler ah = static_cast(m_map)->addAttribute(nameAttr.toStdString()); - if(ah.isValid() && registerAttr) - { - registerAttribute(ah); - emit(attributeAdded(ORBIT, nameAttr)); - } - return ah; -} - -template -inline void MapHandlerGen::registerAttribute(const AttributeHandler& ah) -{ - h_attribs[ORBIT].insert(QString::fromStdString(ah.name()), QString::fromStdString(nameOfType(T()))); -} - -inline QString MapHandlerGen::getAttributeTypeName(unsigned int orbit, const QString& nameAttr) const -{ - if(h_attribs[orbit].contains(nameAttr)) - return h_attribs[orbit][nameAttr]; - else - return ""; -} - -template -Utils::VBO* MapHandlerGen::createVBO(const ATTR_HANDLER& attr) -{ - QString name = QString::fromStdString(attr.name()); - Utils::VBO* vbo = getVBO(name); - if(!vbo) - { - vbo = new Utils::VBO(attr.name()); - vbo->updateData(attr); - h_vbo.insert(name, vbo); - emit(vboAdded(vbo)); - } - return vbo; -} - -template -inline void MapHandlerGen::updateVBO(const ATTR_HANDLER& attr) -{ - Utils::VBO* vbo = getVBO(QString::fromStdString(attr.name())); - if(vbo) - vbo->updateData(attr); -} - - - -template -void MapHandler::draw(Utils::GLSLShader* shader, int primitive) -{ - if(!m_render->isPrimitiveUpToDate(primitive)) - m_render->initPrimitives(*(static_cast(m_map)), primitive) ; - m_render->draw(shader, primitive); -} - -template -void MapHandler::updateBB(const VertexAttribute& position) -{ - CGoGN::Geom::BoundingBox bb = CGoGN::Algo::Geometry::computeBoundingBox(*(static_cast(m_map)), position); - m_bbMin = qglviewer::Vec(bb.min()[0], bb.min()[1], bb.min()[2]); - m_bbMax = qglviewer::Vec(bb.max()[0], bb.max()[1], bb.max()[2]); - m_bbDiagSize = (m_bbMax - m_bbMin).norm(); -} - -} // namespace SCHNApps - -} // namespace CGoGN diff --git a/SCHNApps_old/include/plugin.h b/SCHNApps_old/include/plugin.h deleted file mode 100644 index 41e70fa5afc2dd64a818dfd10b90d4b9824a8d5b..0000000000000000000000000000000000000000 --- a/SCHNApps_old/include/plugin.h +++ /dev/null @@ -1,115 +0,0 @@ -#ifndef _PLUGIN_H_ -#define _PLUGIN_H_ - -#include -#include - -#include "types.h" - -namespace CGoGN -{ - -namespace SCHNApps -{ - -class Window; - -class Plugin : public QObject -{ - Q_OBJECT - -public: - Plugin(); - virtual ~Plugin(); - - const QString& getName() const { return m_name; } - -public slots: - QString getName() { return m_name; } - void setName(const QString& name) { m_name = name; } - - const QString& getFilePath() { return m_filePath; } - void setFilePath(const QString& f) { m_filePath = f; } - - Window* getWindow() { return m_window; } - void setWindow(Window* w) { m_window = w; } - - bool isUsed() const { return !l_views.empty(); } - - bool getProvidesRendering() { return b_providesRendering; } - void setProvidesRendering(bool b) { b_providesRendering = b; } - -public: - virtual bool enable() = 0; - virtual void disable() = 0; - - virtual void redraw(View* view) = 0; - - virtual void keyPress(View* view, QKeyEvent* event) = 0; - virtual void keyRelease(View* view, QKeyEvent* event) = 0; - virtual void mousePress(View* view, QMouseEvent* event) = 0; - virtual void mouseRelease(View* view, QMouseEvent* event) = 0; - virtual void mouseMove(View* view, QMouseEvent* event) = 0; - virtual void wheelEvent(View* view, QWheelEvent* event) = 0; - - /********************************************************* - * MANAGE LINKED VIEWS - *********************************************************/ - - void linkView(View* view); - void unlinkView(View* view); - const QList& getLinkedViews() const { return l_views; } - bool isLinkedToView(View* view) const { return l_views.contains(view); } - - /********************************************************* - * MANAGE SHADERS - *********************************************************/ - - void registerShader(Utils::GLSLShader* shader); - void unregisterShader(Utils::GLSLShader* shader); - const QList getShaders() const { return l_shaders; } - - /********************************************************* - * MANAGE DOCK TABS - *********************************************************/ - - bool addTabInDock(QWidget* tabWidget, const QString& tabText); - void removeTabInDock(QWidget* tabWidget); - const QList& getTabWidgets() const { return l_tabWidgets; } - - /********************************************************* - * MANAGE MENU ACTIONS - *********************************************************/ - - bool addMenuAction(const QString& menuPath, QAction* action); - void removeMenuAction(QAction* action); - - /********************************************************* - * MANAGE TOOLBAR ACTIONS - *********************************************************/ - - bool addToolbarAction(QAction* action); - void removeToolbarAction(QAction* action); - -protected: - QString m_name; - QString m_filePath; - Window* m_window; - - bool b_providesRendering; - - QList l_views; - QList l_tabWidgets; - QList l_menuActions; - QList l_toolbarActions; - - QList l_shaders; -}; - -} // namespace SCHNApps - -} // namespace CGoGN - -Q_DECLARE_INTERFACE(CGoGN::SCHNApps::Plugin, "CGoGN.SCHNapps.Plugin") - -#endif diff --git a/SCHNApps_old/include/texture.h b/SCHNApps_old/include/texture.h deleted file mode 100644 index 7e54e385a8ba2ae41c77f198c5cdde1f87a0d3f8..0000000000000000000000000000000000000000 --- a/SCHNApps_old/include/texture.h +++ /dev/null @@ -1,27 +0,0 @@ -#ifndef _TEXTURE_H_ -#define _TEXTURE_H_ - -namespace CGoGN -{ - -namespace SCHNApps -{ - -struct Texture -{ - Texture(GLuint id, const QSize& s, unsigned int r) : - texID(id), - size(s), - ref(r) - {} - - GLuint texID; - QSize size; - unsigned int ref; -}; - -} // namespace SCHNApps - -} // namespace CGoGN - -#endif diff --git a/SCHNApps_old/include/types.h b/SCHNApps_old/include/types.h deleted file mode 100644 index 62465ca0060b57fb26dd770ada1671a740366e66..0000000000000000000000000000000000000000 --- a/SCHNApps_old/include/types.h +++ /dev/null @@ -1,55 +0,0 @@ -#ifndef _TYPES_H_ -#define _TYPES_H_ - -#include -#include -#include - -#include "Topology/generic/parameters.h" -#include "Topology/map/embeddedMap2.h" -#include "Topology/map/embeddedMap3.h" - -namespace CGoGN -{ - -namespace Utils -{ -class VBO; -class GLSLShader; -} - -struct PFP2: public PFP_STANDARD -{ - typedef EmbeddedMap2 MAP; -}; - -struct PFP3: public PFP_STANDARD -{ - typedef EmbeddedMap3 MAP; -}; - -namespace SCHNApps -{ - -class Plugin; -class View; -class Camera; -class MapHandlerGen; -struct Texture; - -typedef QHash PluginHash; -typedef QHash ViewHash; -typedef QHash CameraHash; - -typedef QHash MapHash; -typedef QHash VBOHash; -typedef QHash AttributeHash; -typedef QHash ShaderHash; - -typedef QHash TextureHash; - -} // namespace SCHNApps - -} // namespace CGoGN - -#endif diff --git a/SCHNApps_old/include/view.h b/SCHNApps_old/include/view.h deleted file mode 100644 index 1631ca18cc244455d8ee955678741b682ce4701f..0000000000000000000000000000000000000000 --- a/SCHNApps_old/include/view.h +++ /dev/null @@ -1,150 +0,0 @@ -#ifndef _VIEW_H_ -#define _VIEW_H_ - -#include -#include - -#include "types.h" -#include "window.h" -#include "Utils/gl_matrices.h" - -namespace CGoGN -{ - -namespace SCHNApps -{ - -class ViewButtonArea; -class ViewButton; - -class CameraViewDialog; -class PluginsViewDialog; -class MapsViewDialog; - -class View : public QGLViewer -{ - Q_OBJECT - -public: - static unsigned int viewCount; - - View(const QString& name, Window* w, const QGLWidget* shareWidget = NULL); - ~View(); - - const QString& getName() const { return m_name; } - -public slots: - QString getName() { return m_name; } - void setName(const QString& name) { m_name = name; } - - Window* getWindow() const { return m_window; } - void setWindow(Window* w) { m_window = w; } - - bool isCurrentView() const { return m_window->getCurrentView() == this; } - -public: - virtual void init(); - virtual void preDraw(); - virtual void draw(); - virtual void postDraw(); - virtual void resizeGL(int width, int height); - - void drawText(); - void drawButtons(); - void drawFrame(); - - void keyPressEvent(QKeyEvent* event); - void keyReleaseEvent(QKeyEvent *event); - void mousePressEvent(QMouseEvent* event); - void mouseReleaseEvent(QMouseEvent* event); - void mouseMoveEvent(QMouseEvent* event); - void wheelEvent(QWheelEvent* event); - - /********************************************************* - * MANAGE LINKED CAMERA - *********************************************************/ - -public slots: - Camera* getCurrentCamera() const { return m_currentCamera; } - -public: - void setCurrentCamera(Camera* c); - - /********************************************************* - * MANAGE LINKED PLUGINS - *********************************************************/ - - void linkPlugin(Plugin* plugin); - void unlinkPlugin(Plugin* plugin); - const QList& getLinkedPlugins() const { return l_plugins; } - bool isLinkedToPlugin(Plugin* plugin) const { return l_plugins.contains(plugin); } - - /********************************************************* - * MANAGE LINKED MAPS - *********************************************************/ - - void linkMap(MapHandlerGen* map); - void unlinkMap(MapHandlerGen* map); - const QList& getLinkedMaps() const { return l_maps; } - bool isLinkedToMap(MapHandlerGen* map) const { return l_maps.contains(map); } - - void updateViewBB(); - - /********************************************************* - * MANAGE MATRICES - *********************************************************/ - - glm::mat4 getCurrentModelViewMatrix() const; - glm::mat4 getCurrentProjectionMatrix() const; - glm::mat4 getCurrentModelViewProjectionMatrix() const; - -protected: - QString m_name; - Window* m_window; - - Camera* m_currentCamera; - QList l_plugins; - QList l_maps; - - ViewButtonArea* m_buttonArea; - - ViewButton* m_cameraButton; - ViewButton* m_pluginsButton; - ViewButton* m_mapsButton; - ViewButton* m_closeButton; - ViewButton* m_VsplitButton; - ViewButton* m_HsplitButton; - - QString m_textInfo; - - CameraViewDialog* m_cameraViewDialog; - PluginsViewDialog* m_pluginsViewDialog; - MapsViewDialog* m_mapsViewDialog; - -public slots: - CameraViewDialog* getCameraViewDialog() { return m_cameraViewDialog; } - PluginsViewDialog* getPluginsViewDialog() { return m_pluginsViewDialog; } - MapsViewDialog* getMapsViewDialog() { return m_mapsViewDialog; } - - void cb_cameraView(int x, int y, int globalX, int globalY); - void cb_pluginsView(int x, int y, int globalX, int globalY); - void cb_mapsView(int x, int y, int globalX, int globalY); - void cb_closeView(int x, int y, int globalX, int globalY); - void cb_VsplitView(int x, int y, int globalX, int globalY); - void cb_HsplitView(int x, int y, int globalX, int globalY); - -signals: - void currentCameraChanged(Camera*); - - void mapLinked(MapHandlerGen*); - void mapUnlinked(MapHandlerGen*); - - void pluginLinked(Plugin*); - void pluginUnlinked(Plugin*); -}; - -} // namespace SCHNApps - -} // namespace CGoGN - -#endif diff --git a/SCHNApps_old/include/viewButtonArea.h b/SCHNApps_old/include/viewButtonArea.h deleted file mode 100644 index d65a98f8198e4594b3660fef3e155b02cdffc29d..0000000000000000000000000000000000000000 --- a/SCHNApps_old/include/viewButtonArea.h +++ /dev/null @@ -1,80 +0,0 @@ -#ifndef _VIEWBUTTONAREA_H_ -#define _VIEWBUTTONAREA_H_ - -#include -#include -#include -#include -#include - -#include - -namespace CGoGN -{ - -namespace SCHNApps -{ - -class View; -struct Texture; - -class ViewButton : public QObject -{ - Q_OBJECT - -public: - ViewButton(const QString& image, View* view); - ~ViewButton(); - - QSize getSize(); - - void click(int x, int y, int globalX, int globalY); - void drawAt(int x, int y); - - static const int SIZE = 24; - static const int SPACE = 4; - -protected: - QString m_img; - View* m_view; - Texture* m_tex; - -signals: - void clicked(int x, int y, int globalX, int globalY); -}; - -class ViewButtonArea : public QObject -{ - Q_OBJECT - -public: - ViewButtonArea(View* view) : - m_view(view), - m_form(0,0,0,0) - {} - ~ViewButtonArea() - {} - - void addButton(ViewButton* button); - void removeButton(ViewButton* button); - - bool isClicked(int x, int y); - void clickButton(int x, int y, int globalX, int globalY); - - const QRect& getForm() { return m_form; } - - void setTopRightPosition(int x, int y); - - void draw(); - -protected: - View* m_view; - QRect m_form; - QList l_buttons; -}; - -} // namespace SCHNApps - -} // namespace CGoGN - -#endif diff --git a/SCHNApps_old/include/window.h b/SCHNApps_old/include/window.h deleted file mode 100644 index 5bebf79dda4a5a1ea6bc72d8af6803804a5a741e..0000000000000000000000000000000000000000 --- a/SCHNApps_old/include/window.h +++ /dev/null @@ -1,230 +0,0 @@ -#ifndef _WINDOW_H_ -#define _WINDOW_H_ - -#include "ui_window.h" - -#include "types.h" -#include "PythonQt/PythonQt.h" -#include "PythonQt/gui/PythonQtScriptingConsole.h" - -class QVBoxLayout; -class QSplitter; - -namespace CGoGN -{ - -namespace SCHNApps -{ - -class CamerasDialog; -class PluginsDialog; -class MapsDialog; - -struct Texture; - -class Window : public QMainWindow, Ui::Window -{ - Q_OBJECT - -public: - Window(const QString& appPath, PythonQtObjectPtr& pythonContext, PythonQtScriptingConsole& pythonConsole); - ~Window(); - -public slots: - const QString& getAppPath() { return m_appPath; } - CamerasDialog* getCamerasDialog() { return m_camerasDialog; } - PluginsDialog* getPluginsDialog() { return m_pluginsDialog; } - MapsDialog* getMapsDialog() { return m_mapsDialog; } - - /********************************************************* - * MANAGE DOCK - *********************************************************/ - - QTabWidget* getDockTabWidget() const { return m_dockTabWidget; } - -public: - void addTabInDock(QWidget* tabWidget, const QString& tabText, bool enable); - void removeTabInDock(QWidget* tabWidget); - -public slots: - void enablePluginTabWidgets(Plugin* plugin); - void disablePluginTabWidgets(Plugin* plugin); - - /********************************************************* - * MANAGE MENU ACTIONS - *********************************************************/ - -public: - bool addMenuAction(const QString& menuPath, QAction* action); - void removeMenuAction(QAction* action); - - /********************************************************* - * MANAGE TOOLBAR ACTIONS - *********************************************************/ - - bool addToolbarAction(QAction* action); - void removeToolbarAction(QAction* action); - - /********************************************************* - * MANAGE CAMERAS - *********************************************************/ - - Camera* addCamera(const QString& name); - Camera* addCamera(); - void removeCamera(const QString& name); - -public slots: - Camera* getCamera(const QString& name) const; - -public: - QList getCamerasList() const { return h_cameras.values(); } - const CameraHash& getCamerasHash() const { return h_cameras; } - - /********************************************************* - * MANAGE VIEWS - *********************************************************/ - - View* addView(const QString& name); - View* addView(); - void removeView(const QString& name); - -public slots: - View* getView(const QString& name) const; - -public: - QList getViewsList() const { return h_views.values(); } - const ViewHash& getViewsHash() const { return h_views; } - - View* getCurrentView() const { return m_currentView; } - void setCurrentView(View* view); - - void splitView(const QString& name, Qt::Orientation orientation); - - /********************************************************* - * MANAGE PLUGINS - *********************************************************/ - -public slots: - void registerPluginsDirectory(const QString& path); - - Plugin* loadPlugin(const QString& pluginFilePath); - void unloadPlugin(const QString& pluginName); - - Plugin* getPlugin(const QString& name) const; - QList getPluginsList() const { return h_plugins.values(); } - const PluginHash& getPluginsHash() const { return h_plugins; } - - const QMap& getAvailablePlugins() const { return m_availablePlugins; } - - /********************************************************* - * MANAGE MAPS - *********************************************************/ - -public: - MapHandlerGen* addMap(const QString& name, unsigned int dim); - void removeMap(const QString& name); - -public slots: - MapHandlerGen* getMap(const QString& name) const; - -public: - QList getMapsList() const { return h_maps.values(); } - const MapHash& getMapsHash() const { return h_maps; } - - /********************************************************* - * MANAGE LINKS - *********************************************************/ - -public slots: - void linkViewAndCamera(View* v, Camera* c); - void linkViewAndCamera(const QString& viewName, const QString& cameraName); - - void linkViewAndMap(View* v, MapHandlerGen* m); - void linkViewAndMap(const QString& viewName, const QString& mapName); - void unlinkViewAndMap(View* v, MapHandlerGen* m); - void unlinkViewAndMap(const QString& viewName, const QString& mapName); - - void linkViewAndPlugin(View* v, Plugin* p); - void linkViewAndPlugin(const QString& viewName, const QString& pluginName); - void unlinkViewAndPlugin(View* v, Plugin* p); - void unlinkViewAndPlugin(const QString& viewName, const QString& pluginName); - - /********************************************************* - * MANAGE TEXTURES - *********************************************************/ - -public: - Texture* getTexture(const QString& image); - void releaseTexture(const QString& image); - -protected: - QString m_appPath; - PythonQtObjectPtr& m_pythonContext; - PythonQtScriptingConsole& m_pythonConsole; - - QVBoxLayout* m_centralLayout; - QSplitter* m_rootSplitter; - bool b_rootSplitterInitialized; - - View* m_firstView; - View* m_currentView; - - QDockWidget* m_dock; - QTabWidget* m_dockTabWidget; - - QDockWidget* m_pythonDock; - - QMap m_availablePlugins; - - PluginHash h_plugins; - ViewHash h_views; - CameraHash h_cameras; - MapHash h_maps; - - TextureHash h_textures; - - CamerasDialog* m_camerasDialog; - PluginsDialog* m_pluginsDialog; - MapsDialog* m_mapsDialog; - -public slots: - void cb_aboutSCHNApps(); - void cb_aboutCGoGN(); - - void cb_showHideDock(); - void cb_showHidePythonDock(); - void cb_loadPythonScript(); - - void cb_showCamerasDialog(); - void cb_showPluginsDialog(); - void cb_showMapsDialog(); - -signals: - void cameraAdded(Camera* camera); - void cameraRemoved(Camera* camera); - - void viewAdded(View* view); - void viewRemoved(View* view); - void currentViewChanged(View* view); - - void mapAdded(MapHandlerGen* map); - void mapRemoved(MapHandlerGen* map); - - void pluginLoaded(Plugin* plugin); - void pluginUnloaded(Plugin* plugin); - - void viewAndCameraLinked(View* view, Camera* camera); - void viewAndCameraUnlinked(View* view, Camera* camera); - - void viewAndMapLinked(View* view, MapHandlerGen* map); - void viewAndMapUnlinked(View* view, MapHandlerGen* map); - - void viewAndPluginLinked(View* view, Plugin* plugin); - void viewAndPluginUnlinked(View* view, Plugin* plugin); -}; - -} // namespace SCHNApps - -} // namespace CGoGN - -#endif diff --git a/SCHNApps_old/resources/cgogn/ESA_logo.svg b/SCHNApps_old/resources/cgogn/ESA_logo.svg deleted file mode 100644 index 94425e1394f082245075a9fa10bc238c6fca0591..0000000000000000000000000000000000000000 --- a/SCHNApps_old/resources/cgogn/ESA_logo.svg +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/SCHNApps_old/resources/cgogn/cgogn.svg b/SCHNApps_old/resources/cgogn/cgogn.svg deleted file mode 100644 index 464b256996a85ccf87374db280f3e577e3de561f..0000000000000000000000000000000000000000 --- a/SCHNApps_old/resources/cgogn/cgogn.svg +++ /dev/null @@ -1,696 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - image/svg+xml - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/SCHNApps_old/resources/cgogn/cgogn2.png b/SCHNApps_old/resources/cgogn/cgogn2.png deleted file mode 100644 index 14a75fb8bce858e84ea2b89fbdf9a89fb4dea39c..0000000000000000000000000000000000000000 Binary files a/SCHNApps_old/resources/cgogn/cgogn2.png and /dev/null differ diff --git a/SCHNApps_old/resources/cgogn/cgogn2.svg b/SCHNApps_old/resources/cgogn/cgogn2.svg deleted file mode 100644 index 8ada1fc1cb196364cfbd205a24f24fc094735463..0000000000000000000000000000000000000000 --- a/SCHNApps_old/resources/cgogn/cgogn2.svg +++ /dev/null @@ -1,771 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - image/svg+xml - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/SCHNApps_old/resources/cgogn/icube.png b/SCHNApps_old/resources/cgogn/icube.png deleted file mode 100644 index 9e0deb05d89b2fd0d40076749ee853ecc7b9e386..0000000000000000000000000000000000000000 Binary files a/SCHNApps_old/resources/cgogn/icube.png and /dev/null differ diff --git a/SCHNApps_old/resources/cgogn/igg.png b/SCHNApps_old/resources/cgogn/igg.png deleted file mode 100644 index 616e1e8c1eebf8f7992e186a7ea714099754b856..0000000000000000000000000000000000000000 Binary files a/SCHNApps_old/resources/cgogn/igg.png and /dev/null differ diff --git a/SCHNApps_old/resources/cgogn/splash.png b/SCHNApps_old/resources/cgogn/splash.png deleted file mode 100644 index 4b0a50f716492904d129f04723da250e3f39fa70..0000000000000000000000000000000000000000 Binary files a/SCHNApps_old/resources/cgogn/splash.png and /dev/null differ diff --git a/SCHNApps_old/resources/cgogn/uds.svg b/SCHNApps_old/resources/cgogn/uds.svg deleted file mode 100644 index 24e228aebcfcbe2ec6d8c9c1f2b2cea9341edd5e..0000000000000000000000000000000000000000 --- a/SCHNApps_old/resources/cgogn/uds.svg +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - - - image/svg+xml - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/SCHNApps_old/resources/icons/Hsplit.png b/SCHNApps_old/resources/icons/Hsplit.png deleted file mode 100644 index 4191310e3506662b105cf3b7790221e028243050..0000000000000000000000000000000000000000 Binary files a/SCHNApps_old/resources/icons/Hsplit.png and /dev/null differ diff --git a/SCHNApps_old/resources/icons/Hsplit.svg b/SCHNApps_old/resources/icons/Hsplit.svg deleted file mode 100644 index ef1dc391d24ff71697314e265ecc914548ab9295..0000000000000000000000000000000000000000 --- a/SCHNApps_old/resources/icons/Hsplit.svg +++ /dev/null @@ -1,223 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - image/svg+xml - - - - - - - - - - - - - diff --git a/SCHNApps_old/resources/icons/Vsplit.png b/SCHNApps_old/resources/icons/Vsplit.png deleted file mode 100644 index acabda7ec93320a263ef391b04e1680fc3f24d22..0000000000000000000000000000000000000000 Binary files a/SCHNApps_old/resources/icons/Vsplit.png and /dev/null differ diff --git a/SCHNApps_old/resources/icons/Vsplit.svg b/SCHNApps_old/resources/icons/Vsplit.svg deleted file mode 100644 index 289a20c47fa341e7c95dce4a2fb8e8f944589e06..0000000000000000000000000000000000000000 --- a/SCHNApps_old/resources/icons/Vsplit.svg +++ /dev/null @@ -1,223 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - image/svg+xml - - - - - - - - - - - - - diff --git a/SCHNApps_old/resources/icons/cameras.png b/SCHNApps_old/resources/icons/cameras.png deleted file mode 100644 index cc22aca215fc8c2d23f26d6f6fb2caa18f34af15..0000000000000000000000000000000000000000 Binary files a/SCHNApps_old/resources/icons/cameras.png and /dev/null differ diff --git a/SCHNApps_old/resources/icons/cameras.svg b/SCHNApps_old/resources/icons/cameras.svg deleted file mode 100644 index 5b981a4c6b3d68e0006729bb51ae07cd092bec36..0000000000000000000000000000000000000000 --- a/SCHNApps_old/resources/icons/cameras.svg +++ /dev/null @@ -1,206 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - image/svg+xml - - - - - - - - - - diff --git a/SCHNApps_old/resources/icons/close.png b/SCHNApps_old/resources/icons/close.png deleted file mode 100644 index 66117067cdbd8d7ba6dfdda7a35caa073c36efa2..0000000000000000000000000000000000000000 Binary files a/SCHNApps_old/resources/icons/close.png and /dev/null differ diff --git a/SCHNApps_old/resources/icons/close.svg b/SCHNApps_old/resources/icons/close.svg deleted file mode 100644 index 3aaff679584ff78ce82523303069268b54c90cf2..0000000000000000000000000000000000000000 --- a/SCHNApps_old/resources/icons/close.svg +++ /dev/null @@ -1,231 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - image/svg+xml - - - - - - - - - - - - diff --git a/SCHNApps_old/resources/icons/maps.png b/SCHNApps_old/resources/icons/maps.png deleted file mode 100644 index 262a9fa5f349e8eb148e13b36ece7a1bd618c567..0000000000000000000000000000000000000000 Binary files a/SCHNApps_old/resources/icons/maps.png and /dev/null differ diff --git a/SCHNApps_old/resources/icons/maps.svg b/SCHNApps_old/resources/icons/maps.svg deleted file mode 100644 index 84bf23c422c0229533161d77c3a4187eba6ccace..0000000000000000000000000000000000000000 --- a/SCHNApps_old/resources/icons/maps.svg +++ /dev/null @@ -1,226 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - image/svg+xml - - - - - - - - - - - - - - - diff --git a/SCHNApps_old/resources/icons/plugins.png b/SCHNApps_old/resources/icons/plugins.png deleted file mode 100644 index a67d6e455f35a12b1a94195c44d5a2747118bd9f..0000000000000000000000000000000000000000 Binary files a/SCHNApps_old/resources/icons/plugins.png and /dev/null differ diff --git a/SCHNApps_old/resources/icons/plugins.svg b/SCHNApps_old/resources/icons/plugins.svg deleted file mode 100644 index 5afcd195ea7f5962ba970905238eea3bf3300e1c..0000000000000000000000000000000000000000 --- a/SCHNApps_old/resources/icons/plugins.svg +++ /dev/null @@ -1,224 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - image/svg+xml - - - - - - - - - - - diff --git a/SCHNApps_old/resources/resources.qrc b/SCHNApps_old/resources/resources.qrc deleted file mode 100644 index f8f5adbfe5a7441a7d9c2960dcce54a224d1f1a5..0000000000000000000000000000000000000000 --- a/SCHNApps_old/resources/resources.qrc +++ /dev/null @@ -1,14 +0,0 @@ - - - cgogn/splash.png - - - cgogn/cgogn2.png - icons/cameras.png - icons/plugins.png - icons/maps.png - icons/close.png - icons/Vsplit.png - icons/Hsplit.png - - diff --git a/SCHNApps_old/src/camera.cpp b/SCHNApps_old/src/camera.cpp deleted file mode 100644 index 55c2d20d44361919c2a34586f22814586d16da02..0000000000000000000000000000000000000000 --- a/SCHNApps_old/src/camera.cpp +++ /dev/null @@ -1,72 +0,0 @@ -#include "camera.h" -#include "dialogs/camerasDialog.h" - -namespace CGoGN -{ - -namespace SCHNApps -{ - -unsigned int Camera::cameraCount = 0; - -Camera::Camera(const QString& name, Window* window) : - m_name(name), - m_window(window), - m_draw(false), - m_drawPath(false), - m_snapCount(0) -{ - ++cameraCount; -} - -Camera::~Camera() -{} - -void Camera::changeType(qglviewer::Camera::Type type) -{ - setType(type); - foreach(View* view, m_window->getViewsList()) - view->updateGL(); - - m_window->getCamerasDialog()->setCameraType(m_name, type); -} - -void Camera::setDraw(bool b) -{ - m_draw = b; - foreach(View* view, m_window->getViewsList()) - view->updateGL(); - - m_window->getCamerasDialog()->setDrawCamera(m_name, b); -} - -void Camera::setDrawPath(bool b) -{ - m_drawPath = b; - foreach(View* view, m_window->getViewsList()) - view->updateGL(); - - m_window->getCamerasDialog()->setDrawCameraPath(m_name, b); -} - -void Camera::linkView(View* view) -{ - if(view && !l_views.contains(view)) - l_views.push_back(view); -} - -void Camera::unlinkView(View* view) -{ - l_views.removeOne(view); -} - -void Camera::saveSnapshot(QString snapPathName) -{ - foreach(View* view, l_views) - view->saveSnapshot(snapPathName + view->getName() + '_' + QString::number(m_snapCount) + ".jpg", true); - ++m_snapCount; -} - -} // namespace SCHNApps - -} // namespace CGoGN diff --git a/SCHNApps_old/src/colorComboBox.cpp b/SCHNApps_old/src/colorComboBox.cpp deleted file mode 100644 index 97b18a61d8fc6defcf34d13314be4764b7b9cab2..0000000000000000000000000000000000000000 --- a/SCHNApps_old/src/colorComboBox.cpp +++ /dev/null @@ -1,51 +0,0 @@ -#include - -#include "colorComboBox.h" - -ColorComboBox::ColorComboBox(QWidget *widget) : QComboBox(widget) -{ - //connect( this, SIGNAL(highlighted(int)), this, SLOT(slotHighlight(int)) ); - populateList(); -} - -QColor ColorComboBox::color() const -{ - return qvariant_cast(itemData(currentIndex(), Qt::DecorationRole)); -} - -void ColorComboBox::setColor(QColor color) -{ - setCurrentIndex(findData(color, int(Qt::DecorationRole))); -} - -void ColorComboBox::populateList() -{ - //QStringList colorNames = QColor::colorNames(); - QStringList colorNames; - colorNames << - "red" << - "green" << - "blue" << - "cyan "<< - "magenta" << - "yellow" << - "gray" << - "white" << - "black"; - - for (int i = 0; i < colorNames.size(); ++i) { - QColor color(colorNames[i]); - insertItem(i, colorNames[i]); - setItemData(i, color, Qt::DecorationRole); - } -} - -void ColorComboBox::slotHighlight(int index) -{ - const QStringList colorNames = QColor::colorNames(); - QColor color(colorNames.at(index)); - - QPalette palette = this->palette(); - palette.setColor(QPalette::Highlight, color); - setPalette(palette); -} diff --git a/SCHNApps_old/src/dialogs/cameraViewDialog.cpp b/SCHNApps_old/src/dialogs/cameraViewDialog.cpp deleted file mode 100644 index 5665c90d4b70fdc389063bfb8e0e07169c6f5d77..0000000000000000000000000000000000000000 --- a/SCHNApps_old/src/dialogs/cameraViewDialog.cpp +++ /dev/null @@ -1,113 +0,0 @@ -#include "dialogs/cameraViewDialog.h" - -#include "window.h" -#include "view.h" -#include "camera.h" - -#include -#include - -namespace CGoGN -{ - -namespace SCHNApps -{ - -CameraViewDialog::CameraViewDialog(Window* window, View* view) : - QDialog(view), - m_window(window), - m_view(view), - b_refreshingUI(false) -{ - setupUi(this); - setWindowTitle(m_view->getName() + QString(" : camera")); - - connect(cameraList, SIGNAL(itemSelectionChanged()), this, SLOT(selectedCameraChanged())); - - connect(m_window, SIGNAL(cameraAdded(Camera*)), this, SLOT(addCameraToList(Camera*))); - connect(m_window, SIGNAL(cameraRemoved(Camera*)), this, SLOT(removeCameraFromList(Camera*))); - - connect(m_window, SIGNAL(viewAndCameraLinked(View*, Camera*)), this, SLOT(selectCamera(View*, Camera*))); - connect(m_window, SIGNAL(viewAndCameraUnlinked(View*, Camera*)), this, SLOT(deselectCamera(View*, Camera*))); - - QList cameras = m_window->getCamerasList(); - foreach(Camera* c, cameras) - cameraList->addItem(c->getName()); - - selectCurrentCamera(); -} - -CameraViewDialog::~CameraViewDialog() -{} - -void CameraViewDialog::selectCurrentCamera() -{ - Camera* current = m_view->getCurrentCamera(); - for(int i = 0; i < cameraList->count(); ++i) - { - if(cameraList->item(i)->text() == current->getName()) - cameraList->item(i)->setSelected(true); - else - cameraList->item(i)->setSelected(false); - } -} - -void CameraViewDialog::selectedCameraChanged() -{ - if(!b_refreshingUI) - { - QList currentItems = cameraList->selectedItems(); - if(currentItems.empty()) - selectCurrentCamera(); - else - { - const QString& cname = currentItems[0]->text(); - Camera* c = m_window->getCamera(cname); - m_window->linkViewAndCamera(m_view, c); - } - } -} - -void CameraViewDialog::selectCamera(View* view, Camera* camera) -{ - if(view == m_view) - { - QList items = cameraList->findItems(camera->getName(), Qt::MatchExactly); - if(!items.empty()) - { - b_refreshingUI = true; - items[0]->setSelected(true); - b_refreshingUI = false; - } - } -} - -void CameraViewDialog::deselectCamera(View* view, Camera* camera) -{ - if(view == m_view) - { - QList items = cameraList->findItems(camera->getName(), Qt::MatchExactly); - if(!items.empty()) - { - b_refreshingUI = true; - items[0]->setSelected(false); - b_refreshingUI = false; - } - } -} - -void CameraViewDialog::addCameraToList(Camera* c) -{ - cameraList->addItem(c->getName()); -} - -void CameraViewDialog::removeCameraFromList(Camera* c) -{ - QList items = cameraList->findItems(c->getName(), Qt::MatchExactly); - if(!items.empty()) - delete items[0]; -} - -} // namespace SCHNApps - -} // namespace CGoGN diff --git a/SCHNApps_old/src/dialogs/camerasDialog.cpp b/SCHNApps_old/src/dialogs/camerasDialog.cpp deleted file mode 100644 index ca6a936e0db11b2e8b05cf63e6e036e5308c250f..0000000000000000000000000000000000000000 --- a/SCHNApps_old/src/dialogs/camerasDialog.cpp +++ /dev/null @@ -1,147 +0,0 @@ -#include "dialogs/camerasDialog.h" - -#include "window.h" -#include "camera.h" - -#include -#include - -namespace CGoGN -{ - -namespace SCHNApps -{ - -CamerasDialog::CamerasDialog(Window* window) : - QDialog(window), - m_window(window) -{ - setupUi(this); - setModal(false); - - connect(addCameraButton, SIGNAL(clicked()), this, SLOT(cb_addCamera())); - connect(removeCamerasButton, SIGNAL(clicked()), this, SLOT(cb_removeCameras())); - - connect(m_window, SIGNAL(cameraAdded(Camera*)), this, SLOT(cb_addCameraToList(Camera*))); - connect(m_window, SIGNAL(cameraRemoved(Camera*)), this, SLOT(cb_removeCameraFromList(Camera*))); - - connect(cameraList, SIGNAL(itemChanged(QTreeWidgetItem*,int)), this, SLOT(cb_itemChanged(QTreeWidgetItem*,int))); - - cameraList->resizeColumnToContents(1); - cameraList->resizeColumnToContents(2); - cameraList->resizeColumnToContents(3); -} - -CamerasDialog::~CamerasDialog() -{} - -void CamerasDialog::setCameraType(const QString& name, qglviewer::Camera::Type type) -{ - b_refreshingUI = true; - QList items = cameraList->findItems(name, Qt::MatchExactly); - if(!items.empty()) - { - if(type == qglviewer::Camera::ORTHOGRAPHIC) - items[0]->setCheckState(1, Qt::Checked); - else - items[0]->setCheckState(1, Qt::Unchecked); - } - b_refreshingUI = false; -} - -void CamerasDialog::setDrawCamera(const QString& name, bool b) -{ - b_refreshingUI = true; - QList items = cameraList->findItems(name, Qt::MatchExactly); - if(!items.empty()) - { - if(b) - items[0]->setCheckState(2, Qt::Checked); - else - items[0]->setCheckState(2, Qt::Unchecked); - } - b_refreshingUI = false; -} - -void CamerasDialog::setDrawCameraPath(const QString& name, bool b) -{ - b_refreshingUI = true; - QList items = cameraList->findItems(name, Qt::MatchExactly); - if(!items.empty()) - { - if(b) - items[0]->setCheckState(3, Qt::Checked); - else - items[0]->setCheckState(3, Qt::Unchecked); - } - b_refreshingUI = false; -} - -void CamerasDialog::cb_addCamera() -{ - m_window->addCamera(); -} - -void CamerasDialog::cb_removeCameras() -{ - QList currentItems = cameraList->selectedItems(); - foreach(QTreeWidgetItem* item, currentItems) - { - const QString& cname = item->text(0); - Camera* c = m_window->getCamera(cname); - if(!c->isUsed()) - m_window->removeCamera(cname); - else - QMessageBox::warning(this, tr("Warning"), "Camera " + cname + " is currently used"); - } -} - -void CamerasDialog::cb_addCameraToList(Camera* c) -{ - QTreeWidgetItem* item = new QTreeWidgetItem(QStringList(c->getName())); - item->setFlags(item->flags() | Qt::ItemIsUserCheckable); - item->setCheckState(1, Qt::Unchecked); - item->setCheckState(2, Qt::Unchecked); - item->setCheckState(3, Qt::Unchecked); - cameraList->addTopLevelItem(item); -} - -void CamerasDialog::cb_removeCameraFromList(Camera* c) -{ - QList items = cameraList->findItems(c->getName(), Qt::MatchExactly); - if(!items.empty()) - delete items[0]; -} - -void CamerasDialog::cb_itemChanged(QTreeWidgetItem* item, int column) -{ - if(!b_refreshingUI) - { - Camera *c = m_window->getCamera(item->text(0)); - switch(column) - { - case 1 : - if(item->checkState(1) == Qt::Checked) - c->changeType(qglviewer::Camera::ORTHOGRAPHIC); - else - c->changeType(qglviewer::Camera::PERSPECTIVE); - break; - case 2 : - if(item->checkState(2) == Qt::Checked) - c->setDraw(true); - else - c->setDraw(false); - break; - case 3 : - if(item->checkState(3) == Qt::Checked) - c->setDrawPath(true); - else - c->setDrawPath(false); - break; - } - } -} - -} // namespace SCHNApps - -} // namespace CGoGN diff --git a/SCHNApps_old/src/dialogs/mapsDialog.cpp b/SCHNApps_old/src/dialogs/mapsDialog.cpp deleted file mode 100644 index 9d04c94e60091fce5a54660645c9c85eedddf205..0000000000000000000000000000000000000000 --- a/SCHNApps_old/src/dialogs/mapsDialog.cpp +++ /dev/null @@ -1,191 +0,0 @@ -#include "dialogs/mapsDialog.h" - -#include "window.h" -#include "mapHandler.h" - -#include -#include - -namespace CGoGN -{ - -namespace SCHNApps -{ - -MapsDialog::MapsDialog(Window* window) : - QDialog(window), - m_window(window) -{ - setupUi(this); -// setModal(false); - - connect(button_removeMap, SIGNAL(clicked()), this, SLOT(removeMap())); - connect(button_refreshMapInfo, SIGNAL(clicked()), this, SLOT(selectedMapChanged())); - - connect(mapList, SIGNAL(itemSelectionChanged()), this, SLOT(selectedMapChanged())); - connect(vertexAttributes, SIGNAL(itemChanged(QListWidgetItem*)), this, SLOT(toggleVBO(QListWidgetItem*))); - - connect(m_window, SIGNAL(mapAdded(MapHandlerGen*)), this, SLOT(addMapToList(MapHandlerGen*))); - connect(m_window, SIGNAL(mapRemoved(MapHandlerGen*)), this, SLOT(removeMapFromList(MapHandlerGen*))); -} - -MapsDialog::~MapsDialog() -{} - -void MapsDialog::clearInfo() -{ - dartAttributes->clear(); - vertexAttributes->clear(); - edgeAttributes->clear(); - faceAttributes->clear(); - volumeAttributes->clear(); - lineEdit_dart_orbits->setText(""); - lineEdit_dart_cells->setText(""); - lineEdit_vertex_orbits->setText(""); - lineEdit_vertex_cells->setText(""); - lineEdit_edge_orbits->setText(""); - lineEdit_edge_cells->setText(""); - lineEdit_face_orbits->setText(""); - lineEdit_face_cells->setText(""); -} - -void MapsDialog::removeMap() -{ - QList currentItems = mapList->selectedItems(); - if(!currentItems.empty()) - { - const QString& name = currentItems[0]->text(); - MapHandlerGen* m = m_window->getMap(name); - if(!m->isUsed()) - { - m_window->removeMap(name); - clearInfo(); - } - else - QMessageBox::warning(this, tr("Warning"), "Map is currently used"); - } -} - -void MapsDialog::selectedMapChanged() -{ - clearInfo(); - - QList currentItems = mapList->selectedItems(); - if(!currentItems.empty()) - { - QListWidgetItem* current = currentItems[0]; - - const QString& name = current->text(); - MapHandlerGen* mh = m_window->getMap(name); - GenericMap* m = mh->getGenericMap(); - for(unsigned int orbit = DART; orbit <= VOLUME; ++orbit) - { - unsigned int nbc = m->getNbCells(orbit); - switch(orbit) - { - case DART : { - unsigned int nb = m->getNbDarts(); - lineEdit_dart_orbits->setText(QString::number(nb)); - lineEdit_dart_cells->setText(QString::number(nbc)); - break; - } - case VERTEX : { - unsigned int nb = m->getNbOrbits(); - lineEdit_vertex_orbits->setText(QString::number(nb)); - lineEdit_vertex_cells->setText(QString::number(nbc)); - break; - } - case EDGE : { - unsigned int nb = m->getNbOrbits(); - lineEdit_edge_orbits->setText(QString::number(nb)); - lineEdit_edge_cells->setText(QString::number(nbc)); - break; - } - case FACE : { - unsigned int nb = m->getNbOrbits(); - lineEdit_face_orbits->setText(QString::number(nb)); - lineEdit_face_cells->setText(QString::number(nbc)); - break; - } - case VOLUME : { - unsigned int nb = m->getNbOrbits(); - lineEdit_volume_orbits->setText(QString::number(nb)); - lineEdit_volume_cells->setText(QString::number(nbc)); - break; - } - } - - if(m->isOrbitEmbedded(orbit)) - { - AttributeContainer& cont = m->getAttributeContainer(orbit); - std::vector names; - std::vector types; - cont.getAttributesNames(names); - cont.getAttributesTypes(types); - for(unsigned int i = 0; i < names.size(); ++i) - { - QString name = QString::fromStdString(names[i]); - QString type = QString::fromStdString(types[i]); - switch(orbit) - { - case DART : { - dartAttributes->addItem(name + " (" + type + ")"); - } break; - case VERTEX : { - QListWidgetItem* item = new QListWidgetItem(name + " (" + type + ")", vertexAttributes); - if(mh->getVBO(name)) - item->setCheckState(Qt::Checked); - else - item->setCheckState(Qt::Unchecked); - } break; - case EDGE : { - edgeAttributes->addItem(name + " (" + type + ")"); - } break; - case FACE : { - faceAttributes->addItem(name + " (" + type + ")"); - } break; - case VOLUME : { - volumeAttributes->addItem(name + " (" + type + ")"); - } break; - } - } - } - } - } -} - -void MapsDialog::toggleVBO(QListWidgetItem *item) -{ - QList currentItems = mapList->selectedItems(); - if(!currentItems.empty()) - { -// QListWidgetItem* current = currentItems[0]; -// const QString& mapName = current->text(); -// MapHandlerGen* mh = m_window->getMap(mapName); - - if(item->checkState() == Qt::Checked) - { - - } - else // Unchecked - { - - } - } -} - -void MapsDialog::addMapToList(MapHandlerGen* m) -{ - mapList->addItem(m->getName()); -} - -void MapsDialog::removeMapFromList(MapHandlerGen* m) -{ - QList items = mapList->findItems(m->getName(), Qt::MatchExactly); - if(!items.empty()) - delete items[0]; -} - -} // namespace SCHNApps - -} // namespace CGoGN diff --git a/SCHNApps_old/src/dialogs/mapsViewDialog.cpp b/SCHNApps_old/src/dialogs/mapsViewDialog.cpp deleted file mode 100644 index d45e270da54918074e7d1c303572eb17ef894257..0000000000000000000000000000000000000000 --- a/SCHNApps_old/src/dialogs/mapsViewDialog.cpp +++ /dev/null @@ -1,102 +0,0 @@ -#include "dialogs/mapsViewDialog.h" - -#include "window.h" -#include "view.h" -#include "plugin.h" -#include "mapHandler.h" - -#include -#include - -namespace CGoGN -{ - -namespace SCHNApps -{ - -MapsViewDialog::MapsViewDialog(Window* window, View* view) : - QDialog(view), - m_window(window), - m_view(view), - b_refreshingUI(false) -{ - setupUi(this); - setWindowTitle(m_view->getName() + QString(" : maps")); - - connect(mapList, SIGNAL(itemSelectionChanged()), this, SLOT(selectedMapsChanged())); - - connect(m_window, SIGNAL(mapAdded(MapHandlerGen*)), this, SLOT(addMapToList(MapHandlerGen*))); - connect(m_window, SIGNAL(mapRemoved(MapHandlerGen*)), this, SLOT(removeMapFromList(MapHandlerGen*))); - - connect(m_window, SIGNAL(viewAndMapLinked(View*, MapHandlerGen*)), this, SLOT(selectMap(View*, MapHandlerGen*))); - connect(m_window, SIGNAL(viewAndMapUnlinked(View*, MapHandlerGen*)), this, SLOT(deselectMap(View*, MapHandlerGen*))); - - QList maps = m_window->getMapsList(); - foreach(MapHandlerGen* m, maps) - mapList->addItem(m->getName()); -} - -MapsViewDialog::~MapsViewDialog() -{} - -void MapsViewDialog::selectedMapsChanged() -{ - if(!b_refreshingUI) - { - for(int i = 0; i < mapList->count(); ++i) - { - QString mapName = mapList->item(i)->text(); - MapHandlerGen* map = m_window->getMap(mapName); - - if(mapList->item(i)->isSelected() && !m_view->isLinkedToMap(map)) - m_window->linkViewAndMap(m_view, map); - - else if(!mapList->item(i)->isSelected() && m_view->isLinkedToMap(map)) - m_window->unlinkViewAndMap(m_view, map); - } - } -} - -void MapsViewDialog::selectMap(View* view, MapHandlerGen* m) -{ - if(view == m_view) - { - QList items = mapList->findItems(m->getName(), Qt::MatchExactly); - if(!items.empty()) - { - b_refreshingUI = true; - items[0]->setSelected(true); - b_refreshingUI = false; - } - } -} - -void MapsViewDialog::deselectMap(View* view, MapHandlerGen* m) -{ - if(view == m_view) - { - QList items = mapList->findItems(m->getName(), Qt::MatchExactly); - if(!items.empty()) - { - b_refreshingUI = true; - items[0]->setSelected(false); - b_refreshingUI = false; - } - } -} - -void MapsViewDialog::addMapToList(MapHandlerGen* m) -{ - mapList->addItem(m->getName()); -} - -void MapsViewDialog::removeMapFromList(MapHandlerGen* m) -{ - QList items = mapList->findItems(m->getName(), Qt::MatchExactly); - if(!items.empty()) - delete items[0]; -} - -} // namespace SCHNApps - -} // namespace CGoGN diff --git a/SCHNApps_old/src/dialogs/pluginsDialog.cpp b/SCHNApps_old/src/dialogs/pluginsDialog.cpp deleted file mode 100644 index 1d3c1e1172008b359be506eac3709756d45edd87..0000000000000000000000000000000000000000 --- a/SCHNApps_old/src/dialogs/pluginsDialog.cpp +++ /dev/null @@ -1,119 +0,0 @@ -#include "dialogs/pluginsDialog.h" - -#include -#include - -#include "window.h" -#include "plugin.h" - -namespace CGoGN -{ - -namespace SCHNApps -{ - -PluginsDialog::PluginsDialog(Window* window) : - QDialog(window), - m_window(window), - b_refreshingUI(false) -{ - setupUi(this); - setModal(false); - - connect(button_registerDirectory, SIGNAL(pressed()), this, SLOT(registerPluginsDirectory())); - connect(list_plugins, SIGNAL(itemChanged(QListWidgetItem*)), this, SLOT(togglePlugin(QListWidgetItem*))); - - connect(m_window, SIGNAL(pluginLoaded(Plugin*)), this, SLOT(checkPlugin(Plugin*))); - connect(m_window, SIGNAL(pluginUnloaded(Plugin*)), this, SLOT(uncheckPlugin(Plugin*))); -} - -PluginsDialog::~PluginsDialog() -{} - -void PluginsDialog::refreshPluginsList() -{ - b_refreshingUI = true; - list_plugins->clear(); - const QMap& availablePlugins = m_window->getAvailablePlugins(); - const PluginHash& loadedPlugins = m_window->getPluginsHash(); - for(QMap::const_iterator it = availablePlugins.constBegin(); it != availablePlugins.constEnd(); ++it) - { - QListWidgetItem* item = new QListWidgetItem(it.key(), list_plugins); - if(loadedPlugins.contains(it.key())) - item->setCheckState(Qt::Checked); - else - item->setCheckState(Qt::Unchecked); - } - b_refreshingUI = false; -} - -void PluginsDialog::registerPluginsDirectory() -{ - QString dir = QFileDialog::getExistingDirectory( - this, - tr("Select a directory"), - m_window->getAppPath(), - QFileDialog::ShowDirsOnly | QFileDialog::DontResolveSymlinks - ); - - if (!dir.isEmpty()) - m_window->registerPluginsDirectory(dir); -} - -void PluginsDialog::togglePlugin(QListWidgetItem* item) -{ - if(!b_refreshingUI) - { - if(item->checkState() == Qt::Checked) - { - Plugin* p = m_window->loadPlugin(item->text()); - if (!p) - { - b_refreshingUI = true; - item->setCheckState(Qt::Unchecked); - b_refreshingUI = false; - } - } - else // Unchecked - { - Plugin* p = m_window->getPlugin(item->text()); - if (p) - { - if(p->isUsed()) - { - QMessageBox::warning(this, tr("Warning"), "Plugin is currently used"); - b_refreshingUI = true; - item->setCheckState(Qt::Checked); - b_refreshingUI = false; - return; - } - else - m_window->unloadPlugin(item->text()); - } - } - } -} - -void PluginsDialog::checkPlugin(Plugin* plugin) -{ - b_refreshingUI = true; - QString name = plugin->getName(); - QList items = list_plugins->findItems(name, Qt::MatchExactly); - if(!items.empty()) - items[0]->setCheckState(Qt::Checked); - b_refreshingUI = false; -} - -void PluginsDialog::uncheckPlugin(Plugin* plugin) -{ - b_refreshingUI = true; - QString name = plugin->getName(); - QList items = list_plugins->findItems(name, Qt::MatchExactly); - if(!items.empty()) - items[0]->setCheckState(Qt::Unchecked); - b_refreshingUI = false; -} - -} // namespace SCHNApps - -} // namespace CGoGN diff --git a/SCHNApps_old/src/dialogs/pluginsViewDialog.cpp b/SCHNApps_old/src/dialogs/pluginsViewDialog.cpp deleted file mode 100644 index 468dae09a1648265cff7681a8959d8305c510809..0000000000000000000000000000000000000000 --- a/SCHNApps_old/src/dialogs/pluginsViewDialog.cpp +++ /dev/null @@ -1,107 +0,0 @@ -#include "dialogs/pluginsViewDialog.h" - -#include "window.h" -#include "view.h" -#include "plugin.h" - -#include -#include - -namespace CGoGN -{ - -namespace SCHNApps -{ - -PluginsViewDialog::PluginsViewDialog(Window* window, View* view) : - QDialog(view), - m_window(window), - m_view(view), - b_refreshingUI(false) -{ - setupUi(this); - setWindowTitle(m_view->getName() + QString(" : plugins")); - - connect(pluginList, SIGNAL(itemSelectionChanged()), this, SLOT(selectedPluginsChanged())); - - connect(m_window, SIGNAL(pluginLoaded(Plugin*)), this, SLOT(addPluginToList(Plugin*))); - connect(m_window, SIGNAL(pluginUnloaded(Plugin*)), this, SLOT(removePluginFromList(Plugin*))); - - connect(m_window, SIGNAL(viewAndPluginLinked(View*, Plugin*)), this, SLOT(selectPlugin(View*, Plugin*))); - connect(m_window, SIGNAL(viewAndPluginUnlinked(View*, Plugin*)), this, SLOT(deselectPlugin(View*, Plugin*))); - - QList plugins = m_window->getPluginsList(); - foreach(Plugin* p, plugins) - { - if(p->getProvidesRendering()) - pluginList->addItem(p->getName()); - } -} - -PluginsViewDialog::~PluginsViewDialog() -{} - -void PluginsViewDialog::selectedPluginsChanged() -{ - if(!b_refreshingUI) - { - for(int i = 0; i < pluginList->count(); ++i) - { - QString pluginName = pluginList->item(i)->text(); - Plugin* plugin = m_window->getPlugin(pluginName); - if(pluginList->item(i)->isSelected() && !m_view->isLinkedToPlugin(plugin)) - m_window->linkViewAndPlugin(m_view, plugin); - - else if(!pluginList->item(i)->isSelected() && m_view->isLinkedToPlugin(plugin)) - m_window->unlinkViewAndPlugin(m_view, plugin); - } - } -} - -void PluginsViewDialog::selectPlugin(View* view, Plugin* plugin) -{ - if(view == m_view) - { - QList items = pluginList->findItems(plugin->getName(), Qt::MatchExactly); - if(!items.empty()) - { - b_refreshingUI = true; - items[0]->setSelected(true); - b_refreshingUI = false; - } - } -} - -void PluginsViewDialog::deselectPlugin(View* view, Plugin* plugin) -{ - if(view == m_view) - { - QList items = pluginList->findItems(plugin->getName(), Qt::MatchExactly); - if(!items.empty()) - { - b_refreshingUI = true; - items[0]->setSelected(false); - b_refreshingUI = false; - } - } -} - -void PluginsViewDialog::addPluginToList(Plugin* p) -{ - if(p->getProvidesRendering()) - pluginList->addItem(p->getName()); -} - -void PluginsViewDialog::removePluginFromList(Plugin* p) -{ - if(p->getProvidesRendering()) - { - QList items = pluginList->findItems(p->getName(), Qt::MatchExactly); - if(!items.empty()) - delete items[0]; - } -} - -} // namespace SCHNApps - -} // namespace CGoGN diff --git a/SCHNApps_old/src/main.cpp b/SCHNApps_old/src/main.cpp deleted file mode 100644 index c25178bedd5ae3ff9415ce0ccf5ec1e9f75f8960..0000000000000000000000000000000000000000 --- a/SCHNApps_old/src/main.cpp +++ /dev/null @@ -1,41 +0,0 @@ -#include -#include "window.h" -#include -#include "PythonQt/PythonQt.h" -#include "PythonQt/gui/PythonQtScriptingConsole.h" - -int main(int argc, char* argv[]) -{ - QApplication app(argc, argv); - - QSplashScreen* splash = new QSplashScreen(QPixmap(":splash/cgogn/splash.png")); - splash->show(); - splash->showMessage("Welcome to SCHNApps", Qt::AlignBottom | Qt::AlignCenter); - - // init PythonQt and Python itself - PythonQt::init(); - - QStringList classNames; - classNames.append("View"); - classNames.append("Camera"); - classNames.append("Plugin"); - classNames.append("MapHandlerGen"); - PythonQt::self()->registerQObjectClassNames(classNames); - - // get a smart pointer to the __main__ module of the Python interpreter - PythonQtObjectPtr pythonContext = PythonQt::self()->getMainModule(); - PythonQtScriptingConsole pythonConsole(NULL, pythonContext); - - CGoGN::SCHNApps::Window schnapps(app.applicationDirPath(), pythonContext, pythonConsole); - schnapps.show(); - - pythonContext.addObject("schnapps", &schnapps); - QFileInfo fi(app.applicationDirPath() + QString("/schnappsInit.py")); - if(fi.exists()) - pythonContext.evalFile(fi.filePath()); - - splash->finish(&schnapps); - delete splash; - - return app.exec(); -} diff --git a/SCHNApps_old/src/mapHandler.cpp b/SCHNApps_old/src/mapHandler.cpp deleted file mode 100644 index 461c93e59ac232eac595cc9bf0953051bf0aab27..0000000000000000000000000000000000000000 --- a/SCHNApps_old/src/mapHandler.cpp +++ /dev/null @@ -1,63 +0,0 @@ -#include "mapHandler.h" - -namespace CGoGN -{ - -namespace SCHNApps -{ - -MapHandlerGen::MapHandlerGen(const QString& name, Window* window, GenericMap* map) : - m_name(name), - m_window(window), - m_map(map) -{ - m_render = new Algo::Render::GL2::MapRender(); -} - -MapHandlerGen::~MapHandlerGen() -{ - foreach(CGoGN::Utils::VBO* vbo, h_vbo) - delete vbo; -} - -/********************************************************* - * MANAGE VBOs - *********************************************************/ - -Utils::VBO* MapHandlerGen::getVBO(const QString& name) const -{ - if (h_vbo.contains(name)) - return h_vbo[name]; - else - return NULL; -} - -void MapHandlerGen::deleteVBO(const QString& name) -{ - if (h_vbo.contains(name)) - { - Utils::VBO* vbo = h_vbo[name]; - h_vbo.remove(name); - emit(vboRemoved(vbo)); - delete vbo; - } -} - -/********************************************************* - * MANAGE LINKED VIEWS - *********************************************************/ - -void MapHandlerGen::linkView(View* view) -{ - if(view && !l_views.contains(view)) - l_views.push_back(view); -} - -void MapHandlerGen::unlinkView(View* view) -{ - l_views.removeOne(view); -} - -} // namespace SCHNApps - -} // namespace CGoGN diff --git a/SCHNApps_old/src/plugin.cpp b/SCHNApps_old/src/plugin.cpp deleted file mode 100644 index 708a23768210a3ca3d8242172a3d3c3630a2dc67..0000000000000000000000000000000000000000 --- a/SCHNApps_old/src/plugin.cpp +++ /dev/null @@ -1,136 +0,0 @@ -#include "plugin.h" - -#include - -#include "window.h" -#include "Utils/GLSLShader.h" - -namespace CGoGN -{ - -namespace SCHNApps -{ - -Plugin::Plugin() : - m_window(NULL), - b_providesRendering(false) -{ - glewInit(); -} - -Plugin::~Plugin() -{ - foreach(View* view, l_views) - unlinkView(view); - - foreach(QWidget* tabWidget, l_tabWidgets) - removeTabInDock(tabWidget); - - foreach(QAction* action, l_menuActions) - removeMenuAction(action); - - foreach(QAction* action, l_toolbarActions) - removeToolbarAction(action); -} - -/********************************************************* - * MANAGE LINKED VIEWS - *********************************************************/ - -void Plugin::linkView(View* view) -{ - if(view && !l_views.contains(view)) - l_views.push_back(view); -} - -void Plugin::unlinkView(View* view) -{ - l_views.removeOne(view); -} - -/********************************************************* - * MANAGE SHADERS - *********************************************************/ - -void Plugin::registerShader(Utils::GLSLShader* shader) -{ - if(shader && !l_shaders.contains(shader)) - l_shaders.push_back(shader); -} - -void Plugin::unregisterShader(Utils::GLSLShader* shader) -{ - l_shaders.removeOne(shader); -} - -/********************************************************* - * MANAGE DOCK TABS - *********************************************************/ - -bool Plugin::addTabInDock(QWidget* tabWidget, const QString& tabText) -{ - if(tabWidget && !l_tabWidgets.contains(tabWidget)) - { - // tab created by plugins that do not provide rendering are always enabled, - // the other are enabled only if they are linked to the current view - m_window->addTabInDock(tabWidget, tabText, !b_providesRendering); - l_tabWidgets.push_back(tabWidget); - return true; - } - else - return false; -} - -void Plugin::removeTabInDock(QWidget* tabWidget) -{ - if(l_tabWidgets.removeOne(tabWidget)) - m_window->removeTabInDock(tabWidget); -} - -/********************************************************* - * MANAGE MENU ACTIONS - *********************************************************/ - -bool Plugin::addMenuAction(const QString& menuPath, QAction* action) -{ - if(action && !l_menuActions.contains(action)) - { - m_window->addMenuAction(menuPath, action); - l_menuActions.push_back(action); - return true; - } - else - return false; -} - -void Plugin::removeMenuAction(QAction* action) -{ - if(l_menuActions.removeOne(action)) - m_window->removeMenuAction(action); -} - -/********************************************************* - * MANAGE TOOLBAR ACTIONS - *********************************************************/ - -bool Plugin::addToolbarAction(QAction* action) -{ - if(action && !l_toolbarActions.contains(action)) - { - m_window->addToolbarAction(action); - l_toolbarActions.push_back(action); - return true; - } - else - return false; -} - -void Plugin::removeToolbarAction(QAction* action) -{ - if(l_toolbarActions.removeOne(action)) - m_window->removeToolbarAction(action); -} - -} // namespace SCHNApps - -} // namespace CGoGN diff --git a/SCHNApps_old/src/view.cpp b/SCHNApps_old/src/view.cpp deleted file mode 100644 index 763544d3b9380fc2f13821272c7dcb8f2d04a5ea..0000000000000000000000000000000000000000 --- a/SCHNApps_old/src/view.cpp +++ /dev/null @@ -1,401 +0,0 @@ -#include "view.h" - -#include "plugin.h" -#include "camera.h" -#include "viewButtonArea.h" -#include "mapHandler.h" - -#include "dialogs/cameraViewDialog.h" -#include "dialogs/pluginsViewDialog.h" -#include "dialogs/mapsViewDialog.h" - -#include "Utils/GLSLShader.h" -#include "Algo/Geometry/boundingbox.h" - -#include -#include -#include - -namespace CGoGN -{ - -namespace SCHNApps -{ - -unsigned int View::viewCount = 0; - -View::View(const QString& name, Window* w, const QGLWidget* shareWidget) : - QGLViewer(NULL, shareWidget), - m_name(name), - m_window(w), - m_cameraButton(NULL), - m_pluginsButton(NULL), - m_mapsButton(NULL), - m_closeButton(NULL) -{ - ++viewCount; - - m_currentCamera = m_window->addCamera(); - - m_cameraViewDialog = new CameraViewDialog(m_window, this); - m_pluginsViewDialog = new PluginsViewDialog(m_window, this); - m_mapsViewDialog = new MapsViewDialog(m_window, this); -} - -View::~View() -{ - m_currentCamera->unlinkView(this); - - qglviewer::Camera* c = new qglviewer::Camera(); - this->setCamera(c); - - foreach(Plugin* plugin, l_plugins) - { - plugin->unlinkView(this); -// unlinkPlugin(plugin); - } - - foreach(MapHandlerGen* map, l_maps) - { - map->unlinkView(this); -// unlinkMap(map); - } - - delete m_buttonArea; -} - -void View::init() -{ - m_buttonArea = new ViewButtonArea(this); - m_buttonArea->setTopRightPosition(this->width(), 0); - - m_cameraButton = new ViewButton(":icons/icons/cameras.png", this); - m_buttonArea->addButton(m_cameraButton); - connect(m_cameraButton, SIGNAL(clicked(int, int, int, int)), this, SLOT(cb_cameraView(int, int, int, int))); - - m_pluginsButton = new ViewButton(":icons/icons/plugins.png", this); - m_buttonArea->addButton(m_pluginsButton); - connect(m_pluginsButton, SIGNAL(clicked(int, int, int, int)), this, SLOT(cb_pluginsView(int, int, int, int))); - - m_mapsButton = new ViewButton(":icons/icons/maps.png", this); - m_buttonArea->addButton(m_mapsButton); - connect(m_mapsButton, SIGNAL(clicked(int, int, int, int)), this, SLOT(cb_mapsView(int, int, int, int))); - - m_VsplitButton = new ViewButton(":icons/icons/Vsplit.png", this); - m_buttonArea->addButton(m_VsplitButton); - connect(m_VsplitButton, SIGNAL(clicked(int, int, int, int)), this, SLOT(cb_VsplitView(int, int, int, int))); - - m_HsplitButton = new ViewButton(":icons/icons/Hsplit.png", this); - m_buttonArea->addButton(m_HsplitButton); - connect(m_HsplitButton, SIGNAL(clicked(int, int, int, int)), this, SLOT(cb_HsplitView(int, int, int, int))); - - m_closeButton = new ViewButton(":icons/icons/close.png", this); - m_buttonArea->addButton(m_closeButton); - connect(m_closeButton, SIGNAL(clicked(int, int, int, int)), this, SLOT(cb_closeView(int, int, int, int))); - - qglviewer::Camera* c = this->camera(); - this->setCamera(m_currentCamera); - delete c; - - this->setBackgroundColor(QColor(0,0,0)); -} - -void View::preDraw() -{ - m_currentCamera->setScreenWidthAndHeight(width(), height()); - - glm::mat4 mm = getCurrentModelViewMatrix(); - glm::mat4 pm = getCurrentProjectionMatrix(); - foreach(Plugin* plugin, l_plugins) - { - const QList& shaders = plugin->getShaders(); - foreach(CGoGN::Utils::GLSLShader* shader, shaders) - shader->updateMatrices(pm, mm); - } - - QGLViewer::preDraw(); -} - -void View::draw() -{ - QList cameras = m_window->getCamerasList(); - foreach(Camera* camera, cameras) - { - if(camera != m_currentCamera) - { - if(camera->getDraw()) camera->draw(); - if(camera->getDrawPath()) camera->drawAllPaths(); - } - } - - foreach(Plugin* plugin, l_plugins) - plugin->redraw(this); -} - -void View::postDraw() -{ - glPushAttrib(GL_ALL_ATTRIB_BITS); - drawButtons(); - if(isCurrentView()) - drawFrame(); - glPopAttrib(); - - QGLViewer::postDraw(); -} - -void View::resizeGL(int width, int height) -{ - QGLViewer::resizeGL(width, height); - if(m_buttonArea) - m_buttonArea->setTopRightPosition(width, 0); -} - -void View::drawButtons() -{ - glEnable(GL_TEXTURE_2D); - startScreenCoordinatesSystem(); - m_buttonArea->draw(); - stopScreenCoordinatesSystem(); - glDisable(GL_TEXTURE_2D); -} - -void View::drawFrame() -{ - startScreenCoordinatesSystem(); - glColor3f(0.0f, 1.0f, 0.0f); - glLineWidth(2.0); - glBegin(GL_LINE_LOOP); - glVertex2i(1, 1); - glVertex2i(1, height()-1); - glVertex2i(width()-1, height()-1); - glVertex2i(width()-1, 1); - glEnd(); - stopScreenCoordinatesSystem(); -} - -void View::keyPressEvent(QKeyEvent* event) -{ - foreach(Plugin* plugin, l_plugins) - plugin->keyPress(this, event); - QGLViewer::keyPressEvent(event); -} - -void View::keyReleaseEvent(QKeyEvent *event) -{ - foreach(Plugin* plugin, l_plugins) - plugin->keyRelease(this, event); - QGLViewer::keyReleaseEvent(event); -} - -void View::mousePressEvent(QMouseEvent* event) -{ - if(!isCurrentView()) - m_window->setCurrentView(this); - - if(m_buttonArea->isClicked(event->x(), event->y())) - m_buttonArea->clickButton(event->x(), event->y(), event->globalX(), event->globalY()); - else - { - foreach(Plugin* plugin, l_plugins) - plugin->mousePress(this, event); - QGLViewer::mousePressEvent(event); - } -} - -void View::mouseReleaseEvent(QMouseEvent* event) -{ - foreach(Plugin* plugin, l_plugins) - plugin->mouseRelease(this, event); - QGLViewer::mouseReleaseEvent(event); -} - -void View::mouseMoveEvent(QMouseEvent* event) -{ - foreach(Plugin* plugin, l_plugins) - plugin->mouseMove(this, event); - QGLViewer::mouseMoveEvent(event); - - QList views = m_currentCamera->getLinkedViews(); - foreach(View* view, views) - { - if(view != this) - view->updateGL(); - } -} - -void View::wheelEvent(QWheelEvent* event) -{ - foreach(Plugin* plugin, l_plugins) - plugin->wheelEvent(this, event); - QGLViewer::wheelEvent(event); - - QList views = m_currentCamera->getLinkedViews(); - foreach(View* view, views) - { - if(view != this) - view->updateGL(); - } -} - -/********************************************************* - * MANAGE LINKED CAMERA - *********************************************************/ - -void View::setCurrentCamera(Camera* c) -{ - if(c != m_currentCamera && c != NULL) - { - m_currentCamera = c; - this->setCamera(m_currentCamera); - emit(currentCameraChanged(c)); - updateGL(); - } -} - -/********************************************************* - * MANAGE LINKED PLUGINS - *********************************************************/ - -void View::linkPlugin(Plugin* plugin) -{ - if(plugin && !l_plugins.contains(plugin)) - { - l_plugins.push_back(plugin); - emit(pluginLinked(plugin)); - } -} - -void View::unlinkPlugin(Plugin* plugin) -{ - if(l_plugins.removeOne(plugin)) - emit(pluginUnlinked(plugin)); -} - -/********************************************************* - * MANAGE LINKED MAPS - *********************************************************/ - -void View::linkMap(MapHandlerGen* map) -{ - if(map && !l_maps.contains(map)) - { - l_maps.push_back(map); - emit(mapLinked(map)); - updateViewBB(); - } -} - -void View::unlinkMap(MapHandlerGen* map) -{ - if(l_maps.removeOne(map)) - { - emit(mapUnlinked(map)); - updateViewBB(); - } -} - -void View::updateViewBB() -{ - qglviewer::Vec bbMin(0,0,0); - qglviewer::Vec bbMax(1,1,1); - if(!l_maps.empty()) - { - bbMin = l_maps[0]->getBBmin(); - bbMax = l_maps[0]->getBBmax(); - for(int i = 1; i < l_maps.size(); ++i) - { - MapHandlerGen* m = l_maps[i]; - qglviewer::Vec min = m->getBBmin(); - qglviewer::Vec max = m->getBBmax(); - for(unsigned int dim = 0; dim < 3; ++dim) - { - if(min[dim] < bbMin[dim]) - bbMin[dim] = min[dim]; - if(max[dim] > bbMax[dim]) - bbMax[dim] = max[dim]; - } - } - } - camera()->setSceneBoundingBox(bbMin, bbMax); - camera()->showEntireScene(); -} - -/********************************************************* - * MANAGE MATRICES - *********************************************************/ - -glm::mat4 View::getCurrentModelViewMatrix() const -{ - GLdouble gl_mvm[16]; - camera()->getModelViewMatrix(gl_mvm); - glm::mat4 mvm; - for(unsigned int i = 0; i < 4; ++i) - { - for(unsigned int j = 0; j < 4; ++j) - mvm[i][j] = (float)gl_mvm[i*4+j]; - } - return mvm; -} - -glm::mat4 View::getCurrentProjectionMatrix() const -{ - GLdouble gl_pm[16]; - camera()->getProjectionMatrix(gl_pm); - glm::mat4 pm; - for(unsigned int i = 0; i < 4; ++i) - { - for(unsigned int j = 0; j < 4; ++j) - pm[i][j] = (float)gl_pm[i*4+j]; - } - return pm; -} - -glm::mat4 View::getCurrentModelViewProjectionMatrix() const -{ - GLdouble gl_mvpm[16]; - camera()->getModelViewProjectionMatrix(gl_mvpm); - glm::mat4 mvpm; - for(unsigned int i = 0; i < 4; ++i) - { - for(unsigned int j = 0; j < 4; ++j) - mvpm[i][j] = (float)gl_mvpm[i*4+j]; - } - return mvpm; -} - -void View::cb_cameraView(int x, int y, int globalX, int globalY) -{ - m_cameraViewDialog->move(globalX, globalY); - m_cameraViewDialog->show(); -} - -void View::cb_pluginsView(int x, int y, int globalX, int globalY) -{ - m_pluginsViewDialog->move(globalX, globalY); - m_pluginsViewDialog->show(); -} - -void View::cb_mapsView(int x, int y, int globalX, int globalY) -{ - m_mapsViewDialog->move(globalX, globalY); - m_mapsViewDialog->show(); -} - -void View::cb_closeView(int x, int y, int globalX, int globalY) -{ - m_window->removeView(m_name); -} - -void View::cb_VsplitView(int x, int y, int globalX, int globalY) -{ - m_window->splitView(m_name, Qt::Horizontal); -} - -void View::cb_HsplitView(int x, int y, int globalX, int globalY) -{ - m_window->splitView(m_name, Qt::Vertical); -} - -} // namespace SCHNApps - -} // namespace CGoGN diff --git a/SCHNApps_old/src/viewButtonArea.cpp b/SCHNApps_old/src/viewButtonArea.cpp deleted file mode 100644 index 53c96661aac9eb6a9abbf566726d741c6b28948d..0000000000000000000000000000000000000000 --- a/SCHNApps_old/src/viewButtonArea.cpp +++ /dev/null @@ -1,117 +0,0 @@ -#include "viewButtonArea.h" - -#include "window.h" -#include "view.h" -#include "texture.h" -#include "camera.h" - -#include - -namespace CGoGN -{ - -namespace SCHNApps -{ - -ViewButton::ViewButton(const QString& image, View* view) : - m_img(image), - m_view(view) -{ - m_tex = m_view->getWindow()->getTexture(m_img); -} - -ViewButton::~ViewButton() -{ - m_view->getWindow()->releaseTexture(m_img); -} - -QSize ViewButton::getSize() -{ - return m_tex->size; -} - -void ViewButton::click(int x, int y, int globalX, int globalY) -{ - emit clicked(x, y, globalX, globalY); -} - -void ViewButton::drawAt(int x, int y) -{ - glBindTexture(GL_TEXTURE_2D, m_tex->texID); - glBegin (GL_QUADS); - glTexCoord2i(0, 1); - glVertex2i(x, y); - glTexCoord2i(0, 0); - glVertex2i(x, y + SIZE); - glTexCoord2i(1, 0); - glVertex2i(x + SIZE, y + SIZE); - glTexCoord2i(1, 1); - glVertex2i(x + SIZE, y); - glEnd(); -} - - - - -void ViewButtonArea::addButton(ViewButton* button) -{ - if(!l_buttons.contains(button)) - { - m_form.setWidth(m_form.width() + ViewButton::SIZE + ViewButton::SPACE); - m_form.moveTopLeft(QPoint(m_form.x() - ViewButton::SIZE - ViewButton::SPACE, m_form.y())); - m_form.setHeight(ViewButton::SIZE + 2 * ViewButton::SPACE); - - l_buttons.push_back(button); - } -} - -void ViewButtonArea::removeButton(ViewButton* button) -{ - if(l_buttons.removeOne(button)) - { - m_form.setWidth(m_form.width() - ViewButton::SIZE - ViewButton::SPACE); - m_form.moveTopLeft(QPoint(m_form.x() + ViewButton::SIZE + ViewButton::SPACE, m_form.y())); - m_form.setHeight(ViewButton::SIZE + 2 * ViewButton::SPACE); - } -} - -bool ViewButtonArea::isClicked(int x, int y) -{ - return m_form.contains(x, y); -} - -void ViewButtonArea::clickButton(int x, int y, int globalX, int globalY) -{ - QPoint p = m_form.topLeft(); - p.setY(p.y() + ViewButton::SPACE); - foreach(ViewButton* b, l_buttons) - { - if(QRect(p, QSize(ViewButton::SIZE, ViewButton::SIZE)).contains(x, y)) - { - b->click(x, y, globalX, globalY); - return; - } - p.setX(p.x() + ViewButton::SPACE + ViewButton::SIZE); - } -} - -void ViewButtonArea::setTopRightPosition(int x, int y) -{ - m_form.moveTopRight(QPoint(x,y)); -} - -void ViewButtonArea::draw() -{ - int p_x = m_form.x(); - int p_y = m_form.y(); - - foreach(ViewButton* b, l_buttons) - { - b->drawAt(p_x, p_y + ViewButton::SPACE); - p_x += ViewButton::SIZE + ViewButton::SPACE; - } -} - -} // namespace SCHNApps - -} // namespace CGoGN diff --git a/SCHNApps_old/src/window.cpp b/SCHNApps_old/src/window.cpp deleted file mode 100644 index bc18764b3f0c9cb50136f6032387b7885e886c61..0000000000000000000000000000000000000000 --- a/SCHNApps_old/src/window.cpp +++ /dev/null @@ -1,780 +0,0 @@ -#include "window.h" - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include "plugin.h" -#include "view.h" -#include "texture.h" -#include "camera.h" -#include "mapHandler.h" - -#include "dialogs/camerasDialog.h" -#include "dialogs/pluginsDialog.h" -#include "dialogs/mapsDialog.h" - -namespace CGoGN -{ - -namespace SCHNApps -{ - -Window::Window(const QString& appPath, PythonQtObjectPtr& pythonContext, PythonQtScriptingConsole& pythonConsole) : - QMainWindow(), - m_appPath(appPath), - m_pythonContext(pythonContext), - m_pythonConsole(pythonConsole), - m_firstView(NULL), - m_currentView(NULL) -{ - m_camerasDialog = new CamerasDialog(this); - m_pluginsDialog = new PluginsDialog(this); - m_mapsDialog = new MapsDialog(this); - - this->setupUi(this); - - m_dock = new QDockWidget(tr("Plugins"), this); - m_dock->setAllowedAreas(Qt::RightDockWidgetArea); - m_dock->setFeatures(QDockWidget::DockWidgetFloatable | QDockWidget::DockWidgetClosable); - - m_dockTabWidget = new QTabWidget(m_dock); - m_dockTabWidget->setObjectName("DockTabWidget"); - m_dockTabWidget->setLayoutDirection(Qt::LeftToRight); - m_dockTabWidget->setTabPosition(QTabWidget::East); - - addDockWidget(Qt::RightDockWidgetArea, m_dock); - m_dock->setVisible(false); - m_dock->setWidget(m_dockTabWidget); - - connect(actionShowHideDock, SIGNAL(triggered()), this, SLOT(cb_showHideDock())); - - m_pythonDock = new QDockWidget(tr("Python"), this); - m_pythonDock->setAllowedAreas(Qt::BottomDockWidgetArea); - m_pythonDock->setFeatures(QDockWidget::DockWidgetFloatable | QDockWidget::DockWidgetClosable); - - addDockWidget(Qt::BottomDockWidgetArea, m_pythonDock); - m_pythonDock->setVisible(false); - m_pythonDock->setWidget(&m_pythonConsole); - - connect(actionShowHidePythonDock, SIGNAL(triggered()), this, SLOT(cb_showHidePythonDock())); - connect(actionLoadPythonScript, SIGNAL(triggered()), this, SLOT(cb_loadPythonScript())); - - m_centralLayout = new QVBoxLayout(centralwidget); - - m_rootSplitter = new QSplitter(centralwidget); - b_rootSplitterInitialized = false; - m_centralLayout->addWidget(m_rootSplitter); - - // add first view - m_firstView = addView(); - setCurrentView(m_firstView); - m_rootSplitter->addWidget(m_firstView); - - glewInit(); - - // connect the basic actions - connect(actionAboutSCHNApps, SIGNAL(triggered()), this, SLOT(cb_aboutSCHNApps())); - connect(actionAboutCGoGN, SIGNAL(triggered()), this, SLOT(cb_aboutCGoGN())); - - connect(actionManageCameras, SIGNAL(triggered()), this, SLOT(cb_showCamerasDialog())); - connect(actionManagePlugins, SIGNAL(triggered()), this, SLOT(cb_showPluginsDialog())); - connect(actionManageMaps, SIGNAL(triggered()), this, SLOT(cb_showMapsDialog())); - - registerPluginsDirectory(m_appPath + QString("/../lib")); -} - -Window::~Window() -{ -} - -/********************************************************* - * MANAGE DOCK - *********************************************************/ - -void Window::addTabInDock(QWidget* tabWidget, const QString& tabText, bool enable) -{ - if(tabWidget) - { - int currentTab = m_dockTabWidget->currentIndex(); - - int idx = m_dockTabWidget->addTab(tabWidget, tabText); - m_dock->setVisible(true); - m_dockTabWidget->setTabEnabled(idx, enable); - - if(currentTab != -1) - m_dockTabWidget->setCurrentIndex(currentTab); - } -} - -void Window::removeTabInDock(QWidget *tabWidget) -{ - if(tabWidget) - m_dockTabWidget->removeTab(m_dockTabWidget->indexOf(tabWidget)); -} - -void Window::enablePluginTabWidgets(Plugin* plugin) -{ - int currentTab = m_dockTabWidget->currentIndex(); - - const QList tabWidgets = plugin->getTabWidgets(); - foreach(QWidget* w, tabWidgets) - m_dockTabWidget->setTabEnabled(m_dockTabWidget->indexOf(w), true); - - m_dockTabWidget->setCurrentIndex(currentTab); -} - -void Window::disablePluginTabWidgets(Plugin* plugin) -{ - int currentTab = m_dockTabWidget->currentIndex(); - - const QList tabWidgets = plugin->getTabWidgets(); - foreach(QWidget* w, tabWidgets) - m_dockTabWidget->setTabEnabled(m_dockTabWidget->indexOf(w), false); - - m_dockTabWidget->setCurrentIndex(currentTab); -} - -/********************************************************* - * MANAGE MENU ACTIONS - *********************************************************/ - -bool Window::addMenuAction(const QString& menuPath, QAction* action) -{ - // if menu path = empty string: set error + failure - if (menuPath.isEmpty()) - return false; - - if (!action) - return false; - - // extracting all the substring separated by ';' - QStringList stepNames = menuPath.split(";"); - stepNames.removeAll(""); - unsigned int nbStep = stepNames.count(); - - // if only one substring: error + failure - // No action directly in the menu bar - if (nbStep < 1) - return false; - - unsigned int i = 0; - QMenu* lastMenu = NULL; - foreach(QString step, stepNames) - { - ++i; - if (i < nbStep) // if not last substring (= menu) - { - // try to find an existing submenu with step name - bool found = false; - QList actions; - if(i == 1) actions = menubar->actions(); - else actions = lastMenu->actions(); - foreach(QAction* action, actions) - { - QMenu* submenu = action->menu(); - if (submenu && submenu->title() == step) - { - lastMenu = submenu; - found = true; - break; - } - } - if (!found) - { - QMenu* newMenu; - if(i == 1) - { - newMenu = menubar->addMenu(step); - newMenu->setParent(menubar); - } - else - { - newMenu = lastMenu->addMenu(step); - newMenu->setParent(lastMenu); - } - lastMenu = newMenu; - } - } - else // if last substring (= action name) - { - lastMenu->addAction(action); - action->setText(step); - action->setParent(lastMenu); - } - } - - return true; -} - -void Window::removeMenuAction(QAction *action) -{ - if(action) - { - action->setEnabled(false); - // parent of the action - // which is an instance of QMenu if the action was created - // using the addMenuActionMethod() - QObject* parent = action->parent(); - delete action; - - while(parent != NULL) - { - QMenu* parentMenu = dynamic_cast(parent); - if(parentMenu && parentMenu->actions().empty()) - { - parent = parent->parent(); - delete parentMenu; - } - else - parent = NULL; - } - } -} - -/********************************************************* - * MANAGE TOOLBAR ACTIONS - *********************************************************/ - -bool Window::addToolbarAction(QAction* action) -{ - if (action) - { - toolBar->addAction(action); - return true; - } - return false; -} - -void Window::removeToolbarAction(QAction* action) -{ - if (action) - toolBar->removeAction(action); -} - -/********************************************************* - * MANAGE CAMERAS - *********************************************************/ - -Camera* Window::addCamera(const QString& name) -{ - if (h_cameras.contains(name)) - return NULL; - - Camera* camera = new Camera(name, this); - h_cameras.insert(name, camera); - - emit(cameraAdded(camera)); - - return camera; -} - -Camera* Window::addCamera() -{ - return addCamera(QString("camera_") + QString::number(Camera::cameraCount)); -} - -void Window::removeCamera(const QString& name) -{ - if (h_cameras.contains(name)) - { - Camera* camera = h_cameras[name]; - h_cameras.remove(name); - - emit(cameraRemoved(camera)); - - delete camera; - } -} - -Camera* Window::getCamera(const QString& name) const -{ - if (h_cameras.contains(name)) - return h_cameras[name]; - else - return NULL; -} - -/********************************************************* - * MANAGE VIEWS - *********************************************************/ - -View* Window::addView(const QString& name) -{ - if (h_views.contains(name)) - return NULL; - - View* view = NULL; - if(m_firstView == NULL) - view = new View(name, this); - else - view = new View(name, this, m_firstView); - h_views.insert(name, view); - - emit(viewAdded(view)); - - return view; -} - -View* Window::addView() -{ - return addView(QString("view_") + QString::number(View::viewCount)); -} - -void Window::removeView(const QString& name) -{ - if (h_views.contains(name)) - { - if(h_views.count() > 1) - { - View* view = h_views[name]; - if(view == m_firstView) - { - ViewHash::const_iterator i = h_views.constBegin(); - while (i != h_views.constEnd()) - { - if(i.value() != view) - { - m_firstView = i.value(); - i = h_views.constEnd(); - } - else - ++i; - } - } -// if(view == m_currentView) - setCurrentView(m_firstView); - h_views.remove(name); - - emit(viewRemoved(view)); - - delete view; - } - } -} - -View* Window::getView(const QString& name) const -{ - if (h_views.contains(name)) - return h_views[name]; - else - return NULL; -} - -void Window::setCurrentView(View* view) -{ - if(m_currentView) - { - const QList& oldPlugins = m_currentView->getLinkedPlugins(); - foreach(Plugin* p, oldPlugins) - disablePluginTabWidgets(p); - - disconnect(m_currentView, SIGNAL(pluginLinked(Plugin*)), this, SLOT(enablePluginTabWidgets(Plugin*))); - disconnect(m_currentView, SIGNAL(pluginUnlinked(Plugin*)), this, SLOT(disablePluginTabWidgets(Plugin*))); - } - - View* oldCurrent = m_currentView; - m_currentView = view; - - const QList& newPlugins = m_currentView->getLinkedPlugins(); - foreach(Plugin* p, newPlugins) - enablePluginTabWidgets(p); - - connect(m_currentView, SIGNAL(pluginLinked(Plugin*)), this, SLOT(enablePluginTabWidgets(Plugin*))); - connect(m_currentView, SIGNAL(pluginUnlinked(Plugin*)), this, SLOT(disablePluginTabWidgets(Plugin*))); - - emit(currentViewChanged(m_currentView)); - - if(oldCurrent) - oldCurrent->updateGL(); - m_currentView->updateGL(); -} - -void Window::splitView(const QString& name, Qt::Orientation orientation) -{ - View* newView = addView(); - - View* view = h_views[name]; - QSplitter* parent = (QSplitter*)(view->parentWidget()); - if(parent == m_rootSplitter && !b_rootSplitterInitialized) - { - m_rootSplitter->setOrientation(orientation); - b_rootSplitterInitialized = true; - } - if(parent->orientation() == orientation) - parent->insertWidget(parent->indexOf(view)+1, newView); - else - { - int idx = parent->indexOf(view); - view->setParent(NULL); - QSplitter* spl = new QSplitter(orientation); - spl->addWidget(view); - spl->addWidget(newView); - parent->insertWidget(idx, spl); - } -} - -/********************************************************* - * MANAGE PLUGINS - *********************************************************/ - -void Window::registerPluginsDirectory(const QString& path) -{ - QDir directory(path); - if(directory.exists()) - { - QStringList filters; - filters << "lib*.so"; - filters << "lib*.dylib"; - filters << "*.dll"; - - QStringList pluginFiles = directory.entryList(filters, QDir::Files); - - foreach(QString pluginFile, pluginFiles) - { - QFileInfo pfi(pluginFile); - QString pluginName = pfi.baseName().remove(0, 3); - QString pluginFilePath = directory.absoluteFilePath(pluginFile); - - m_availablePlugins[pluginName] = pluginFilePath; - } - - m_pluginsDialog->refreshPluginsList(); - } -} - -Plugin* Window::loadPlugin(const QString& pluginName) -{ - if (h_plugins.contains(pluginName)) - return h_plugins[pluginName]; - - if (m_availablePlugins.contains(pluginName)) - { - QString pluginFilePath = m_availablePlugins[pluginName]; - - QPluginLoader loader(pluginFilePath); - - // if the loader loads a plugin instance - if (QObject* pluginObject = loader.instance()) - { - Plugin* plugin = qobject_cast(pluginObject); - - // set the plugin with correct parameters (name, filepath, window) - plugin->setName(pluginName); - plugin->setFilePath(pluginFilePath); - plugin->setWindow(this); - - // then we call its enable() methods - if (plugin->enable()) - { - // if it succeeded we reference this plugin - h_plugins.insert(pluginName, plugin); - - statusbar->showMessage(pluginName + QString(" successfully loaded."), 2000); - emit(pluginLoaded(plugin)); - - // method success - return plugin; - } - else - { - delete plugin; - return NULL; - } - } - // if loading fails - else - { -// std::cout << "loadPlugin: loader.instance() failed" << std::endl << loader.errorString().toStdString() << std::endl; - return NULL; - } - } - else - { -// std::cout << "loadPlugin: plugin not found (" << pluginName.toStdString() << ")" << std::endl; - return NULL; - } -} - -void Window::unloadPlugin(const QString& pluginName) -{ - if (h_plugins.contains(pluginName)) - { - Plugin* plugin = h_plugins[pluginName]; - - // calling its disable() method and dereferencing it - plugin->disable(); - h_plugins.remove(pluginName); - - QPluginLoader loader(plugin->getFilePath()); - loader.unload(); - - statusbar->showMessage(pluginName + QString(" successfully unloaded."), 2000); - emit(pluginUnloaded(plugin)); - - // delete plugin - delete plugin; - } -} - -Plugin* Window::getPlugin(const QString& name) const -{ - if (h_plugins.contains(name)) - return h_plugins[name]; - else - return NULL; -} - -/********************************************************* - * MANAGE MAPS - *********************************************************/ - -MapHandlerGen* Window::addMap(const QString& name, unsigned int dim) -{ - if (h_maps.contains(name)) - return NULL; - - MapHandlerGen* mh = NULL; - switch(dim) - { - case 2 : { - PFP2::MAP* map = new PFP2::MAP(); - mh = new MapHandler(name, this, map); - break; - } - case 3 : { - PFP3::MAP* map = new PFP3::MAP(); - mh = new MapHandler(name, this, map); - break; - } - } - - h_maps.insert(name, mh); - - emit(mapAdded(mh)); - - return mh; -} - -void Window::removeMap(const QString& name) -{ - if (h_maps.contains(name)) - { - MapHandlerGen* map = h_maps[name]; - h_maps.remove(name); - - emit(mapRemoved(map)); - - delete map; - } -} - -MapHandlerGen* Window::getMap(const QString& name) const -{ - if (h_maps.contains(name)) - return h_maps[name]; - else - return NULL; -} - -/********************************************************* - * MANAGE LINKS - *********************************************************/ - -void Window::linkViewAndCamera(View* v, Camera* c) -{ - Camera* current = v->getCurrentCamera(); - current->unlinkView(v); - emit(viewAndCameraUnlinked(v, current)); - - v->setCurrentCamera(c); - - c->linkView(v); - emit(viewAndCameraLinked(v, c)); -} - -void Window::linkViewAndCamera(const QString& viewName, const QString& cameraName) -{ - View* view = getView(viewName); - Camera* camera = getCamera(cameraName); - if(view && camera) - linkViewAndCamera(view, camera); -} - -void Window::linkViewAndMap(View* v, MapHandlerGen* m) -{ - v->linkMap(m); - m->linkView(v); - - emit(viewAndMapLinked(v, m)); - - v->updateGL(); -} - -void Window::linkViewAndMap(const QString& viewName, const QString& mapName) -{ - View* view = getView(viewName); - MapHandlerGen* map = getMap(mapName); - if(view && map) - linkViewAndMap(view, map); -} - -void Window::unlinkViewAndMap(View* v, MapHandlerGen* m) -{ - v->unlinkMap(m); - m->unlinkView(v); - - emit(viewAndMapUnlinked(v, m)); - - v->updateGL(); -} - -void Window::unlinkViewAndMap(const QString& viewName, const QString& mapName) -{ - View* view = getView(viewName); - MapHandlerGen* map = getMap(mapName); - if(view && map) - unlinkViewAndMap(view, map); -} - -void Window::linkViewAndPlugin(View* v, Plugin* p) -{ - v->linkPlugin(p); - p->linkView(v); - - emit(viewAndPluginLinked(v, p)); - - v->updateGL(); -} - -void Window::linkViewAndPlugin(const QString& viewName, const QString& pluginName) -{ - View* view = getView(viewName); - Plugin* plugin = getPlugin(pluginName); - if(view && plugin) - linkViewAndPlugin(view, plugin); -} - -void Window::unlinkViewAndPlugin(View* v, Plugin* p) -{ - v->unlinkPlugin(p); - p->unlinkView(v); - - emit(viewAndPluginUnlinked(v, p)); - - v->updateGL(); -} - -void Window::unlinkViewAndPlugin(const QString& viewName, const QString& pluginName) -{ - View* view = getView(viewName); - Plugin* plugin = getPlugin(pluginName); - if(view && plugin) - unlinkViewAndPlugin(view, plugin); -} - -/********************************************************* - * MANAGE TEXTURES - *********************************************************/ - -Texture* Window::getTexture(const QString& image) -{ - if(h_textures.contains(image)) - { - Texture* t = h_textures[image]; - t->ref++; - return t; - } - else - { - Texture* t = NULL; - QImage img(image); - if(!img.isNull()) - { - GLuint texID = m_firstView->bindTexture(img); - t = new Texture(texID, img.size(), 1); - h_textures.insert(image, t); - } - return t; - } -} - -void Window::releaseTexture(const QString& image) -{ - if(h_textures.contains(image)) - { - Texture* t = h_textures[image]; - t->ref--; - if(t->ref == 0) - { - m_firstView->deleteTexture(h_textures[image]->texID); - h_textures.remove(image); - delete t; - } - } -} - - - -void Window::cb_aboutSCHNApps() -{ - QString str("SCHNApps:\nS... CGoGN Holder for Nice Applications\n" - "Web site: http://cgogn.unistra.fr \n" - "Contact information: cgogn@unistra.fr"); - QMessageBox::about(this, tr("About SCHNApps"), str); -} - -void Window::cb_aboutCGoGN() -{ - QString str("CGoGN:\nCombinatorial and Geometric modeling\n" - "with Generic N-dimensional Maps\n" - "Web site: http://cgogn.unistra.fr \n" - "Contact information: cgogn@unistra.fr"); - QMessageBox::about(this, tr("About CGoGN"), str); -} - -void Window::cb_showHideDock() -{ - m_dock->setVisible(m_dock->isHidden()); -} - -void Window::cb_showHidePythonDock() -{ - m_pythonDock->setVisible(m_pythonDock->isHidden()); -} - -void Window::cb_loadPythonScript() -{ - QString fileName = QFileDialog::getOpenFileName(this, "Load Python script", getAppPath(), "Python script (*.py)"); - QFileInfo fi(fileName); - if(fi.exists()) - m_pythonContext.evalFile(fi.filePath()); -} - -void Window::cb_showCamerasDialog() -{ - m_camerasDialog->show(); -} - -void Window::cb_showPluginsDialog() -{ - m_pluginsDialog->show(); -} - -void Window::cb_showMapsDialog() -{ - m_mapsDialog->show(); -} - -} // namespace SCHNApps - -} // namespace CGoGN