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
Operations
Operations
Incidents
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
David Cazier
CGoGN
Commits
eb68fc91
Commit
eb68fc91
authored
Feb 01, 2013
by
untereiner
Browse files
Options
Browse Files
Download
Plain Diff
Merge cgogn:~kraemer/CGoGN
parents
9d7fca91
7ebfbaa8
Changes
58
Hide whitespace changes
Inline
Side-by-side
Showing
58 changed files
with
1374 additions
and
1024 deletions
+1374
-1024
SCHNApps/CMakeLists.txt
SCHNApps/CMakeLists.txt
+32
-1
SCHNApps/Debug/CMakeLists.txt
SCHNApps/Debug/CMakeLists.txt
+6
-48
SCHNApps/Plugins/CMakeLists.txt
SCHNApps/Plugins/CMakeLists.txt
+1
-0
SCHNApps/Plugins/differentialProperties/CMakeLists.txt
SCHNApps/Plugins/differentialProperties/CMakeLists.txt
+21
-66
SCHNApps/Plugins/differentialProperties/include/computeCurvatureDialog.h
...s/differentialProperties/include/computeCurvatureDialog.h
+2
-1
SCHNApps/Plugins/differentialProperties/include/computeNormalDialog.h
...gins/differentialProperties/include/computeNormalDialog.h
+2
-1
SCHNApps/Plugins/differentialProperties/include/differentialProperties.h
...s/differentialProperties/include/differentialProperties.h
+24
-2
SCHNApps/Plugins/differentialProperties/src/computeCurvatureDialog.cpp
...ins/differentialProperties/src/computeCurvatureDialog.cpp
+20
-9
SCHNApps/Plugins/differentialProperties/src/computeNormalDialog.cpp
...lugins/differentialProperties/src/computeNormalDialog.cpp
+20
-9
SCHNApps/Plugins/differentialProperties/src/differentialProperties.cpp
...ins/differentialProperties/src/differentialProperties.cpp
+134
-82
SCHNApps/Plugins/importSurface/CMakeLists.txt
SCHNApps/Plugins/importSurface/CMakeLists.txt
+20
-58
SCHNApps/Plugins/importSurface/include/importSurface.h
SCHNApps/Plugins/importSurface/include/importSurface.h
+0
-0
SCHNApps/Plugins/importSurface/src/importSurface.cpp
SCHNApps/Plugins/importSurface/src/importSurface.cpp
+2
-0
SCHNApps/Plugins/importVolume/CMakeLists.txt
SCHNApps/Plugins/importVolume/CMakeLists.txt
+20
-60
SCHNApps/Plugins/importVolume/include/importVolume.h
SCHNApps/Plugins/importVolume/include/importVolume.h
+0
-0
SCHNApps/Plugins/importVolume/src/importVolume.cpp
SCHNApps/Plugins/importVolume/src/importVolume.cpp
+2
-0
SCHNApps/Plugins/plugins_cmake.txt
SCHNApps/Plugins/plugins_cmake.txt
+52
-0
SCHNApps/Plugins/render/CMakeLists.txt
SCHNApps/Plugins/render/CMakeLists.txt
+19
-61
SCHNApps/Plugins/render/forms/render.ui
SCHNApps/Plugins/render/forms/render.ui
+0
-0
SCHNApps/Plugins/render/include/render.h
SCHNApps/Plugins/render/include/render.h
+0
-0
SCHNApps/Plugins/render/src/render.cpp
SCHNApps/Plugins/render/src/render.cpp
+0
-0
SCHNApps/Plugins/renderExplod/CMakeLists.txt
SCHNApps/Plugins/renderExplod/CMakeLists.txt
+19
-63
SCHNApps/Plugins/renderExplod/forms/renderExplod.ui
SCHNApps/Plugins/renderExplod/forms/renderExplod.ui
+13
-29
SCHNApps/Plugins/renderExplod/include/renderExplod.h
SCHNApps/Plugins/renderExplod/include/renderExplod.h
+18
-8
SCHNApps/Plugins/renderExplod/src/renderExplod.cpp
SCHNApps/Plugins/renderExplod/src/renderExplod.cpp
+457
-0
SCHNApps/Plugins/renderVector/CMakeLists.txt
SCHNApps/Plugins/renderVector/CMakeLists.txt
+19
-61
SCHNApps/Plugins/renderVector/forms/renderVector.ui
SCHNApps/Plugins/renderVector/forms/renderVector.ui
+0
-0
SCHNApps/Plugins/renderVector/include/renderVector.h
SCHNApps/Plugins/renderVector/include/renderVector.h
+0
-0
SCHNApps/Plugins/renderVector/src/renderVector.cpp
SCHNApps/Plugins/renderVector/src/renderVector.cpp
+0
-0
SCHNApps/Plugins/subdivideSurface/CMakeLists.txt
SCHNApps/Plugins/subdivideSurface/CMakeLists.txt
+20
-63
SCHNApps/Plugins/subdivideSurface/include/subdivideSurfaceDialog.h
...Plugins/subdivideSurface/include/subdivideSurfaceDialog.h
+2
-1
SCHNApps/Plugins/subdivideSurface/src/subdivideSurfaceDialog.cpp
...s/Plugins/subdivideSurface/src/subdivideSurfaceDialog.cpp
+20
-9
SCHNApps/Plugins/surfaceDeformation/CMakeLists.txt
SCHNApps/Plugins/surfaceDeformation/CMakeLists.txt
+31
-0
SCHNApps/Plugins/surfaceDeformation/include/surfaceDeformation.h
...s/Plugins/surfaceDeformation/include/surfaceDeformation.h
+43
-0
SCHNApps/Plugins/surfaceDeformation/src/surfaceDeformation.cpp
...pps/Plugins/surfaceDeformation/src/surfaceDeformation.cpp
+12
-0
SCHNApps/Release/CMakeLists.txt
SCHNApps/Release/CMakeLists.txt
+6
-48
SCHNApps/bin/init.py
SCHNApps/bin/init.py
+10
-5
SCHNApps/forms/camerasDialog.ui
SCHNApps/forms/camerasDialog.ui
+36
-23
SCHNApps/include/camera.h
SCHNApps/include/camera.h
+9
-21
SCHNApps/include/dialogs/camerasDialog.h
SCHNApps/include/dialogs/camerasDialog.h
+7
-0
SCHNApps/include/mapHandler.h
SCHNApps/include/mapHandler.h
+21
-0
SCHNApps/include/view.h
SCHNApps/include/view.h
+3
-0
SCHNApps/include/window.h
SCHNApps/include/window.h
+17
-111
SCHNApps/src/camera.cpp
SCHNApps/src/camera.cpp
+26
-18
SCHNApps/src/dialogs/cameraViewDialog.cpp
SCHNApps/src/dialogs/cameraViewDialog.cpp
+4
-11
SCHNApps/src/dialogs/camerasDialog.cpp
SCHNApps/src/dialogs/camerasDialog.cpp
+85
-8
SCHNApps/src/dialogs/mapsDialog.cpp
SCHNApps/src/dialogs/mapsDialog.cpp
+3
-8
SCHNApps/src/dialogs/mapsViewDialog.cpp
SCHNApps/src/dialogs/mapsViewDialog.cpp
+3
-11
SCHNApps/src/dialogs/pluginsViewDialog.cpp
SCHNApps/src/dialogs/pluginsViewDialog.cpp
+3
-11
SCHNApps/src/view.cpp
SCHNApps/src/view.cpp
+26
-2
SCHNApps/src/window.cpp
SCHNApps/src/window.cpp
+20
-10
include/Algo/Decimation/edgeSelector.hpp
include/Algo/Decimation/edgeSelector.hpp
+7
-7
include/Algo/Decimation/lightfieldApproximator.hpp
include/Algo/Decimation/lightfieldApproximator.hpp
+4
-4
include/Algo/Geometry/curvature.hpp
include/Algo/Geometry/curvature.hpp
+4
-4
include/Algo/Geometry/feature.hpp
include/Algo/Geometry/feature.hpp
+3
-3
include/Algo/MC/image.hpp
include/Algo/MC/image.hpp
+3
-3
include/Geometry/plane_3d.hpp
include/Geometry/plane_3d.hpp
+1
-1
src/Utils/frameManipulator.cpp
src/Utils/frameManipulator.cpp
+42
-83
No files found.
SCHNApps/CMakeLists.txt
View file @
eb68fc91
...
...
@@ -16,7 +16,7 @@ find_package(LibXml2 REQUIRED)
find_package
(
GLEW REQUIRED
)
find_package
(
Qt4 REQUIRED
)
find_package
(
QGLViewer REQUIRED
)
find_package
(
PythonLibs REQUIRED
)
find_package
(
PythonLibs
2.7
REQUIRED
)
SET
(
QT_USE_QTOPENGL TRUE
)
SET
(
QT_USE_QTXML TRUE
)
...
...
@@ -102,6 +102,37 @@ 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
)
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
)
ADD_SUBDIRECTORY
(
${
CMAKE_SOURCE_DIR
}
/Release Release
)
IF
(
NOT WIN32
)
ADD_SUBDIRECTORY
(
${
CMAKE_SOURCE_DIR
}
/Debug Debug
)
...
...
SCHNApps/Debug/CMakeLists.txt
View file @
eb68fc91
...
...
@@ -16,63 +16,21 @@ INCLUDE_DIRECTORIES(
${
CMAKE_CURRENT_BINARY_DIR
}
)
file
(
GLOB
SCHNApps_SRC_FILES
${
SCHNApps_ROOT_DIR
}
/src/main.cpp
${
SCHNApps_ROOT_DIR
}
/src/camera.cpp
${
SCHNApps_ROOT_DIR
}
/src/mapHandler.cpp
${
SCHNApps_ROOT_DIR
}
/src/plugin.cpp
${
SCHNApps_ROOT_DIR
}
/src/view.cpp
${
SCHNApps_ROOT_DIR
}
/src/window.cpp
${
SCHNApps_ROOT_DIR
}
/src/viewButtonArea.cpp
${
SCHNApps_ROOT_DIR
}
/src/dialogs/camerasDialog.cpp
${
SCHNApps_ROOT_DIR
}
/src/dialogs/pluginsDialog.cpp
${
SCHNApps_ROOT_DIR
}
/src/dialogs/mapsDialog.cpp
${
SCHNApps_ROOT_DIR
}
/src/dialogs/cameraViewDialog.cpp
${
SCHNApps_ROOT_DIR
}
/src/dialogs/pluginsViewDialog.cpp
${
SCHNApps_ROOT_DIR
}
/src/dialogs/mapsViewDialog.cpp
QT4_WRAP_UI
(
UIC_FILES
${
SCHNApps_UI_FILES
}
)
SET
(
SCHNApps_H_OBJECT_FILES
${
SCHNApps_ROOT_DIR
}
/include/view.h
${
SCHNApps_ROOT_DIR
}
/include/window.h
${
SCHNApps_ROOT_DIR
}
/include/mapHandler.h
${
SCHNApps_ROOT_DIR
}
/include/plugin.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
)
file
(
GLOB
SCHNApps_FORM_FILES
${
SCHNApps_ROOT_DIR
}
/forms/window.ui
${
SCHNApps_ROOT_DIR
}
/forms/camerasDialog.ui
${
SCHNApps_ROOT_DIR
}
/forms/pluginsDialog.ui
${
SCHNApps_ROOT_DIR
}
/forms/mapsDialog.ui
${
SCHNApps_ROOT_DIR
}
/forms/cameraViewDialog.ui
${
SCHNApps_ROOT_DIR
}
/forms/pluginsViewDialog.ui
${
SCHNApps_ROOT_DIR
}
/forms/mapsViewDialog.ui
)
QT4_WRAP_UI
(
UI_H_FILES
${
SCHNApps_FORM_FILES
}
)
QT4_WRAP_CPP
(
MOC_FILES
${
SCHNApps_
H_
OBJECT_FILES
}
${
SCHNApps_
Q
OBJECT_FILES
}
)
QT4_ADD_RESOURCES
(
RCC_FILES
${
SCHNApps_ROOT_DIR
}
/resources/resources.qrc
)
ADD_EXECUTABLE
(
SCHNAppsD
${
SCHNApps_
SRC_
FILES
}
${
UI
_H
_FILES
}
${
SCHNApps_FILES
}
${
UI
C
_FILES
}
${
MOC_FILES
}
${
RCC_FILES
}
)
...
...
SCHNApps/Plugins/CMakeLists.txt
View file @
eb68fc91
...
...
@@ -7,3 +7,4 @@ ADD_SUBDIRECTORY(render)
ADD_SUBDIRECTORY
(
renderVector
)
ADD_SUBDIRECTORY
(
renderExplod
)
ADD_SUBDIRECTORY
(
subdivideSurface
)
ADD_SUBDIRECTORY
(
surfaceDeformation
)
SCHNApps/Plugins/differentialProperties/CMakeLists.txt
View file @
eb68fc91
cmake_minimum_required
(
VERSION 2.8
)
SET
(
PLUGIN_NAME DifferentialProperties
)
SET
(
PLUGIN_ROOT_DIR
${
SCHNApps_ROOT_DIR
}
/Plugins/differentialProperties
)
INCLUDE_DIRECTORIES
(
${
SCHNApps_ROOT_DIR
}
/include
${
SCHNApps_ROOT_DIR
}
/Plugins/differentialProperties/include
${
PLUGIN_ROOT_DIR
}
/include
${
CMAKE_CURRENT_BINARY_DIR
}
)
SET
(
PLUGIN_SRC
${
SCHNApps_ROOT_DIR
}
/Plugins/differentialProperties/src/differentialProperties.cpp
${
SCHNApps_ROOT_DIR
}
/Plugins/differentialProperties/src/computeNormalDialog.cpp
${
SCHNApps_ROOT_DIR
}
/Plugins/differentialProperties/src/computeCurvatureDialog.cpp
file
(
GLOB_RECURSE
PLUGIN_FILES
${
PLUGIN_ROOT_DIR
}
/src/*.cpp
${
PLUGIN_ROOT_DIR
}
/include/*.h
${
PLUGIN_ROOT_DIR
}
/include/*.hpp
)
SET
(
PLUGIN_H
${
SCHNApps_ROOT_DIR
}
/Plugins/differentialProperties/include/differentialProperties.h
${
SCHNApps_ROOT_DIR
}
/Plugins/differentialProperties/include/computeNormalDialog.h
${
SCHNApps_ROOT_DIR
}
/Plugins/differentialProperties/include/computeCurvatureDialog.h
file
(
GLOB_RECURSE
PLUGIN_UI_FILES
${
PLUGIN_ROOT_DIR
}
/forms/*.ui
)
SET
(
PLUGIN_FORM
${
SCHNApps_ROOT_DIR
}
/Plugins/differentialProperties/forms/computeNormalDialog.ui
${
SCHNApps_ROOT_DIR
}
/Plugins/differentialProperties/forms/computeCurvatureDialog.ui
SET
(
PLUGIN_QOBJECT_FILES
${
PLUGIN_ROOT_DIR
}
/include/differentialProperties.h
${
PLUGIN_ROOT_DIR
}
/include/computeNormalDialog.h
${
PLUGIN_ROOT_DIR
}
/include/computeCurvatureDialog.h
)
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
)
QT4_WRAP_UI
(
PLUGIN_UI
${
PLUGIN_FORM
}
)
QT4_WRAP_CPP
(
PLUGIN_MOC
${
PLUGIN_H
}
)
ADD_LIBRARY
(
DifferentialPropertiesPluginD SHARED
${
PLUGIN_SRC
}
${
PLUGIN_UI
}
${
PLUGIN_MOC
}
)
TARGET_LINK_LIBRARIES
(
DifferentialPropertiesPluginD
${
CGoGN_LIBS_D
}
${
COMMON_LIBS
}
)
ADD_DEPENDENCIES
(
DifferentialPropertiesPluginD SCHNAppsD
)
SET_TARGET_PROPERTIES
(
DifferentialPropertiesPluginD 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
)
QT4_WRAP_UI
(
PLUGIN_UI
${
PLUGIN_FORM
}
)
QT4_WRAP_CPP
(
PLUGIN_MOC
${
PLUGIN_H
}
)
ADD_LIBRARY
(
DifferentialPropertiesPlugin SHARED
${
PLUGIN_SRC
}
${
PLUGIN_UI
}
${
PLUGIN_MOC
}
)
TARGET_LINK_LIBRARIES
(
DifferentialPropertiesPlugin
${
CGoGN_LIBS_R
}
${
COMMON_LIBS
}
)
ADD_DEPENDENCIES
(
DifferentialPropertiesPlugin SCHNApps
)
ENDIF
(
${
CMAKE_BUILD_TYPE
}
STREQUAL Debug
)
include
(
${
SCHNApps_ROOT_DIR
}
/Plugins/plugins_cmake.txt
)
SCHNApps/Plugins/differentialProperties/include/computeCurvatureDialog.h
View file @
eb68fc91
...
...
@@ -21,9 +21,10 @@ public:
private:
Window
*
m_window
;
MapHandlerGen
*
m_selectedMap
;
public
slots
:
void
selectedMapChanged
();
void
refreshUI
();
void
addMapToList
(
MapHandlerGen
*
m
);
void
removeMapFromList
(
MapHandlerGen
*
m
);
};
...
...
SCHNApps/Plugins/differentialProperties/include/computeNormalDialog.h
View file @
eb68fc91
...
...
@@ -21,9 +21,10 @@ public:
private:
Window
*
m_window
;
MapHandlerGen
*
m_selectedMap
;
public
slots
:
void
selectedMapChanged
();
void
refreshUI
();
void
addMapToList
(
MapHandlerGen
*
m
);
void
removeMapFromList
(
MapHandlerGen
*
m
);
};
...
...
SCHNApps/Plugins/differentialProperties/include/differentialProperties.h
View file @
eb68fc91
...
...
@@ -41,8 +41,30 @@ public slots:
void
openComputeNormalDialog
();
void
openComputeCurvatureDialog
();
void
computeNormal
();
void
computeCurvature
();
void
computeNormalFromDialog
();
void
computeCurvatureFromDialog
();
void
computeNormal
(
const
QString
&
mapName
,
const
QString
&
positionAttributeName
=
"position"
,
const
QString
&
normalAttributeName
=
"normal"
,
bool
createNormalVBO
=
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
createKmaxVBO
=
true
,
bool
createkmaxVBO
=
true
,
bool
createKminVBO
=
true
,
bool
createkminVBO
=
true
,
bool
createKnormalVBO
=
true
);
private:
ComputeNormalDialog
*
m_computeNormalDialog
;
...
...
SCHNApps/Plugins/differentialProperties/src/computeCurvatureDialog.cpp
View file @
eb68fc91
...
...
@@ -10,7 +10,9 @@ namespace CGoGN
namespace
SCHNApps
{
ComputeCurvatureDialog
::
ComputeCurvatureDialog
(
Window
*
w
)
:
m_window
(
w
)
ComputeCurvatureDialog
::
ComputeCurvatureDialog
(
Window
*
w
)
:
m_window
(
w
),
m_selectedMap
(
NULL
)
{
setupUi
(
this
);
...
...
@@ -23,15 +25,18 @@ ComputeCurvatureDialog::ComputeCurvatureDialog(Window* w) : m_window(w)
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
()));
connect
(
mapList
,
SIGNAL
(
itemSelectionChanged
()),
this
,
SLOT
(
refreshUI
()));
const
QList
<
MapHandlerGen
*>&
maps
=
m_window
->
getMapsList
();
foreach
(
MapHandlerGen
*
map
,
maps
)
mapList
->
addItem
(
map
->
getName
());
}
void
ComputeCurvatureDialog
::
selectedMapChanged
()
void
ComputeCurvatureDialog
::
refreshUI
()
{
if
(
m_selectedMap
)
disconnect
(
m_selectedMap
,
SIGNAL
(
attributeAdded
()),
this
,
SLOT
(
refreshUI
()));
QList
<
QListWidgetItem
*>
currentItems
=
mapList
->
selectedItems
();
if
(
!
currentItems
.
empty
())
{
...
...
@@ -94,7 +99,12 @@ void ComputeCurvatureDialog::selectedMapChanged()
++
k
;
}
}
m_selectedMap
=
mh
;
connect
(
m_selectedMap
,
SIGNAL
(
attributeAdded
()),
this
,
SLOT
(
refreshUI
()));
}
else
m_selectedMap
=
NULL
;
}
void
ComputeCurvatureDialog
::
addMapToList
(
MapHandlerGen
*
m
)
...
...
@@ -104,13 +114,14 @@ void ComputeCurvatureDialog::addMapToList(MapHandlerGen* m)
void
ComputeCurvatureDialog
::
removeMapFromList
(
MapHandlerGen
*
m
)
{
for
(
int
i
=
0
;
i
<
mapList
->
count
();
++
i
)
QList
<
QListWidgetItem
*>
items
=
mapList
->
findItems
(
m
->
getName
(),
Qt
::
MatchExactly
);
if
(
!
items
.
empty
())
delete
items
[
0
];
if
(
m_selectedMap
==
m
)
{
if
(
mapList
->
item
(
i
)
->
text
()
==
m
->
getName
())
{
delete
mapList
->
item
(
i
);
return
;
}
disconnect
(
m_selectedMap
,
SIGNAL
(
attributeAdded
()),
this
,
SLOT
(
refreshUI
()));
m_selectedMap
=
NULL
;
}
}
...
...
SCHNApps/Plugins/differentialProperties/src/computeNormalDialog.cpp
View file @
eb68fc91
...
...
@@ -10,7 +10,9 @@ namespace CGoGN
namespace
SCHNApps
{
ComputeNormalDialog
::
ComputeNormalDialog
(
Window
*
w
)
:
m_window
(
w
)
ComputeNormalDialog
::
ComputeNormalDialog
(
Window
*
w
)
:
m_window
(
w
),
m_selectedMap
(
NULL
)
{
setupUi
(
this
);
...
...
@@ -19,15 +21,18 @@ ComputeNormalDialog::ComputeNormalDialog(Window* w) : m_window(w)
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
()));
connect
(
mapList
,
SIGNAL
(
itemSelectionChanged
()),
this
,
SLOT
(
refreshUI
()));
const
QList
<
MapHandlerGen
*>&
maps
=
m_window
->
getMapsList
();
foreach
(
MapHandlerGen
*
map
,
maps
)
mapList
->
addItem
(
map
->
getName
());
}
void
ComputeNormalDialog
::
selectedMapChanged
()
void
ComputeNormalDialog
::
refreshUI
()
{
if
(
m_selectedMap
)
disconnect
(
m_selectedMap
,
SIGNAL
(
attributeAdded
()),
this
,
SLOT
(
refreshUI
()));
QList
<
QListWidgetItem
*>
currentItems
=
mapList
->
selectedItems
();
if
(
!
currentItems
.
empty
())
{
...
...
@@ -59,7 +64,12 @@ void ComputeNormalDialog::selectedMapChanged()
++
j
;
}
}
m_selectedMap
=
mh
;
connect
(
m_selectedMap
,
SIGNAL
(
attributeAdded
()),
this
,
SLOT
(
refreshUI
()));
}
else
m_selectedMap
=
NULL
;
}
void
ComputeNormalDialog
::
addMapToList
(
MapHandlerGen
*
m
)
...
...
@@ -69,13 +79,14 @@ void ComputeNormalDialog::addMapToList(MapHandlerGen* m)
void
ComputeNormalDialog
::
removeMapFromList
(
MapHandlerGen
*
m
)
{
for
(
int
i
=
0
;
i
<
mapList
->
count
();
++
i
)
QList
<
QListWidgetItem
*>
items
=
mapList
->
findItems
(
m
->
getName
(),
Qt
::
MatchExactly
);
if
(
!
items
.
empty
())
delete
items
[
0
];
if
(
m_selectedMap
==
m
)
{
if
(
mapList
->
item
(
i
)
->
text
()
==
m
->
getName
())
{
delete
mapList
->
item
(
i
);
return
;
}
disconnect
(
m_selectedMap
,
SIGNAL
(
attributeAdded
()),
this
,
SLOT
(
refreshUI
()));
m_selectedMap
=
NULL
;
}
}
...
...
SCHNApps/Plugins/differentialProperties/src/differentialProperties.cpp
View file @
eb68fc91
...
...
@@ -19,11 +19,11 @@ bool DifferentialPropertiesPlugin::enable()
connect
(
m_computeNormalAction
,
SIGNAL
(
triggered
()),
this
,
SLOT
(
openComputeNormalDialog
()));
connect
(
m_computeCurvatureAction
,
SIGNAL
(
triggered
()),
this
,
SLOT
(
openComputeCurvatureDialog
()));
connect
(
m_computeNormalDialog
,
SIGNAL
(
accepted
()),
this
,
SLOT
(
computeNormal
()));
connect
(
m_computeNormalDialog
->
button_apply
,
SIGNAL
(
clicked
()),
this
,
SLOT
(
computeNormal
()));
connect
(
m_computeNormalDialog
,
SIGNAL
(
accepted
()),
this
,
SLOT
(
computeNormal
FromDialog
()));
connect
(
m_computeNormalDialog
->
button_apply
,
SIGNAL
(
clicked
()),
this
,
SLOT
(
computeNormal
FromDialog
()));
connect
(
m_computeCurvatureDialog
,
SIGNAL
(
accepted
()),
this
,
SLOT
(
computeCurvature
()));
connect
(
m_computeCurvatureDialog
->
button_apply
,
SIGNAL
(
clicked
()),
this
,
SLOT
(
computeCurvature
()));
connect
(
m_computeCurvatureDialog
,
SIGNAL
(
accepted
()),
this
,
SLOT
(
computeCurvature
FromDialog
()));
connect
(
m_computeCurvatureDialog
->
button_apply
,
SIGNAL
(
clicked
()),
this
,
SLOT
(
computeCurvature
FromDialog
()));
return
true
;
}
...
...
@@ -38,124 +38,176 @@ void DifferentialPropertiesPlugin::openComputeCurvatureDialog()
m_computeCurvatureDialog
->
show
();
}
void
DifferentialPropertiesPlugin
::
computeNormal
()
void
DifferentialPropertiesPlugin
::
computeNormal
FromDialog
()
{
QList
<
QListWidgetItem
*>
currentItems
=
m_computeNormalDialog
->
mapList
->
selectedItems
();
if
(
!
currentItems
.
empty
())
{
const
QString
&
mapname
=
currentItems
[
0
]
->
text
();
MapHandler
<
PFP2
>*
mh
=
static_cast
<
MapHandler
<
PFP2
>*>
(
m_window
->
getMap
(
mapname
));
PFP2
::
MAP
*
map
=
mh
->
getMap
();
const
QString
&
mapName
=
currentItems
[
0
]
->
text
();
std
::
string
positionName
=
m_computeNormalDialog
->
combo_positionAttribute
->
currentText
().
toUtf8
().
constData
();
std
::
s
tring
normalName
;
QString
positionName
=
m_computeNormalDialog
->
combo_positionAttribute
->
currentText
();
QS
tring
normalName
;
if
(
m_computeNormalDialog
->
normalAttributeName
->
text
().
isEmpty
())
normalName
=
m_computeNormalDialog
->
combo_normalAttribute
->
currentText
()
.
toUtf8
().
constData
()
;
normalName
=
m_computeNormalDialog
->
combo_normalAttribute
->
currentText
();
else
normalName
=
m_computeNormalDialog
->
normalAttributeName
->
text
()
.
toUtf8
().
constData
()
;
normalName
=
m_computeNormalDialog
->
normalAttributeName
->
text
();
VertexAttribute
<
PFP2
::
VEC3
>
position
=
map
->
getAttribute
<
PFP2
::
VEC3
,
VERTEX
>
(
positionName
);
VertexAttribute
<
PFP2
::
VEC3
>
normal
=
map
->
getAttribute
<
PFP2
::
VEC3
,
VERTEX
>
(
normalName
);
if
(
!
normal
.
isValid
())
normal
=
map
->
addAttribute
<
PFP2
::
VEC3
,
VERTEX
>
(
normalName
);
bool
createVBO
=
(
m_computeNormalDialog
->
check_createVBO
->
checkState
()
==
Qt
::
Checked
);
Algo
::
Surface
::
Geometry
::
computeNormalVertices
<
PFP2
>
(
*
map
,
position
,
normal
);
if
(
m_computeNormalDialog
->
check_createVBO
->
checkState
()
==
Qt
::
Checked
)
mh
->
createVBO
(
normal
);
QList
<
View
*>
views
=
mh
->
getLinkedViews
();
foreach
(
View
*
view
,
views
)
view
->
updateGL
();
computeNormal
(
mapName
,
positionName
,
normalName
,
createVBO
);
}
}
void
DifferentialPropertiesPlugin
::
computeCurvature
()
void
DifferentialPropertiesPlugin
::
computeCurvature
FromDialog
()
{
QList
<
QListWidgetItem
*>
currentItems
=
m_computeCurvatureDialog
->
mapList
->
selectedItems
();
if
(
!
currentItems
.
empty
())
{
const
QString
&
mapname
=
currentItems
[
0
]
->
text
();
MapHandler
<
PFP2
>*
mh
=
static_cast
<
MapHandler
<
PFP2
>*>
(
m_window
->
getMap
(
mapname
));
PFP2
::
MAP
*
map
=
mh
->
getMap
();
const
QString
&
mapName
=
currentItems
[
0
]
->
text
();
std
::
string
positionName
=
m_computeCurvatureDialog
->
combo_positionAttribute
->
currentText
().
toUtf8
().
constData
();
std
::
string
normalName
=
m_computeCurvatureDialog
->
combo_normalAttribute
->
currentText
().
toUtf8
().
constData
();
QString
positionName
=
m_computeCurvatureDialog
->
combo_positionAttribute
->
currentText
();
QString
normalName
=
m_computeCurvatureDialog
->
combo_normalAttribute
->
currentText
();
VertexAttribute
<
PFP2
::
VEC3
>
position
=
map
->
getAttribute
<
PFP2
::
VEC3
,
VERTEX
>
(
positionName
);
VertexAttribute
<
PFP2
::
VEC3
>
normal
=
map
->
getAttribute
<
PFP2
::
VEC3
,
VERTEX
>
(
normalName
);
std
::
string
KmaxName
;
QString
KmaxName
;
if
(
m_computeCurvatureDialog
->
KmaxAttributeName
->
text
().
isEmpty
())
KmaxName
=
m_computeCurvatureDialog
->
combo_KmaxAttribute
->
currentText
()
.
toUtf8
().
constData
()
;
KmaxName
=
m_computeCurvatureDialog
->
combo_KmaxAttribute
->
currentText
();
else
KmaxName
=
m_computeCurvatureDialog
->
KmaxAttributeName
->
text
().
toUtf8
().
constData
();
VertexAttribute
<
PFP2
::
VEC3
>
Kmax
=
map
->
getAttribute
<
PFP2
::
VEC3
,
VERTEX
>
(
KmaxName
);
if
(
!
Kmax
.
isValid
())
Kmax
=
map
->
addAttribute
<
PFP2
::
VEC3
,
VERTEX
>
(
KmaxName
);
KmaxName
=
m_computeCurvatureDialog
->
KmaxAttributeName
->
text
();
std
::
s
tring
kmaxName
;
QS
tring
kmaxName
;
if
(
m_computeCurvatureDialog
->
kmaxAttributeName
->
text
().
isEmpty
())
kmaxName
=
m_computeCurvatureDialog
->
combo_kmaxAttribute
->
currentText
()
.
toUtf8
().
constData
()
;
kmaxName
=
m_computeCurvatureDialog
->
combo_kmaxAttribute
->
currentText
();
else
kmaxName
=
m_computeCurvatureDialog
->
kmaxAttributeName
->
text
().
toUtf8
().
constData
();
VertexAttribute
<
PFP2
::
REAL
>
kmax
=
map
->
getAttribute
<
PFP2
::
REAL
,
VERTEX
>
(
kmaxName
);
if
(
!
kmax
.
isValid
())
kmax
=
map
->
addAttribute
<
PFP2
::
REAL
,
VERTEX
>
(
kmaxName
);
kmaxName
=
m_computeCurvatureDialog
->
kmaxAttributeName
->
text
();
std
::
s
tring
KminName
;
QS
tring
KminName
;
if
(
m_computeCurvatureDialog
->
KminAttributeName
->
text
().
isEmpty
())
KminName
=
m_computeCurvatureDialog
->
combo_KminAttribute
->
currentText
()
.
toUtf8
().
constData
()
;
KminName
=
m_computeCurvatureDialog
->
combo_KminAttribute
->
currentText
();
else
KminName
=
m_computeCurvatureDialog
->
KminAttributeName
->
text
().
toUtf8
().
constData
();
VertexAttribute
<
PFP2
::
VEC3
>
Kmin
=
map
->
getAttribute
<
PFP2
::
VEC3
,
VERTEX
>
(
KminName
);
if
(
!
Kmin
.
isValid
())
Kmin
=
map
->
addAttribute
<
PFP2
::
VEC3
,
VERTEX
>
(
KminName
);
KminName
=
m_computeCurvatureDialog
->
KminAttributeName
->
text
();
std
::
s
tring
kminName
;
QS
tring
kminName
;
if
(
m_computeCurvatureDialog
->
kminAttributeName
->
text
().
isEmpty
())
kminName
=
m_computeCurvatureDialog
->
combo_kminAttribute
->
currentText
()
.
toUtf8
().
constData
()
;
kminName
=
m_computeCurvatureDialog
->
combo_kminAttribute
->
currentText
();
else
kminName
=
m_computeCurvatureDialog
->
kminAttributeName
->
text
().
toUtf8
().
constData
();
VertexAttribute
<
PFP2
::
REAL
>
kmin
=
map
->
getAttribute
<
PFP2
::
REAL
,
VERTEX
>
(
kminName
);
if
(
!
kmin
.
isValid
())
kmin
=
map
->
addAttribute
<
PFP2
::
REAL
,
VERTEX
>
(
kminName
);
kminName
=
m_computeCurvatureDialog
->
kminAttributeName
->
text
();
std
::
s
tring
KnormalName
;
QS
tring
KnormalName
;
if
(
m_computeCurvatureDialog
->
KnormalAttributeName
->
text
().
isEmpty
())
KnormalName
=
m_computeCurvatureDialog
->
combo_KnormalAttribute
->
currentText
()
.
toUtf8
().
constData
()
;
KnormalName
=
m_computeCurvatureDialog
->
combo_KnormalAttribute
->
currentText
();
else
KnormalName
=
m_computeCurvatureDialog
->
KnormalAttributeName
->
text
().
toUtf8
().
constData
();
VertexAttribute
<
PFP2
::
VEC3
>
Knormal
=
map
->
getAttribute
<
PFP2
::
VEC3
,
VERTEX
>
(
KnormalName
);
if
(
!
Knormal
.
isValid
())
Knormal
=
map
->
addAttribute
<
PFP2
::
VEC3
,
VERTEX
>
(
KnormalName
);
KnormalName
=
m_computeCurvatureDialog
->
KnormalAttributeName
->
text
();
EdgeAttribute
<
PFP2
::
REAL
>
edgeAngle
=
map
->
getAttribute
<
PFP2
::
REAL
,
EDGE
>
(
"edgeAngle"
);
if
(
!
edgeAngle
.
isValid
())
edgeAngle
=
map
->
addAttribute
<
PFP2
::
REAL
,
EDGE
>
(
"edgeAngle"
);
Algo
::
Surface
::
Geometry
::
computeAnglesBetweenNormalsOnEdges
<
PFP2
>
(
*
map
,
position
,
edgeAngle
);
bool
KmaxVBO
=
(
m_computeCurvatureDialog
->
check_KmaxCreateVBO
->
checkState
()
==
Qt
::
Checked
);
Algo
::
Surface
::
Geometry
::
computeCurvatureVertices_NormalCycles_Projected
<
PFP2
>
(
*
map
,
0.01
f
*
mh
->
getBBdiagSize
(),
position
,
normal
,
edgeAngle
,
kmax
,
kmin
,
Kmax
,
Kmin
,
Knormal
);
bool
kmaxVBO
=
(
m_computeCurvatureDialog
->
check_kmaxCreateVBO
->
checkState
()
==
Qt
::
Checked
);
if
(
m_computeCurvatureDialog
->
check_KmaxCreateVBO
->
checkState
()
==
Qt
::
Checked
)
mh
->
createVBO
(
Kmax
);
bool
KminVBO
=
(
m_computeCurvatureDialog
->
check_KminCreateVBO
->
checkState
()
==
Qt
::
Checked
);
if
(
m_computeCurvatureDialog
->
check_kmaxCreateVBO
->
checkState
()
==
Qt
::
Checked
)