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
38002988
Commit
38002988
authored
May 23, 2014
by
Sylvain Thery
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bugfix no more IMPL
parent
b03a47fe
Changes
37
Hide whitespace changes
Inline
Side-by-side
Showing
37 changed files
with
235 additions
and
222 deletions
+235
-222
Apps/Benches/bench_remesh.cpp
Apps/Benches/bench_remesh.cpp
+2
-4
Apps/Benches/bench_trav.cpp
Apps/Benches/bench_trav.cpp
+1
-1
SCHNApps/Plugins/surface_deformation/include/surface_deformation.h
...Plugins/surface_deformation/include/surface_deformation.h
+6
-6
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
+1
-1
SCHNApps/Plugins/surface_modelisation/src/surface_modelisation.cpp
...Plugins/surface_modelisation/src/surface_modelisation.cpp
+4
-4
SCHNApps/Plugins/surface_renderScalar/src/surface_renderScalar.cpp
...Plugins/surface_renderScalar/src/surface_renderScalar.cpp
+2
-2
SCHNApps/Plugins/surface_renderScalar/src/surface_renderScalar_dockTab.cpp
...surface_renderScalar/src/surface_renderScalar_dockTab.cpp
+1
-1
SCHNApps/Plugins/surface_renderTopo/include/surface_renderTopo.h
...s/Plugins/surface_renderTopo/include/surface_renderTopo.h
+1
-1
SCHNApps/Plugins/surface_selection/include/surface_selection.h
...pps/Plugins/surface_selection/include/surface_selection.h
+2
-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/mapHandler.h
SCHNApps/include/mapHandler.h
+3
-4
SCHNApps/include/mapHandler.hpp
SCHNApps/include/mapHandler.hpp
+7
-7
include/Algo/BooleanOperator/mergeVertices.h
include/Algo/BooleanOperator/mergeVertices.h
+3
-3
include/Algo/BooleanOperator/mergeVertices.hpp
include/Algo/BooleanOperator/mergeVertices.hpp
+3
-3
include/Algo/Decimation/approximator.hpp
include/Algo/Decimation/approximator.hpp
+4
-4
include/Algo/Decimation/colorPerVertexApproximator.h
include/Algo/Decimation/colorPerVertexApproximator.h
+2
-2
include/Algo/Decimation/colorPerVertexApproximator.hpp
include/Algo/Decimation/colorPerVertexApproximator.hpp
+2
-2
include/Algo/Decimation/decimation.h
include/Algo/Decimation/decimation.h
+3
-3
include/Algo/Decimation/decimation.hpp
include/Algo/Decimation/decimation.hpp
+6
-6
include/Algo/Decimation/edgeSelector.h
include/Algo/Decimation/edgeSelector.h
+32
-32
include/Algo/Decimation/edgeSelector.hpp
include/Algo/Decimation/edgeSelector.hpp
+17
-9
include/Algo/Decimation/geometryApproximator.hpp
include/Algo/Decimation/geometryApproximator.hpp
+17
-9
include/Algo/Decimation/halfEdgeSelector.h
include/Algo/Decimation/halfEdgeSelector.h
+6
-6
include/Algo/Decimation/halfEdgeSelector.hpp
include/Algo/Decimation/halfEdgeSelector.hpp
+2
-2
include/Algo/Filtering/average.h
include/Algo/Filtering/average.h
+15
-15
include/Algo/Filtering/bilateral.h
include/Algo/Filtering/bilateral.h
+3
-3
include/Algo/Filtering/functors.h
include/Algo/Filtering/functors.h
+3
-3
include/Algo/Filtering/tools.h
include/Algo/Filtering/tools.h
+6
-6
include/Algo/Import/importMRDAT.hpp
include/Algo/Import/importMRDAT.hpp
+2
-2
include/Algo/LinearSolving/basic.h
include/Algo/LinearSolving/basic.h
+34
-34
include/Algo/Multiresolution/Map2MR/Filters/loop.h
include/Algo/Multiresolution/Map2MR/Filters/loop.h
+2
-2
include/Algo/Multiresolution/filter.h
include/Algo/Multiresolution/filter.h
+4
-4
include/Algo/Render/GL1/topo_render.h
include/Algo/Render/GL1/topo_render.h
+4
-4
include/Algo/Selection/raySelector.hpp
include/Algo/Selection/raySelector.hpp
+18
-18
No files found.
Apps/Benches/bench_remesh.cpp
View file @
38002988
...
...
@@ -24,8 +24,6 @@ struct PFP: public PFP_STANDARD
};
typedef
PFP
::
MAP
MAP
;
typedef
PFP
::
MAP
::
IMPL
MAP_IMPL
;
int
main
(
int
argc
,
char
**
argv
)
...
...
@@ -42,7 +40,7 @@ int main(int argc, char **argv)
CGoGNerr
<<
"could not import "
<<
argv
[
1
]
<<
CGoGNendl
;
return
2
;
}
VertexAttribute
<
PFP
::
VEC3
,
MAP
_IMPL
>
position
=
myMap
.
getAttribute
<
PFP
::
VEC3
,
VERTEX
>
(
attrNames
[
0
])
;
VertexAttribute
<
PFP
::
VEC3
,
MAP
>
position
=
myMap
.
getAttribute
<
PFP
::
VEC3
,
VERTEX
,
MAP
>
(
attrNames
[
0
])
;
Utils
::
Chrono
chrono
;
...
...
@@ -54,7 +52,7 @@ int main(int argc, char **argv)
Algo
::
Surface
::
Modelisation
::
LoopSubdivision
<
PFP
>
(
myMap
,
position
)
;
unsigned
int
nbVertices
=
Algo
::
Topo
::
getNbOrbits
<
VERTEX
>
(
myMap
)
;
std
::
vector
<
VertexAttribute
<
typename
PFP
::
VEC3
,
MAP
_IMPL
>
*>
attr
;
std
::
vector
<
VertexAttribute
<
typename
PFP
::
VEC3
,
MAP
>
*>
attr
;
attr
.
push_back
(
&
position
);
Algo
::
Surface
::
Decimation
::
decimate
<
PFP
>
(
myMap
,
Algo
::
Surface
::
Decimation
::
S_QEM
,
Algo
::
Surface
::
Decimation
::
A_QEM
,
attr
,
nbVertices
*
0.1
)
;
...
...
Apps/Benches/bench_trav.cpp
View file @
38002988
...
...
@@ -57,7 +57,7 @@ int main()
Utils
::
Chrono
ch
;
ch
.
start
();
// add position attribute on vertices and get handler on it
VertexAttribute
<
VEC3
,
MAP
_IMPL
>
position
=
myMap
.
addAttribute
<
VEC3
,
VERTEX
>
(
"position"
);
VertexAttribute
<
VEC3
,
MAP
>
position
=
myMap
.
addAttribute
<
VEC3
,
VERTEX
,
MAP
>
(
"position"
);
constexpr
int
nb
=
100
;
Algo
::
Volume
::
Tilings
::
Cubic
::
Grid
<
PFP
>
cubic
(
myMap
,
nb
,
nb
,
nb
);
cubic
.
embedIntoGrid
(
position
,
10.0
f
,
10.0
f
,
10.0
f
);
...
...
SCHNApps/Plugins/surface_deformation/include/surface_deformation.h
View file @
38002988
...
...
@@ -28,19 +28,19 @@ struct MapParameters
void
start
(
MapHandlerGen
*
mh
);
void
stop
(
MapHandlerGen
*
mh
);
VertexAttribute
<
PFP2
::
VEC3
,
PFP2
::
MAP
::
IMPL
>
positionAttribute
;
VertexAttribute
<
PFP2
::
VEC3
,
PFP2
::
MAP
>
positionAttribute
;
CellSelector
<
PFP2
::
MAP
,
VERTEX
>*
handleSelector
;
CellSelector
<
PFP2
::
MAP
,
VERTEX
>*
freeSelector
;
bool
initialized
;
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
<
PFP2
::
VEC3
,
PFP2
::
MAP
>
positionInit
;
VertexAttribute
<
PFP2
::
VEC3
,
PFP2
::
MAP
>
diffCoord
;
VertexAttribute
<
Eigen_Matrix3f
,
PFP2
::
MAP
>
vertexRotationMatrix
;
VertexAttribute
<
PFP2
::
VEC3
,
PFP2
::
MAP
>
rotatedDiffCoord
;
VertexAttribute
<
unsigned
int
,
PFP2
::
MAP
::
IMPL
>
vIndex
;
VertexAttribute
<
unsigned
int
,
PFP2
::
MAP
>
vIndex
;
unsigned
int
nb_vertices
;
NLContext
nlContext
;
...
...
SCHNApps/Plugins/surface_differentialProperties/src/surface_differentialProperties.cpp
View file @
38002988
...
...
@@ -185,11 +185,11 @@ void Surface_DifferentialProperties_Plugin::computeNormal(
if
(
mh
==
NULL
)
return
;
VertexAttribute
<
PFP2
::
VEC3
,
PFP2
::
MAP
::
IMPL
>
position
=
mh
->
getAttribute
<
PFP2
::
VEC3
,
VERTEX
>
(
positionAttributeName
);
VertexAttribute
<
PFP2
::
VEC3
,
PFP2
::
MAP
>
position
=
mh
->
getAttribute
<
PFP2
::
VEC3
,
VERTEX
>
(
positionAttributeName
);
if
(
!
position
.
isValid
())
return
;
VertexAttribute
<
PFP2
::
VEC3
,
PFP2
::
MAP
::
IMPL
>
normal
=
mh
->
getAttribute
<
PFP2
::
VEC3
,
VERTEX
>
(
normalAttributeName
);
VertexAttribute
<
PFP2
::
VEC3
,
PFP2
::
MAP
>
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
,
PFP2
::
MAP
::
IMPL
>
position
=
mh
->
getAttribute
<
PFP2
::
VEC3
,
VERTEX
>
(
positionAttributeName
);
VertexAttribute
<
PFP2
::
VEC3
,
PFP2
::
MAP
>
position
=
mh
->
getAttribute
<
PFP2
::
VEC3
,
VERTEX
>
(
positionAttributeName
);
if
(
!
position
.
isValid
())
return
;
VertexAttribute
<
PFP2
::
VEC3
,
PFP2
::
MAP
::
IMPL
>
normal
=
mh
->
getAttribute
<
PFP2
::
VEC3
,
VERTEX
>
(
normalAttributeName
);
VertexAttribute
<
PFP2
::
VEC3
,
PFP2
::
MAP
>
normal
=
mh
->
getAttribute
<
PFP2
::
VEC3
,
VERTEX
>
(
normalAttributeName
);
if
(
!
normal
.
isValid
())
return
;
VertexAttribute
<
PFP2
::
VEC3
,
PFP2
::
MAP
::
IMPL
>
Kmax
=
mh
->
getAttribute
<
PFP2
::
VEC3
,
VERTEX
>
(
KmaxAttributeName
);
VertexAttribute
<
PFP2
::
VEC3
,
PFP2
::
MAP
>
Kmax
=
mh
->
getAttribute
<
PFP2
::
VEC3
,
VERTEX
>
(
KmaxAttributeName
);
if
(
!
Kmax
.
isValid
())
Kmax
=
mh
->
addAttribute
<
PFP2
::
VEC3
,
VERTEX
>
(
KmaxAttributeName
);
VertexAttribute
<
PFP2
::
REAL
,
PFP2
::
MAP
::
IMPL
>
kmax
=
mh
->
getAttribute
<
PFP2
::
REAL
,
VERTEX
>
(
kmaxAttributeName
);
VertexAttribute
<
PFP2
::
REAL
,
PFP2
::
MAP
>
kmax
=
mh
->
getAttribute
<
PFP2
::
REAL
,
VERTEX
>
(
kmaxAttributeName
);
if
(
!
kmax
.
isValid
())
kmax
=
mh
->
addAttribute
<
PFP2
::
REAL
,
VERTEX
>
(
kmaxAttributeName
);
VertexAttribute
<
PFP2
::
VEC3
,
PFP2
::
MAP
::
IMPL
>
Kmin
=
mh
->
getAttribute
<
PFP2
::
VEC3
,
VERTEX
>
(
KminAttributeName
);
VertexAttribute
<
PFP2
::
VEC3
,
PFP2
::
MAP
>
Kmin
=
mh
->
getAttribute
<
PFP2
::
VEC3
,
VERTEX
>
(
KminAttributeName
);
if
(
!
Kmin
.
isValid
())
Kmin
=
mh
->
addAttribute
<
PFP2
::
VEC3
,
VERTEX
>
(
KminAttributeName
);
VertexAttribute
<
PFP2
::
REAL
,
PFP2
::
MAP
::
IMPL
>
kmin
=
mh
->
getAttribute
<
PFP2
::
REAL
,
VERTEX
>
(
kminAttributeName
);
VertexAttribute
<
PFP2
::
REAL
,
PFP2
::
MAP
>
kmin
=
mh
->
getAttribute
<
PFP2
::
REAL
,
VERTEX
>
(
kminAttributeName
);
if
(
!
kmin
.
isValid
())
kmin
=
mh
->
addAttribute
<
PFP2
::
REAL
,
VERTEX
>
(
kminAttributeName
);
VertexAttribute
<
PFP2
::
VEC3
,
PFP2
::
MAP
::
IMPL
>
Knormal
=
mh
->
getAttribute
<
PFP2
::
VEC3
,
VERTEX
>
(
KnormalAttributeName
);
VertexAttribute
<
PFP2
::
VEC3
,
PFP2
::
MAP
>
Knormal
=
mh
->
getAttribute
<
PFP2
::
VEC3
,
VERTEX
>
(
KnormalAttributeName
);
if
(
!
Knormal
.
isValid
())
Knormal
=
mh
->
addAttribute
<
PFP2
::
VEC3
,
VERTEX
>
(
KnormalAttributeName
);
EdgeAttribute
<
PFP2
::
REAL
,
PFP2
::
MAP
::
IMPL
>
edgeAngle
=
mh
->
getAttribute
<
PFP2
::
REAL
,
EDGE
>
(
"edgeAngle"
);
EdgeAttribute
<
PFP2
::
REAL
,
PFP2
::
MAP
>
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
,
PFP2
::
MAP
::
IMPL
>
kmean
=
mh
->
getAttribute
<
PFP2
::
REAL
,
VERTEX
>
(
"kmean"
);
VertexAttribute
<
PFP2
::
REAL
,
PFP2
::
MAP
>
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
,
PFP2
::
MAP
::
IMPL
>
kgaussian
=
mh
->
getAttribute
<
PFP2
::
REAL
,
VERTEX
>
(
"kgaussian"
);
VertexAttribute
<
PFP2
::
REAL
,
PFP2
::
MAP
>
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 @
38002988
...
...
@@ -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
,
PFP2
::
MAP
::
IMPL
>
position
=
map
->
getAttribute
<
PFP2
::
VEC3
,
VERTEX
>
(
attrNames
[
0
]);
VertexAttribute
<
PFP2
::
VEC3
,
PFP2
::
MAP
>
position
=
map
->
getAttribute
<
PFP2
::
VEC3
,
VERTEX
,
PFP2
::
MAP
>
(
attrNames
[
0
]);
mh
->
registerAttribute
(
position
);
// update corresponding VBO & emit attribute update signal
...
...
SCHNApps/Plugins/surface_modelisation/include/surface_modelisation.h
View file @
38002988
...
...
@@ -25,7 +25,7 @@ struct MapParameters
faceSelector
(
NULL
)
{}
VertexAttribute
<
PFP2
::
VEC3
,
PFP2
::
MAP
::
IMPL
>
positionAttribute
;
VertexAttribute
<
PFP2
::
VEC3
,
PFP2
::
MAP
>
positionAttribute
;
CellSelector
<
PFP2
::
MAP
,
VERTEX
>*
vertexSelector
;
CellSelector
<
PFP2
::
MAP
,
EDGE
>*
edgeSelector
;
...
...
SCHNApps/Plugins/surface_modelisation/src/surface_modelisation.cpp
View file @
38002988
...
...
@@ -217,7 +217,7 @@ void Surface_Modelisation_Plugin::createEmptyMap()
MapHandler
<
PFP2
>*
mh
=
static_cast
<
MapHandler
<
PFP2
>*>
(
mhg
);
// add vertex position attribute
VertexAttribute
<
PFP2
::
VEC3
,
PFP2
::
MAP
::
IMPL
>
position
=
mh
->
addAttribute
<
PFP2
::
VEC3
,
VERTEX
>
(
"position"
);
VertexAttribute
<
PFP2
::
VEC3
,
PFP2
::
MAP
>
position
=
mh
->
addAttribute
<
PFP2
::
VEC3
,
VERTEX
>
(
"position"
);
// update corresponding VBO & emit attribute update signal
mh
->
notifyAttributeModification
(
position
);
mapNumber
++
;
...
...
@@ -230,7 +230,7 @@ void Surface_Modelisation_Plugin::createNewFace(MapHandlerGen* mhg)
PFP2
::
MAP
*
map
=
mh
->
getMap
();
if
(
h_parameterSet
[
mhg
].
positionAttribute
.
isValid
())
{
VertexAttribute
<
PFP2
::
VEC3
,
PFP2
::
MAP
::
IMPL
>&
position
=
h_parameterSet
[
mhg
].
positionAttribute
;
VertexAttribute
<
PFP2
::
VEC3
,
PFP2
::
MAP
>&
position
=
h_parameterSet
[
mhg
].
positionAttribute
;
if
(
collectedVertices
.
size
()
>=
3
)
{
Dart
d
=
map
->
newFace
(
collectedVertices
.
size
());
...
...
@@ -259,7 +259,7 @@ void Surface_Modelisation_Plugin::addCube(MapHandlerGen *mhg)
PFP2
::
MAP
*
map
=
mh
->
getMap
();
if
(
h_parameterSet
[
mhg
].
positionAttribute
.
isValid
())
{
VertexAttribute
<
PFP2
::
VEC3
,
PFP2
::
MAP
::
IMPL
>&
position
=
h_parameterSet
[
mhg
].
positionAttribute
;
VertexAttribute
<
PFP2
::
VEC3
,
PFP2
::
MAP
>&
position
=
h_parameterSet
[
mhg
].
positionAttribute
;
Algo
::
Surface
::
Modelisation
::
embedPrism
<
PFP2
>
(
*
map
,
position
,
4
,
true
,
0.7
f
,
0.7
f
,
1.0
f
);
...
...
@@ -743,7 +743,7 @@ void Surface_Modelisation_Plugin::pathExtrudeFace(MapHandlerGen *mhg)
PFP2
::
MAP
*
map
=
mh
->
getMap
();
MapParameters
&
p
=
h_parameterSet
[
mhg
];
VertexAttribute
<
PFP2
::
VEC3
,
PFP2
::
MAP
::
IMPL
>&
position
=
p
.
positionAttribute
;
VertexAttribute
<
PFP2
::
VEC3
,
PFP2
::
MAP
>&
position
=
p
.
positionAttribute
;
if
(
p
.
faceSelector
&&
!
p
.
faceSelector
->
getSelectedCells
().
empty
())
{
const
std
::
vector
<
Face
>&
selectedDart
=
p
.
faceSelector
->
getSelectedCells
();
...
...
SCHNApps/Plugins/surface_renderScalar/src/surface_renderScalar.cpp
View file @
38002988
...
...
@@ -160,7 +160,7 @@ void Surface_RenderScalar_Plugin::attributeModified(unsigned int orbit, QString
if
(
mapParam
.
scalarVBO
&&
nameAttr
==
QString
::
fromStdString
(
mapParam
.
scalarVBO
->
name
()))
{
MapHandler
<
PFP2
>*
mh
=
static_cast
<
MapHandler
<
PFP2
>*>
(
map
);
const
VertexAttribute
<
PFP2
::
REAL
,
PFP2
::
MAP
::
IMPL
>&
attr
=
mh
->
getAttribute
<
PFP2
::
REAL
,
VERTEX
>
(
nameAttr
);
const
VertexAttribute
<
PFP2
::
REAL
,
PFP2
::
MAP
>&
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
))
...
...
@@ -207,7 +207,7 @@ void Surface_RenderScalar_Plugin::changeScalarVBO(const QString& view, const QSt
if
(
vbuf
)
{
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
()));
const
VertexAttribute
<
PFP2
::
REAL
,
PFP2
::
MAP
>&
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 @
38002988
...
...
@@ -60,7 +60,7 @@ void Surface_RenderScalar_DockTab::selectedScalarVBOChanged()
if
(
vbo
)
{
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
()));
const
VertexAttribute
<
PFP2
::
REAL
,
PFP2
::
MAP
>&
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 @
38002988
...
...
@@ -25,7 +25,7 @@ struct MapParameters
facesScaleFactor
(
1.0
f
)
{}
VertexAttribute
<
PFP2
::
VEC3
,
PFP2
::
MAP
::
IMPL
>
positionAttribute
;
VertexAttribute
<
PFP2
::
VEC3
,
PFP2
::
MAP
>
positionAttribute
;
bool
drawDarts
;
QColor
dartsColor
;
bool
drawPhi1
;
...
...
SCHNApps/Plugins/surface_selection/include/surface_selection.h
View file @
38002988
...
...
@@ -26,8 +26,8 @@ struct MapParameters
selectionMethod
(
SingleCell
)
{}
VertexAttribute
<
PFP2
::
VEC3
,
PFP2
::
MAP
::
IMPL
>
positionAttribute
;
VertexAttribute
<
PFP2
::
VEC3
,
PFP2
::
MAP
::
IMPL
>
normalAttribute
;
VertexAttribute
<
PFP2
::
VEC3
,
PFP2
::
MAP
>
positionAttribute
;
VertexAttribute
<
PFP2
::
VEC3
,
PFP2
::
MAP
>
normalAttribute
;
SelectionMethod
selectionMethod
;
};
...
...
SCHNApps/Plugins/surface_subdivision/src/surface_subdivision.cpp
View file @
38002988
...
...
@@ -64,7 +64,7 @@ void Surface_Subdivision_Plugin::loopSubdivision(
if
(
mh
==
NULL
)
return
;
VertexAttribute
<
PFP2
::
VEC3
,
PFP2
::
MAP
::
IMPL
>
position
=
mh
->
getAttribute
<
PFP2
::
VEC3
,
VERTEX
>
(
positionAttributeName
);
VertexAttribute
<
PFP2
::
VEC3
,
PFP2
::
MAP
>
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
,
PFP2
::
MAP
::
IMPL
>
position
=
mh
->
getAttribute
<
PFP2
::
VEC3
,
VERTEX
>
(
positionAttributeName
);
VertexAttribute
<
PFP2
::
VEC3
,
PFP2
::
MAP
>
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
,
PFP2
::
MAP
::
IMPL
>
position
=
mh
->
getAttribute
<
PFP2
::
VEC3
,
VERTEX
>
(
positionAttributeName
);
VertexAttribute
<
PFP2
::
VEC3
,
PFP2
::
MAP
>
position
=
mh
->
getAttribute
<
PFP2
::
VEC3
,
VERTEX
>
(
positionAttributeName
);
if
(
!
position
.
isValid
())
return
;
...
...
SCHNApps/Plugins/volume_import/src/volume_import.cpp
View file @
38002988
...
...
@@ -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
,
PFP3
::
MAP
::
IMPL
>
position
=
map
->
getAttribute
<
PFP3
::
VEC3
,
VERTEX
>
(
attrNames
[
0
]);
VertexAttribute
<
PFP3
::
VEC3
,
PFP3
::
MAP
>
position
=
map
->
getAttribute
<
PFP3
::
VEC3
,
VERTEX
,
PFP3
::
MAP
>
(
attrNames
[
0
]);
mh
->
registerAttribute
(
position
);
// update corresponding VBO & emit attribute update signal
...
...
SCHNApps/include/mapHandler.h
View file @
38002988
...
...
@@ -193,7 +193,6 @@ template <typename PFP>
class
MapHandler
:
public
MapHandlerGen
{
typedef
typename
PFP
::
MAP
MAP
;
typedef
typename
PFP
::
MAP
::
IMPL
MAP_IMPL
;
typedef
typename
PFP
::
VEC3
VEC3
;
public:
...
...
@@ -221,10 +220,10 @@ public:
*********************************************************/
template
<
typename
T
,
unsigned
int
ORBIT
>
AttributeHandler
<
T
,
ORBIT
,
MAP
_IMPL
>
getAttribute
(
const
QString
&
nameAttr
,
bool
onlyRegistered
=
true
)
const
;
AttributeHandler
<
T
,
ORBIT
,
MAP
>
getAttribute
(
const
QString
&
nameAttr
,
bool
onlyRegistered
=
true
)
const
;
template
<
typename
T
,
unsigned
int
ORBIT
>
AttributeHandler
<
T
,
ORBIT
,
MAP
_IMPL
>
addAttribute
(
const
QString
&
nameAttr
,
bool
registerAttr
=
true
);
AttributeHandler
<
T
,
ORBIT
,
MAP
>
addAttribute
(
const
QString
&
nameAttr
,
bool
registerAttr
=
true
);
/*********************************************************
* MANAGE DRAWING
...
...
@@ -233,7 +232,7 @@ public:
void
draw
(
Utils
::
GLSLShader
*
shader
,
int
primitive
);
void
drawBB
();
void
updateBB
(
const
VertexAttribute
<
VEC3
,
MAP
_IMPL
>&
position
);
void
updateBB
(
const
VertexAttribute
<
VEC3
,
MAP
>&
position
);
void
updateBBDrawer
();
/*********************************************************
...
...
SCHNApps/include/mapHandler.hpp
View file @
38002988
...
...
@@ -36,24 +36,24 @@ unsigned int MapHandler<PFP>::getNbOrbits(unsigned int orbit)
template
<
typename
PFP
>
template
<
typename
T
,
unsigned
int
ORBIT
>
AttributeHandler
<
T
,
ORBIT
,
typename
PFP
::
MAP
::
IMPL
>
MapHandler
<
PFP
>::
getAttribute
(
const
QString
&
nameAttr
,
bool
onlyRegistered
)
const
AttributeHandler
<
T
,
ORBIT
,
typename
PFP
::
MAP
>
MapHandler
<
PFP
>::
getAttribute
(
const
QString
&
nameAttr
,
bool
onlyRegistered
)
const
{
if
(
onlyRegistered
)
{
if
(
m_attribs
[
ORBIT
].
contains
(
nameAttr
))
return
static_cast
<
MAP
*>
(
m_map
)
->
template
getAttribute
<
T
,
ORBIT
>(
nameAttr
.
toStdString
());
return
static_cast
<
MAP
*>
(
m_map
)
->
template
getAttribute
<
T
,
ORBIT
,
MAP
>(
nameAttr
.
toStdString
());
else
return
AttributeHandler
<
T
,
ORBIT
,
MAP
_IMPL
>
();
return
AttributeHandler
<
T
,
ORBIT
,
MAP
>
();
}
else
return
static_cast
<
MAP
*>
(
m_map
)
->
template
getAttribute
<
T
,
ORBIT
>(
nameAttr
.
toStdString
());
return
static_cast
<
MAP
*>
(
m_map
)
->
template
getAttribute
<
T
,
ORBIT
,
MAP
>(
nameAttr
.
toStdString
());
}
template
<
typename
PFP
>
template
<
typename
T
,
unsigned
int
ORBIT
>
AttributeHandler
<
T
,
ORBIT
,
typename
PFP
::
MAP
::
IMPL
>
MapHandler
<
PFP
>::
addAttribute
(
const
QString
&
nameAttr
,
bool
registerAttr
)
AttributeHandler
<
T
,
ORBIT
,
typename
PFP
::
MAP
>
MapHandler
<
PFP
>::
addAttribute
(
const
QString
&
nameAttr
,
bool
registerAttr
)
{
AttributeHandler
<
T
,
ORBIT
,
MAP
_IMPL
>
ah
=
static_cast
<
MAP
*>
(
m_map
)
->
template
addAttribute
<
T
,
ORBIT
>(
nameAttr
.
toStdString
());
AttributeHandler
<
T
,
ORBIT
,
MAP
>
ah
=
static_cast
<
MAP
*>
(
m_map
)
->
template
addAttribute
<
T
,
ORBIT
,
MAP
>(
nameAttr
.
toStdString
());
if
(
ah
.
isValid
()
&&
registerAttr
)
{
registerAttribute
(
ah
);
...
...
@@ -94,7 +94,7 @@ void MapHandler<PFP>::drawBB()
}
template
<
typename
PFP
>
void
MapHandler
<
PFP
>::
updateBB
(
const
VertexAttribute
<
VEC3
,
MAP
_IMPL
>&
position
)
void
MapHandler
<
PFP
>::
updateBB
(
const
VertexAttribute
<
VEC3
,
MAP
>&
position
)
{
m_bb
=
CGoGN
::
Algo
::
Geometry
::
computeBoundingBox
<
PFP
>
(
*
(
static_cast
<
MAP
*>
(
m_map
)),
position
);
m_bbMin
=
qglviewer
::
Vec
(
m_bb
.
min
()[
0
],
m_bb
.
min
()[
1
],
m_bb
.
min
()[
2
]);
...
...
include/Algo/BooleanOperator/mergeVertices.h
View file @
38002988
...
...
@@ -42,13 +42,13 @@ namespace BooleanOperator
{
template
<
typename
PFP
>
bool
isBetween
(
typename
PFP
::
MAP
&
map
,
const
VertexAttribute
<
typename
PFP
::
VEC3
,
typename
PFP
::
MAP
::
IMPL
>&
positions
,
Dart
d
,
Dart
e
,
Dart
f
)
;
bool
isBetween
(
typename
PFP
::
MAP
&
map
,
const
VertexAttribute
<
typename
PFP
::
VEC3
,
typename
PFP
::
MAP
>&
positions
,
Dart
d
,
Dart
e
,
Dart
f
)
;
template
<
typename
PFP
>
void
mergeVertex
(
typename
PFP
::
MAP
&
map
,
VertexAttribute
<
typename
PFP
::
VEC3
,
typename
PFP
::
MAP
::
IMPL
>&
positions
,
Dart
d
,
Dart
e
);
void
mergeVertex
(
typename
PFP
::
MAP
&
map
,
VertexAttribute
<
typename
PFP
::
VEC3
,
typename
PFP
::
MAP
>&
positions
,
Dart
d
,
Dart
e
);
template
<
typename
PFP
>
void
mergeVertices
(
typename
PFP
::
MAP
&
map
,
VertexAttribute
<
typename
PFP
::
VEC3
,
typename
PFP
::
MAP
::
IMPL
>&
positions
);
void
mergeVertices
(
typename
PFP
::
MAP
&
map
,
VertexAttribute
<
typename
PFP
::
VEC3
,
typename
PFP
::
MAP
>&
positions
);
}
...
...
include/Algo/BooleanOperator/mergeVertices.hpp
View file @
38002988
...
...
@@ -35,7 +35,7 @@ namespace BooleanOperator
{
template
<
typename
PFP
>
bool
isBetween
(
typename
PFP
::
MAP
&
map
,
const
VertexAttribute
<
typename
PFP
::
VEC3
,
typename
PFP
::
MAP
::
IMPL
>&
positions
,
Dart
d
,
Dart
e
,
Dart
f
)
bool
isBetween
(
typename
PFP
::
MAP
&
map
,
const
VertexAttribute
<
typename
PFP
::
VEC3
,
typename
PFP
::
MAP
>&
positions
,
Dart
d
,
Dart
e
,
Dart
f
)
{
return
CGoGN
::
Geom
::
isBetween
(
positions
[
map
.
phi1
(
d
)]
-
positions
[
d
],
positions
[
map
.
phi1
(
e
)]
-
positions
[
e
],
...
...
@@ -43,7 +43,7 @@ bool isBetween(typename PFP::MAP& map, const VertexAttribute<typename PFP::VEC3,
}
template
<
typename
PFP
>
void
mergeVertex
(
typename
PFP
::
MAP
&
map
,
VertexAttribute
<
typename
PFP
::
VEC3
,
typename
PFP
::
MAP
::
IMPL
>&
positions
,
Dart
d
,
Dart
e
,
int
precision
)
void
mergeVertex
(
typename
PFP
::
MAP
&
map
,
VertexAttribute
<
typename
PFP
::
VEC3
,
typename
PFP
::
MAP
>&
positions
,
Dart
d
,
Dart
e
,
int
precision
)
{
assert
(
positions
[
d
].
isNear
(
positions
[
e
],
precision
)
&&
!
map
.
sameVertex
(
d
,
e
))
;
...
...
@@ -76,7 +76,7 @@ void mergeVertex(typename PFP::MAP& map, VertexAttribute<typename PFP::VEC3, typ
}
template
<
typename
PFP
>
void
mergeVertices
(
typename
PFP
::
MAP
&
map
,
VertexAttribute
<
typename
PFP
::
VEC3
,
typename
PFP
::
MAP
::
IMPL
>&
positions
,
int
precision
)
void
mergeVertices
(
typename
PFP
::
MAP
&
map
,
VertexAttribute
<
typename
PFP
::
VEC3
,
typename
PFP
::
MAP
>&
positions
,
int
precision
)
{
// TODO optimiser en triant les sommets
// map.template enableQuickTraversal<VERTEX>();
...
...
include/Algo/Decimation/approximator.hpp
View file @
38002988
...
...
@@ -52,13 +52,13 @@ Approximator<PFP,T,ORBIT>::Approximator(MAP& m, std::vector<VertexAttribute<T, M
std
::
stringstream
aname
;
aname
<<
"approx_"
<<
m_attrV
[
i
]
->
name
()
;
m_approx
[
i
]
=
this
->
m_map
.
template
addAttribute
<
T
,
ORBIT
>(
aname
.
str
())
;
m_approx
[
i
]
=
this
->
m_map
.
template
addAttribute
<
T
,
ORBIT
,
MAP
>(
aname
.
str
())
;
if
(
m_predictor
)
// if predictors are associated to the approximator
{
// create attributes to store the details needed for reconstruction
std
::
stringstream
dname
;
dname
<<
"detail_"
<<
m_attrV
[
i
]
->
name
()
;
m_detail
[
i
]
=
this
->
m_map
.
template
addAttribute
<
T
,
ORBIT
>(
dname
.
str
())
;
m_detail
[
i
]
=
this
->
m_map
.
template
addAttribute
<
T
,
ORBIT
,
MAP
>(
dname
.
str
())
;
}
}
}
...
...
@@ -117,14 +117,14 @@ Approximator<PFP,T,ORBIT>::getApprox(Dart d, unsigned int index) const
}
template
<
typename
PFP
,
typename
T
,
unsigned
int
ORBIT
>
const
VertexAttribute
<
T
,
typename
PFP
::
MAP
::
IMPL
>&
const
VertexAttribute
<
T
,
typename
PFP
::
MAP
>&
Approximator
<
PFP
,
T
,
ORBIT
>::
getAttr
(
unsigned
int
index
)
const
{
return
*
(
m_attrV
[
index
])
;
}
template
<
typename
PFP
,
typename
T
,
unsigned
int
ORBIT
>
VertexAttribute
<
T
,
typename
PFP
::
MAP
::
IMPL
>&
VertexAttribute
<
T
,
typename
PFP
::
MAP
>&
Approximator
<
PFP
,
T
,
ORBIT
>::
getAttr
(
unsigned
int
index
)
{
return
*
(
m_attrV
[
index
])
;
...
...
include/Algo/Decimation/colorPerVertexApproximator.h
View file @
38002988
...
...
@@ -71,10 +71,10 @@ public:
{
assert
(
m_color
->
isValid
()
||
!
"Approximator_ColorNaive: the approximated attribute is not valid"
)
;
m_position
=
this
->
m_map
.
template
getAttribute
<
VEC3
,
VERTEX
>(
"position"
)
;
m_position
=
this
->
m_map
.
template
getAttribute
<
VEC3
,
VERTEX
,
MAP
>(
"position"
)
;
assert
(
m_position
.
isValid
()
||
!
"Approximator_ColorNaive::init: the position attribute is not valid"
)
;
m_approxposition
=
this
->
m_map
.
template
getAttribute
<
VEC3
,
EDGE
>(
"approx_position"
)
;
m_approxposition
=
this
->
m_map
.
template
getAttribute
<
VEC3
,
EDGE
,
MAP
>(
"approx_position"
)
;
assert
(
m_approxposition
.
isValid
()
||
!
"Approximator_ColorNaive::init: the approx_position attribute is not valid"
)
;
return
m_color
->
isValid
()
&&
m_position
.
isValid
()
&&
m_approxposition
.
isValid
()
;
...
...
include/Algo/Decimation/colorPerVertexApproximator.hpp
View file @
38002988
...
...
@@ -59,7 +59,7 @@ void Approximator_ColorNaive<PFP>::approximate(Dart d)
template
<
typename
PFP
>
bool
Approximator_ColorQEMext
<
PFP
>::
init
()
{
m_quadric
=
this
->
m_map
.
template
getAttribute
<
Utils
::
QuadricNd
<
REAL
,
6
>,
VERTEX
>
(
"QEMext-quadric"
)
;
m_quadric
=
this
->
m_map
.
template
getAttribute
<
Utils
::
QuadricNd
<
REAL
,
6
>,
VERTEX
,
MAP
>
(
"QEMext-quadric"
)
;
// Does not require to be valid (if it is not, altenatives will be used).
if
(
this
->
m_predictor
)
...
...
@@ -171,7 +171,7 @@ void Approximator_ColorQEMext<PFP>::approximate(Dart d)
template
<
typename
PFP
>
bool
Approximator_GeomColOpt
<
PFP
>::
init
()
{
m_quadric
=
this
->
m_map
.
template
getAttribute
<
Utils
::
Quadric
<
REAL
>,
VERTEX
>
(
"QEMquadric"
)
;
m_quadric
=
this
->
m_map
.
template
getAttribute
<
Utils
::
Quadric
<
REAL
>,
VERTEX
,
MAP
>
(
"QEMquadric"
)
;
// Does not require to be valid (if it is not, altenatives will be used).
if
(
this
->
m_predictor
)
...
...
include/Algo/Decimation/decimation.h
View file @
38002988
...
...
@@ -63,9 +63,9 @@ int decimate(
typename
PFP
::
MAP
&
map
,
SelectorType
s
,
ApproximatorType
a
,
std
::
vector
<
VertexAttribute
<
typename
PFP
::
VEC3
,
typename
PFP
::
MAP
::
IMPL
>*>&
attribs
,
std
::
vector
<
VertexAttribute
<
typename
PFP
::
VEC3
,
typename
PFP
::
MAP
>*>&
attribs
,
unsigned
int
nbWantedVertices
,
EdgeAttribute
<
typename
PFP
::
REAL
,
typename
PFP
::
MAP
::
IMPL
>*
edgeErrors
=
NULL
,
EdgeAttribute
<
typename
PFP
::
REAL
,
typename
PFP
::
MAP
>*
edgeErrors
=
NULL
,
void
(
*
callback_wrapper
)(
void
*
,
const
void
*
)
=
NULL
,
void
*
callback_object
=
NULL
)
;
...
...
@@ -92,7 +92,7 @@ int decimate(
std
::
vector
<
ApproximatorGen
<
PFP
>*>&
a
,
unsigned
int
nbWantedVertices
,
bool
recomputePriorityList
=
true
,
EdgeAttribute
<
typename
PFP
::
REAL
,
typename
PFP
::
MAP
::
IMPL
>*
edgeErrors
=
NULL
,
EdgeAttribute
<
typename
PFP
::
REAL
,
typename
PFP
::
MAP
>*
edgeErrors
=
NULL
,
void
(
*
callback_wrapper
)(
void
*
,
const
void
*
)
=
NULL
,
void
*
callback_object
=
NULL
)
;
...
...
include/Algo/Decimation/decimation.hpp
View file @
38002988
...
...
@@ -37,20 +37,20 @@ namespace Decimation
template
<
typename
PFP
>
int
decimate
(
typename
PFP
::
MAP
&
map
,
SelectorType
s
,
ApproximatorType
a
,
std
::
vector
<
VertexAttribute
<
typename
PFP
::
VEC3
,
typename
PFP
::
MAP
::
IMPL
>*>&
attribs
,
std
::
vector
<
VertexAttribute
<
typename
PFP
::
VEC3
,
typename
PFP
::
MAP
>*>&
attribs
,
unsigned
int
nbWantedVertices
,
EdgeAttribute
<
typename
PFP
::
REAL
,
typename
PFP
::
MAP
::
IMPL
>*
edgeErrors
,
EdgeAttribute
<
typename
PFP
::
REAL
,
typename
PFP
::
MAP
>*
edgeErrors
,
void
(
*
callback_wrapper
)(
void
*
,
const
void
*
),
void
*
callback_object
)
{
assert
(
attribs
.
size
()
>=
1
||
!
"Decimate: not enough attribs provided"
)
;
assert
(
attribs
[
0
]
->
name
()
==
"position"
||
!
"Decimate: first attribute should always be the position"
)
;
VertexAttribute
<
typename
PFP
::
VEC3
,
typename
PFP
::
MAP
::
IMPL
>
position
=
*
(
attribs
[
0
])
;
VertexAttribute
<
typename
PFP
::
VEC3
,
typename
PFP
::
MAP
>
position
=
*
(
attribs
[
0
])
;
std
::
vector
<
ApproximatorGen
<
PFP
>*>
approximators
;
Selector
<
PFP
>*
selector
=
NULL
;
std
::
vector
<
VertexAttribute
<
typename
PFP
::
VEC3
,
typename
PFP
::
MAP
::
IMPL
>*>*
v_approx
=
NULL
;
std
::
vector
<
VertexAttribute
<
typename
PFP
::
VEC3
,
typename
PFP
::
MAP
>*>*
v_approx
=
NULL
;
switch
(
a
)
{
...
...
@@ -77,7 +77,7 @@ int decimate(
break
;
case
A_ColorNaive
:
{
v_approx
=
new
std
::
vector
<
VertexAttribute
<
typename
PFP
::
VEC3
,
typename
PFP
::
MAP
::
IMPL
>*>
[
2
]
;
v_approx
=
new
std
::
vector
<
VertexAttribute
<
typename
PFP
::
VEC3
,
typename
PFP
::
MAP
>*>
[
2
]
;
// pos
v_approx
[
0
].
push_back
(
attribs
[
0
])
;
...
...
@@ -181,7 +181,7 @@ int decimate(
Selector
<
PFP
>*
selector
,
std
::
vector
<
ApproximatorGen
<
PFP
>*>&
approximators
,
unsigned
int
nbWantedVertices
,
bool
recomputePriorityList
,
EdgeAttribute
<
typename
PFP
::
REAL
,
typename
PFP
::
MAP
::
IMPL
>*
edgeErrors
,
EdgeAttribute
<
typename
PFP
::
REAL
,
typename
PFP
::
MAP
>*
edgeErrors
,
void
(
*
callback_wrapper
)(
void
*
,
const
void
*
),
void
*
callback_object
)
{
...
...
include/Algo/Decimation/edgeSelector.h
View file @
38002988
...
...
@@ -128,7 +128,7 @@ public:
EdgeSelector_Length
(
MAP
&
m
,
VertexAttribute
<
VEC3
,
MAP
>&
pos
,
std
::
vector
<
ApproximatorGen
<
PFP
>*>&
approx
)
:
Selector
<
PFP
>
(
m
,
pos
,
approx
)
{
edgeInfo
=
m
.
template
addAttribute
<
EdgeInfo
,
EDGE
>(
"edgeInfo"
)
;
edgeInfo
=
m
.
template
addAttribute
<
EdgeInfo
,
EDGE
,
MAP
>(
"edgeInfo"
)
;
}
~
EdgeSelector_Length
()
{
...
...
@@ -196,8 +196,8 @@ public:
Selector
<
PFP
>
(
m
,
pos
,
approx
),
m_positionApproximator
(
NULL
)
{
edgeInfo
=
m
.
template
addAttribute
<
EdgeInfo
,
EDGE
>(
"edgeInfo"
)
;
quadric
=
m
.
template
addAttribute
<
Utils
::
Quadric
<
REAL
>,
VERTEX
>
(
"QEMquadric"
)
;
edgeInfo
=
m
.
template
addAttribute
<
EdgeInfo
,
EDGE
,
MAP
>(
"edgeInfo"
)
;
quadric
=
m
.
template
addAttribute
<
Utils
::
Quadric
<
REAL
>,
VERTEX
,
MAP
>
(
"QEMquadric"
)
;