Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
CGoGN
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Thomas Pitiot
CGoGN
Commits
8d771e17
Commit
8d771e17
authored
Jan 26, 2015
by
Sylvain Thery
Browse files
Options
Browse Files
Download
Plain Diff
Merge icube-forge.unistra.fr:cgogn/cgogn
parents
b9808b7c
e50b4eb7
Changes
21
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
21 changed files
with
5276 additions
and
66 deletions
+5276
-66
CMakeLists.txt
CMakeLists.txt
+39
-12
SCHNApps/CMakeLists.txt
SCHNApps/CMakeLists.txt
+2
-4
SCHNApps/Plugins/CMakeLists.txt
SCHNApps/Plugins/CMakeLists.txt
+1
-0
SCHNApps/Plugins/surface_distance/CMakeLists.txt
SCHNApps/Plugins/surface_distance/CMakeLists.txt
+32
-0
SCHNApps/Plugins/surface_distance/forms/dialog_computeDistance.ui
.../Plugins/surface_distance/forms/dialog_computeDistance.ui
+237
-0
SCHNApps/Plugins/surface_distance/include/dialog_computeDistance.h
...Plugins/surface_distance/include/dialog_computeDistance.h
+40
-0
SCHNApps/Plugins/surface_distance/include/surface_distance.h
SCHNApps/Plugins/surface_distance/include/surface_distance.h
+54
-0
SCHNApps/Plugins/surface_distance/src/dialog_computeDistance.cpp
...s/Plugins/surface_distance/src/dialog_computeDistance.cpp
+181
-0
SCHNApps/Plugins/surface_distance/src/surface_distance.cpp
SCHNApps/Plugins/surface_distance/src/surface_distance.cpp
+145
-0
ThirdParty/CMakeLists.txt
ThirdParty/CMakeLists.txt
+5
-13
ThirdParty/OpenNL/src/CMakeLists.txt
ThirdParty/OpenNL/src/CMakeLists.txt
+11
-2
ThirdParty/TinyXml2/CMakeLists.txt
ThirdParty/TinyXml2/CMakeLists.txt
+35
-0
ThirdParty/TinyXml2/readme.txt
ThirdParty/TinyXml2/readme.txt
+9
-0
ThirdParty/TinyXml2/tinyxml2.cpp
ThirdParty/TinyXml2/tinyxml2.cpp
+2318
-0
ThirdParty/TinyXml2/tinyxml2.h
ThirdParty/TinyXml2/tinyxml2.h
+2130
-0
include/Algo/Filtering/average_normals.h
include/Algo/Filtering/average_normals.h
+4
-3
include/Algo/Geometry/distances.h
include/Algo/Geometry/distances.h
+4
-0
include/Algo/Geometry/voronoiDiagrams.hpp
include/Algo/Geometry/voronoiDiagrams.hpp
+3
-3
include/Algo/Selection/collector.h
include/Algo/Selection/collector.h
+9
-5
include/Algo/Selection/collector.hpp
include/Algo/Selection/collector.hpp
+16
-23
include/Utils/xml.h
include/Utils/xml.h
+1
-1
No files found.
CMakeLists.txt
View file @
8d771e17
cmake_minimum_required
(
VERSION 2.8
)
project
(
CGoGN
)
#cmake_policy(SET CMP0042 NEW) # rpath new policy
#SET ( CMAKE_VERBOSE_MAKEFILE 1 )
...
...
@@ -9,7 +10,30 @@ SET ( CGoGN_ROOT_DIR ${CMAKE_SOURCE_DIR} )
SET
(
CMAKE_MODULE_PATH
${
CGoGN_ROOT_DIR
}
/cmake_modules/
)
# ====== Check GCC VERSION FOR C++11 ======
if
(
CMAKE_COMPILER_IS_GNUCXX
)
execute_process
(
COMMAND
${
CMAKE_CXX_COMPILER
}
-dumpversion OUTPUT_VARIABLE GCC_VERSION
)
if
(
GCC_VERSION VERSION_LESS 4.8
)
message
(
FATAL_ERROR
"Full support of C++11 needed. Therefore a gcc/g++ compiler with a version at least 4.8 is needed."
)
endif
()
endif
()
# ====== Check CLANG VERSION FOR C++11 ======
if
(
APPLE
)
execute_process
(
COMMAND
${
CMAKE_CXX_COMPILER
}
-dumpversion OUTPUT_VARIABLE CLANG_VERSION
)
if
(
CLANG_VERSION VERSION_LESS 3.1
)
message
(
FATAL_ERROR
"Full support of C++11 needed. Therefore a clang compiler with a version at least 3.1 is needed !!"
)
endif
()
endif
()
# ====== Check MSVC VERSION FOR C++11 ======
if
(
WIN32
)
if
(
MSVC_VERSION LESS 1800
)
message
(
FATAL_ERROR
"Full support of C++11 needed. Therefore a microsoft compiler with a version at least 12 is needed."
)
endif
()
endif
()
# ======== Check Build Type =============
IF
(
NOT
(
${
CMAKE_BUILD_TYPE
}
MATCHES
"Debug|Release"
))
IF
(
${
CMAKE_CURRENT_BINARY_DIR
}
MATCHES
"(.*)Debug|(.*)debug|(.*)DEBUG"
)
SET
(
CMAKE_BUILD_TYPE
"Debug"
)
...
...
@@ -18,8 +42,16 @@ IF (NOT (${CMAKE_BUILD_TYPE} MATCHES "Debug|Release"))
ENDIF
()
ENDIF
()
# for shared or not shared
SET
(
BUILD_SHARED_LIBS OFF CACHE BOOL
"if used all library are build as shared type (.so/.dylib/.dll)"
)
# for shared or not shared (default except on windows)
if
(
WIN32
)
SET
(
BUILD_SHARED_LIBS OFF CACHE BOOL
"if used all library are build as shared type (.so/.dylib/.dll)"
)
else
()
SET
(
BUILD_SHARED_LIBS ON CACHE BOOL
"if used all library are build as shared type (.so/.dylib/.dll)"
)
endif
()
#IF(EXISTS "${CGoGN_ROOT_DIR}/ThirdParty/include/Assimp")
IF
(
EXISTS
"
${
CGoGN_ROOT_DIR
}
/lib/
${
CMAKE_BUILD_TYPE
}
/*assimp*"
)
...
...
@@ -44,9 +76,10 @@ SET ( COMPILE_BENCHES ON CACHE BOOL "compile benches" )
SET
(
COMPILE_SANDBOX ON CACHE BOOL
"compile all in sandbox"
)
#create one big lib
#create one big lib
SET
(
ONELIB OFF CACHE BOOL
"build CGoGN in one lib"
)
SET
(
WITH_GLEWMX OFF CACHE BOOL
"use multi-contex GLEW"
)
SET
(
USE_OGL_CORE_PROFILE OFF CACHE BOOL
"use OpenGL 3.3 core profile (do not work on mac)"
)
...
...
@@ -58,8 +91,6 @@ ENDIF(WIN32)
find_package
(
OpenGL REQUIRED
)
find_package
(
Boost COMPONENTS regex REQUIRED
)
find_package
(
ZLIB REQUIRED
)
#find_package(LibXml2 REQUIRED)
find_package
(
TinyXml2 REQUIRED
)
find_package
(
GLEW REQUIRED
)
# MESSAGE HERE FOR MORE EASY USER READING
...
...
@@ -99,7 +130,6 @@ SET (CGoGN_EXT_INCLUDES
${
OPENGL_INCLUDE_DIR
}
${
GLEW_INCLUDE_DIRS
}
${
ZLIB_INCLUDE_DIRS
}
${
TINYXML2_INCLUDE_DIR
}
${
Boost_INCLUDE_DIRS
}
)
...
...
@@ -109,8 +139,8 @@ SET (CGoGN_EXT_LIBS
${
OPENGL_LIBRARY
}
${
GLEW_LIBRARIES
}
${
ZLIB_LIBRARIES
}
${
TINYXML2_LIBRARY
}
${
Boost_REGEX_LIBRARY
}
tinyxml2
)
IF
(
WIN32
)
...
...
@@ -173,11 +203,8 @@ ELSE()
SET
(
CMAKE_C_FLAGS
"
${
CMAKE_C_FLAGS
}
-Wall -Woverride-init -fPIC"
)
# remove the 60000+ "no unused local typedefs" warnings with GCC4.8+
if
(
CMAKE_COMPILER_IS_GNUCXX
)
execute_process
(
COMMAND
${
CMAKE_C_COMPILER
}
-dumpversion OUTPUT_VARIABLE GCC_VERSION
)
if
(
GCC_VERSION VERSION_GREATER 4.8 OR GCC_VERSION VERSION_EQUAL 4.8
)
SET
(
CMAKE_CXX_FLAGS
"
${
CMAKE_CXX_FLAGS
}
-Wno-unused-local-typedefs"
)
SET
(
CMAKE_C_FLAGS
"
${
CMAKE_C_FLAGS
}
-Wno-unused-local-typedefs"
)
endif
(
GCC_VERSION VERSION_GREATER 4.8 OR GCC_VERSION VERSION_EQUAL 4.8
)
SET
(
CMAKE_CXX_FLAGS
"
${
CMAKE_CXX_FLAGS
}
-Wno-unused-local-typedefs"
)
SET
(
CMAKE_C_FLAGS
"
${
CMAKE_C_FLAGS
}
-Wno-unused-local-typedefs"
)
endif
()
ENDIF
()
...
...
SCHNApps/CMakeLists.txt
View file @
8d771e17
...
...
@@ -23,7 +23,6 @@ SET( USE_OGL_CORE_PROFILE OFF CACHE BOOL "use OpenGL 3.3 core profile (do not wo
find_package
(
OpenGL REQUIRED
)
find_package
(
Boost COMPONENTS regex system REQUIRED
)
find_package
(
ZLIB REQUIRED
)
find_package
(
LibXml2 REQUIRED
)
find_package
(
GLEW REQUIRED
)
find_package
(
Qt4 REQUIRED
)
find_package
(
QGLViewer REQUIRED
)
...
...
@@ -73,7 +72,6 @@ SET (EXT_INCLUDES
${
OPENGL_INCLUDE_DIR
}
${
GLEW_INCLUDE_DIRS
}
${
ZLIB_INCLUDE_DIRS
}
${
LIBXML2_INCLUDE_DIR
}
${
Boost_INCLUDE_DIRS
}
${
QT_INCLUDE_DIR
}
${
QGLVIEWER_INCLUDE_DIR
}
...
...
@@ -86,17 +84,17 @@ SET (EXT_INCLUDES
SET
(
EXT_LIBS
PythonQt
nl
${
QGLVIEWER_LIBRARIES
}
${
OPENGL_LIBRARY
}
${
GLEW_LIBRARIES
}
${
ZLIB_LIBRARIES
}
${
LIBXML2_LIBRARIES
}
${
Boost_SYSTEM_LIBRARY
}
${
Boost_REGEX_LIBRARY
}
${
QT_LIBRARIES
}
${
QGLVIEWER_LIBRARIES
}
${
PYTHON_LIBRARIES
}
${
SUITESPARSE_LIBRARIES
}
# ${SUPERLU_LIBRARIES}
tinyxml2
)
...
...
SCHNApps/Plugins/CMakeLists.txt
View file @
8d771e17
...
...
@@ -11,6 +11,7 @@ ADD_SUBDIRECTORY(surface_selection)
ADD_SUBDIRECTORY
(
surface_deformation
)
ADD_SUBDIRECTORY
(
surface_modelisation
)
#ADD_SUBDIRECTORY(surface_tilings)
ADD_SUBDIRECTORY
(
surface_distance
)
ADD_SUBDIRECTORY
(
volume_import
)
#ADD_SUBDIRECTORY(volume_render)
SCHNApps/Plugins/surface_distance/CMakeLists.txt
0 → 100644
View file @
8d771e17
cmake_minimum_required
(
VERSION 2.8
)
SET
(
PLUGIN_NAME Surface_Distance
)
SET
(
PLUGIN_ROOT_DIR
${
SCHNApps_ROOT_DIR
}
/Plugins/surface_distance
)
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/surface_distance.h
${
PLUGIN_ROOT_DIR
}
/include/dialog_computeDistance.h
)
include
(
${
SCHNApps_ROOT_DIR
}
/Plugins/plugins_cmake.txt
)
SCHNApps/Plugins/surface_distance/forms/dialog_computeDistance.ui
0 → 100644
View file @
8d771e17
<?xml version="1.0" encoding="UTF-8"?>
<ui
version=
"4.0"
>
<class>
Dialog_ComputeDistance
</class>
<widget
class=
"QDialog"
name=
"Dialog_ComputeDistance"
>
<property
name=
"geometry"
>
<rect>
<x>
0
</x>
<y>
0
</y>
<width>
607
</width>
<height>
359
</height>
</rect>
</property>
<property
name=
"windowTitle"
>
<string>
Compute Distance
</string>
</property>
<layout
class=
"QVBoxLayout"
name=
"verticalLayout_5"
>
<item>
<layout
class=
"QHBoxLayout"
name=
"horizontalLayout_8"
>
<item>
<layout
class=
"QVBoxLayout"
name=
"verticalLayout_3"
>
<item>
<widget
class=
"QListWidget"
name=
"list_maps_1"
/>
</item>
<item>
<layout
class=
"QHBoxLayout"
name=
"horizontalLayout_2"
>
<item>
<widget
class=
"QLabel"
name=
"label_2"
>
<property
name=
"text"
>
<string>
Position attribute :
</string>
</property>
</widget>
</item>
<item>
<widget
class=
"QComboBox"
name=
"combo_positionAttribute_1"
>
<property
name=
"sizePolicy"
>
<sizepolicy
hsizetype=
"Preferred"
vsizetype=
"Fixed"
>
<horstretch>
0
</horstretch>
<verstretch>
0
</verstretch>
</sizepolicy>
</property>
</widget>
</item>
</layout>
</item>
<item>
<widget
class=
"QGroupBox"
name=
"groupBox"
>
<property
name=
"title"
>
<string>
Distance attribute
</string>
</property>
<layout
class=
"QVBoxLayout"
name=
"verticalLayout"
>
<item>
<layout
class=
"QHBoxLayout"
name=
"horizontalLayout"
>
<item>
<widget
class=
"QLabel"
name=
"label_3"
>
<property
name=
"text"
>
<string>
Existing attribute :
</string>
</property>
</widget>
</item>
<item>
<widget
class=
"QComboBox"
name=
"combo_distanceAttribute_1"
>
<property
name=
"sizePolicy"
>
<sizepolicy
hsizetype=
"Expanding"
vsizetype=
"Fixed"
>
<horstretch>
0
</horstretch>
<verstretch>
0
</verstretch>
</sizepolicy>
</property>
</widget>
</item>
</layout>
</item>
<item>
<layout
class=
"QHBoxLayout"
name=
"horizontalLayout_5"
>
<item>
<widget
class=
"QLabel"
name=
"label"
>
<property
name=
"text"
>
<string>
New attribute :
</string>
</property>
</widget>
</item>
<item>
<widget
class=
"QLineEdit"
name=
"distanceAttributeName_1"
/>
</item>
</layout>
</item>
</layout>
</widget>
</item>
</layout>
</item>
<item>
<layout
class=
"QVBoxLayout"
name=
"verticalLayout_4"
>
<item>
<widget
class=
"QListWidget"
name=
"list_maps_2"
/>
</item>
<item>
<layout
class=
"QHBoxLayout"
name=
"horizontalLayout_4"
>
<item>
<widget
class=
"QLabel"
name=
"label_4"
>
<property
name=
"text"
>
<string>
Position attribute :
</string>
</property>
</widget>
</item>
<item>
<widget
class=
"QComboBox"
name=
"combo_positionAttribute_2"
>
<property
name=
"sizePolicy"
>
<sizepolicy
hsizetype=
"Preferred"
vsizetype=
"Fixed"
>
<horstretch>
0
</horstretch>
<verstretch>
0
</verstretch>
</sizepolicy>
</property>
</widget>
</item>
</layout>
</item>
<item>
<widget
class=
"QGroupBox"
name=
"groupBox_2"
>
<property
name=
"title"
>
<string>
Distance attribute
</string>
</property>
<layout
class=
"QVBoxLayout"
name=
"verticalLayout_2"
>
<item>
<layout
class=
"QHBoxLayout"
name=
"horizontalLayout_6"
>
<item>
<widget
class=
"QLabel"
name=
"label_5"
>
<property
name=
"text"
>
<string>
Existing attribute :
</string>
</property>
</widget>
</item>
<item>
<widget
class=
"QComboBox"
name=
"combo_distanceAttribute_2"
>
<property
name=
"sizePolicy"
>
<sizepolicy
hsizetype=
"Expanding"
vsizetype=
"Fixed"
>
<horstretch>
0
</horstretch>
<verstretch>
0
</verstretch>
</sizepolicy>
</property>
</widget>
</item>
</layout>
</item>
<item>
<layout
class=
"QHBoxLayout"
name=
"horizontalLayout_7"
>
<item>
<widget
class=
"QLabel"
name=
"label_6"
>
<property
name=
"text"
>
<string>
New attribute :
</string>
</property>
</widget>
</item>
<item>
<widget
class=
"QLineEdit"
name=
"distanceAttributeName_2"
/>
</item>
</layout>
</item>
</layout>
</widget>
</item>
</layout>
</item>
</layout>
</item>
<item>
<widget
class=
"QCheckBox"
name=
"enableVBO"
>
<property
name=
"text"
>
<string>
Create VBOs
</string>
</property>
<property
name=
"checked"
>
<bool>
false
</bool>
</property>
</widget>
</item>
<item>
<layout
class=
"QHBoxLayout"
name=
"horizontalLayout_3"
>
<item>
<widget
class=
"QPushButton"
name=
"button_cancel"
>
<property
name=
"text"
>
<string>
Cancel
</string>
</property>
</widget>
</item>
<item>
<widget
class=
"QPushButton"
name=
"button_apply"
>
<property
name=
"text"
>
<string>
Apply
</string>
</property>
</widget>
</item>
<item>
<widget
class=
"QPushButton"
name=
"button_ok"
>
<property
name=
"text"
>
<string>
OK
</string>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</widget>
<resources/>
<connections>
<connection>
<sender>
button_ok
</sender>
<signal>
clicked()
</signal>
<receiver>
Dialog_ComputeDistance
</receiver>
<slot>
accept()
</slot>
<hints>
<hint
type=
"sourcelabel"
>
<x>
232
</x>
<y>
283
</y>
</hint>
<hint
type=
"destinationlabel"
>
<x>
140
</x>
<y>
156
</y>
</hint>
</hints>
</connection>
<connection>
<sender>
button_cancel
</sender>
<signal>
clicked()
</signal>
<receiver>
Dialog_ComputeDistance
</receiver>
<slot>
reject()
</slot>
<hints>
<hint
type=
"sourcelabel"
>
<x>
52
</x>
<y>
283
</y>
</hint>
<hint
type=
"destinationlabel"
>
<x>
140
</x>
<y>
156
</y>
</hint>
</hints>
</connection>
</connections>
</ui>
SCHNApps/Plugins/surface_distance/include/dialog_computeDistance.h
0 → 100644
View file @
8d771e17
#ifndef _DIALOG_COMPUTEDISTANCE_H_
#define _DIALOG_COMPUTEDISTANCE_H_
#include "ui_dialog_computeDistance.h"
namespace
CGoGN
{
namespace
SCHNApps
{
class
SCHNApps
;
class
MapHandlerGen
;
class
Dialog_ComputeDistance
:
public
QDialog
,
public
Ui
::
Dialog_ComputeDistance
{
Q_OBJECT
public:
Dialog_ComputeDistance
(
SCHNApps
*
s
);
private:
SCHNApps
*
m_schnapps
;
MapHandlerGen
*
m_selectedMap1
;
MapHandlerGen
*
m_selectedMap2
;
public
slots
:
void
selectedMap1Changed
();
void
selectedMap2Changed
();
void
addMapToList
(
MapHandlerGen
*
map
);
void
removeMapFromList
(
MapHandlerGen
*
map
);
void
addAttributeToList1
(
unsigned
int
orbit
,
const
QString
&
nameAttr
);
void
addAttributeToList2
(
unsigned
int
orbit
,
const
QString
&
nameAttr
);
};
}
// namespace SCHNApps
}
// namespace CGoGN
#endif
SCHNApps/Plugins/surface_distance/include/surface_distance.h
0 → 100644
View file @
8d771e17
#ifndef _SURFACE_DISTANCE_PLUGIN_H_
#define _SURFACE_DISTANCE_PLUGIN_H_
#include "plugin_processing.h"
#include "dialog_computeDistance.h"
namespace
CGoGN
{
namespace
SCHNApps
{
class
Surface_Distance_Plugin
:
public
PluginProcessing
{
Q_OBJECT
Q_INTERFACES
(
CGoGN
::
SCHNApps
::
Plugin
)
public:
Surface_Distance_Plugin
()
{}
~
Surface_Distance_Plugin
()
{}
virtual
bool
enable
();
virtual
void
disable
();
private
slots
:
void
openComputeDistanceDialog
();
void
computeDistanceFromDialog
();
void
appsFinished
();
public
slots
:
void
computeDistance
(
const
QString
&
mapName1
,
const
QString
&
positionAttributeName1
,
const
QString
&
distanceAttributeName1
,
const
QString
&
mapName2
,
const
QString
&
positionAttributeName2
,
const
QString
&
distanceAttributeName2
);
private:
Dialog_ComputeDistance
*
m_computeDistanceDialog
;
QAction
*
m_computeDistanceAction
;
};
}
// namespace SCHNApps
}
// namespace CGoGN
#endif
SCHNApps/Plugins/surface_distance/src/dialog_computeDistance.cpp
0 → 100644
View file @
8d771e17
#include "dialog_computeDistance.h"
#include "surface_distance.h"
#include "schnapps.h"
#include "mapHandler.h"
namespace
CGoGN
{
namespace
SCHNApps
{
Dialog_ComputeDistance
::
Dialog_ComputeDistance
(
SCHNApps
*
s
)
:
m_schnapps
(
s
),
m_selectedMap1
(
NULL
),
m_selectedMap2
(
NULL
)
{
setupUi
(
this
);
distanceAttributeName_1
->
setText
(
"distance"
);
distanceAttributeName_2
->
setText
(
"distance"
);
connect
(
m_schnapps
,
SIGNAL
(
mapAdded
(
MapHandlerGen
*
)),
this
,
SLOT
(
addMapToList
(
MapHandlerGen
*
)));
connect
(
m_schnapps
,
SIGNAL
(
mapRemoved
(
MapHandlerGen
*
)),
this
,
SLOT
(
removeMapFromList
(
MapHandlerGen
*
)));
connect
(
list_maps_1
,
SIGNAL
(
itemSelectionChanged
()),
this
,
SLOT
(
selectedMap1Changed
()));
connect
(
list_maps_2
,
SIGNAL
(
itemSelectionChanged
()),
this
,
SLOT
(
selectedMap2Changed
()));
foreach
(
MapHandlerGen
*
map
,
m_schnapps
->
getMapSet
().
values
())
{
QListWidgetItem
*
item1
=
new
QListWidgetItem
(
map
->
getName
(),
list_maps_1
);
QListWidgetItem
*
item2
=
new
QListWidgetItem
(
map
->
getName
(),
list_maps_2
);
}
}
void
Dialog_ComputeDistance
::
selectedMap1Changed
()
{
if
(
m_selectedMap1
)
disconnect
(
m_selectedMap1
,
SIGNAL
(
attributeAdded
(
unsigned
int
,
const
QString
&
)),
this
,
SLOT
(
addAttributeToList1
(
unsigned
int
,
const
QString
&
)));
QList
<
QListWidgetItem
*>
currentItems
=
list_maps_1
->
selectedItems
();
if
(
!
currentItems
.
empty
())
{
combo_positionAttribute_1
->
clear
();
combo_distanceAttribute_1
->
clear
();
const
QString
&
mapname
=
currentItems
[
0
]
->
text
();
MapHandlerGen
*
mh
=
m_schnapps
->
getMap
(
mapname
);
QString
vec3TypeName
=
QString
::
fromStdString
(
nameOfType
(
PFP2
::
VEC3
()));
QString
realTypeName
=
QString
::
fromStdString
(
nameOfType
(
PFP2
::
REAL
()));
const
AttributeSet
&
attribs
=
mh
->
getAttributeSet
(
VERTEX
);
for
(
AttributeSet
::
const_iterator
i
=
attribs
.
constBegin
();
i
!=
attribs
.
constEnd
();
++
i
)
{
if
(
i
.
value
()
==
vec3TypeName
)
{
combo_positionAttribute_1
->
addItem
(
i
.
key
());
}
if
(
i
.
value
()
==
realTypeName
)
{
combo_distanceAttribute_1
->
addItem
(
i
.
key
());
}
}
m_selectedMap1
=
mh
;
connect
(
m_selectedMap1
,
SIGNAL
(
attributeAdded
(
unsigned
int
,
const
QString
&
)),
this
,
SLOT
(
addAttributeToList1
(
unsigned
int
,
const
QString
&
)));
}
else
m_selectedMap1
=
NULL
;
}
void
Dialog_ComputeDistance
::
selectedMap2Changed
()
{
if
(
m_selectedMap2
)
disconnect
(
m_selectedMap2
,
SIGNAL
(
attributeAdded
(
unsigned
int
,
const
QString
&
)),
this
,
SLOT
(
addAttributeToList2
(
unsigned
int
,
const
QString
&
)));
QList
<
QListWidgetItem
*>
currentItems
=
list_maps_2
->
selectedItems
();
if
(
!
currentItems
.
empty
())
{
combo_positionAttribute_2
->
clear
();
combo_distanceAttribute_2
->
clear
();
const
QString
&
mapname
=
currentItems
[
0
]
->
text
();
MapHandlerGen
*
mh
=
m_schnapps
->
getMap
(
mapname
);
QString
vec3TypeName
=
QString
::
fromStdString
(
nameOfType
(
PFP2
::
VEC3
()));