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
1
Issues
1
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
Operations
Operations
Incidents
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
CGoGN
CGoGN
Commits
ba596b91
Commit
ba596b91
authored
Apr 25, 2012
by
Pierre Kraemer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
start template the ORBIT parameter
parent
04072a3b
Changes
40
Hide whitespace changes
Inline
Side-by-side
Showing
40 changed files
with
710 additions
and
634 deletions
+710
-634
include/Algo/Decimation/edgeSelector.hpp
include/Algo/Decimation/edgeSelector.hpp
+2
-2
include/Algo/Decimation/geometryApproximator.hpp
include/Algo/Decimation/geometryApproximator.hpp
+4
-4
include/Algo/Export/export.hpp
include/Algo/Export/export.hpp
+7
-7
include/Algo/Export/exportPov.h
include/Algo/Export/exportPov.h
+1
-1
include/Algo/ImplicitHierarchicalMesh/subdivision3.hpp
include/Algo/ImplicitHierarchicalMesh/subdivision3.hpp
+2
-2
include/Algo/Import/importMRDAT.h
include/Algo/Import/importMRDAT.h
+3
-3
include/Algo/Import/importMRDAT.hpp
include/Algo/Import/importMRDAT.hpp
+2
-2
include/Algo/Import/importMesh.hpp
include/Algo/Import/importMesh.hpp
+4
-4
include/Algo/Import/importNodeEle.hpp
include/Algo/Import/importNodeEle.hpp
+3
-3
include/Algo/Import/importObjEle.hpp
include/Algo/Import/importObjEle.hpp
+3
-3
include/Algo/Import/importTet.hpp
include/Algo/Import/importTet.hpp
+3
-3
include/Algo/Import/importTs.hpp
include/Algo/Import/importTs.hpp
+3
-3
include/Algo/Modelisation/subdivision3.hpp
include/Algo/Modelisation/subdivision3.hpp
+3
-3
include/Algo/Modelisation/tetrahedralization.hpp
include/Algo/Modelisation/tetrahedralization.hpp
+14
-14
include/Algo/ProgressiveMesh/pmesh.hpp
include/Algo/ProgressiveMesh/pmesh.hpp
+2
-2
include/Algo/Render/GL2/mapRender.hpp
include/Algo/Render/GL2/mapRender.hpp
+14
-14
include/Topology/generic/attribmap.h
include/Topology/generic/attribmap.h
+15
-15
include/Topology/generic/attribmap.hpp
include/Topology/generic/attribmap.hpp
+22
-22
include/Topology/generic/attributeHandler.h
include/Topology/generic/attributeHandler.h
+3
-3
include/Topology/generic/attributeHandler.hpp
include/Topology/generic/attributeHandler.hpp
+53
-52
include/Topology/generic/autoAttributeHandler.h
include/Topology/generic/autoAttributeHandler.h
+6
-7
include/Topology/generic/cellmarker.h
include/Topology/generic/cellmarker.h
+111
-92
include/Topology/generic/dartmarker.h
include/Topology/generic/dartmarker.h
+40
-38
include/Topology/generic/functor.h
include/Topology/generic/functor.h
+20
-4
include/Topology/generic/genericmap.h
include/Topology/generic/genericmap.h
+46
-26
include/Topology/generic/genericmap.hpp
include/Topology/generic/genericmap.hpp
+48
-37
include/Topology/generic/traversorCell.h
include/Topology/generic/traversorCell.h
+13
-14
include/Topology/generic/traversorCell.hpp
include/Topology/generic/traversorCell.hpp
+27
-27
src/Algo/ImplicitHierarchicalMesh/ihm3.cpp
src/Algo/ImplicitHierarchicalMesh/ihm3.cpp
+1
-1
src/Topology/generic/attribmap.cpp
src/Topology/generic/attribmap.cpp
+11
-9
src/Topology/generic/genericmap.cpp
src/Topology/generic/genericmap.cpp
+60
-53
src/Topology/gmap/embeddedGMap2.cpp
src/Topology/gmap/embeddedGMap2.cpp
+106
-106
src/Topology/gmap/embeddedGMap3.cpp
src/Topology/gmap/embeddedGMap3.cpp
+10
-10
src/Topology/gmap/gmap2.cpp
src/Topology/gmap/gmap2.cpp
+3
-3
src/Topology/gmap/gmap3.cpp
src/Topology/gmap/gmap3.cpp
+9
-9
src/Topology/map/embeddedMap2.cpp
src/Topology/map/embeddedMap2.cpp
+7
-7
src/Topology/map/embeddedMap3.cpp
src/Topology/map/embeddedMap3.cpp
+10
-10
src/Topology/map/map2MR/map2MR_PrimalRegular.cpp
src/Topology/map/map2MR/map2MR_PrimalRegular.cpp
+2
-2
src/Topology/map/map3MR/map3MR_PrimalAdapt.cpp
src/Topology/map/map3MR/map3MR_PrimalAdapt.cpp
+4
-4
src/Topology/map/map3MR/map3MR_PrimalRegular.cpp
src/Topology/map/map3MR/map3MR_PrimalRegular.cpp
+13
-13
No files found.
include/Algo/Decimation/edgeSelector.hpp
View file @
ba596b91
...
...
@@ -877,8 +877,8 @@ void EdgeSelector_Curvature<PFP>::computeEdgeInfo(Dart d, EdgeInfo& einfo)
MAP
&
m
=
this
->
m_map
;
Dart
dd
=
m
.
phi2
(
d
)
;
unsigned
int
v1
=
m
.
getEmbedding
(
VERTEX
,
d
)
;
unsigned
int
v2
=
m
.
getEmbedding
(
VERTEX
,
dd
)
;
unsigned
int
v1
=
m
.
getEmbedding
<
VERTEX
>
(
d
)
;
unsigned
int
v2
=
m
.
getEmbedding
<
VERTEX
>
(
dd
)
;
m_positionApproximator
->
approximate
(
d
)
;
...
...
include/Algo/Decimation/geometryApproximator.hpp
View file @
ba596b91
...
...
@@ -220,8 +220,8 @@ void Approximator_MidEdge<PFP>::approximate(Dart d)
// vertex split to reset the initial connectivity and embeddings
m
.
insertTrianglePair
(
d
,
d2
,
dd2
)
;
m
.
embedOrbit
(
VERTEX
,
d
,
m
.
getEmbedding
(
VERTEX
,
d
))
;
m
.
embedOrbit
(
VERTEX
,
dd
,
m
.
getEmbedding
(
VERTEX
,
dd
))
;
m
.
embedOrbit
(
VERTEX
,
d
,
m
.
getEmbedding
<
VERTEX
>
(
d
))
;
m
.
embedOrbit
(
VERTEX
,
dd
,
m
.
getEmbedding
<
VERTEX
>
(
dd
))
;
}
}
...
...
@@ -268,8 +268,8 @@ void Approximator_HalfCollapse<PFP>::approximate(Dart d)
// vertex split to reset the initial connectivity and embeddings
m
.
insertTrianglePair
(
d
,
d2
,
dd2
)
;
m
.
embedOrbit
(
VERTEX
,
d
,
m
.
getEmbedding
(
VERTEX
,
d
))
;
m
.
embedOrbit
(
VERTEX
,
dd
,
m
.
getEmbedding
(
VERTEX
,
dd
))
;
m
.
embedOrbit
(
VERTEX
,
d
,
m
.
getEmbedding
<
VERTEX
>
(
d
))
;
m
.
embedOrbit
(
VERTEX
,
dd
,
m
.
getEmbedding
<
VERTEX
>
(
dd
))
;
}
}
...
...
include/Algo/Export/export.hpp
View file @
ba596b91
...
...
@@ -78,7 +78,7 @@ bool exportPLY(typename PFP::MAP& map, const typename PFP::TVEC3& position, cons
for
(
Dart
it
=
tfv
.
begin
();
it
!=
tfv
.
end
();
it
=
tfv
.
next
())
{
++
degree
;
unsigned
int
vNum
=
map
.
getEmbedding
(
VERTEX
,
it
)
;
unsigned
int
vNum
=
map
.
getEmbedding
<
VERTEX
>
(
it
)
;
if
(
!
markV
.
isMarked
(
it
))
{
markV
.
mark
(
it
)
;
...
...
@@ -205,7 +205,7 @@ bool exportPLYnew(typename PFP::MAP& map, const std::vector<typename PFP::TVEC3*
for
(
Dart
it
=
tfv
.
begin
();
it
!=
tfv
.
end
();
it
=
tfv
.
next
())
{
++
degree
;
unsigned
int
vNum
=
map
.
getEmbedding
(
VERTEX
,
it
)
;
unsigned
int
vNum
=
map
.
getEmbedding
<
VERTEX
>
(
it
)
;
if
(
!
markV
.
isMarked
(
it
))
{
markV
.
mark
(
it
)
;
...
...
@@ -353,7 +353,7 @@ bool exportOFF(typename PFP::MAP& map, const typename PFP::TVEC3& position, cons
for
(
Dart
it
=
tfv
.
begin
();
it
!=
tfv
.
end
();
it
=
tfv
.
next
())
{
++
degree
;
unsigned
int
vNum
=
map
.
getEmbedding
(
VERTEX
,
it
)
;
unsigned
int
vNum
=
map
.
getEmbedding
<
VERTEX
>
(
it
)
;
if
(
!
markV
.
isMarked
(
it
))
{
markV
.
mark
(
it
)
;
...
...
@@ -427,7 +427,7 @@ bool exportPlyPTMgeneric(typename PFP::MAP& map, const typename PFP::TVEC3& posi
{
markV
.
mark
(
it
);
tableVertLab
[
it
]
=
lab
++
;
vertices
.
push_back
(
map
.
getEmbedding
(
VERTEX
,
it
));
vertices
.
push_back
(
map
.
getEmbedding
<
VERTEX
>
(
it
));
}
face
.
push_back
(
tableVertLab
[
it
]);
}
...
...
@@ -569,7 +569,7 @@ bool exportPlySLFgeneric(typename PFP::MAP& map, const typename PFP::TVEC3& posi
{
markV.mark(it);
tableVertLab[it] = lab++;
vertices.push_back(map.getEmbedding
(VERTEX,
it));
vertices.push_back(map.getEmbedding
<VERTEX>(
it));
}
face.push_back(tableVertLab[it]);
}
...
...
@@ -702,7 +702,7 @@ bool exportPlySLFgenericBin(typename PFP::MAP& map, const typename PFP::TVEC3& p
{
markV.mark(it);
tableVertLab[it] = lab++;
vertices.push_back(map.getEmbedding
(VERTEX,
it));
vertices.push_back(map.getEmbedding
<VERTEX>(
it));
}
face.push_back(tableVertLab[it]);
}
...
...
@@ -842,7 +842,7 @@ bool exportPLYPTM(typename PFP::MAP& map, const char* filename, const typename P
{
markV
.
mark
(
it
);
tableVertLab
[
it
]
=
lab
++
;
vertices
.
push_back
(
map
.
getEmbedding
(
VERTEX
,
it
));
vertices
.
push_back
(
map
.
getEmbedding
<
VERTEX
>
(
it
));
}
face
.
push_back
(
tableVertLab
[
it
]);
}
...
...
include/Algo/Export/exportPov.h
View file @
ba596b91
...
...
@@ -115,7 +115,7 @@ void export3MeshPlainSmooth(std::ofstream& out, typename PFP::MAP& map, typename
Dart
dd
=
d
;
do
{
unsigned
int
vNum
=
map
.
getEmbedding
(
VERTEX
,
dd
)
;
unsigned
int
vNum
=
map
.
getEmbedding
<
VERTEX
>
(
dd
)
;
if
(
!
markV
.
isMarked
(
dd
))
{
markV
.
mark
(
dd
)
;
...
...
include/Algo/ImplicitHierarchicalMesh/subdivision3.hpp
View file @
ba596b91
...
...
@@ -690,7 +690,7 @@ void subdivideLoop(typename PFP::MAP& map, Dart d, typename PFP::TVEC3& position
}
while
(
f
!=
x
);
}
map
.
embedOrbit
(
VERTEX
,
centralDart
,
map
.
getEmbedding
(
VERTEX
,
centralDart
));
map
.
embedOrbit
(
VERTEX
,
centralDart
,
map
.
getEmbedding
<
VERTEX
>
(
centralDart
));
//Third step : 3-sew internal faces
for
(
std
::
vector
<
std
::
pair
<
Dart
,
Dart
>
>::
iterator
it
=
subdividedfaces
.
begin
();
it
!=
subdividedfaces
.
end
();
++
it
)
...
...
@@ -1435,7 +1435,7 @@ Dart subdivideVolumeGen(typename PFP::MAP& map, Dart d, typename PFP::TVEC3& pos
//
// if(map.phi3(map.phi2(f1)) == map.phi2(f1) && map.phi3(map.phi2(f2)) == map.phi2(f2))
// {
// if(map.getEmbedding
(VERTEX, map.phi_1(map.phi2(f2))) == map.getEmbedding(VERTEX,
map.phi_1(map.phi2(f1))))
// if(map.getEmbedding
<VERTEX>(map.phi_1(map.phi2(f2))) == map.getEmbedding<VERTEX>(
map.phi_1(map.phi2(f1))))
// {
// map.Map3::sewVolumes(map.phi2(f2), map.phi2(f1));
// }
...
...
include/Algo/Import/importMRDAT.h
View file @
ba596b91
...
...
@@ -90,11 +90,11 @@ public:
do
{
Dart
next
=
map
.
phi1
(
it
)
;
unsigned
int
emb
=
map
.
getEmbedding
(
VERTEX
,
it
)
;
unsigned
int
emb
=
map
.
getEmbedding
<
VERTEX
>
(
it
)
;
unsigned
int
idx
=
emb
==
v0
?
0
:
emb
==
v1
?
1
:
2
;
map
.
incCurrentLevel
()
;
Dart
dd
=
map
.
phi1
(
next
)
;
unsigned
int
oldEmb
=
map
.
getEmbedding
(
VERTEX
,
dd
)
;
unsigned
int
oldEmb
=
map
.
getEmbedding
<
VERTEX
>
(
dd
)
;
unsigned
int
newEmb
=
vID
[
children
[
0
]
->
indices
[
idx
]]
;
if
(
oldEmb
==
EMBNULL
)
{
...
...
@@ -120,7 +120,7 @@ public:
do
{
unsigned
int
emb
=
map
.
getEmbedding
(
VERTEX
,
it
)
;
unsigned
int
emb
=
map
.
getEmbedding
<
VERTEX
>
(
it
)
;
unsigned
int
idx
=
emb
==
v0
?
0
:
emb
==
v1
?
1
:
2
;
map
.
incCurrentLevel
()
;
children
[
idx
+
1
]
->
embed
<
PFP
>
(
map
,
it
,
vID
)
;
...
...
include/Algo/Import/importMRDAT.hpp
View file @
ba596b91
...
...
@@ -223,11 +223,11 @@ bool importMRDAT(typename PFP::MAP& map, const std::string& filename, std::vecto
// darts incident to end vertex of edge
std
::
vector
<
Dart
>&
vec
=
vecDartsPerVertex
[
map
.
phi1
(
d
)]
;
unsigned
int
embd
=
map
.
getEmbedding
(
VERTEX
,
d
)
;
unsigned
int
embd
=
map
.
getEmbedding
<
VERTEX
>
(
d
)
;
Dart
good_dart
=
NIL
;
for
(
typename
std
::
vector
<
Dart
>::
iterator
it
=
vec
.
begin
();
it
!=
vec
.
end
()
&&
good_dart
==
NIL
;
++
it
)
{
if
(
map
.
getEmbedding
(
VERTEX
,
map
.
phi1
(
*
it
))
==
embd
)
if
(
map
.
getEmbedding
<
VERTEX
>
(
map
.
phi1
(
*
it
))
==
embd
)
good_dart
=
*
it
;
}
...
...
include/Algo/Import/importMesh.hpp
View file @
ba596b91
...
...
@@ -98,11 +98,11 @@ bool importMesh(typename PFP::MAP& map, MeshTablesSurface<PFP>& mts)
// darts incident to end vertex of edge
std
::
vector
<
Dart
>&
vec
=
vecDartsPerVertex
[
map
.
phi1
(
d
)];
unsigned
int
embd
=
map
.
getEmbedding
(
VERTEX
,
d
);
unsigned
int
embd
=
map
.
getEmbedding
<
VERTEX
>
(
d
);
Dart
good_dart
=
NIL
;
for
(
typename
std
::
vector
<
Dart
>::
iterator
it
=
vec
.
begin
();
it
!=
vec
.
end
()
&&
good_dart
==
NIL
;
++
it
)
{
if
(
map
.
getEmbedding
(
VERTEX
,
map
.
phi1
(
*
it
))
==
embd
)
if
(
map
.
getEmbedding
<
VERTEX
>
(
map
.
phi1
(
*
it
))
==
embd
)
good_dart
=
*
it
;
}
...
...
@@ -212,11 +212,11 @@ bool importMeshSToV(typename PFP::MAP& map, MeshTablesSurface<PFP>& mts, float d
// darts incident to end vertex of edge
std
::
vector
<
Dart
>&
vec
=
vecDartsPerVertex
[
map
.
phi1
(
d
)];
unsigned
int
embd
=
map
.
getEmbedding
(
VERTEX
,
d
);
unsigned
int
embd
=
map
.
getEmbedding
<
VERTEX
>
(
d
);
Dart
good_dart
=
NIL
;
for
(
typename
std
::
vector
<
Dart
>::
iterator
it
=
vec
.
begin
();
it
!=
vec
.
end
()
&&
good_dart
==
NIL
;
++
it
)
{
if
(
map
.
getEmbedding
(
VERTEX
,
map
.
phi1
(
*
it
))
==
embd
)
if
(
map
.
getEmbedding
<
VERTEX
>
(
map
.
phi1
(
*
it
))
==
embd
)
good_dart
=
*
it
;
}
...
...
include/Algo/Import/importNodeEle.hpp
View file @
ba596b91
...
...
@@ -210,9 +210,9 @@ bool importNodeWithELERegions(typename PFP::MAP& map, const std::string& filenam
Dart
good_dart
=
NIL
;
for
(
typename
std
::
vector
<
Dart
>::
iterator
it
=
vec
.
begin
();
it
!=
vec
.
end
()
&&
good_dart
==
NIL
;
++
it
)
{
if
(
map
.
getEmbedding
(
VERTEX
,
map
.
phi1
(
*
it
))
==
map
.
getEmbedding
(
VERTEX
,
d
)
&&
map
.
getEmbedding
(
VERTEX
,
map
.
phi_1
(
*
it
))
==
map
.
getEmbedding
(
VERTEX
,
map
.
phi_1
(
d
))
/*&&
map.getEmbedding
(VERTEX, *it) == map.getEmbedding(VERTEX,
map.phi1(d)) */
)
if
(
map
.
getEmbedding
<
VERTEX
>
(
map
.
phi1
(
*
it
))
==
map
.
getEmbedding
<
VERTEX
>
(
d
)
&&
map
.
getEmbedding
<
VERTEX
>
(
map
.
phi_1
(
*
it
))
==
map
.
getEmbedding
<
VERTEX
>
(
map
.
phi_1
(
d
))
/*&&
map.getEmbedding
<VERTEX>(*it) == map.getEmbedding<VERTEX>(
map.phi1(d)) */
)
{
good_dart
=
*
it
;
}
...
...
include/Algo/Import/importObjEle.hpp
View file @
ba596b91
...
...
@@ -205,9 +205,9 @@ bool importOFFWithELERegions(typename PFP::MAP& map, const std::string& filename
Dart
good_dart
=
NIL
;
for
(
typename
std
::
vector
<
Dart
>::
iterator
it
=
vec
.
begin
();
it
!=
vec
.
end
()
&&
good_dart
==
NIL
;
++
it
)
{
if
(
map
.
getEmbedding
(
VERTEX
,
map
.
phi1
(
*
it
))
==
map
.
getEmbedding
(
VERTEX
,
d
)
&&
map
.
getEmbedding
(
VERTEX
,
map
.
phi_1
(
*
it
))
==
map
.
getEmbedding
(
VERTEX
,
map
.
phi_1
(
d
))
/*&&
map.getEmbedding
(VERTEX, *it) == map.getEmbedding(VERTEX,
map.phi1(d)) */
)
if
(
map
.
getEmbedding
<
VERTEX
>
(
map
.
phi1
(
*
it
))
==
map
.
getEmbedding
<
VERTEX
>
(
d
)
&&
map
.
getEmbedding
<
VERTEX
>
(
map
.
phi_1
(
*
it
))
==
map
.
getEmbedding
<
VERTEX
>
(
map
.
phi_1
(
d
))
/*&&
map.getEmbedding
<VERTEX>(*it) == map.getEmbedding<VERTEX>(
map.phi1(d)) */
)
{
good_dart
=
*
it
;
}
...
...
include/Algo/Import/importTet.hpp
View file @
ba596b91
...
...
@@ -174,9 +174,9 @@ bool importTet(typename PFP::MAP& map, const std::string& filename, std::vector<
Dart
good_dart
=
NIL
;
for
(
typename
std
::
vector
<
Dart
>::
iterator
it
=
vec
.
begin
();
it
!=
vec
.
end
()
&&
good_dart
==
NIL
;
++
it
)
{
if
(
map
.
getEmbedding
(
VERTEX
,
map
.
phi1
(
*
it
))
==
map
.
getEmbedding
(
VERTEX
,
d
)
&&
map
.
getEmbedding
(
VERTEX
,
map
.
phi_1
(
*
it
))
==
map
.
getEmbedding
(
VERTEX
,
map
.
phi_1
(
d
))
/*&&
map.getEmbedding
(VERTEX, *it) == map.getEmbedding(VERTEX,
map.phi1(d)) */
)
if
(
map
.
getEmbedding
<
VERTEX
>
(
map
.
phi1
(
*
it
))
==
map
.
getEmbedding
<
VERTEX
>
(
d
)
&&
map
.
getEmbedding
<
VERTEX
>
(
map
.
phi_1
(
*
it
))
==
map
.
getEmbedding
<
VERTEX
>
(
map
.
phi_1
(
d
))
/*&&
map.getEmbedding
<VERTEX>(*it) == map.getEmbedding<VERTEX>(
map.phi1(d)) */
)
{
good_dart
=
*
it
;
}
...
...
include/Algo/Import/importTs.hpp
View file @
ba596b91
...
...
@@ -181,9 +181,9 @@ bool importTs(typename PFP::MAP& map, const std::string& filename, std::vector<s
Dart
good_dart
=
NIL
;
for
(
typename
std
::
vector
<
Dart
>::
iterator
it
=
vec
.
begin
();
it
!=
vec
.
end
()
&&
good_dart
==
NIL
;
++
it
)
{
if
(
map
.
getEmbedding
(
VERTEX
,
map
.
phi1
(
*
it
))
==
map
.
getEmbedding
(
VERTEX
,
d
)
&&
map
.
getEmbedding
(
VERTEX
,
map
.
phi_1
(
*
it
))
==
map
.
getEmbedding
(
VERTEX
,
map
.
phi_1
(
d
))
/*&&
map.getEmbedding
(VERTEX, *it) == map.getEmbedding(VERTEX,
map.phi1(d)) */
)
if
(
map
.
getEmbedding
<
VERTEX
>
(
map
.
phi1
(
*
it
))
==
map
.
getEmbedding
<
VERTEX
>
(
d
)
&&
map
.
getEmbedding
<
VERTEX
>
(
map
.
phi_1
(
*
it
))
==
map
.
getEmbedding
<
VERTEX
>
(
map
.
phi_1
(
d
))
/*&&
map.getEmbedding
<VERTEX>(*it) == map.getEmbedding<VERTEX>(
map.phi1(d)) */
)
{
good_dart
=
*
it
;
}
...
...
include/Algo/Modelisation/subdivision3.hpp
View file @
ba596b91
...
...
@@ -450,7 +450,7 @@ void catmullClarkVol(typename PFP::MAP& map, EMBV& attributs, const FunctorSelec
// if(phi3(f1) == f1 && phi3(f2) == f2)
// sewVolumes(f1, f2, false);
// }
// embedOrbit(VERTEX, centralDart, getEmbedding
(VERTEX,
centralDart));
// embedOrbit(VERTEX, centralDart, getEmbedding
<VERTEX>(
centralDart));
//attributs[map.phi1(ne)] = attBary[*it];
//
// setCurrentLevel(getMaxLevel() - 1) ;
...
...
@@ -461,13 +461,13 @@ void catmullClarkVol(typename PFP::MAP& map, EMBV& attributs, const FunctorSelec
// TraversorE<typename PFP::MAP> travE2(map);
// for (Dart d = travE2.begin(); d != travE2.end(); d = travE2.next())
// {
// map.embedOrbit(VERTEX, map.phi1(d), map.getEmbedding
(VERTEX,
map.phi1(d)));
// map.embedOrbit(VERTEX, map.phi1(d), map.getEmbedding
<VERTEX>(
map.phi1(d)));
// }
//
// TraversorF<typename PFP::MAP> travF2(map) ;
// for (Dart d = travF2.begin(); d != travF2.end(); d = travF2.next())
// {
// map.embedOrbit(VERTEX, map.phi2(map.phi1(d)), map.getEmbedding
(VERTEX,
map.phi2(map.phi1(d))));
// map.embedOrbit(VERTEX, map.phi2(map.phi1(d)), map.getEmbedding
<VERTEX>(
map.phi2(map.phi1(d))));
// }
...
...
include/Algo/Modelisation/tetrahedralization.hpp
View file @
ba596b91
...
...
@@ -98,8 +98,8 @@ Dart linkIntoEdge(typename PFP::MAP& map, Dart d, Dart e)
map
.
sewFaces
(
e2
,
d3
);
map
.
sewFaces
(
e
,
d
);
map
.
setDartEmbedding
(
VERTEX
,
d
,
map
.
getEmbedding
(
VERTEX
,
e2
))
;
map
.
setDartEmbedding
(
VERTEX
,
d3
,
map
.
getEmbedding
(
VERTEX
,
e
))
;
map
.
setDartEmbedding
(
VERTEX
,
d
,
map
.
getEmbedding
<
VERTEX
>
(
e2
))
;
map
.
setDartEmbedding
(
VERTEX
,
d3
,
map
.
getEmbedding
<
VERTEX
>
(
e
))
;
return
e2
;
}
...
...
@@ -115,14 +115,14 @@ void unlinkFromEdge(typename PFP::MAP& map, Dart d)
// //Si la face n'est pas libre en phi2
// if(map.phi2(d) != d && map.phi2(d3) != d3)
// {
// unsigned int dVEmb = map.getEmbedding
(VERTEX,
d) ;
// unsigned int dVEmb = map.getEmbedding
<VERTEX>(
d) ;
// if(dVEmb != EMBNULL)
// {
// map.embedOrbit(VERTEX, d, dVEmb) ;
// map.setDartEmbedding(VERTEX, d, EMBNULL) ;
// }
//
// unsigned int d3VEmb = map.getEmbedding
(VERTEX,
d3) ;
// unsigned int d3VEmb = map.getEmbedding
<VERTEX>(
d3) ;
// if(d3VEmb != EMBNULL)
// {
// map.embedOrbit(VERTEX, d3, d3VEmb) ;
...
...
@@ -169,8 +169,8 @@ void insertFace(typename PFP::MAP& map, Dart d, Dart nF)
map
.
sewFaces
(
dd
,
nFd
);
map
.
sewFaces
(
d2
,
map
.
phi3
(
nFd
));
map
.
setDartEmbedding
(
VERTEX
,
nFd
,
map
.
getEmbedding
(
VERTEX
,
d2
))
;
map
.
setDartEmbedding
(
VERTEX
,
map
.
phi3
(
nFd
),
map
.
getEmbedding
(
VERTEX
,
dd
))
;
map
.
setDartEmbedding
(
VERTEX
,
nFd
,
map
.
getEmbedding
<
VERTEX
>
(
d2
))
;
map
.
setDartEmbedding
(
VERTEX
,
map
.
phi3
(
nFd
),
map
.
getEmbedding
<
VERTEX
>
(
dd
))
;
dd
=
map
.
phi_1
(
map
.
phi2
(
map
.
phi_1
(
dd
)));
nFd
=
map
.
phi1
(
nFd
);
...
...
@@ -196,14 +196,14 @@ void swap2To2(typename PFP::MAP& map, Dart d)
map
.
flipEdge
(
r
);
Dart
e
=
map
.
phi2
(
r
);
unsigned
int
dVEmb
=
map
.
getEmbedding
(
VERTEX
,
r
)
;
unsigned
int
dVEmb
=
map
.
getEmbedding
<
VERTEX
>
(
r
)
;
if
(
dVEmb
!=
EMBNULL
)
{
map
.
setDartEmbedding
(
VERTEX
,
map
.
phi_1
(
r
),
dVEmb
)
;
map
.
setDartEmbedding
(
VERTEX
,
r
,
EMBNULL
)
;
}
unsigned
int
eVEmb
=
map
.
getEmbedding
(
VERTEX
,
e
)
;
unsigned
int
eVEmb
=
map
.
getEmbedding
<
VERTEX
>
(
e
)
;
if
(
eVEmb
!=
EMBNULL
)
{
map
.
setDartEmbedding
(
VERTEX
,
map
.
phi_1
(
e
),
eVEmb
)
;
...
...
@@ -218,8 +218,8 @@ void swap2To2(typename PFP::MAP& map, Dart d)
Dart
e
=
map
.
phi2
(
dd
);
Dart
e2
=
map
.
phi2
(
map
.
phi3
(
dd
));
map
.
setDartEmbedding
(
VERTEX
,
dd
,
map
.
getEmbedding
(
VERTEX
,
e2
))
;
map
.
setDartEmbedding
(
VERTEX
,
map
.
phi3
(
dd
),
map
.
getEmbedding
(
VERTEX
,
e
))
;
map
.
setDartEmbedding
(
VERTEX
,
dd
,
map
.
getEmbedding
<
VERTEX
>
(
e2
))
;
map
.
setDartEmbedding
(
VERTEX
,
map
.
phi3
(
dd
),
map
.
getEmbedding
<
VERTEX
>
(
e
))
;
dd
=
map
.
phi1
(
dd
);
...
...
@@ -305,8 +305,8 @@ void swap3To2(typename PFP::MAP& map, Dart d)
do
{
Dart
e
=
map
.
phi2
(
map
.
phi3
(
map
.
phi2
(
dd
)));
unsigned
int
eVEmb
=
map
.
getEmbedding
(
VERTEX
,
e
)
;
unsigned
int
ddVEmb
=
map
.
getEmbedding
(
VERTEX
,
dd
)
;
unsigned
int
eVEmb
=
map
.
getEmbedding
<
VERTEX
>
(
e
)
;
unsigned
int
ddVEmb
=
map
.
getEmbedding
<
VERTEX
>
(
dd
)
;
map
.
setDartEmbedding
(
VERTEX
,
map
.
phi2
(
dd
),
eVEmb
)
;
map
.
setDartEmbedding
(
VERTEX
,
map
.
phi2
(
e
),
ddVEmb
)
;
...
...
@@ -323,8 +323,8 @@ Dart swap2To3(typename PFP::MAP& map, Dart d)
{
Dart
e
=
map
.
phi1
(
map
.
phi2
(
map
.
phi3
(
d
)));
unsigned
int
p1
=
map
.
getEmbedding
(
VERTEX
,
map
.
phi_1
(
map
.
phi2
(
d
)))
;
unsigned
int
p2
=
map
.
getEmbedding
(
VERTEX
,
map
.
phi2
(
map
.
phi1
(
map
.
phi2
(
map
.
phi3
(
d
)))))
;
unsigned
int
p1
=
map
.
getEmbedding
<
VERTEX
>
(
map
.
phi_1
(
map
.
phi2
(
d
)))
;
unsigned
int
p2
=
map
.
getEmbedding
<
VERTEX
>
(
map
.
phi2
(
map
.
phi1
(
map
.
phi2
(
map
.
phi3
(
d
)))))
;
//détachement des demi-faces du milieu
//garde la relation volumique qui les lies
...
...
include/Algo/ProgressiveMesh/pmesh.hpp
View file @
ba596b91
...
...
@@ -258,8 +258,8 @@ void ProgressiveMesh<PFP>::refine()
Dart
d1
=
m_map
.
phi2
(
d2
)
;
Dart
dd1
=
m_map
.
phi2
(
dd2
)
;
unsigned
int
v1
=
m_map
.
getEmbedding
(
VERTEX
,
d
)
;
// get the embedding
unsigned
int
v2
=
m_map
.
getEmbedding
(
VERTEX
,
dd
)
;
// of the new vertices
unsigned
int
v1
=
m_map
.
getEmbedding
<
VERTEX
>
(
d
)
;
// get the embedding
unsigned
int
v2
=
m_map
.
getEmbedding
<
VERTEX
>
(
dd
)
;
// of the new vertices
unsigned
int
e1
=
m_map
.
getEmbedding
(
EDGE
,
m_map
.
phi1
(
d
))
;
unsigned
int
e2
=
m_map
.
getEmbedding
(
EDGE
,
m_map
.
phi_1
(
d
))
;
// and new edges
unsigned
int
e3
=
m_map
.
getEmbedding
(
EDGE
,
m_map
.
phi1
(
dd
))
;
...
...
include/Algo/Render/GL2/mapRender.hpp
View file @
ba596b91
...
...
@@ -195,12 +195,12 @@ inline void MapRender::addEarTri(typename PFP::MAP& map, Dart d, std::vector<GLu
Dart
c
=
map
.
phi1
(
b
);
do
{
typename
PFP
::
VEC3
P1
=
position
[
map
.
getEmbedding
(
VERTEX
,
a
)];
typename
PFP
::
VEC3
P2
=
position
[
map
.
getEmbedding
(
VERTEX
,
b
)];
typename
PFP
::
VEC3
P3
=
position
[
map
.
getEmbedding
(
VERTEX
,
c
)];
typename
PFP
::
VEC3
P1
=
position
[
map
.
getEmbedding
<
VERTEX
>
(
a
)];
typename
PFP
::
VEC3
P2
=
position
[
map
.
getEmbedding
<
VERTEX
>
(
b
)];
typename
PFP
::
VEC3
P3
=
position
[
map
.
getEmbedding
<
VERTEX
>
(
c
)];
float
val
=
computeEarAngle
<
PFP
>
(
P1
,
P2
,
P3
,
normalPoly
);
VertexPoly
*
vp
=
new
VertexPoly
(
map
.
getEmbedding
(
VERTEX
,
b
),
val
,
(
P3
-
P1
).
norm2
(),
vpp
);
VertexPoly
*
vp
=
new
VertexPoly
(
map
.
getEmbedding
<
VERTEX
>
(
b
),
val
,
(
P3
-
P1
).
norm2
(),
vpp
);
if
(
vp
->
value
<
5.0
f
)
nbe
++
;
...
...
@@ -288,9 +288,9 @@ inline void MapRender::addTri(typename PFP::MAP& map, Dart d, std::vector<GLuint
// loop to cut a polygon in triangle on the fly (works only with convex faces)
do
{
tableIndices
.
push_back
(
map
.
getEmbedding
(
VERTEX
,
d
));
tableIndices
.
push_back
(
map
.
getEmbedding
(
VERTEX
,
b
));
tableIndices
.
push_back
(
map
.
getEmbedding
(
VERTEX
,
c
));
tableIndices
.
push_back
(
map
.
getEmbedding
<
VERTEX
>
(
d
));
tableIndices
.
push_back
(
map
.
getEmbedding
<
VERTEX
>
(
b
));
tableIndices
.
push_back
(
map
.
getEmbedding
<
VERTEX
>
(
c
));
b
=
c
;
c
=
map
.
phi1
(
b
);
}
while
(
c
!=
d
);
...
...
@@ -404,8 +404,8 @@ void MapRender::initLines(typename PFP::MAP& map, const FunctorSelect& good, std
TraversorE
<
typename
PFP
::
MAP
>
trav
(
map
,
good
,
thread
);
for
(
Dart
d
=
trav
.
begin
();
d
!=
trav
.
end
();
d
=
trav
.
next
())
{
tableIndices
.
push_back
(
map
.
getEmbedding
(
VERTEX
,
d
));
tableIndices
.
push_back
(
map
.
getEmbedding
(
VERTEX
,
map
.
phi1
(
d
)));
tableIndices
.
push_back
(
map
.
getEmbedding
<
VERTEX
>
(
d
));
tableIndices
.
push_back
(
map
.
getEmbedding
<
VERTEX
>
(
map
.
phi1
(
d
)));
}
}
...
...
@@ -419,8 +419,8 @@ void MapRender::initBoundaries(typename PFP::MAP& map, const FunctorSelect& good
{
if
(
map
.
isBoundaryEdge
(
d
))
{
tableIndices
.
push_back
(
map
.
getEmbedding
(
VERTEX
,
d
));
tableIndices
.
push_back
(
map
.
getEmbedding
(
VERTEX
,
map
.
phi1
(
d
)));
tableIndices
.
push_back
(
map
.
getEmbedding
<
VERTEX
>
(
d
));
tableIndices
.
push_back
(
map
.
getEmbedding
<
VERTEX
>
(
map
.
phi1
(
d
)));
}
}
}
...
...
@@ -451,9 +451,9 @@ void MapRender::initLinesOptimized(typename PFP::MAP& map, const FunctorSelect&
if
(
!
m
.
isMarked
(
ee
))
{
if
(
good
(
ee
))
tableIndices
.
push_back
(
map
.
getEmbedding
(
VERTEX
,
ee
));
tableIndices
.
push_back
(
map
.
getEmbedding
<
VERTEX
>
(
ee
));
if
(
good
(
f
))
tableIndices
.
push_back
(
map
.
getEmbedding
(
VERTEX
,
map
.
phi1
(
ee
)));
tableIndices
.
push_back
(
map
.
getEmbedding
<
VERTEX
>
(
map
.
phi1
(
ee
)));
m
.
markOrbit
(
EDGE
,
f
);
bound
.
push_back
(
f
);
...
...
@@ -481,7 +481,7 @@ void MapRender::initPoints(typename PFP::MAP& map, const FunctorSelect& good, st
TraversorV
<
typename
PFP
::
MAP
>
trav
(
map
,
good
,
thread
);
for
(
Dart
d
=
trav
.
begin
();
d
!=
trav
.
end
();
d
=
trav
.
next
())
tableIndices
.
push_back
(
map
.
getEmbedding
(
VERTEX
,
d
));
tableIndices
.
push_back
(
map
.
getEmbedding
<
VERTEX
>
(
d
));
}
template
<
typename
PFP
>
...
...
include/Topology/generic/attribmap.h
View file @
ba596b91
...
...
@@ -34,7 +34,7 @@ namespace CGoGN
class
AttribMap
:
public
GenericMap
{
private:
template
<
typename
T
>
friend
class
AutoAttributeHandler
;
template
<
typename
T
,
unsigned
int
ORBIT
>
friend
class
AutoAttributeHandler
;
void
init
()
;
...
...
@@ -52,41 +52,39 @@ public:
/**
* Create an attribute for a given orbit
* @param orbit
* @param nameAttr attribute name
* @return an AttributeHandler
*/
template
<
typename
T
>
AttributeHandler
<
T
>
addAttribute
(
unsigned
int
orbit
,
const
std
::
string
&
nameAttr
)
;
template
<
typename
T
,
unsigned
int
ORBIT
>
AttributeHandler
<
T
,
ORBIT
>
addAttribute
(
const
std
::
string
&
nameAttr
)
;
/**
* remove an attribute
* @param attr a handler to the attribute to remove
* @return true if remove succeed else false
*/
template
<
typename
T
>
bool
removeAttribute
(
AttributeHandler
<
T
>&
attr
)
;
template
<
typename
T
,
unsigned
int
ORBIT
>
bool
removeAttribute
(
AttributeHandler
<
T
,
ORBIT
>&
attr
)
;
/**
* search an attribute for a given orbit
* @param orbit
* @param nameAttr attribute name
* @return an AttributeHandler
*/
template
<
typename
T
>
AttributeHandler
<
T
>
getAttribute
(
unsigned
int
orbit
,
const
std
::
string
&
nameAttr
)
;
template
<
typename
T
,
unsigned
int
ORBIT
>
AttributeHandler
<
T
,
ORBIT
>
getAttribute
(
const
std
::
string
&
nameAttr
)
;
/**
* swap the content of two attributes (efficient, only swap pointers)
*/
template
<
typename
T
>
bool
swapAttributes
(
AttributeHandler
<
T
>&
attr1
,
AttributeHandler
<
T
>&
attr2
)
;
template
<
typename
T
,
unsigned
int
ORBIT
>
bool
swapAttributes
(
AttributeHandler
<
T
,
ORBIT
>&
attr1
,
AttributeHandler
<
T
,
ORBI
T
>&
attr2
)
;
/**
* copy the content of src attribute to dst attribute
*/
template
<
typename
T
>
bool
copyAttribute
(
AttributeHandler
<
T
>&
dst
,
AttributeHandler
<
T
>&
src
)
;
template
<
typename
T
,
unsigned
int
ORBIT
>
bool
copyAttribute
(
AttributeHandler
<
T
,
ORBIT
>&
dst
,
AttributeHandler
<
T
,
ORBI
T
>&
src
)
;
/**
* get the number of cell in the attribute container of an orbit
...
...
@@ -104,12 +102,14 @@ public:
* use the given attribute to store the indices of the cells of the corresponding orbit
* @return the number of cells of the orbit
*/
unsigned
int
computeIndexCells
(
AttributeHandler
<
unsigned
int
>&
idx
)
;
template
<
unsigned
int
ORBIT
>
unsigned
int
computeIndexCells
(
AttributeHandler
<
unsigned
int
,
ORBIT
>&
idx
)
;
/**
* ensure that each orbit as one embedding and that each embedding is handle by only one orbit
*/
void
bijectiveOrbitEmbedding
(
unsigned
int
orbit
);
template
<
unsigned
int
ORBIT
>
void
bijectiveOrbitEmbedding
();
}
;
...
...
include/Topology/generic/attribmap.hpp
View file @
ba596b91
...
...
@@ -25,17 +25,17 @@
namespace
CGoGN
{
template
<
typename
T
>
inline
AttributeHandler
<
T
>
AttribMap
::
addAttribute
(
unsigned
int
orbit
,
const
std
::
string
&
nameAttr
)
template
<
typename
T
,
unsigned
int
ORBIT
>
inline
AttributeHandler
<
T
,
ORBIT
>
AttribMap
::
addAttribute
(
const
std
::
string
&
nameAttr
)
{
if
(
!
isOrbitEmbedded
(
orbit
))
addEmbedding
(
orbit
)
;
AttributeMultiVector
<
T
>*
amv
=
m_attribs
[
orbit
].
addAttribute
<
T
>
(
nameAttr
)
;
return
AttributeHandler
<
T
>
(
this
,
amv
)
;
if
(
!
isOrbitEmbedded
(
ORBIT
))
addEmbedding
(
ORBIT
)
;
AttributeMultiVector
<
T
>*
amv
=
m_attribs
[
ORBIT
].
addAttribute
<
T
>
(
nameAttr
)
;
return
AttributeHandler
<
T
,
ORBIT
>
(
this
,
amv
)
;
}
template
<
typename
T
>
inline
bool
AttribMap
::
removeAttribute
(
AttributeHandler
<
T
>&
attr
)
template
<
typename
T
,
unsigned
int
ORBIT
>
inline
bool
AttribMap
::
removeAttribute
(
AttributeHandler
<
T
,
ORBIT
>&
attr
)
{
assert
(
attr
.
isValid
()
||
!
"Invalid attribute handler"
)
;
if
(
m_attribs
[
attr
.
getOrbit
()].
removeAttribute
<
T
>
(
attr
.
getIndex
()))
...
...
@@ -50,36 +50,36 @@ inline bool AttribMap::removeAttribute(AttributeHandler<T>& attr)
return
false
;
}
template
<
typename
T
>
inline
AttributeHandler
<
T
>
AttribMap
::
getAttribute
(
unsigned
int
orbit
,
const
std
::
string
&
nameAttr
)
template
<
typename
T
,
unsigned
int
ORBIT
>
inline
AttributeHandler
<
T
,
ORBIT
>
AttribMap
::
getAttribute
(
const
std
::
string
&
nameAttr
)
{
AttributeMultiVector
<
T
>*
amv
=
m_attribs
[
orbit
].
getDataVector
<
T
>
(
nameAttr
)
;
return
AttributeHandler
<
T
>
(
this
,
amv
)
;
AttributeMultiVector
<
T
>*
amv
=
m_attribs
[
ORBIT
].
getDataVector
<
T
>
(
nameAttr
)
;
return
AttributeHandler
<
T
,
ORBIT
>
(
this
,
amv
)
;
}
template
<
typename
T
>
inline
bool
AttribMap
::
swapAttributes
(
AttributeHandler
<
T
>&
attr1
,
AttributeHandler
<
T
>&
attr2
)
template
<
typename
T
,
unsigned
int
ORBIT
>
inline
bool
AttribMap
::
swapAttributes
(
AttributeHandler
<
T
,
ORBIT
>&
attr1
,
AttributeHandler
<
T
,
ORBI
T
>&
attr2
)
{
assert
((
attr1
.
isValid
()
&&
attr2
.
isValid
())
||
!
"Invalid attribute handler"
)
;
assert
(
attr1
.
getOrbit
()
==
attr2
.
getOrbit
()
||
!
"Cannot swap attributes of different orbits"
)
;
unsigned
int
orbit
=
attr1
.
getOrbit
()
;
//
assert(attr1.getOrbit() == attr2.getOrbit() || !"Cannot swap attributes of different orbits") ;
//
unsigned int orbit = attr1.getOrbit() ;
unsigned
int
index1
=
attr1
.
getIndex
()
;
unsigned
int
index2
=
attr2
.
getIndex
()
;
if
(
index1
!=
index2
)
return
m_attribs
[
orbit
].
swapAttributes
(
index1
,
index2
)
;
return
m_attribs
[
ORBIT
].
swapAttributes
(
index1
,
index2
)
;
return
false
;
}