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
d574eb73
Commit
d574eb73
authored
Mar 06, 2014
by
Pierre Kraemer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
SCHNApps en bonne voie..
parent
13c0da82
Changes
76
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
76 changed files
with
1615 additions
and
1518 deletions
+1615
-1518
SCHNApps/Plugins/surface_deformation/include/surface_deformation.h
...Plugins/surface_deformation/include/surface_deformation.h
+8
-8
SCHNApps/Plugins/surface_deformation/src/surface_deformation.cpp
...s/Plugins/surface_deformation/src/surface_deformation.cpp
+11
-6
SCHNApps/Plugins/surface_deformation/src/surface_deformation_dockTab.cpp
...s/surface_deformation/src/surface_deformation_dockTab.cpp
+12
-3
SCHNApps/Plugins/surface_differentialProperties/src/surface_differentialProperties.cpp
...erentialProperties/src/surface_differentialProperties.cpp
+12
-12
SCHNApps/Plugins/surface_import/src/surface_import.cpp
SCHNApps/Plugins/surface_import/src/surface_import.cpp
+1
-1
SCHNApps/Plugins/surface_modelisation/include/surface_modelisation.h
...ugins/surface_modelisation/include/surface_modelisation.h
+4
-4
SCHNApps/Plugins/surface_modelisation/src/surface_modelisation.cpp
...Plugins/surface_modelisation/src/surface_modelisation.cpp
+17
-15
SCHNApps/Plugins/surface_modelisation/src/surface_modelisation_dockTab.cpp
...surface_modelisation/src/surface_modelisation_dockTab.cpp
+16
-4
SCHNApps/Plugins/surface_renderScalar/src/surface_renderScalar.cpp
...Plugins/surface_renderScalar/src/surface_renderScalar.cpp
+4
-2
SCHNApps/Plugins/surface_renderScalar/src/surface_renderScalar_dockTab.cpp
...surface_renderScalar/src/surface_renderScalar_dockTab.cpp
+2
-1
SCHNApps/Plugins/surface_renderTopo/include/surface_renderTopo.h
...s/Plugins/surface_renderTopo/include/surface_renderTopo.h
+1
-1
SCHNApps/Plugins/surface_renderTopo/src/surface_renderTopo_dockTab.cpp
...ins/surface_renderTopo/src/surface_renderTopo_dockTab.cpp
+4
-4
SCHNApps/Plugins/surface_selection/include/surface_selection.h
...pps/Plugins/surface_selection/include/surface_selection.h
+2
-2
SCHNApps/Plugins/surface_selection/src/surface_selection.cpp
SCHNApps/Plugins/surface_selection/src/surface_selection.cpp
+4
-2
SCHNApps/Plugins/surface_selection/src/surface_selection_dockTab.cpp
...ugins/surface_selection/src/surface_selection_dockTab.cpp
+8
-2
SCHNApps/Plugins/surface_subdivision/src/surface_subdivision.cpp
...s/Plugins/surface_subdivision/src/surface_subdivision.cpp
+3
-3
SCHNApps/Plugins/volume_import/src/volume_import.cpp
SCHNApps/Plugins/volume_import/src/volume_import.cpp
+1
-1
SCHNApps/include/cellSelector.h
SCHNApps/include/cellSelector.h
+8
-8
SCHNApps/include/mapHandler.h
SCHNApps/include/mapHandler.h
+30
-14
SCHNApps/include/mapHandler.hpp
SCHNApps/include/mapHandler.hpp
+67
-35
SCHNApps/src/controlDock_mapTab.cpp
SCHNApps/src/controlDock_mapTab.cpp
+4
-4
SCHNApps/src/mapHandler.cpp
SCHNApps/src/mapHandler.cpp
+2
-29
include/Algo/Geometry/centroid.h
include/Algo/Geometry/centroid.h
+16
-16
include/Algo/Geometry/centroid.hpp
include/Algo/Geometry/centroid.hpp
+17
-40
include/Algo/Geometry/inclusion.h
include/Algo/Geometry/inclusion.h
+10
-10
include/Algo/Geometry/inclusion.hpp
include/Algo/Geometry/inclusion.hpp
+12
-12
include/Algo/Geometry/normal.h
include/Algo/Geometry/normal.h
+1
-4
include/Algo/Geometry/normalization.h
include/Algo/Geometry/normalization.h
+3
-3
include/Algo/Geometry/orientation.h
include/Algo/Geometry/orientation.h
+1
-1
include/Algo/Geometry/plane.h
include/Algo/Geometry/plane.h
+3
-3
include/Algo/Geometry/stats.h
include/Algo/Geometry/stats.h
+2
-2
include/Algo/Geometry/volume.hpp
include/Algo/Geometry/volume.hpp
+7
-8
include/Algo/Geometry/voronoiDiagrams.h
include/Algo/Geometry/voronoiDiagrams.h
+38
-31
include/Algo/Geometry/voronoiDiagrams.hpp
include/Algo/Geometry/voronoiDiagrams.hpp
+64
-37
include/Algo/Histogram/histogram.h
include/Algo/Histogram/histogram.h
+177
-184
include/Algo/Histogram/histogram.hpp
include/Algo/Histogram/histogram.hpp
+4
-29
include/Algo/LinearSolving/basic.h
include/Algo/LinearSolving/basic.h
+40
-40
include/Algo/LinearSolving/matrixSetup.h
include/Algo/LinearSolving/matrixSetup.h
+90
-76
include/Algo/LinearSolving/variablesSetup.h
include/Algo/LinearSolving/variablesSetup.h
+32
-20
include/Algo/Modelisation/boundEmb.h
include/Algo/Modelisation/boundEmb.h
+6
-3
include/Algo/Modelisation/extrusion.hpp
include/Algo/Modelisation/extrusion.hpp
+10
-10
include/Algo/Modelisation/planeCutting.h
include/Algo/Modelisation/planeCutting.h
+23
-6
include/Algo/Modelisation/planeCutting.hpp
include/Algo/Modelisation/planeCutting.hpp
+58
-40
include/Algo/Modelisation/tetrahedralization.h
include/Algo/Modelisation/tetrahedralization.h
+1
-6
include/Algo/Modelisation/tetrahedralization.hpp
include/Algo/Modelisation/tetrahedralization.hpp
+6
-48
include/Algo/Modelisation/voxellisation.h
include/Algo/Modelisation/voxellisation.h
+479
-463
include/Algo/MovingObjects/particle_base.h
include/Algo/MovingObjects/particle_base.h
+0
-2
include/Algo/MovingObjects/particle_cell_2D.h
include/Algo/MovingObjects/particle_cell_2D.h
+10
-6
include/Algo/MovingObjects/particle_cell_2D.hpp
include/Algo/MovingObjects/particle_cell_2D.hpp
+10
-5
include/Algo/MovingObjects/particle_cell_2D_memo.h
include/Algo/MovingObjects/particle_cell_2D_memo.h
+21
-14
include/Algo/MovingObjects/particle_cell_2D_memo.hpp
include/Algo/MovingObjects/particle_cell_2D_memo.hpp
+12
-9
include/Algo/MovingObjects/particle_cell_2D_secured.h
include/Algo/MovingObjects/particle_cell_2D_secured.h
+19
-16
include/Algo/MovingObjects/particle_cell_2D_secured.hpp
include/Algo/MovingObjects/particle_cell_2D_secured.hpp
+11
-7
include/Algo/MovingObjects/particle_cell_2DandHalf.h
include/Algo/MovingObjects/particle_cell_2DandHalf.h
+17
-8
include/Algo/MovingObjects/particle_cell_2DandHalf_memo.h
include/Algo/MovingObjects/particle_cell_2DandHalf_memo.h
+19
-16
include/Algo/MovingObjects/particle_cell_2DandHalf_memo.hpp
include/Algo/MovingObjects/particle_cell_2DandHalf_memo.hpp
+12
-10
include/Algo/MovingObjects/particle_cell_3D.h
include/Algo/MovingObjects/particle_cell_3D.h
+19
-16
include/Algo/MovingObjects/particle_cell_3D.hpp
include/Algo/MovingObjects/particle_cell_3D.hpp
+24
-27
include/Algo/Parallel/parallel_foreach.h
include/Algo/Parallel/parallel_foreach.h
+1
-11
include/Algo/Parallel/parallel_foreach.hpp
include/Algo/Parallel/parallel_foreach.hpp
+0
-14
include/Topology/generic/genericmap.h
include/Topology/generic/genericmap.h
+45
-27
include/Topology/generic/genericmap.hpp
include/Topology/generic/genericmap.hpp
+5
-0
include/Topology/generic/mapCommon.h
include/Topology/generic/mapCommon.h
+10
-14
include/Topology/generic/mapCommon.hpp
include/Topology/generic/mapCommon.hpp
+44
-15
include/Topology/generic/mapMono.h
include/Topology/generic/mapMono.h
+1
-1
include/Topology/generic/mapMono.hpp
include/Topology/generic/mapMono.hpp
+1
-1
include/Topology/generic/mapMulti.h
include/Topology/generic/mapMulti.h
+4
-4
include/Topology/generic/mapMulti.hpp
include/Topology/generic/mapMulti.hpp
+3
-3
include/Topology/generic/traversorCell.h
include/Topology/generic/traversorCell.h
+1
-0
include/Topology/generic/traversorCell.hpp
include/Topology/generic/traversorCell.hpp
+5
-3
include/Topology/gmap/gmap1.h
include/Topology/gmap/gmap1.h
+0
-6
include/Topology/gmap/gmap2.h
include/Topology/gmap/gmap2.h
+0
-6
include/Topology/gmap/gmap3.h
include/Topology/gmap/gmap3.h
+0
-6
include/Topology/map/map1.h
include/Topology/map/map1.h
+0
-6
include/Topology/map/map2.h
include/Topology/map/map2.h
+0
-6
include/Topology/map/map3.h
include/Topology/map/map3.h
+0
-6
No files found.
SCHNApps/Plugins/surface_deformation/include/surface_deformation.h
View file @
d574eb73
...
...
@@ -28,19 +28,19 @@ struct MapParameters
void
start
(
MapHandlerGen
*
mh
);
void
stop
(
MapHandlerGen
*
mh
);
VertexAttribute
<
PFP2
::
VEC3
>
positionAttribute
;
VertexAttribute
<
PFP2
::
VEC3
,
PFP2
::
MAP
::
IMPL
>
positionAttribute
;
CellSelector
<
VERTEX
>*
handleSelector
;
CellSelector
<
VERTEX
>*
freeSelector
;
CellSelector
<
PFP2
::
MAP
,
VERTEX
>*
handleSelector
;
CellSelector
<
PFP2
::
MAP
,
VERTEX
>*
freeSelector
;
bool
initialized
;
VertexAttribute
<
PFP2
::
VEC3
>
positionInit
;
VertexAttribute
<
PFP2
::
VEC3
>
diffCoord
;
VertexAttribute
<
Eigen_Matrix3f
>
vertexRotationMatrix
;
VertexAttribute
<
PFP2
::
VEC3
>
rotatedDiffCoord
;
VertexAttribute
<
PFP2
::
VEC3
,
PFP2
::
MAP
::
IMPL
>
positionInit
;
VertexAttribute
<
PFP2
::
VEC3
,
PFP2
::
MAP
::
IMPL
>
diffCoord
;
VertexAttribute
<
Eigen_Matrix3f
,
PFP2
::
MAP
::
IMPL
>
vertexRotationMatrix
;
VertexAttribute
<
PFP2
::
VEC3
,
PFP2
::
MAP
::
IMPL
>
rotatedDiffCoord
;
VertexAttribute
<
unsigned
int
>
vIndex
;
VertexAttribute
<
unsigned
int
,
PFP2
::
MAP
::
IMPL
>
vIndex
;
unsigned
int
nb_vertices
;
NLContext
nlContext
;
...
...
SCHNApps/Plugins/surface_deformation/src/surface_deformation.cpp
View file @
d574eb73
...
...
@@ -25,12 +25,14 @@ MapParameters::~MapParameters()
nlDeleteContext
(
nlContext
);
}
void
MapParameters
::
start
(
MapHandlerGen
*
mh
)
void
MapParameters
::
start
(
MapHandlerGen
*
mh
g
)
{
if
(
!
initialized
)
{
if
(
positionAttribute
.
isValid
()
&&
handleSelector
&&
freeSelector
)
{
MapHandler
<
PFP2
>*
mh
=
static_cast
<
MapHandler
<
PFP2
>*>
(
mhg
);
positionInit
=
mh
->
getAttribute
<
PFP2
::
VEC3
,
VERTEX
>
(
"positionInit"
,
false
);
if
(
!
positionInit
.
isValid
())
positionInit
=
mh
->
addAttribute
<
PFP2
::
VEC3
,
VERTEX
>
(
"positionInit"
,
false
);
...
...
@@ -60,7 +62,7 @@ void MapParameters::start(MapHandlerGen* mh)
for
(
unsigned
int
i
=
vertexRotationMatrix
.
begin
();
i
!=
vertexRotationMatrix
.
end
();
vertexRotationMatrix
.
next
(
i
))
vertexRotationMatrix
[
i
]
=
Eigen
::
Matrix3f
::
Identity
();
nb_vertices
=
static_cast
<
AttribMap
*>
(
map
)
->
computeIndexCells
<
VERTEX
>
(
vIndex
);
nb_vertices
=
map
->
computeIndexCells
<
VERTEX
>
(
vIndex
);
if
(
nlContext
)
nlDeleteContext
(
nlContext
);
...
...
@@ -317,7 +319,8 @@ void Surface_Deformation_Plugin::changePositionAttribute(const QString& map, con
MapParameters
&
p
=
h_parameterSet
[
m
];
if
(
!
p
.
initialized
)
{
p
.
positionAttribute
=
m
->
getAttribute
<
PFP2
::
VEC3
,
VERTEX
>
(
name
);
MapHandler
<
PFP2
>*
mh
=
static_cast
<
MapHandler
<
PFP2
>*>
(
m
);
p
.
positionAttribute
=
mh
->
getAttribute
<
PFP2
::
VEC3
,
VERTEX
>
(
name
);
if
(
m
->
isSelectedMap
())
m_dockTab
->
updateMapParameters
();
}
...
...
@@ -332,7 +335,8 @@ void Surface_Deformation_Plugin::changeHandleSelector(const QString& map, const
MapParameters
&
p
=
h_parameterSet
[
m
];
if
(
!
p
.
initialized
)
{
p
.
handleSelector
=
m
->
getCellSelector
<
VERTEX
>
(
name
);
MapHandler
<
PFP2
>*
mh
=
static_cast
<
MapHandler
<
PFP2
>*>
(
m
);
p
.
handleSelector
=
mh
->
getCellSelector
<
VERTEX
>
(
name
);
if
(
m
->
isSelectedMap
())
m_dockTab
->
updateMapParameters
();
}
...
...
@@ -347,7 +351,8 @@ void Surface_Deformation_Plugin::changeFreeSelector(const QString& map, const QS
MapParameters
&
p
=
h_parameterSet
[
m
];
if
(
!
p
.
initialized
)
{
p
.
freeSelector
=
m
->
getCellSelector
<
VERTEX
>
(
name
);
MapHandler
<
PFP2
>*
mh
=
static_cast
<
MapHandler
<
PFP2
>*>
(
m
);
p
.
freeSelector
=
mh
->
getCellSelector
<
VERTEX
>
(
name
);
if
(
m
->
isSelectedMap
())
m_dockTab
->
updateMapParameters
();
}
...
...
@@ -406,7 +411,7 @@ void Surface_Deformation_Plugin::asRigidAsPossible(MapHandlerGen* mh)
if
(
p
.
initialized
)
{
CellMarkerNoUnmark
<
VERTEX
>
m
(
*
map
)
;
CellMarkerNoUnmark
<
PFP2
::
MAP
,
VERTEX
>
m
(
*
map
)
;
for
(
Dart
d
=
map
->
begin
();
d
!=
map
->
end
();
map
->
next
(
d
))
{
...
...
SCHNApps/Plugins/surface_deformation/src/surface_deformation_dockTab.cpp
View file @
d574eb73
...
...
@@ -37,7 +37,10 @@ void Surface_Deformation_DockTab::positionAttributeChanged(int index)
if
(
index
==
0
)
;
else
m_plugin
->
h_parameterSet
[
map
].
positionAttribute
=
map
->
getAttribute
<
PFP2
::
VEC3
,
VERTEX
>
(
combo_positionAttribute
->
currentText
());
{
MapHandler
<
PFP2
>*
mh
=
static_cast
<
MapHandler
<
PFP2
>*>
(
map
);
m_plugin
->
h_parameterSet
[
map
].
positionAttribute
=
mh
->
getAttribute
<
PFP2
::
VEC3
,
VERTEX
>
(
combo_positionAttribute
->
currentText
());
}
}
}
}
...
...
@@ -48,7 +51,10 @@ void Surface_Deformation_DockTab::handleSelectorChanged(int index)
{
MapHandlerGen
*
map
=
m_schnapps
->
getSelectedMap
();
if
(
map
)
m_plugin
->
h_parameterSet
[
map
].
handleSelector
=
map
->
getCellSelector
<
VERTEX
>
(
combo_handleSelector
->
currentText
());
{
MapHandler
<
PFP2
>*
mh
=
static_cast
<
MapHandler
<
PFP2
>*>
(
map
);
m_plugin
->
h_parameterSet
[
map
].
handleSelector
=
mh
->
getCellSelector
<
VERTEX
>
(
combo_handleSelector
->
currentText
());
}
}
}
...
...
@@ -58,7 +64,10 @@ void Surface_Deformation_DockTab::freeSelectorChanged(int index)
{
MapHandlerGen
*
map
=
m_schnapps
->
getSelectedMap
();
if
(
map
)
m_plugin
->
h_parameterSet
[
map
].
freeSelector
=
map
->
getCellSelector
<
VERTEX
>
(
combo_freeSelector
->
currentText
());
{
MapHandler
<
PFP2
>*
mh
=
static_cast
<
MapHandler
<
PFP2
>*>
(
map
);
m_plugin
->
h_parameterSet
[
map
].
freeSelector
=
mh
->
getCellSelector
<
VERTEX
>
(
combo_freeSelector
->
currentText
());
}
}
}
...
...
SCHNApps/Plugins/surface_differentialProperties/src/surface_differentialProperties.cpp
View file @
d574eb73
...
...
@@ -185,11 +185,11 @@ void Surface_DifferentialProperties_Plugin::computeNormal(
if
(
mh
==
NULL
)
return
;
VertexAttribute
<
PFP2
::
VEC3
>
position
=
mh
->
getAttribute
<
PFP2
::
VEC3
,
VERTEX
>
(
positionAttributeName
);
VertexAttribute
<
PFP2
::
VEC3
,
PFP2
::
MAP
::
IMPL
>
position
=
mh
->
getAttribute
<
PFP2
::
VEC3
,
VERTEX
>
(
positionAttributeName
);
if
(
!
position
.
isValid
())
return
;
VertexAttribute
<
PFP2
::
VEC3
>
normal
=
mh
->
getAttribute
<
PFP2
::
VEC3
,
VERTEX
>
(
normalAttributeName
);
VertexAttribute
<
PFP2
::
VEC3
,
PFP2
::
MAP
::
IMPL
>
normal
=
mh
->
getAttribute
<
PFP2
::
VEC3
,
VERTEX
>
(
normalAttributeName
);
if
(
!
normal
.
isValid
())
normal
=
mh
->
addAttribute
<
PFP2
::
VEC3
,
VERTEX
>
(
normalAttributeName
);
...
...
@@ -219,35 +219,35 @@ void Surface_DifferentialProperties_Plugin::computeCurvature(
if
(
mh
==
NULL
)
return
;
VertexAttribute
<
PFP2
::
VEC3
>
position
=
mh
->
getAttribute
<
PFP2
::
VEC3
,
VERTEX
>
(
positionAttributeName
);
VertexAttribute
<
PFP2
::
VEC3
,
PFP2
::
MAP
::
IMPL
>
position
=
mh
->
getAttribute
<
PFP2
::
VEC3
,
VERTEX
>
(
positionAttributeName
);
if
(
!
position
.
isValid
())
return
;
VertexAttribute
<
PFP2
::
VEC3
>
normal
=
mh
->
getAttribute
<
PFP2
::
VEC3
,
VERTEX
>
(
normalAttributeName
);
VertexAttribute
<
PFP2
::
VEC3
,
PFP2
::
MAP
::
IMPL
>
normal
=
mh
->
getAttribute
<
PFP2
::
VEC3
,
VERTEX
>
(
normalAttributeName
);
if
(
!
normal
.
isValid
())
return
;
VertexAttribute
<
PFP2
::
VEC3
>
Kmax
=
mh
->
getAttribute
<
PFP2
::
VEC3
,
VERTEX
>
(
KmaxAttributeName
);
VertexAttribute
<
PFP2
::
VEC3
,
PFP2
::
MAP
::
IMPL
>
Kmax
=
mh
->
getAttribute
<
PFP2
::
VEC3
,
VERTEX
>
(
KmaxAttributeName
);
if
(
!
Kmax
.
isValid
())
Kmax
=
mh
->
addAttribute
<
PFP2
::
VEC3
,
VERTEX
>
(
KmaxAttributeName
);
VertexAttribute
<
PFP2
::
REAL
>
kmax
=
mh
->
getAttribute
<
PFP2
::
REAL
,
VERTEX
>
(
kmaxAttributeName
);
VertexAttribute
<
PFP2
::
REAL
,
PFP2
::
MAP
::
IMPL
>
kmax
=
mh
->
getAttribute
<
PFP2
::
REAL
,
VERTEX
>
(
kmaxAttributeName
);
if
(
!
kmax
.
isValid
())
kmax
=
mh
->
addAttribute
<
PFP2
::
REAL
,
VERTEX
>
(
kmaxAttributeName
);
VertexAttribute
<
PFP2
::
VEC3
>
Kmin
=
mh
->
getAttribute
<
PFP2
::
VEC3
,
VERTEX
>
(
KminAttributeName
);
VertexAttribute
<
PFP2
::
VEC3
,
PFP2
::
MAP
::
IMPL
>
Kmin
=
mh
->
getAttribute
<
PFP2
::
VEC3
,
VERTEX
>
(
KminAttributeName
);
if
(
!
Kmin
.
isValid
())
Kmin
=
mh
->
addAttribute
<
PFP2
::
VEC3
,
VERTEX
>
(
KminAttributeName
);
VertexAttribute
<
PFP2
::
REAL
>
kmin
=
mh
->
getAttribute
<
PFP2
::
REAL
,
VERTEX
>
(
kminAttributeName
);
VertexAttribute
<
PFP2
::
REAL
,
PFP2
::
MAP
::
IMPL
>
kmin
=
mh
->
getAttribute
<
PFP2
::
REAL
,
VERTEX
>
(
kminAttributeName
);
if
(
!
kmin
.
isValid
())
kmin
=
mh
->
addAttribute
<
PFP2
::
REAL
,
VERTEX
>
(
kminAttributeName
);
VertexAttribute
<
PFP2
::
VEC3
>
Knormal
=
mh
->
getAttribute
<
PFP2
::
VEC3
,
VERTEX
>
(
KnormalAttributeName
);
VertexAttribute
<
PFP2
::
VEC3
,
PFP2
::
MAP
::
IMPL
>
Knormal
=
mh
->
getAttribute
<
PFP2
::
VEC3
,
VERTEX
>
(
KnormalAttributeName
);
if
(
!
Knormal
.
isValid
())
Knormal
=
mh
->
addAttribute
<
PFP2
::
VEC3
,
VERTEX
>
(
KnormalAttributeName
);
EdgeAttribute
<
PFP2
::
REAL
>
edgeAngle
=
mh
->
getAttribute
<
PFP2
::
REAL
,
EDGE
>
(
"edgeAngle"
);
EdgeAttribute
<
PFP2
::
REAL
,
PFP2
::
MAP
::
IMPL
>
edgeAngle
=
mh
->
getAttribute
<
PFP2
::
REAL
,
EDGE
>
(
"edgeAngle"
);
if
(
!
edgeAngle
.
isValid
())
edgeAngle
=
mh
->
addAttribute
<
PFP2
::
REAL
,
EDGE
>
(
"edgeAngle"
);
...
...
@@ -269,7 +269,7 @@ void Surface_DifferentialProperties_Plugin::computeCurvature(
if
(
compute_kmean
)
{
VertexAttribute
<
PFP2
::
REAL
>
kmean
=
mh
->
getAttribute
<
PFP2
::
REAL
,
VERTEX
>
(
"kmean"
);
VertexAttribute
<
PFP2
::
REAL
,
PFP2
::
MAP
::
IMPL
>
kmean
=
mh
->
getAttribute
<
PFP2
::
REAL
,
VERTEX
>
(
"kmean"
);
if
(
!
kmean
.
isValid
())
kmean
=
mh
->
addAttribute
<
PFP2
::
REAL
,
VERTEX
>
(
"kmean"
);
...
...
@@ -281,7 +281,7 @@ void Surface_DifferentialProperties_Plugin::computeCurvature(
if
(
compute_kgaussian
)
{
VertexAttribute
<
PFP2
::
REAL
>
kgaussian
=
mh
->
getAttribute
<
PFP2
::
REAL
,
VERTEX
>
(
"kgaussian"
);
VertexAttribute
<
PFP2
::
REAL
,
PFP2
::
MAP
::
IMPL
>
kgaussian
=
mh
->
getAttribute
<
PFP2
::
REAL
,
VERTEX
>
(
"kgaussian"
);
if
(
!
kgaussian
.
isValid
())
kgaussian
=
mh
->
addAttribute
<
PFP2
::
REAL
,
VERTEX
>
(
"kgaussian"
);
...
...
SCHNApps/Plugins/surface_import/src/surface_import.cpp
View file @
d574eb73
...
...
@@ -37,7 +37,7 @@ MapHandlerGen* Surface_Import_Plugin::importFromFile(const QString& fileName)
Algo
::
Surface
::
Import
::
importMesh
<
PFP2
>
(
*
map
,
fileName
.
toStdString
(),
attrNames
);
// get vertex position attribute
VertexAttribute
<
PFP2
::
VEC3
>
position
=
map
->
getAttribute
<
PFP2
::
VEC3
,
VERTEX
>
(
attrNames
[
0
]);
VertexAttribute
<
PFP2
::
VEC3
,
PFP2
::
MAP
::
IMPL
>
position
=
map
->
getAttribute
<
PFP2
::
VEC3
,
VERTEX
>
(
attrNames
[
0
]);
mh
->
registerAttribute
(
position
);
// update corresponding VBO & emit attribute update signal
...
...
SCHNApps/Plugins/surface_modelisation/include/surface_modelisation.h
View file @
d574eb73
...
...
@@ -25,11 +25,11 @@ struct MapParameters
faceSelector
(
NULL
)
{}
VertexAttribute
<
PFP2
::
VEC3
>
positionAttribute
;
VertexAttribute
<
PFP2
::
VEC3
,
PFP2
::
MAP
::
IMPL
>
positionAttribute
;
CellSelector
<
VERTEX
>*
vertexSelector
;
CellSelector
<
EDGE
>*
edgeSelector
;
CellSelector
<
FACE
>*
faceSelector
;
CellSelector
<
PFP2
::
MAP
,
VERTEX
>*
vertexSelector
;
CellSelector
<
PFP2
::
MAP
,
EDGE
>*
edgeSelector
;
CellSelector
<
PFP2
::
MAP
,
FACE
>*
faceSelector
;
};
class
Surface_Modelisation_Plugin
:
public
PluginInteraction
...
...
SCHNApps/Plugins/surface_modelisation/src/surface_modelisation.cpp
View file @
d574eb73
...
...
@@ -159,7 +159,8 @@ void Surface_Modelisation_Plugin::changePositionAttribute(const QString& view, c
MapHandlerGen
*
m
=
m_schnapps
->
getMap
(
map
);
if
(
m
)
{
h_parameterSet
[
m
].
positionAttribute
=
m
->
getAttribute
<
PFP2
::
VEC3
,
VERTEX
>
(
name
);
MapHandler
<
PFP2
>*
mh
=
static_cast
<
MapHandler
<
PFP2
>*>
(
m
);
h_parameterSet
[
m
].
positionAttribute
=
mh
->
getAttribute
<
PFP2
::
VEC3
,
VERTEX
>
(
name
);
if
(
m
->
isSelectedMap
())
m_dockTab
->
updateMapParameters
();
}
...
...
@@ -170,8 +171,8 @@ void Surface_Modelisation_Plugin::changeVertexSelector(const QString& map, const
MapHandlerGen
*
m
=
m_schnapps
->
getMap
(
map
);
if
(
m
)
{
Map
Parameters
&
p
=
h_parameterSet
[
m
]
;
p
.
vertexSelector
=
m
->
getCellSelector
<
VERTEX
>
(
name
);
Map
Handler
<
PFP2
>*
mh
=
static_cast
<
MapHandler
<
PFP2
>*>
(
m
)
;
h_parameterSet
[
m
].
vertexSelector
=
mh
->
getCellSelector
<
VERTEX
>
(
name
);
if
(
m
->
isSelectedMap
())
m_dockTab
->
updateMapParameters
();
}
...
...
@@ -182,8 +183,8 @@ void Surface_Modelisation_Plugin::changeEdgeSelector(const QString& map, const Q
MapHandlerGen
*
m
=
m_schnapps
->
getMap
(
map
);
if
(
m
)
{
Map
Parameters
&
p
=
h_parameterSet
[
m
]
;
p
.
edgeSelector
=
m
->
getCellSelector
<
EDGE
>
(
name
);
Map
Handler
<
PFP2
>*
mh
=
static_cast
<
MapHandler
<
PFP2
>*>
(
m
)
;
h_parameterSet
[
m
].
edgeSelector
=
mh
->
getCellSelector
<
EDGE
>
(
name
);
if
(
m
->
isSelectedMap
())
m_dockTab
->
updateMapParameters
();
}
...
...
@@ -194,8 +195,8 @@ void Surface_Modelisation_Plugin::changeFaceSelector(const QString& map, const Q
MapHandlerGen
*
m
=
m_schnapps
->
getMap
(
map
);
if
(
m
)
{
Map
Parameters
&
p
=
h_parameterSet
[
m
]
;
p
.
faceSelector
=
m
->
getCellSelector
<
FACE
>
(
name
);
Map
Handler
<
PFP2
>*
mh
=
static_cast
<
MapHandler
<
PFP2
>*>
(
m
)
;
h_parameterSet
[
m
].
faceSelector
=
mh
->
getCellSelector
<
FACE
>
(
name
);
if
(
m
->
isSelectedMap
())
m_dockTab
->
updateMapParameters
();
}
...
...
@@ -216,7 +217,7 @@ void Surface_Modelisation_Plugin::createEmptyMap()
MapHandler
<
PFP2
>*
mh
=
static_cast
<
MapHandler
<
PFP2
>*>
(
mhg
);
// add vertex position attribute
VertexAttribute
<
PFP2
::
VEC3
>
position
=
mh
->
addAttribute
<
PFP2
::
VEC3
,
VERTEX
>
(
"position"
);
VertexAttribute
<
PFP2
::
VEC3
,
PFP2
::
MAP
::
IMPL
>
position
=
mh
->
addAttribute
<
PFP2
::
VEC3
,
VERTEX
>
(
"position"
);
// update corresponding VBO & emit attribute update signal
mh
->
notifyAttributeModification
(
position
);
mapNumber
++
;
...
...
@@ -229,7 +230,7 @@ void Surface_Modelisation_Plugin::createNewFace(MapHandlerGen* mhg)
PFP2
::
MAP
*
map
=
mh
->
getMap
();
if
(
h_parameterSet
[
mhg
].
positionAttribute
.
isValid
())
{
VertexAttribute
<
PFP2
::
VEC3
>&
position
=
h_parameterSet
[
mhg
].
positionAttribute
;
VertexAttribute
<
PFP2
::
VEC3
,
PFP2
::
MAP
::
IMPL
>&
position
=
h_parameterSet
[
mhg
].
positionAttribute
;
if
(
collectedVertices
.
size
()
>=
3
)
{
Dart
d
=
map
->
newFace
(
collectedVertices
.
size
());
...
...
@@ -258,7 +259,7 @@ void Surface_Modelisation_Plugin::addCube(MapHandlerGen *mhg)
PFP2
::
MAP
*
map
=
mh
->
getMap
();
if
(
h_parameterSet
[
mhg
].
positionAttribute
.
isValid
())
{
VertexAttribute
<
PFP2
::
VEC3
>&
position
=
h_parameterSet
[
mhg
].
positionAttribute
;
VertexAttribute
<
PFP2
::
VEC3
,
PFP2
::
MAP
::
IMPL
>&
position
=
h_parameterSet
[
mhg
].
positionAttribute
;
Algo
::
Surface
::
Modelisation
::
embedPrism
<
PFP2
>
(
*
map
,
position
,
4
,
true
,
0.7
f
,
0.7
f
,
1.0
f
);
...
...
@@ -355,16 +356,17 @@ void Surface_Modelisation_Plugin::splitSurface(MapHandlerGen* mhg)
else
isPath
=
false
;
}
CellMarker
<
PFP2
::
MAP
,
VERTEX
>
vm
(
*
map
);
if
(
isPath
)
{
for
(
std
::
vector
<
Dart
>::
iterator
it
=
path
.
begin
()
;
it
!=
path
.
end
()
-
1
;
++
it
)
{
if
(
isPath
)
{
CellMarker
<
VERTEX
>*
vm
=
new
CellMarker
<
VERTEX
>
(
*
map
);
if
(
vm
->
isMarked
(
*
it
))
{
if
(
vm
.
isMarked
(
*
it
))
isPath
=
false
;
vm
->
mark
(
*
it
);
vm
.
mark
(
*
it
);
std
::
vector
<
Dart
>::
iterator
next
;
next
=
it
+
1
;
...
...
@@ -738,7 +740,7 @@ void Surface_Modelisation_Plugin::pathExtrudeFace(MapHandlerGen *mhg)
PFP2
::
MAP
*
map
=
mh
->
getMap
();
MapParameters
&
p
=
h_parameterSet
[
mhg
];
VertexAttribute
<
PFP2
::
VEC3
>
position
=
p
.
positionAttribute
;
VertexAttribute
<
PFP2
::
VEC3
,
PFP2
::
MAP
::
IMPL
>&
position
=
p
.
positionAttribute
;
if
(
p
.
faceSelector
&&
!
p
.
faceSelector
->
getSelectedCells
().
empty
())
{
const
std
::
vector
<
Dart
>&
selectedDart
=
p
.
faceSelector
->
getSelectedCells
();
...
...
SCHNApps/Plugins/surface_modelisation/src/surface_modelisation_dockTab.cpp
View file @
d574eb73
...
...
@@ -41,7 +41,10 @@ void Surface_Modelisation_DockTab::positionAttributeChanged(int index)
{
MapHandlerGen
*
map
=
m_schnapps
->
getSelectedMap
();
if
(
map
)
m_plugin
->
h_parameterSet
[
map
].
positionAttribute
=
map
->
getAttribute
<
PFP2
::
VEC3
,
VERTEX
>
(
combo_positionAttribute
->
currentText
());
{
MapHandler
<
PFP2
>*
mh
=
static_cast
<
MapHandler
<
PFP2
>*>
(
map
);
m_plugin
->
h_parameterSet
[
map
].
positionAttribute
=
mh
->
getAttribute
<
PFP2
::
VEC3
,
VERTEX
>
(
combo_positionAttribute
->
currentText
());
}
}
}
...
...
@@ -51,7 +54,10 @@ void Surface_Modelisation_DockTab::vertexSelectorChanged(int index)
{
MapHandlerGen
*
map
=
m_schnapps
->
getSelectedMap
();
if
(
map
)
m_plugin
->
h_parameterSet
[
map
].
vertexSelector
=
map
->
getCellSelector
<
VERTEX
>
(
combo_vertexSelector
->
currentText
());
{
MapHandler
<
PFP2
>*
mh
=
static_cast
<
MapHandler
<
PFP2
>*>
(
map
);
m_plugin
->
h_parameterSet
[
map
].
vertexSelector
=
mh
->
getCellSelector
<
VERTEX
>
(
combo_vertexSelector
->
currentText
());
}
}
}
...
...
@@ -61,7 +67,10 @@ void Surface_Modelisation_DockTab::edgeSelectorChanged(int index)
{
MapHandlerGen
*
map
=
m_schnapps
->
getSelectedMap
();
if
(
map
)
m_plugin
->
h_parameterSet
[
map
].
edgeSelector
=
map
->
getCellSelector
<
EDGE
>
(
combo_edgeSelector
->
currentText
());
{
MapHandler
<
PFP2
>*
mh
=
static_cast
<
MapHandler
<
PFP2
>*>
(
map
);
m_plugin
->
h_parameterSet
[
map
].
edgeSelector
=
mh
->
getCellSelector
<
EDGE
>
(
combo_edgeSelector
->
currentText
());
}
}
}
...
...
@@ -71,7 +80,10 @@ void Surface_Modelisation_DockTab::faceSelectorChanged(int index)
{
MapHandlerGen
*
map
=
m_schnapps
->
getSelectedMap
();
if
(
map
)
m_plugin
->
h_parameterSet
[
map
].
faceSelector
=
map
->
getCellSelector
<
FACE
>
(
combo_faceSelector
->
currentText
());
{
MapHandler
<
PFP2
>*
mh
=
static_cast
<
MapHandler
<
PFP2
>*>
(
map
);
m_plugin
->
h_parameterSet
[
map
].
faceSelector
=
mh
->
getCellSelector
<
FACE
>
(
combo_faceSelector
->
currentText
());
}
}
}
...
...
SCHNApps/Plugins/surface_renderScalar/src/surface_renderScalar.cpp
View file @
d574eb73
...
...
@@ -159,7 +159,8 @@ void Surface_RenderScalar_Plugin::attributeModified(unsigned int orbit, QString
MapParameters
&
mapParam
=
viewParamSet
[
map
];
if
(
mapParam
.
scalarVBO
&&
nameAttr
==
QString
::
fromStdString
(
mapParam
.
scalarVBO
->
name
()))
{
const
VertexAttribute
<
PFP2
::
REAL
>&
attr
=
map
->
getAttribute
<
PFP2
::
REAL
,
VERTEX
>
(
nameAttr
);
MapHandler
<
PFP2
>*
mh
=
static_cast
<
MapHandler
<
PFP2
>*>
(
map
);
const
VertexAttribute
<
PFP2
::
REAL
,
PFP2
::
MAP
::
IMPL
>&
attr
=
mh
->
getAttribute
<
PFP2
::
REAL
,
VERTEX
>
(
nameAttr
);
mapParam
.
scalarMin
=
std
::
numeric_limits
<
float
>::
max
();
mapParam
.
scalarMax
=
std
::
numeric_limits
<
float
>::
min
();
for
(
unsigned
int
i
=
attr
.
begin
();
i
!=
attr
.
end
();
attr
.
next
(
i
))
...
...
@@ -205,7 +206,8 @@ void Surface_RenderScalar_Plugin::changeScalarVBO(const QString& view, const QSt
if
(
vbuf
)
{
const
VertexAttribute
<
PFP2
::
REAL
>&
attr
=
m
->
getAttribute
<
PFP2
::
REAL
,
VERTEX
>
(
QString
::
fromStdString
(
vbuf
->
name
()));
MapHandler
<
PFP2
>*
mh
=
static_cast
<
MapHandler
<
PFP2
>*>
(
m
);
const
VertexAttribute
<
PFP2
::
REAL
,
PFP2
::
MAP
::
IMPL
>&
attr
=
mh
->
getAttribute
<
PFP2
::
REAL
,
VERTEX
>
(
QString
::
fromStdString
(
vbuf
->
name
()));
p
.
scalarMin
=
std
::
numeric_limits
<
float
>::
max
();
p
.
scalarMax
=
std
::
numeric_limits
<
float
>::
min
();
for
(
unsigned
int
i
=
attr
.
begin
();
i
!=
attr
.
end
();
attr
.
next
(
i
))
...
...
SCHNApps/Plugins/surface_renderScalar/src/surface_renderScalar_dockTab.cpp
View file @
d574eb73
...
...
@@ -59,7 +59,8 @@ void Surface_RenderScalar_DockTab::selectedScalarVBOChanged()
if
(
vbo
)
{
const
VertexAttribute
<
PFP2
::
REAL
>&
attr
=
map
->
getAttribute
<
PFP2
::
REAL
,
VERTEX
>
(
QString
::
fromStdString
(
vbo
->
name
()));
MapHandler
<
PFP2
>*
mh
=
static_cast
<
MapHandler
<
PFP2
>*>
(
map
);
const
VertexAttribute
<
PFP2
::
REAL
,
PFP2
::
MAP
::
IMPL
>&
attr
=
mh
->
getAttribute
<
PFP2
::
REAL
,
VERTEX
>
(
QString
::
fromStdString
(
vbo
->
name
()));
p
.
scalarMin
=
std
::
numeric_limits
<
float
>::
max
();
p
.
scalarMax
=
std
::
numeric_limits
<
float
>::
min
();
for
(
unsigned
int
i
=
attr
.
begin
();
i
!=
attr
.
end
();
attr
.
next
(
i
))
...
...
SCHNApps/Plugins/surface_renderTopo/include/surface_renderTopo.h
View file @
d574eb73
...
...
@@ -25,7 +25,7 @@ struct MapParameters
facesScaleFactor
(
1.0
f
)
{}
VertexAttribute
<
PFP2
::
VEC3
>
positionAttribute
;
VertexAttribute
<
PFP2
::
VEC3
,
PFP2
::
MAP
::
IMPL
>
positionAttribute
;
bool
drawDarts
;
QColor
dartsColor
;
bool
drawPhi1
;
...
...
SCHNApps/Plugins/surface_renderTopo/src/surface_renderTopo_dockTab.cpp
View file @
d574eb73
...
...
@@ -40,10 +40,10 @@ void Surface_RenderTopo_DockTab::positionAttributeChanged(int index)
MapHandlerGen
*
map
=
m_schnapps
->
getSelectedMap
();
if
(
view
&&
map
)
{
if
(
index
==
0
)
;
else
m_plugin
->
h_viewParameterSet
[
view
][
map
].
positionAttribute
=
map
->
getAttribute
<
PFP2
::
VEC3
,
VERTEX
>
(
combo_positionAttribute
->
currentText
());
//
if(index == 0)
//
;
//
else
//
m_plugin->h_viewParameterSet[view][map].positionAttribute = map->getAttribute<PFP2::VEC3, VERTEX>(combo_positionAttribute->currentText());
view
->
updateGL
();
}
}
...
...
SCHNApps/Plugins/surface_selection/include/surface_selection.h
View file @
d574eb73
...
...
@@ -26,8 +26,8 @@ struct MapParameters
selectionMethod
(
SingleCell
)
{}
VertexAttribute
<
PFP2
::
VEC3
>
positionAttribute
;
VertexAttribute
<
PFP2
::
VEC3
>
normalAttribute
;
VertexAttribute
<
PFP2
::
VEC3
,
PFP2
::
MAP
::
IMPL
>
positionAttribute
;
VertexAttribute
<
PFP2
::
VEC3
,
PFP2
::
MAP
::
IMPL
>
normalAttribute
;
SelectionMethod
selectionMethod
;
};
...
...
SCHNApps/Plugins/surface_selection/src/surface_selection.cpp
View file @
d574eb73
...
...
@@ -586,7 +586,8 @@ void Surface_Selection_Plugin::changePositionAttribute(const QString& map, const
MapHandlerGen
*
m
=
m_schnapps
->
getMap
(
map
);
if
(
m
)
{
h_parameterSet
[
m
].
positionAttribute
=
m
->
getAttribute
<
PFP2
::
VEC3
,
VERTEX
>
(
name
);
MapHandler
<
PFP2
>*
mh
=
static_cast
<
MapHandler
<
PFP2
>*>
(
m
);
h_parameterSet
[
m
].
positionAttribute
=
mh
->
getAttribute
<
PFP2
::
VEC3
,
VERTEX
>
(
name
);
if
(
m
->
isSelectedMap
())
m_dockTab
->
updateMapParameters
();
}
...
...
@@ -597,7 +598,8 @@ void Surface_Selection_Plugin::changeNormalAttribute(const QString& map, const Q
MapHandlerGen
*
m
=
m_schnapps
->
getMap
(
map
);
if
(
m
)
{
h_parameterSet
[
m
].
normalAttribute
=
m
->
getAttribute
<
PFP2
::
VEC3
,
VERTEX
>
(
name
);
MapHandler
<
PFP2
>*
mh
=
static_cast
<
MapHandler
<
PFP2
>*>
(
m
);
h_parameterSet
[
m
].
normalAttribute
=
mh
->
getAttribute
<
PFP2
::
VEC3
,
VERTEX
>
(
name
);
if
(
m
->
isSelectedMap
())
m_dockTab
->
updateMapParameters
();
}
...
...
SCHNApps/Plugins/surface_selection/src/surface_selection_dockTab.cpp
View file @
d574eb73
...
...
@@ -31,7 +31,10 @@ void Surface_Selection_DockTab::positionAttributeChanged(int index)
{
MapHandlerGen
*
map
=
m_schnapps
->
getSelectedMap
();
if
(
map
)
m_plugin
->
h_parameterSet
[
map
].
positionAttribute
=
map
->
getAttribute
<
PFP2
::
VEC3
,
VERTEX
>
(
combo_positionAttribute
->
currentText
());
{
MapHandler
<
PFP2
>*
mh
=
static_cast
<
MapHandler
<
PFP2
>*>
(
map
);
m_plugin
->
h_parameterSet
[
map
].
positionAttribute
=
mh
->
getAttribute
<
PFP2
::
VEC3
,
VERTEX
>
(
combo_positionAttribute
->
currentText
());
}
}
}
...
...
@@ -41,7 +44,10 @@ void Surface_Selection_DockTab::normalAttributeChanged(int index)
{
MapHandlerGen
*
map
=
m_schnapps
->
getSelectedMap
();
if
(
map
)
m_plugin
->
h_parameterSet
[
map
].
normalAttribute
=
map
->
getAttribute
<
PFP2
::
VEC3
,
VERTEX
>
(
combo_normalAttribute
->
currentText
());
{
MapHandler
<
PFP2
>*
mh
=
static_cast
<
MapHandler
<
PFP2
>*>
(
map
);
m_plugin
->
h_parameterSet
[
map
].
normalAttribute
=
mh
->
getAttribute
<
PFP2
::
VEC3
,
VERTEX
>
(
combo_normalAttribute
->
currentText
());
}
}
}
...
...
SCHNApps/Plugins/surface_subdivision/src/surface_subdivision.cpp
View file @
d574eb73
...
...
@@ -64,7 +64,7 @@ void Surface_Subdivision_Plugin::loopSubdivision(
if
(
mh
==
NULL
)
return
;
VertexAttribute
<
PFP2
::
VEC3
>
position
=
mh
->
getAttribute
<
PFP2
::
VEC3
,
VERTEX
>
(
positionAttributeName
);
VertexAttribute
<
PFP2
::
VEC3
,
PFP2
::
MAP
::
IMPL
>
position
=
mh
->
getAttribute
<
PFP2
::
VEC3
,
VERTEX
>
(
positionAttributeName
);
if
(
!
position
.
isValid
())
return
;
...
...
@@ -86,7 +86,7 @@ void Surface_Subdivision_Plugin::CCSubdivision(
if
(
mh
==
NULL
)
return
;
VertexAttribute
<
PFP2
::
VEC3
>
position
=
mh
->
getAttribute
<
PFP2
::
VEC3
,
VERTEX
>
(
positionAttributeName
);
VertexAttribute
<
PFP2
::
VEC3
,
PFP2
::
MAP
::
IMPL
>
position
=
mh
->
getAttribute
<
PFP2
::
VEC3
,
VERTEX
>
(
positionAttributeName
);
if
(
!
position
.
isValid
())
return
;
...
...
@@ -108,7 +108,7 @@ void Surface_Subdivision_Plugin::trianguleFaces(
if
(
mh
==
NULL
)
return
;
VertexAttribute
<
PFP2
::
VEC3
>
position
=
mh
->
getAttribute
<
PFP2
::
VEC3
,
VERTEX
>
(
positionAttributeName
);
VertexAttribute
<
PFP2
::
VEC3
,
PFP2
::
MAP
::
IMPL
>
position
=
mh
->
getAttribute
<
PFP2
::
VEC3
,
VERTEX
>
(
positionAttributeName
);
if
(
!
position
.
isValid
())
return
;
...
...
SCHNApps/Plugins/volume_import/src/volume_import.cpp
View file @
d574eb73
...
...
@@ -37,7 +37,7 @@ MapHandlerGen* Volume_Import_Plugin::importFromFile(const QString& fileName)
Algo
::
Volume
::
Import
::
importMesh
<
PFP3
>
(
*
map
,
fileName
.
toStdString
(),
attrNames
);
// get vertex position attribute
VertexAttribute
<
PFP3
::
VEC3
>
position
=
map
->
getAttribute
<
PFP3
::
VEC3
,
VERTEX
>
(
attrNames
[
0
]);
VertexAttribute
<
PFP3
::
VEC3
,
PFP3
::
MAP
::
IMPL
>
position
=
map
->
getAttribute
<
PFP3
::
VEC3
,
VERTEX
>
(
attrNames
[
0
]);
mh
->
registerAttribute
(
position
);
// update corresponding VBO & emit attribute update signal
...
...
SCHNApps/include/cellSelector.h
View file @
d574eb73
...
...
@@ -92,11 +92,11 @@ protected:
QList
<
CellSelectorGen
*>
m_mutuallyExclusive
;
};
template
<
unsigned
int
ORBIT
>
template
<
typename
MAP
,
unsigned
int
ORBIT
>
class
CellSelector
:
public
CellSelectorGen
{
public:
CellSelector
(
GenericMap
&
map
,
const
QString
&
name
,
unsigned
int
thread
=
0
)
:
CellSelector
(
MAP
&
map
,
const
QString
&
name
,
unsigned
int
thread
=
0
)
:
CellSelectorGen
(
name
),
m_map
(
map
),
m_cm
(
map
,
thread
)
...
...
@@ -107,7 +107,7 @@ public:
inline
unsigned
int
getOrbit
()
{
return
ORBIT
;
}
inline
const
CellMarker
<
ORBIT
>&
getMarker
()
{
return
m_cm
;
}
inline
const
CellMarker
<
MAP
,
ORBIT
>&
getMarker
()
{
return
m_cm
;
}
inline
void
select
(
Dart
d
,
bool
emitSignal
=
true
)
{
...
...
@@ -131,12 +131,12 @@ public:
{
if
(
m_cm
.
isMarked
(
d
))
{
unsigned
int
v
=
m_map
.