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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Etienne Schmitt
CGoGN
Commits
4fe72dc8
Commit
4fe72dc8
authored
Jan 25, 2013
by
Pierre Kraemer
Browse files
Options
Browse Files
Download
Plain Diff
Merge cgogn:~sauvage/CGoGN
parents
0e99db93
ff9485da
Changes
28
Hide whitespace changes
Inline
Side-by-side
Showing
28 changed files
with
1058 additions
and
332 deletions
+1058
-332
Apps/Examples/volumeExplorer.cpp
Apps/Examples/volumeExplorer.cpp
+20
-61
Apps/Tuto/tuto_dual3.cpp
Apps/Tuto/tuto_dual3.cpp
+1
-1
Apps/Tuto/tuto_oper3.cpp
Apps/Tuto/tuto_oper3.cpp
+4
-31
SCHNApps/Plugins/CMakeLists.txt
SCHNApps/Plugins/CMakeLists.txt
+1
-0
SCHNApps/Plugins/importVolume/CMakeLists.txt
SCHNApps/Plugins/importVolume/CMakeLists.txt
+71
-0
SCHNApps/Plugins/importVolume/importVolume.cpp
SCHNApps/Plugins/importVolume/importVolume.cpp
+54
-0
SCHNApps/Plugins/importVolume/importVolume.h
SCHNApps/Plugins/importVolume/importVolume.h
+51
-0
cmake_modules/FindQwt.cmake
cmake_modules/FindQwt.cmake
+42
-0
include/Algo/Filtering/average.h
include/Algo/Filtering/average.h
+4
-4
include/Algo/Filtering/average_normals.h
include/Algo/Filtering/average_normals.h
+13
-13
include/Algo/Filtering/bilateral.h
include/Algo/Filtering/bilateral.h
+3
-3
include/Algo/Filtering/taubin.h
include/Algo/Filtering/taubin.h
+3
-3
include/Algo/Geometry/curvature.hpp
include/Algo/Geometry/curvature.hpp
+9
-0
include/Algo/Geometry/voronoiDiagrams.h
include/Algo/Geometry/voronoiDiagrams.h
+5
-0
include/Algo/Geometry/voronoiDiagrams.hpp
include/Algo/Geometry/voronoiDiagrams.hpp
+4
-0
include/Algo/Import/import.h
include/Algo/Import/import.h
+1
-1
include/Algo/Import/importMesh.hpp
include/Algo/Import/importMesh.hpp
+1
-1
include/Algo/Modelisation/subdivision.h
include/Algo/Modelisation/subdivision.h
+1
-9
include/Algo/Modelisation/subdivision.hpp
include/Algo/Modelisation/subdivision.hpp
+0
-108
include/Algo/Render/GL2/explodeVolumeRender.h
include/Algo/Render/GL2/explodeVolumeRender.h
+18
-2
include/Algo/Render/GL2/explodeVolumeRender.hpp
include/Algo/Render/GL2/explodeVolumeRender.hpp
+353
-93
include/Topology/generic/traversor3.hpp
include/Topology/generic/traversor3.hpp
+1
-1
include/Utils/Shaders/shaderExplodeSmoothVolumes.frag
include/Utils/Shaders/shaderExplodeSmoothVolumes.frag
+19
-0
include/Utils/Shaders/shaderExplodeSmoothVolumes.geom
include/Utils/Shaders/shaderExplodeSmoothVolumes.geom
+46
-0
include/Utils/Shaders/shaderExplodeSmoothVolumes.h
include/Utils/Shaders/shaderExplodeSmoothVolumes.h
+101
-0
include/Utils/Shaders/shaderExplodeSmoothVolumes.vert
include/Utils/Shaders/shaderExplodeSmoothVolumes.vert
+14
-0
include/Utils/Shaders/shaderExplodeVolumes.geom
include/Utils/Shaders/shaderExplodeVolumes.geom
+1
-1
src/Utils/Shaders/shaderExplodeSmoothVolumes.cpp
src/Utils/Shaders/shaderExplodeSmoothVolumes.cpp
+217
-0
No files found.
Apps/Examples/volumeExplorer.cpp
View file @
4fe72dc8
...
...
@@ -144,52 +144,28 @@ void MyQT::cb_Open()
size_t
pos
=
filename
.
rfind
(
"."
);
// position of "." in filename
std
::
string
extension
=
filename
.
substr
(
pos
);
if
(
extension
==
std
::
string
(
".tet"
))
{
if
(
!
Algo
::
Volume
::
Import
::
importTet
<
PFP
>
(
myMap
,
filename
,
attrNames
))
{
CGoGNerr
<<
"could not import "
<<
filename
<<
CGoGNendl
;
return
;
}
else
position
=
myMap
.
getAttribute
<
PFP
::
VEC3
,
VERTEX
>
(
attrNames
[
0
])
;
}
if
(
extension
==
std
::
string
(
".node"
))
if
(
extension
==
std
::
string
(
".off"
))
{
if
(
!
Algo
::
Volume
::
Import
::
importMesh
V
<
PFP
>
(
myMap
,
filename
,
attrNames
,
Algo
::
Volume
::
Import
::
NODE
))
if
(
!
Algo
::
Volume
::
Import
::
importMesh
ToExtrude
<
PFP
>
(
myMap
,
filename
,
attrNames
))
{
std
::
cerr
<<
"could not import "
<<
filename
<<
std
::
endl
;
return
;
}
else
position
=
myMap
.
getAttribute
<
PFP
::
VEC3
,
VERTEX
>
(
attrNames
[
0
])
;
}
if
(
extension
==
std
::
string
(
".ts"
))
{
if
(
!
Algo
::
Volume
::
Import
::
importMeshV
<
PFP
>
(
myMap
,
filename
,
attrNames
,
Algo
::
Volume
::
Import
::
TS
))
{
std
::
cerr
<<
"could not import "
<<
filename
<<
std
::
endl
;
return
;
position
=
myMap
.
getAttribute
<
PFP
::
VEC3
,
VERTEX
>
(
attrNames
[
0
])
;
myMap
.
closeMap
()
;
}
else
position
=
myMap
.
getAttribute
<
PFP
::
VEC3
,
VERTEX
>
(
attrNames
[
0
])
;
}
if
(
extension
==
std
::
string
(
".off"
))
else
{
if
(
!
Algo
::
Volume
::
Import
::
importMesh
ToExtrude
<
PFP
>
(
myMap
,
filename
,
attrNames
))
if
(
!
Algo
::
Volume
::
Import
::
importMesh
<
PFP
>
(
myMap
,
filename
,
attrNames
))
{
std
::
cerr
<<
"could not import "
<<
filename
<<
std
::
endl
;
return
;
}
else
{
position
=
myMap
.
getAttribute
<
PFP
::
VEC3
,
VERTEX
>
(
attrNames
[
0
])
;
myMap
.
closeMap
();
}
position
=
myMap
.
getAttribute
<
PFP
::
VEC3
,
VERTEX
>
(
attrNames
[
0
])
;
}
color
=
myMap
.
addAttribute
<
PFP
::
VEC3
,
VOLUME
>
(
"color"
);
...
...
@@ -397,31 +373,22 @@ int main(int argc, char **argv)
size_t
pos
=
filename
.
rfind
(
"."
);
// position of "." in filename
std
::
string
extension
=
filename
.
substr
(
pos
);
if
(
extension
==
std
::
string
(
".
tet
"
))
if
(
extension
==
std
::
string
(
".
off
"
))
{
if
(
!
Algo
::
Volume
::
Import
::
import
Tet
<
PFP
>
(
myMap
,
argv
[
1
],
attrNames
))
if
(
!
Algo
::
Volume
::
Import
::
import
MeshToExtrude
<
PFP
>
(
myMap
,
filename
,
attrNames
))
{
CGoGNerr
<<
"could not import "
<<
argv
[
1
]
<<
CGoGN
endl
;
std
::
cerr
<<
"could not import "
<<
filename
<<
std
::
endl
;
return
1
;
}
else
position
=
myMap
.
getAttribute
<
PFP
::
VEC3
,
VERTEX
>
(
attrNames
[
0
])
;
}
if
(
extension
==
std
::
string
(
".node"
))
{
if
(
!
Algo
::
Volume
::
Import
::
importMeshV
<
PFP
>
(
myMap
,
argv
[
1
],
attrNames
,
Algo
::
Volume
::
Import
::
NODE
))
{
std
::
cerr
<<
"could not import "
<<
argv
[
1
]
<<
std
::
endl
;
return
1
;
position
=
myMap
.
getAttribute
<
PFP
::
VEC3
,
VERTEX
>
(
attrNames
[
0
])
;
myMap
.
closeMap
()
;
}
else
position
=
myMap
.
getAttribute
<
PFP
::
VEC3
,
VERTEX
>
(
attrNames
[
0
])
;
}
if
(
extension
==
std
::
string
(
".ts"
))
else
{
if
(
!
Algo
::
Volume
::
Import
::
importMesh
V
<
PFP
>
(
myMap
,
filename
,
attrNames
,
Algo
::
Volume
::
Import
::
TS
))
if
(
!
Algo
::
Volume
::
Import
::
importMesh
<
PFP
>
(
myMap
,
filename
,
attrNames
))
{
std
::
cerr
<<
"could not import "
<<
filename
<<
std
::
endl
;
return
1
;
...
...
@@ -430,20 +397,6 @@ int main(int argc, char **argv)
position
=
myMap
.
getAttribute
<
PFP
::
VEC3
,
VERTEX
>
(
attrNames
[
0
])
;
}
if
(
extension
==
std
::
string
(
".off"
))
{
if
(
!
Algo
::
Volume
::
Import
::
importMeshToExtrude
<
PFP
>
(
myMap
,
argv
[
1
],
attrNames
))
{
std
::
cerr
<<
"could not import "
<<
std
::
endl
;
return
1
;
}
else
{
position
=
myMap
.
getAttribute
<
PFP
::
VEC3
,
VERTEX
>
(
attrNames
[
0
])
;
myMap
.
closeMap
();
}
}
color
=
myMap
.
addAttribute
<
PFP
::
VEC3
,
VOLUME
>
(
"color"
);
TraversorCell
<
PFP
::
MAP
,
VOLUME
>
tra
(
myMap
);
...
...
@@ -469,6 +422,12 @@ int main(int argc, char **argv)
prim
.
hexaGrid_topo
(
nb
,
nb
,
nb
);
prim
.
embedHexaGrid
(
1.0
f
,
1.0
f
,
1.0
f
);
for
(
unsigned
int
i
=
position
.
begin
();
i
!=
position
.
end
();
position
.
next
(
i
))
{
PFP
::
VEC3
pert
(
float
(
double
(
rand
())
/
RAND_MAX
/
20.0
),
float
(
double
(
rand
())
/
RAND_MAX
/
20.0
),
float
(
double
(
rand
())
/
RAND_MAX
/
20.0
));
position
[
i
]
+=
pert
;
}
color
=
myMap
.
addAttribute
<
PFP
::
VEC3
,
VOLUME
>
(
"color"
);
TraversorW
<
PFP
::
MAP
>
tra
(
myMap
);
for
(
Dart
d
=
tra
.
begin
();
d
!=
tra
.
end
();
d
=
tra
.
next
())
...
...
Apps/Tuto/tuto_dual3.cpp
View file @
4fe72dc8
...
...
@@ -61,7 +61,7 @@ int main(int argc, char **argv)
PFP
::
MAP
myMap
;
std
::
vector
<
std
::
string
>
attrNames
;
Algo
::
Volume
::
Import
::
importMesh
V
<
PFP
>
(
myMap
,
argv
[
1
],
attrNames
,
Algo
::
Volume
::
Import
::
NODE
);
Algo
::
Volume
::
Import
::
importMesh
<
PFP
>
(
myMap
,
argv
[
1
],
attrNames
);
// get a handler to the 3D vector attribute created by the import
VertexAttribute
<
PFP
::
VEC3
>
position
=
myMap
.
getAttribute
<
PFP
::
VEC3
,
VERTEX
>
(
attrNames
[
0
]);
...
...
Apps/Tuto/tuto_oper3.cpp
View file @
4fe72dc8
...
...
@@ -612,47 +612,20 @@ void MyQT::importMesh(std::string& filename)
size_t
pos
=
filename
.
rfind
(
"."
);
// position of "." in filename
std
::
string
extension
=
filename
.
substr
(
pos
);
std
::
vector
<
std
::
string
>
attrNames
;
if
(
extension
==
std
::
string
(
".map"
))
{
myMap
.
loadMapBin
(
filename
);
position
=
myMap
.
getAttribute
<
VEC3
,
VERTEX
>
(
"position"
)
;
}
else
if
(
extension
==
std
::
string
(
".node"
))
{
std
::
vector
<
std
::
string
>
attrNames
;
if
(
!
Algo
::
Volume
::
Import
::
importMeshV
<
PFP
>
(
myMap
,
filename
,
attrNames
,
Algo
::
Volume
::
Import
::
NODE
))
{
std
::
cerr
<<
"could not import "
<<
filename
<<
std
::
endl
;
return
;
}
position
=
myMap
.
getAttribute
<
VEC3
,
VERTEX
>
(
attrNames
[
0
])
;
}
else
if
(
extension
==
std
::
string
(
".tet"
))
{
std
::
vector
<
std
::
string
>
attrNames
;
if
(
!
Algo
::
Volume
::
Import
::
importMeshV
<
PFP
>
(
myMap
,
filename
,
attrNames
,
Algo
::
Volume
::
Import
::
TET
))
{
std
::
cerr
<<
"could not import "
<<
filename
<<
std
::
endl
;
return
;
}
position
=
myMap
.
getAttribute
<
VEC3
,
VERTEX
>
(
attrNames
[
0
])
;
}
else
if
(
extension
==
std
::
string
(
".off"
))
{
std
::
vector
<
std
::
string
>
attrNames
;
if
(
!
Algo
::
Volume
::
Import
::
importMeshV
<
PFP
>
(
myMap
,
filename
,
attrNames
,
Algo
::
Volume
::
Import
::
OFF
))
{
std
::
cerr
<<
"could not import "
<<
filename
<<
std
::
endl
;
return
;
}
position
=
myMap
.
getAttribute
<
VEC3
,
VERTEX
>
(
attrNames
[
0
])
;
}
else
else
if
(
!
Algo
::
Volume
::
Import
::
importMesh
<
PFP
>
(
myMap
,
filename
,
attrNames
))
{
std
::
cerr
<<
"could not import "
<<
filename
<<
std
::
endl
;
return
;
}
else
position
=
myMap
.
getAttribute
<
PFP
::
VEC3
,
VERTEX
>
(
attrNames
[
0
])
;
m_selected
=
NIL
;
m_selected2
=
NIL
;
...
...
SCHNApps/Plugins/CMakeLists.txt
View file @
4fe72dc8
cmake_minimum_required
(
VERSION 2.8
)
ADD_SUBDIRECTORY
(
importSurface
)
ADD_SUBDIRECTORY
(
importVolume
)
ADD_SUBDIRECTORY
(
differentialProperties
)
ADD_SUBDIRECTORY
(
render
)
ADD_SUBDIRECTORY
(
renderVector
)
...
...
SCHNApps/Plugins/importVolume/CMakeLists.txt
0 → 100644
View file @
4fe72dc8
cmake_minimum_required
(
VERSION 2.8
)
INCLUDE_DIRECTORIES
(
${
SCHNApps_ROOT_DIR
}
/include
${
SCHNApps_ROOT_DIR
}
/Plugins/importVolume
${
CMAKE_CURRENT_BINARY_DIR
}
)
SET
(
PLUGIN_SRC
${
SCHNApps_ROOT_DIR
}
/Plugins/importVolume/importVolume.cpp
)
SET
(
PLUGIN_H
${
SCHNApps_ROOT_DIR
}
/Plugins/importVolume/importVolume.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
(
ImportVolumePluginD SHARED
${
PLUGIN_SRC
}
${
PLUGIN_UI
}
${
PLUGIN_MOC
}
)
TARGET_LINK_LIBRARIES
(
ImportVolumePluginD
${
CGoGN_LIBS_D
}
${
COMMON_LIBS
}
${
QGLVIEWER_LIBRARIES
}
)
ADD_DEPENDENCIES
(
ImportVolumePluginD SCHNAppsD
)
SET_TARGET_PROPERTIES
(
ImportVolumePluginD 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
(
ImportVolumePlugin SHARED
${
PLUGIN_SRC
}
${
PLUGIN_UI
}
${
PLUGIN_MOC
}
)
TARGET_LINK_LIBRARIES
(
ImportVolumePlugin
${
CGoGN_LIBS_R
}
${
COMMON_LIBS
}
${
QGLVIEWER_LIBRARIES
}
)
ADD_DEPENDENCIES
(
ImportVolumePlugin SCHNApps
)
ENDIF
(
${
CMAKE_BUILD_TYPE
}
STREQUAL Debug
)
SCHNApps/Plugins/importVolume/importVolume.cpp
0 → 100644
View file @
4fe72dc8
#include "importVolume.h"
#include "mapHandler.h"
#include "Algo/Import/import.h"
#include <QFileDialog>
#include <QFileInfo>
bool
ImportVolumePlugin
::
enable
()
{
importAction
=
new
QAction
(
"import"
,
this
);
addMenuAction
(
"Volume;Import"
,
importAction
);
connect
(
importAction
,
SIGNAL
(
triggered
()),
this
,
SLOT
(
cb_import
()));
return
true
;
}
void
ImportVolumePlugin
::
cb_import
()
{
QString
fileName
=
QFileDialog
::
getOpenFileName
(
m_window
,
"Import file"
,
m_window
->
getAppPath
(),
"Mesh Files (*.node *.ts *.off *.tet)"
);
QFileInfo
fi
(
fileName
);
if
(
fi
.
exists
())
{
GenericMap
*
m
=
m_window
->
createMap
(
3
);
PFP3
::
MAP
*
map
=
static_cast
<
PFP3
::
MAP
*>
(
m
);
MapHandler
<
PFP3
>*
h
=
new
MapHandler
<
PFP3
>
(
fi
.
baseName
(),
m_window
,
map
);
std
::
vector
<
std
::
string
>
attrNames
;
Algo
::
Volume
::
Import
::
importMesh
<
PFP3
>
(
*
map
,
fileName
.
toUtf8
().
constData
(),
attrNames
);
// get vertex position attribute
VertexAttribute
<
PFP2
::
VEC3
>
position
=
map
->
getAttribute
<
PFP2
::
VEC3
,
CGoGN
::
VERTEX
>
(
attrNames
[
0
]);
// create VBO for vertex position attribute
h
->
createVBO
(
position
);
// compute map bounding box
h
->
updateBB
(
position
);
// compute primitive connectivity VBOs
h
->
updatePrimitives
(
Algo
::
Render
::
GL2
::
POINTS
);
h
->
updatePrimitives
(
Algo
::
Render
::
GL2
::
LINES
);
h
->
updatePrimitives
(
Algo
::
Render
::
GL2
::
TRIANGLES
);
m_window
->
addMap
(
h
);
}
}
#ifndef DEBUG
Q_EXPORT_PLUGIN2
(
ImportVolumePlugin
,
ImportVolumePlugin
)
#else
Q_EXPORT_PLUGIN2
(
ImportVolumePluginD
,
ImportVolumePlugin
)
#endif
SCHNApps/Plugins/importVolume/importVolume.h
0 → 100644
View file @
4fe72dc8
#ifndef _IMPORTSURFACE_PLUGIN_H_
#define _IMPORTSURFACE_PLUGIN_H_
#include "plugin.h"
using
namespace
CGoGN
;
using
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
,
int
key
)
{}
virtual
void
keyRelease
(
View
*
view
,
int
key
)
{}
virtual
void
mousePress
(
View
*
view
,
int
button
,
int
x
,
int
y
)
{}
virtual
void
mouseRelease
(
View
*
view
,
int
button
,
int
x
,
int
y
)
{}
virtual
void
mouseMove
(
View
*
view
,
int
buttons
,
int
x
,
int
y
)
{}
virtual
void
wheelEvent
(
View
*
view
,
int
delta
,
int
x
,
int
y
)
{}
virtual
void
viewLinked
(
View
*
view
)
{}
virtual
void
viewUnlinked
(
View
*
view
)
{}
virtual
void
currentViewChanged
(
View
*
view
)
{}
virtual
void
mapLinked
(
View
*
view
,
MapHandlerGen
*
m
)
{}
virtual
void
mapUnlinked
(
View
*
view
,
MapHandlerGen
*
m
)
{}
public
slots
:
void
cb_import
();
private:
QAction
*
importAction
;
};
#endif
cmake_modules/FindQwt.cmake
0 → 100644
View file @
4fe72dc8
# Find Qwt
# ~~~~~~~~
# Copyright (c) 2010, Tim Sutton <tim at linfiniti.com>
# Redistribution and use is allowed according to the terms of the BSD license.
# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
#
# Once run this will define:
#
# QWT_FOUND = system has QWT lib
# QWT_LIBRARY = full path to the QWT library
# QWT_INCLUDE_DIR = where to find headers
#
FIND_PATH
(
QWT_INCLUDE_DIR NAMES qwt.h PATHS
/usr/include
/usr/local/include
"$ENV{LIB_DIR}/include"
"$ENV{INCLUDE}"
PATH_SUFFIXES qwt-qt4 qwt qwt5
)
FIND_LIBRARY
(
QWT_LIBRARY NAMES qwt qwt5 qwt-qt4 qwt5-qt4 PATHS
/usr/lib
/usr/local/lib
"$ENV{LIB_DIR}/lib"
"$ENV{LIB}/lib"
)
IF
(
QWT_INCLUDE_DIR AND QWT_LIBRARY
)
SET
(
QWT_FOUND TRUE
)
ENDIF
(
QWT_INCLUDE_DIR AND QWT_LIBRARY
)
IF
(
QWT_FOUND
)
IF
(
NOT QWT_FIND_QUIETLY
)
MESSAGE
(
STATUS
"Found Qwt:
${
QWT_LIBRARY
}
"
)
ENDIF
(
NOT QWT_FIND_QUIETLY
)
ELSE
(
QWT_FOUND
)
IF
(
QWT_FIND_REQUIRED
)
MESSAGE
(
FATAL_ERROR
"Could not find Qwt"
)
ENDIF
(
QWT_FIND_REQUIRED
)
ENDIF
(
QWT_FOUND
)
include/Algo/Filtering/average.h
View file @
4fe72dc8
...
...
@@ -49,7 +49,7 @@ void filterAverageAttribute_OneRing(
const
FunctorSelect
&
select
=
allDarts
)
{
FunctorAverage
<
T
,
VERTEX
>
fa
(
attIn
)
;
Algo
::
Selection
::
Collector_OneRing
<
PFP
>
col
(
map
)
;
Algo
::
S
urface
::
S
election
::
Collector_OneRing
<
PFP
>
col
(
map
)
;
TraversorV
<
typename
PFP
::
MAP
>
t
(
map
,
select
)
;
for
(
Dart
d
=
t
.
begin
();
d
!=
t
.
end
();
d
=
t
.
next
())
...
...
@@ -98,7 +98,7 @@ void filterAverageVertexAttribute_WithinSphere(
{
FunctorAverage
<
T
,
VERTEX
>
faInside
(
attIn
)
;
FunctorAverageOnSphereBorder
<
PFP
,
T
>
faBorder
(
map
,
attIn
,
position
)
;
Algo
::
Selection
::
Collector_WithinSphere
<
PFP
>
col
(
map
,
position
,
radius
)
;
Algo
::
S
urface
::
S
election
::
Collector_WithinSphere
<
PFP
>
col
(
map
,
position
,
radius
)
;
TraversorV
<
typename
PFP
::
MAP
>
t
(
map
,
select
)
;
for
(
Dart
d
=
t
.
begin
();
d
!=
t
.
end
();
d
=
t
.
next
())
...
...
@@ -139,7 +139,7 @@ void filterAverageEdgeAttribute_WithinSphere(
const
FunctorSelect
&
select
=
allDarts
)
{
FunctorAverage
<
T
,
EDGE
>
fa
(
attIn
)
;
Algo
::
Selection
::
Collector_WithinSphere
<
PFP
>
col
(
map
,
position
,
radius
)
;
Algo
::
S
urface
::
S
election
::
Collector_WithinSphere
<
PFP
>
col
(
map
,
position
,
radius
)
;
TraversorE
<
typename
PFP
::
MAP
>
t
(
map
,
select
)
;
for
(
Dart
d
=
t
.
begin
();
d
!=
t
.
end
();
d
=
t
.
next
())
...
...
@@ -167,7 +167,7 @@ void filterAverageFaceAttribute_WithinSphere(
const
FunctorSelect
&
select
=
allDarts
)
{
FunctorAverage
<
T
,
FACE
>
fa
(
attIn
)
;
Algo
::
Selection
::
Collector_WithinSphere
<
PFP
>
col
(
map
,
position
,
radius
)
;
Algo
::
S
urface
::
S
election
::
Collector_WithinSphere
<
PFP
>
col
(
map
,
position
,
radius
)
;
TraversorF
<
typename
PFP
::
MAP
>
t
(
map
,
select
)
;
for
(
Dart
d
=
t
.
begin
();
d
!=
t
.
end
();
d
=
t
.
next
())
...
...
include/Algo/Filtering/average_normals.h
View file @
4fe72dc8
...
...
@@ -87,9 +87,9 @@ void filterAverageNormals(typename PFP::MAP& map, const VertexAttribute<typename
FaceAutoAttribute
<
VEC3
>
faceNormal
(
map
,
"faceNormal"
)
;
FaceAutoAttribute
<
VEC3
>
faceCentroid
(
map
,
"faceCentroid"
)
;
Algo
::
Geometry
::
computeAreaFaces
<
PFP
>
(
map
,
position
,
faceArea
,
select
)
;
Algo
::
Geometry
::
computeNormalFaces
<
PFP
>
(
map
,
position
,
faceNormal
,
select
)
;
Algo
::
Geometry
::
computeCentroidFaces
<
PFP
>
(
map
,
position
,
faceCentroid
,
select
)
;
Algo
::
Surface
::
Geometry
::
computeAreaFaces
<
PFP
>
(
map
,
position
,
faceArea
,
select
)
;
Algo
::
Surface
::
Geometry
::
computeNormalFaces
<
PFP
>
(
map
,
position
,
faceNormal
,
select
)
;
Algo
::
Surface
::
Geometry
::
computeCentroidFaces
<
PFP
>
(
map
,
position
,
faceCentroid
,
select
)
;
FaceAutoAttribute
<
VEC3
>
faceNewNormal
(
map
,
"faceNewNormal"
)
;
...
...
@@ -131,9 +131,9 @@ void filterMMSE(typename PFP::MAP& map, float sigmaN2, const VertexAttribute<typ
FaceAutoAttribute
<
VEC3
>
faceNormal
(
map
,
"faceNormal"
)
;
FaceAutoAttribute
<
VEC3
>
faceCentroid
(
map
,
"faceCentroid"
)
;
Algo
::
Geometry
::
computeAreaFaces
<
PFP
>
(
map
,
position
,
faceArea
,
select
)
;
Algo
::
Geometry
::
computeNormalFaces
<
PFP
>
(
map
,
position
,
faceNormal
,
select
)
;
Algo
::
Geometry
::
computeCentroidFaces
<
PFP
>
(
map
,
position
,
faceCentroid
,
select
)
;
Algo
::
Surface
::
Geometry
::
computeAreaFaces
<
PFP
>
(
map
,
position
,
faceArea
,
select
)
;
Algo
::
Surface
::
Geometry
::
computeNormalFaces
<
PFP
>
(
map
,
position
,
faceNormal
,
select
)
;
Algo
::
Surface
::
Geometry
::
computeCentroidFaces
<
PFP
>
(
map
,
position
,
faceCentroid
,
select
)
;
FaceAutoAttribute
<
VEC3
>
faceNewNormal
(
map
,
"faceNewNormal"
)
;
...
...
@@ -216,9 +216,9 @@ void filterTNBA(typename PFP::MAP& map, float sigmaN2, float SUSANthreshold, con
FaceAutoAttribute
<
VEC3
>
faceNormal
(
map
,
"faceNormal"
)
;
FaceAutoAttribute
<
VEC3
>
faceCentroid
(
map
,
"faceCentroid"
)
;
Algo
::
Geometry
::
computeAreaFaces
<
PFP
>
(
map
,
position
,
faceArea
,
select
)
;
Algo
::
Geometry
::
computeNormalFaces
<
PFP
>
(
map
,
position
,
faceNormal
,
select
)
;
Algo
::
Geometry
::
computeCentroidFaces
<
PFP
>
(
map
,
position
,
faceCentroid
,
select
)
;
Algo
::
Surface
::
Geometry
::
computeAreaFaces
<
PFP
>
(
map
,
position
,
faceArea
,
select
)
;
Algo
::
Surface
::
Geometry
::
computeNormalFaces
<
PFP
>
(
map
,
position
,
faceNormal
,
select
)
;
Algo
::
Surface
::
Geometry
::
computeCentroidFaces
<
PFP
>
(
map
,
position
,
faceCentroid
,
select
)
;
FaceAutoAttribute
<
VEC3
>
faceNewNormal
(
map
,
"faceNewNormal"
)
;
...
...
@@ -335,9 +335,9 @@ void filterVNBA(typename PFP::MAP& map, float sigmaN2, float SUSANthreshold, con
FaceAutoAttribute
<
VEC3
>
faceNormal
(
map
,
"faceNormal"
)
;
FaceAutoAttribute
<
VEC3
>
faceCentroid
(
map
,
"faceCentroid"
)
;
Algo
::
Geometry
::
computeAreaFaces
<
PFP
>
(
map
,
position
,
faceArea
,
select
)
;
Algo
::
Geometry
::
computeNormalFaces
<
PFP
>
(
map
,
position
,
faceNormal
,
select
)
;
Algo
::
Geometry
::
computeCentroidFaces
<
PFP
>
(
map
,
position
,
faceCentroid
,
select
)
;
Algo
::
Surface
::
Geometry
::
computeAreaFaces
<
PFP
>
(
map
,
position
,
faceArea
,
select
)
;
Algo
::
Surface
::
Geometry
::
computeNormalFaces
<
PFP
>
(
map
,
position
,
faceNormal
,
select
)
;
Algo
::
Surface
::
Geometry
::
computeCentroidFaces
<
PFP
>
(
map
,
position
,
faceCentroid
,
select
)
;
VertexAutoAttribute
<
REAL
>
vertexArea
(
map
,
"vertexArea"
)
;
FaceAutoAttribute
<
VEC3
>
faceNewNormal
(
map
,
"faceNewNormal"
)
;
...
...
@@ -369,7 +369,7 @@ void filterVNBA(typename PFP::MAP& map, float sigmaN2, float SUSANthreshold, con
float
angle
=
Geom
::
angle
(
normV
,
neighborNormal
)
;
if
(
angle
<=
SUSANthreshold
)
{
REAL
umbArea
=
Algo
::
Geometry
::
vertexOneRingArea
<
PFP
>
(
map
,
it
,
position
)
;
REAL
umbArea
=
Algo
::
Surface
::
Geometry
::
vertexOneRingArea
<
PFP
>
(
map
,
it
,
position
)
;
vertexArea
[
it
]
=
umbArea
;
sumArea
+=
umbArea
;
...
...
include/Algo/Filtering/bilateral.h
View file @
4fe72dc8
...
...
@@ -49,7 +49,7 @@ void sigmaBilateral(typename PFP::MAP& map, const VertexAttribute<typename PFP::
TraversorE
<
typename
PFP
::
MAP
>
t
(
map
,
select
)
;
for
(
Dart
d
=
t
.
begin
();
d
!=
t
.
end
();
d
=
t
.
next
())
{
sumLengths
+=
Algo
::
Geometry
::
edgeLength
<
PFP
>
(
map
,
d
,
position
)
;
sumLengths
+=
Algo
::
Surface
::
Geometry
::
edgeLength
<
PFP
>
(
map
,
d
,
position
)
;
sumAngles
+=
Geom
::
angle
(
normal
[
d
],
normal
[
map
.
phi1
(
d
)])
;
++
nbEdges
;
}
...
...
@@ -80,7 +80,7 @@ void filterBilateral(typename PFP::MAP& map, const VertexAttribute<typename PFP:
Traversor2VE
<
typename
PFP
::
MAP
>
te
(
map
,
d
)
;
for
(
Dart
it
=
te
.
begin
();
it
!=
te
.
end
();
it
=
te
.
next
())
{
VEC3
vec
=
Algo
::
Geometry
::
vectorOutOfDart
<
PFP
>
(
map
,
it
,
position
)
;
VEC3
vec
=
Algo
::
Surface
::
Geometry
::
vectorOutOfDart
<
PFP
>
(
map
,
it
,
position
)
;
float
h
=
normal_d
*
vec
;
float
t
=
vec
.
norm
()
;
float
wcs
=
exp
(
(
-
1.0
f
*
(
t
*
t
)
/
(
2.0
f
*
sigmaC
*
sigmaC
)
)
+
(
-
1.0
f
*
(
h
*
h
)
/
(
2.0
f
*
sigmaS
*
sigmaS
)
)
)
;
...
...
@@ -125,7 +125,7 @@ void filterSUSAN(typename PFP::MAP& map, float SUSANthreshold, const VertexAttri
float
angle
=
Geom
::
angle
(
normal_d
,
neighborNormal
)
;
if
(
angle
<=
SUSANthreshold
)
{
VEC3
vec
=
Algo
::
Geometry
::
vectorOutOfDart
<
PFP
>
(
map
,
it
,
position
)
;
VEC3
vec
=
Algo
::
Surface
::
Geometry
::
vectorOutOfDart
<
PFP
>
(
map
,
it
,
position
)
;
float
h
=
normal_d
*
vec
;
float
t
=
vec
.
norm
()
;
float
wcs
=
exp
(
(
-
1.0
f
*
(
t
*
t
)
/
(
2.0
f
*
sigmaC
*
sigmaC
)
)
+
(
-
1.0
f
*
(
h
*
h
)
/
(
2.0
f
*
sigmaS
*
sigmaS
)
)
);
...
...
include/Algo/Filtering/taubin.h
View file @
4fe72dc8
...
...
@@ -42,7 +42,7 @@ void filterTaubin(typename PFP::MAP& map, VertexAttribute<typename PFP::VEC3>& p
{
typedef
typename
PFP
::
VEC3
VEC3
;
Algo
::
Selection
::
Collector_OneRing
<
PFP
>
c
(
map
)
;
Algo
::
S
urface
::
S
election
::
Collector_OneRing
<
PFP
>
c
(
map
)
;
const
float
lambda
=
0.6307
;
const
float
mu
=
-
0.6732
;
...
...
@@ -109,7 +109,7 @@ void filterTaubin_modified(typename PFP::MAP& map, VertexAttribute<typename PFP:
CellMarkerNoUnmark
<
VERTEX
>
mv
(
map
)
;
FunctorAverageOnSphereBorder
<
PFP
,
VEC3
>
fa1
(
map
,
position
,
position
)
;
Algo
::
Selection
::
Collector_WithinSphere
<
PFP
>
c1
(
map
,
position
,
radius
)
;
Algo
::
S
urface
::
S
election
::
Collector_WithinSphere
<
PFP
>
c1
(
map
,
position
,
radius
)
;
for
(
Dart
d
=
map
.
begin
();
d
!=
map
.
end
();
map
.
next
(
d
))
{
if
(
select
(
d
)
&&
!
mv
.
isMarked
(
d
))
...
...
@@ -133,7 +133,7 @@ void filterTaubin_modified(typename PFP::MAP& map, VertexAttribute<typename PFP:
// unshrinking step
FunctorAverageOnSphereBorder
<
PFP
,
VEC3
>
fa2
(
map
,
position2
,
position2
)
;
Algo
::
Selection
::
Collector_WithinSphere
<
PFP
>
c2
(
map
,
position2
,
radius
)
;
Algo
::
S
urface
::
S
election
::
Collector_WithinSphere
<
PFP
>
c2
(
map
,
position2
,
radius
)
;
for
(
Dart
d
=
map
.
begin
();
d
!=
map
.
end
();
map
.
next
(
d
))
{
if
(
select
(
d
)
&&
mv
.
isMarked
(
d
))
...
...
include/Algo/Geometry/curvature.hpp
View file @
4fe72dc8
...
...
@@ -27,6 +27,15 @@
#include "Topology/generic/traversorCell.h"
#include "Topology/generic/traversor2.h"
extern "C"
{
#include "C_BLAS_LAPACK/INCLUDE/f2c.h"
#include "C_BLAS_LAPACK/INCLUDE/clapack.h"
}
#undef max
#undef min
namespace CGoGN
{
...
...
include/Algo/Geometry/voronoiDiagrams.h
View file @
4fe72dc8
...
...
@@ -14,6 +14,10 @@ namespace CGoGN
namespace
Algo
{
namespace
Surface
{
namespace
Geometry