Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
Sauvage
CGoGN
Commits
17225370
Commit
17225370
authored
Oct 15, 2012
by
Pierre Kraemer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
embedOrbit->setOrbitEmbedding + optim about EMBNULL
parent
0d75d907
Changes
40
Hide whitespace changes
Inline
Side-by-side
Showing
40 changed files
with
347 additions
and
320 deletions
+347
-320
Apps/deprecated/tp_master.cpp
Apps/deprecated/tp_master.cpp
+1
-1
Apps/deprecated/tutoriel.cpp
Apps/deprecated/tutoriel.cpp
+1
-1
include/Algo/Decimation/edgeSelector.hpp
include/Algo/Decimation/edgeSelector.hpp
+3
-3
include/Algo/Decimation/geometryApproximator.hpp
include/Algo/Decimation/geometryApproximator.hpp
+6
-6
include/Algo/Decimation/simplifMesh.hpp
include/Algo/Decimation/simplifMesh.hpp
+2
-2
include/Algo/DecimationVolumes/operator.hpp
include/Algo/DecimationVolumes/operator.hpp
+6
-6
include/Algo/ImplicitHierarchicalMesh/ihm.hpp
include/Algo/ImplicitHierarchicalMesh/ihm.hpp
+3
-3
include/Algo/ImplicitHierarchicalMesh/ihm3.hpp
include/Algo/ImplicitHierarchicalMesh/ihm3.hpp
+1
-1
include/Algo/ImplicitHierarchicalMesh/subdivision3.hpp
include/Algo/ImplicitHierarchicalMesh/subdivision3.hpp
+2
-2
include/Algo/Import/importMRDAT.h
include/Algo/Import/importMRDAT.h
+2
-2
include/Algo/Import/importMesh.hpp
include/Algo/Import/importMesh.hpp
+3
-3
include/Algo/Import/importMoka.hpp
include/Algo/Import/importMoka.hpp
+1
-1
include/Algo/Modelisation/extrusion.hpp
include/Algo/Modelisation/extrusion.hpp
+1
-1
include/Algo/Modelisation/polyhedron.hpp
include/Algo/Modelisation/polyhedron.hpp
+18
-18
include/Algo/Modelisation/primitives3d.hpp
include/Algo/Modelisation/primitives3d.hpp
+1
-1
include/Algo/Modelisation/subdivision3.hpp
include/Algo/Modelisation/subdivision3.hpp
+3
-3
include/Algo/Modelisation/tetrahedralization.hpp
include/Algo/Modelisation/tetrahedralization.hpp
+2
-2
include/Algo/Multiresolution/Map2MR/map2MR_PM.hpp
include/Algo/Multiresolution/Map2MR/map2MR_PM.hpp
+2
-2
include/Algo/Multiresolution/Map2MR/map2MR_PrimalRegular.hpp
include/Algo/Multiresolution/Map2MR/map2MR_PrimalRegular.hpp
+5
-5
include/Algo/Multiresolution/Map3MR/map3MR_PrimalAdapt.hpp
include/Algo/Multiresolution/Map3MR/map3MR_PrimalAdapt.hpp
+9
-9
include/Algo/Multiresolution/Map3MR/map3MR_PrimalRegular.hpp
include/Algo/Multiresolution/Map3MR/map3MR_PrimalRegular.hpp
+19
-19
include/Algo/ProgressiveMesh/pmesh.hpp
include/Algo/ProgressiveMesh/pmesh.hpp
+12
-12
include/Algo/VolumetricProgressiveMesh/vpmesh.hpp
include/Algo/VolumetricProgressiveMesh/vpmesh.hpp
+12
-12
include/Topology/generic/attribmap.hpp
include/Topology/generic/attribmap.hpp
+1
-1
include/Topology/generic/attributeHandler.hpp
include/Topology/generic/attributeHandler.hpp
+3
-3
include/Topology/generic/cellmarker.h
include/Topology/generic/cellmarker.h
+6
-9
include/Topology/generic/dartmarker.h
include/Topology/generic/dartmarker.h
+1
-2
include/Topology/generic/ecell.hpp
include/Topology/generic/ecell.hpp
+1
-1
include/Topology/generic/functor.h
include/Topology/generic/functor.h
+18
-17
include/Topology/generic/genericFunc.h
include/Topology/generic/genericFunc.h
+1
-1
include/Topology/generic/genericFunc.hpp
include/Topology/generic/genericFunc.hpp
+1
-1
include/Topology/generic/genericmap.h
include/Topology/generic/genericmap.h
+24
-10
include/Topology/generic/genericmap.hpp
include/Topology/generic/genericmap.hpp
+39
-24
include/Topology/generic/traversorGen.h
include/Topology/generic/traversorGen.h
+0
-41
include/Topology/map/embeddedMap2.h
include/Topology/map/embeddedMap2.h
+1
-4
src/Algo/ImplicitHierarchicalMesh/ihm3.cpp
src/Algo/ImplicitHierarchicalMesh/ihm3.cpp
+2
-2
src/Topology/gmap/embeddedGMap2.cpp
src/Topology/gmap/embeddedGMap2.cpp
+41
-19
src/Topology/gmap/embeddedGMap3.cpp
src/Topology/gmap/embeddedGMap3.cpp
+23
-23
src/Topology/map/embeddedMap2.cpp
src/Topology/map/embeddedMap2.cpp
+42
-19
src/Topology/map/embeddedMap3.cpp
src/Topology/map/embeddedMap3.cpp
+28
-28
No files found.
Apps/deprecated/tp_master.cpp
View file @
17225370
...
...
@@ -92,7 +92,7 @@ private:
// Assigne un nouveau plongement au sommet. Les anciens plongements sont libérés.
void
newVertex
(
Dart
d
)
{
embed
NewCell
<
VERTEX
>
(
d
);
setOrbitEmbedding
NewCell
<
VERTEX
>
(
d
);
}
public:
...
...
Apps/deprecated/tutoriel.cpp
View file @
17225370
...
...
@@ -95,7 +95,7 @@ private:
// Assigne un nouveau plongement au sommet. Les anciens plongements sont libérés.
void
newVertex
(
Dart
d
)
{
embed
NewCell
(
VERTEX
,
d
);
setOrbitEmbedding
NewCell
(
VERTEX
,
d
);
}
public:
...
...
include/Algo/Decimation/edgeSelector.hpp
View file @
17225370
...
...
@@ -898,7 +898,7 @@ void EdgeSelector_Curvature<PFP>::computeEdgeInfo(Dart d, EdgeInfo& einfo)
Dart
d2
=
m
.
phi2
(
m
.
phi_1
(
d
))
;
Dart
dd2
=
m
.
phi2
(
m
.
phi_1
(
dd
))
;
m
.
extractTrianglePair
(
d
)
;
unsigned
int
newV
=
m
.
template
embed
NewCell
<
VERTEX
>(
d2
)
;
unsigned
int
newV
=
m
.
template
setOrbitEmbedding
NewCell
<
VERTEX
>(
d2
)
;
this
->
m_position
[
newV
]
=
m_positionApproximator
->
getApprox
(
d
)
;
// compute things on the coarse version of the mesh
...
...
@@ -911,8 +911,8 @@ void EdgeSelector_Curvature<PFP>::computeEdgeInfo(Dart d, EdgeInfo& einfo)
// vertex split to reset the initial connectivity and embeddings
m
.
insertTrianglePair
(
d
,
d2
,
dd2
)
;
m
.
template
embedOrbit
<
VERTEX
>(
d
,
v1
)
;
m
.
template
embedOrbit
<
VERTEX
>(
dd
,
v2
)
;
m
.
template
setOrbitEmbedding
<
VERTEX
>(
d
,
v1
)
;
m
.
template
setOrbitEmbedding
<
VERTEX
>(
dd
,
v2
)
;
REAL
err
=
0
;
...
...
include/Algo/Decimation/geometryApproximator.hpp
View file @
17225370
...
...
@@ -211,7 +211,7 @@ void Approximator_MidEdge<PFP>::approximate(Dart d)
// temporary edge collapse
m
.
extractTrianglePair
(
d
)
;
unsigned
int
newV
=
m
.
template
embed
NewCell
<
VERTEX
>(
d2
)
;
unsigned
int
newV
=
m
.
template
setOrbitEmbedding
NewCell
<
VERTEX
>(
d2
)
;
this
->
m_attrV
[
0
]
->
operator
[](
newV
)
=
this
->
m_approx
[
0
][
d
]
;
// compute the detail vector
...
...
@@ -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
.
template
embedOrbit
<
VERTEX
>(
d
,
m
.
template
getEmbedding
<
VERTEX
>(
d
))
;
m
.
template
embedOrbit
<
VERTEX
>(
dd
,
m
.
template
getEmbedding
<
VERTEX
>(
dd
))
;
m
.
template
setOrbitEmbedding
<
VERTEX
>(
d
,
m
.
template
getEmbedding
<
VERTEX
>(
d
))
;
m
.
template
setOrbitEmbedding
<
VERTEX
>(
dd
,
m
.
template
getEmbedding
<
VERTEX
>(
dd
))
;
}
}
...
...
@@ -260,7 +260,7 @@ void Approximator_HalfCollapse<PFP>::approximate(Dart d)
// temporary edge collapse
m
.
extractTrianglePair
(
d
)
;
unsigned
int
newV
=
m
.
template
embed
NewCell
<
VERTEX
>(
d2
)
;
unsigned
int
newV
=
m
.
template
setOrbitEmbedding
NewCell
<
VERTEX
>(
d2
)
;
for
(
unsigned
int
i
=
0
;
i
<
this
->
m_attrV
.
size
()
;
++
i
)
{
this
->
m_attrV
[
i
]
->
operator
[](
newV
)
=
this
->
m_approx
[
i
][
d
]
;
...
...
@@ -275,8 +275,8 @@ void Approximator_HalfCollapse<PFP>::approximate(Dart d)
// vertex split to reset the initial connectivity and embeddings
m
.
insertTrianglePair
(
d
,
d2
,
dd2
)
;
m
.
template
embedOrbit
<
VERTEX
>(
d
,
m
.
template
getEmbedding
<
VERTEX
>(
d
))
;
m
.
template
embedOrbit
<
VERTEX
>(
dd
,
m
.
template
getEmbedding
<
VERTEX
>(
dd
))
;
m
.
template
setOrbitEmbedding
<
VERTEX
>(
d
,
m
.
template
getEmbedding
<
VERTEX
>(
d
))
;
m
.
template
setOrbitEmbedding
<
VERTEX
>(
dd
,
m
.
template
getEmbedding
<
VERTEX
>(
dd
))
;
}
}
...
...
include/Algo/Decimation/simplifMesh.hpp
View file @
17225370
...
...
@@ -175,7 +175,7 @@ void SimplifTrian<PFP>::updateCriterias(Dart d)
CRIT_IT
it
=
m_edgeCrit
.
insert
(
std
::
make_pair
(
key
,
cr
));
// store iterator on edge
unsigned
int
em
=
m_map
.
getEmbedding
(
d
,
EDGE
);
m_map
.
embedOrbit
<
EDGE
>
(
d
,
em
);
m_map
.
setOrbitEmbedding
<
EDGE
>
(
d
,
em
);
m_edgeEmb
[
em
]
=
it
;
m_protectMarker
.
mark
(
em
)
;
...
...
@@ -235,7 +235,7 @@ Dart SimplifTrian<PFP>::edgeCollapse(Dart d, typename PFP::VEC3& newPos)
// embed new vertex
unsigned
int
emb
=
m_map
.
getEmbedding
(
d2
,
VERTEX
);
m_map
.
embedOrbit
<
VERTEX
>
(
d2
,
emb
);
m_map
.
setOrbitEmbedding
<
VERTEX
>
(
d2
,
emb
);
m_positions
[
d2
]
=
newPos
;
m_valences
[
d2
]
=
v_d
+
v_dd
-
4
;
...
...
include/Algo/DecimationVolumes/operator.hpp
View file @
17225370
...
...
@@ -122,12 +122,12 @@ void CollapseEdgeOperator<PFP>::split(typename PFP::MAP& m, VertexAttribute<type
// //vertexSplit(vs) ; // split vertex
// //map.vertexSplit()
//
// m_map.template
embedOrbit
<VERTEX>(d, v1) ; // embed the
// m_map.template
embedOrbit
<VERTEX>(dd, v2) ; // new vertices
// m_map.template
embedOrbit
<EDGE>(d1, e1) ;
// m_map.template
embedOrbit
<EDGE>(d2, e2) ; // and new edges
// m_map.template
embedOrbit
<EDGE>(dd1, e3) ;
// m_map.template
embedOrbit
<EDGE>(dd2, e4) ;
// m_map.template
setOrbitEmbedding
<VERTEX>(d, v1) ; // embed the
// m_map.template
setOrbitEmbedding
<VERTEX>(dd, v2) ; // new vertices
// m_map.template
setOrbitEmbedding
<EDGE>(d1, e1) ;
// m_map.template
setOrbitEmbedding
<EDGE>(d2, e2) ; // and new edges
// m_map.template
setOrbitEmbedding
<EDGE>(dd1, e3) ;
// m_map.template
setOrbitEmbedding
<EDGE>(dd2, e4) ;
}
/****************************************************************************************************
...
...
include/Algo/ImplicitHierarchicalMesh/ihm.hpp
View file @
17225370
...
...
@@ -258,8 +258,8 @@ inline void ImplicitHierarchicalMap::splitFace(Dart d, Dart e)
{
unsigned
int
cur
=
m_curLevel
;
m_curLevel
=
m_maxLevel
;
this
->
embedOrbit
<
FACE
>
(
d
,
this
->
getEmbedding
<
FACE
>
(
d
))
;
this
->
embedOrbit
<
FACE
>
(
e
,
this
->
getEmbedding
<
FACE
>
(
e
))
;
this
->
setOrbitEmbedding
<
FACE
>
(
d
,
this
->
getEmbedding
<
FACE
>
(
d
))
;
this
->
setOrbitEmbedding
<
FACE
>
(
e
,
this
->
getEmbedding
<
FACE
>
(
e
))
;
m_curLevel
=
cur
;
}
}
...
...
@@ -349,7 +349,7 @@ T& AttributeHandler_IHM<T, ORBIT>::operator[](Dart d)
if
(
index
==
EMBNULL
)
{
index
=
m
->
embed
NewCell
<
ORBIT
>
(
d
)
;
index
=
m
->
setOrbitEmbedding
NewCell
<
ORBIT
>
(
d
)
;
m
->
m_nextLevelCell
[
orbit
]
->
operator
[](
index
)
=
EMBNULL
;
}
...
...
include/Algo/ImplicitHierarchicalMesh/ihm3.hpp
View file @
17225370
...
...
@@ -616,7 +616,7 @@ T& AttributeHandler_IHM<T, ORBIT>::operator[](Dart d)
if
(
index
==
EMBNULL
)
{
index
=
m
->
embed
NewCell
<
ORBIT
>
(
d
)
;
index
=
m
->
setOrbitEmbedding
NewCell
<
ORBIT
>
(
d
)
;
m
->
m_nextLevelCell
[
orbit
]
->
operator
[](
index
)
=
EMBNULL
;
}
...
...
include/Algo/ImplicitHierarchicalMesh/subdivision3.hpp
View file @
17225370
...
...
@@ -829,7 +829,7 @@ void subdivideLoop(typename PFP::MAP& map, Dart d, AttributeHandler<typename PFP
}
while
(
f
!=
x
);
}
map
.
template
embedOrbit
<
VERTEX
>(
centralDart
,
map
.
template
getEmbedding
<
VERTEX
>(
centralDart
));
map
.
template
setOrbitEmbedding
<
VERTEX
>(
centralDart
,
map
.
template
getEmbedding
<
VERTEX
>(
centralDart
));
//Third step : 3-sew internal faces
for
(
std
::
vector
<
std
::
pair
<
Dart
,
Dart
>
>::
iterator
it
=
subdividedfaces
.
begin
();
it
!=
subdividedfaces
.
end
();
++
it
)
...
...
@@ -1224,7 +1224,7 @@ Dart subdivideVolume(typename PFP::MAP& map, Dart d, AttributeHandler<typename P
}
while
(
f
!=
x
);
}
map
.
template
embedOrbit
<
VERTEX
>(
centralDart
,
map
.
template
getEmbedding
<
VERTEX
>(
centralDart
));
map
.
template
setOrbitEmbedding
<
VERTEX
>(
centralDart
,
map
.
template
getEmbedding
<
VERTEX
>(
centralDart
));
//Third step : 3-sew internal faces
for
(
std
::
vector
<
std
::
pair
<
char
,
std
::
pair
<
Dart
,
Dart
>
>
>::
iterator
it
=
subdividedfaces
.
begin
();
it
!=
subdividedfaces
.
end
();
++
it
)
...
...
include/Algo/Import/importMRDAT.h
View file @
17225370
...
...
@@ -98,12 +98,12 @@ public:
unsigned
int
newEmb
=
vID
[
children
[
0
]
->
indices
[
idx
]]
;
if
(
oldEmb
==
EMBNULL
)
{
map
.
template
embedOrbit
<
VERTEX
>(
dd
,
newEmb
)
;
map
.
template
setOrbitEmbedding
<
VERTEX
>(
dd
,
newEmb
)
;
map
.
pushLevel
()
;
for
(
unsigned
int
i
=
map
.
getCurrentLevel
()
+
1
;
i
<=
map
.
getMaxLevel
();
++
i
)
{
map
.
setCurrentLevel
(
i
)
;
map
.
template
embedOrbit
<
VERTEX
>(
dd
,
newEmb
)
;
map
.
template
setOrbitEmbedding
<
VERTEX
>(
dd
,
newEmb
)
;
}
map
.
popLevel
()
;
}
...
...
include/Algo/Import/importMesh.hpp
View file @
17225370
...
...
@@ -49,6 +49,8 @@ bool importMesh(typename PFP::MAP& map, MeshTablesSurface<PFP>& mts)
DartMarkerNoUnmark
m
(
map
)
;
FunctorInitEmb
<
typename
PFP
::
MAP
,
VERTEX
>
fsetemb
(
map
);
// for each face of table
for
(
unsigned
int
i
=
0
;
i
<
nbf
;
++
i
)
{
...
...
@@ -77,9 +79,7 @@ bool importMesh(typename PFP::MAP& map, MeshTablesSurface<PFP>& mts)
for
(
unsigned
int
j
=
0
;
j
<
nbe
;
++
j
)
{
unsigned
int
em
=
edgesBuffer
[
j
];
// get embedding
FunctorSetEmb
<
typename
PFP
::
MAP
,
VERTEX
>
fsetemb
(
map
,
em
);
// foreach_dart_of_orbit_in_parent<typename PFP::MAP>(&map, VERTEX, d, fsetemb) ;
fsetemb
.
changeEmb
(
em
)
;
map
.
template
foreach_dart_of_orbit
<
PFP
::
MAP
::
VERTEX_OF_PARENT
>(
d
,
fsetemb
);
m
.
mark
(
d
)
;
// mark on the fly to unmark on second loop
...
...
include/Algo/Import/importMoka.hpp
View file @
17225370
...
...
@@ -118,7 +118,7 @@ bool importMoka(typename PFP::MAP& gmap, const std::string& filename, std::vecto
}
for
(
typename
std
::
map
<
Dart
,
unsigned
int
>::
iterator
it
=
map_dart_emb
.
begin
()
;
it
!=
map_dart_emb
.
end
()
;
++
it
)
gmap
.
template
embedOrbit
<
VERTEX
>(
it
->
first
,
it
->
second
);
gmap
.
template
setOrbitEmbedding
<
VERTEX
>(
it
->
first
,
it
->
second
);
gmap
.
closeMap
();
...
...
include/Algo/Modelisation/extrusion.hpp
View file @
17225370
...
...
@@ -257,7 +257,7 @@ Polyhedron<PFP>* extrusion_scale_prim(typename PFP::MAP& the_map, VertexAttribut
else
position
[
em
]
=
P
;
Dart
d
=
vertD
[
index
++
];
the_map
.
template
embedOrbit
<
VERTEX
>(
d
,
em
);
the_map
.
template
setOrbitEmbedding
<
VERTEX
>(
d
,
em
);
// rotate again to put profile in the good position along the path
// pos4=Geom::Vec4f ((*ip)[0],(*ip)[1],(*ip)[2], 1.0f);
...
...
include/Algo/Modelisation/polyhedron.hpp
View file @
17225370
...
...
@@ -783,7 +783,7 @@ void Polyhedron<PFP>::embedGrid(float x, float y, float z)
VEC3
pos
(
-
x
/
2
+
dx
*
float
(
j
),
-
y
/
2
+
dy
*
float
(
i
),
z
);
unsigned
int
em
=
m_positions
.
insert
(
pos
);
Dart
d
=
m_tableVertDarts
[
i
*
(
m_nx
+
1
)
+
j
];
m_map
.
template
embedOrbit
<
VERTEX
>(
d
,
em
);
m_map
.
template
setOrbitEmbedding
<
VERTEX
>(
d
,
em
);
}
}
}
...
...
@@ -814,7 +814,7 @@ void Polyhedron<PFP>::embedCylinder(float bottom_radius, float top_radius, float
VEC3
pos
(
x
,
y
,
-
height
/
2
+
dz
*
float
(
i
));
unsigned
int
em
=
m_positions
.
insert
(
pos
);
Dart
d
=
m_tableVertDarts
[
i
*
(
m_nx
)
+
j
];
m_map
.
template
embedOrbit
<
VERTEX
>(
d
,
em
);
m_map
.
template
setOrbitEmbedding
<
VERTEX
>(
d
,
em
);
}
}
...
...
@@ -824,7 +824,7 @@ void Polyhedron<PFP>::embedCylinder(float bottom_radius, float top_radius, float
VEC3
pos
(
0.0
f
,
0.0
f
,
-
height
/
2
);
unsigned
int
em
=
m_positions
.
insert
(
pos
);
Dart
d
=
m_tableVertDarts
[
indexUmbrella
++
];
m_map
.
template
embedOrbit
<
VERTEX
>(
d
,
em
);
m_map
.
template
setOrbitEmbedding
<
VERTEX
>(
d
,
em
);
}
if
(
m_top_closed
)
...
...
@@ -832,7 +832,7 @@ void Polyhedron<PFP>::embedCylinder(float bottom_radius, float top_radius, float
VEC3
pos
(
0.0
f
,
0.0
f
,
height
/
2
);
unsigned
int
em
=
m_positions
.
insert
(
pos
);
Dart
d
=
m_tableVertDarts
[
indexUmbrella
];
m_map
.
template
embedOrbit
<
VERTEX
>(
d
,
em
);
m_map
.
template
setOrbitEmbedding
<
VERTEX
>(
d
,
em
);
}
}
...
...
@@ -864,7 +864,7 @@ void Polyhedron<PFP>::embedCone(float radius, float height)
VEC3
pos
(
x
,
y
,
h
);
unsigned
int
em
=
m_positions
.
insert
(
pos
);
Dart
d
=
m_tableVertDarts
[
i
*
(
m_nx
)
+
j
];
m_map
.
template
embedOrbit
<
VERTEX
>(
d
,
em
);
m_map
.
template
setOrbitEmbedding
<
VERTEX
>(
d
,
em
);
}
}
...
...
@@ -874,14 +874,14 @@ void Polyhedron<PFP>::embedCone(float radius, float height)
VEC3
pos
(
0.0
f
,
0.0
f
,
-
height
/
2
);
unsigned
int
em
=
m_positions
.
insert
(
pos
);
Dart
d
=
m_tableVertDarts
[
indexUmbrella
++
];
m_map
.
template
embedOrbit
<
VERTEX
>(
d
,
em
);
m_map
.
template
setOrbitEmbedding
<
VERTEX
>(
d
,
em
);
}
// top always closed in cone
VEC3
pos
(
0.0
f
,
0.0
f
,
height
/
2.0
f
);
unsigned
int
em
=
m_positions
.
insert
(
pos
);
Dart
d
=
m_tableVertDarts
[
indexUmbrella
];
m_map
.
template
embedOrbit
<
VERTEX
>(
d
,
em
);
m_map
.
template
setOrbitEmbedding
<
VERTEX
>(
d
,
em
);
}
template
<
typename
PFP
>
...
...
@@ -910,7 +910,7 @@ void Polyhedron<PFP>::embedSphere(float radius)
VEC3
pos
(
x
,
y
,
h
);
unsigned
int
em
=
m_positions
.
insert
(
pos
);
Dart
d
=
m_tableVertDarts
[
i
*
(
m_nx
)
+
j
];
m_map
.
template
embedOrbit
<
VERTEX
>(
d
,
em
);
m_map
.
template
setOrbitEmbedding
<
VERTEX
>(
d
,
em
);
}
}
...
...
@@ -918,13 +918,13 @@ void Polyhedron<PFP>::embedSphere(float radius)
VEC3
pos
(
0.0
f
,
0.0
f
,
-
radius
);
unsigned
int
em
=
m_positions
.
insert
(
pos
);
Dart
d
=
m_tableVertDarts
[
m_nx
*
(
m_nz
+
1
)];
m_map
.
template
embedOrbit
<
VERTEX
>(
d
,
em
);
m_map
.
template
setOrbitEmbedding
<
VERTEX
>(
d
,
em
);
// top pole
pos
=
VEC3
(
0.0
f
,
0.0
f
,
radius
);
em
=
m_positions
.
insert
(
pos
);
d
=
m_tableVertDarts
[
m_nx
*
(
m_nz
+
1
)
+
1
];
m_map
.
template
embedOrbit
<
VERTEX
>(
d
,
em
);
m_map
.
template
setOrbitEmbedding
<
VERTEX
>(
d
,
em
);
}
template
<
typename
PFP
>
...
...
@@ -952,7 +952,7 @@ void Polyhedron<PFP>::embedTore(float big_radius, float small_radius)
VEC3
pos
(
x
,
y
,
z
);
unsigned
int
em
=
m_positions
.
insert
(
pos
);
Dart
d
=
m_tableVertDarts
[
j
*
(
m_nx
)
+
i
];
m_map
.
template
embedOrbit
<
VERTEX
>(
d
,
em
);
m_map
.
template
setOrbitEmbedding
<
VERTEX
>(
d
,
em
);
}
}
}
...
...
@@ -983,7 +983,7 @@ void Polyhedron<PFP>::embedCube(float sx, float sy, float sz)
VEC3
pos
(
x
,
-
sy
/
2.0
f
,
z
);
unsigned
int
em
=
m_positions
.
insert
(
pos
);
Dart
d
=
m_tableVertDarts
[
index
++
];
m_map
.
template
embedOrbit
<
VERTEX
>(
d
,
em
);
m_map
.
template
setOrbitEmbedding
<
VERTEX
>(
d
,
em
);
}
for
(
unsigned
int
i
=
0
;
i
<
m_ny
;
++
i
)
{
...
...
@@ -991,7 +991,7 @@ void Polyhedron<PFP>::embedCube(float sx, float sy, float sz)
VEC3
pos
(
sx
/
2.0
f
,
y
,
z
);
unsigned
int
em
=
m_positions
.
insert
(
pos
);
Dart
d
=
m_tableVertDarts
[
index
++
];
m_map
.
template
embedOrbit
<
VERTEX
>(
d
,
em
);
m_map
.
template
setOrbitEmbedding
<
VERTEX
>(
d
,
em
);
}
for
(
unsigned
int
i
=
0
;
i
<
m_nx
;
++
i
)
{
...
...
@@ -999,7 +999,7 @@ void Polyhedron<PFP>::embedCube(float sx, float sy, float sz)
VEC3
pos
(
x
,
sy
/
2.0
f
,
z
);
unsigned
int
em
=
m_positions
.
insert
(
pos
);
Dart
d
=
m_tableVertDarts
[
index
++
];
m_map
.
template
embedOrbit
<
VERTEX
>(
d
,
em
);
m_map
.
template
setOrbitEmbedding
<
VERTEX
>(
d
,
em
);
}
for
(
unsigned
int
i
=
0
;
i
<
m_ny
;
++
i
)
{
...
...
@@ -1007,7 +1007,7 @@ void Polyhedron<PFP>::embedCube(float sx, float sy, float sz)
VEC3
pos
(
-
sx
/
2.0
f
,
y
,
z
);
unsigned
int
em
=
m_positions
.
insert
(
pos
);
Dart
d
=
m_tableVertDarts
[
index
++
];
m_map
.
template
embedOrbit
<
VERTEX
>(
d
,
em
);
m_map
.
template
setOrbitEmbedding
<
VERTEX
>(
d
,
em
);
}
}
...
...
@@ -1019,7 +1019,7 @@ void Polyhedron<PFP>::embedCube(float sx, float sy, float sz)
VEC3
pos
(
-
sx
/
2.0
f
+
float
(
j
)
*
dx
,
-
sy
/
2.0
f
+
float
(
i
)
*
dy
,
sz
/
2.0
f
);
unsigned
int
em
=
m_positions
.
insert
(
pos
);
Dart
d
=
m_tableVertDarts
[
index
++
];
m_map
.
template
embedOrbit
<
VERTEX
>(
d
,
em
);
m_map
.
template
setOrbitEmbedding
<
VERTEX
>(
d
,
em
);
}
}
...
...
@@ -1031,7 +1031,7 @@ void Polyhedron<PFP>::embedCube(float sx, float sy, float sz)
VEC3
pos
(
-
sx
/
2.0
f
+
float
(
j
)
*
dx
,
sy
/
2.0
f
-
float
(
i
)
*
dy
,
-
sz
/
2.0
f
);
unsigned
int
em
=
m_positions
.
insert
(
pos
);
Dart
d
=
m_tableVertDarts
[
index
++
];
m_map
.
template
embedOrbit
<
VERTEX
>(
d
,
em
);
m_map
.
template
setOrbitEmbedding
<
VERTEX
>(
d
,
em
);
}
}
}
...
...
@@ -1104,7 +1104,7 @@ void Polyhedron<PFP>::embedTwistedStrip(float radius_min, float radius_max, flo
VEC3
pos
(
r
*
cos
(
alpha
*
float
(
i
)),
r
*
sin
(
alpha
*
float
(
i
)),
rw
*
sin
(
beta
*
float
(
i
)));
unsigned
int
em
=
m_positions
.
insert
(
pos
);
Dart
d
=
m_tableVertDarts
[
i
*
(
m_nx
+
1
)
+
j
];
m_map
.
template
embedOrbit
<
VERTEX
>(
d
,
em
);
m_map
.
template
setOrbitEmbedding
<
VERTEX
>(
d
,
em
);
}
}
}
...
...
include/Algo/Modelisation/primitives3d.hpp
View file @
17225370
...
...
@@ -176,7 +176,7 @@ void Primitive3D<PFP>::embedHexaGrid(float x, float y, float z)
typename
PFP
::
VEC3
pos
(
-
x
/
2.0
f
+
dx
*
float
(
k
),
-
y
/
2.0
f
+
dy
*
float
(
j
),
-
z
/
2.0
f
+
dz
*
float
(
i
));
Dart
d
=
m_tableVertDarts
[
i
*
nbs
+
j
*
(
m_nx
+
1
)
+
k
];
m_map
.
template
embed
NewCell
<
VERTEX
>(
d
);
m_map
.
template
setOrbitEmbedding
NewCell
<
VERTEX
>(
d
);
m_positions
[
d
]
=
pos
;
}
}
...
...
include/Algo/Modelisation/subdivision3.hpp
View file @
17225370
...
...
@@ -607,7 +607,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));
//
setOrbitEmbedding
<VERTEX>(centralDart, getEmbedding<VERTEX>(centralDart));
//attributs[map.phi1(ne)] = attBary[*it];
//
// setCurrentLevel(getMaxLevel() - 1) ;
...
...
@@ -618,13 +618,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.
setOrbitEmbedding
<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.
setOrbitEmbedding
<VERTEX>(map.phi2(map.phi1(d)), map.getEmbedding<VERTEX>(map.phi2(map.phi1(d))));
// }
...
...
include/Algo/Modelisation/tetrahedralization.hpp
View file @
17225370
...
...
@@ -304,14 +304,14 @@ void unlinkFromEdge(typename PFP::MAP& map, Dart d)
// unsigned int dVEmb = map.getEmbedding<VERTEX>(d) ;
// if(dVEmb != EMBNULL)
// {
// map.
embedOrbit
<VERTEX>(d, dVEmb) ;
// map.
setOrbitEmbedding
<VERTEX>(d, dVEmb) ;
// map.setDartEmbedding<VERTEX>(d, EMBNULL) ;
// }
//
// unsigned int d3VEmb = map.getEmbedding<VERTEX>(d3) ;
// if(d3VEmb != EMBNULL)
// {
// map.
embedOrbit
<VERTEX>(d3, d3VEmb) ;
// map.
setOrbitEmbedding
<VERTEX>(d3, d3VEmb) ;
// map.setDartEmbedding<VERTEX>(d3, EMBNULL) ;
// }
// }
...
...
include/Algo/Multiresolution/Map2MR/map2MR_PM.hpp
View file @
17225370
...
...
@@ -291,7 +291,7 @@ void Map2MR_PM<PFP>::coarsen()
//std::cout << std::endl;
m_map
.
template
embedOrbit
<
VERTEX
>(
dres
,
m_map
.
template
getEmbedding
<
VERTEX
>(
dres
));
m_map
.
template
setOrbitEmbedding
<
VERTEX
>(
dres
,
m_map
.
template
getEmbedding
<
VERTEX
>(
dres
));
}
}
...
...
@@ -324,7 +324,7 @@ void Map2MR_PM<PFP>::refine()
//std::cout << std::endl;
m_map
.
template
embedOrbit
<
VERTEX
>(
dres
,
m_map
.
template
getEmbedding
<
VERTEX
>(
dres
));
m_map
.
template
setOrbitEmbedding
<
VERTEX
>(
dres
,
m_map
.
template
getEmbedding
<
VERTEX
>(
dres
));
}
}
...
...
include/Algo/Multiresolution/Map2MR/map2MR_PrimalRegular.hpp
View file @
17225370
...
...
@@ -69,9 +69,9 @@ void Map2MR<PFP>::addNewLevel(bool triQuad, bool embedNewVertices)
if
(
!
shareVertexEmbeddings
&&
embedNewVertices
)
{
if
(
m_map
.
template
getEmbedding
<
VERTEX
>(
d
)
==
EMBNULL
)
m_map
.
template
embed
NewCell
<
VERTEX
>(
d
)
;
m_map
.
template
setOrbitEmbedding
NewCell
<
VERTEX
>(
d
)
;
if
(
m_map
.
template
getEmbedding
<
VERTEX
>(
m_map
.
phi1
(
d
))
==
EMBNULL
)
m_map
.
template
embed
NewCell
<
VERTEX
>(
d
)
;
m_map
.
template
setOrbitEmbedding
NewCell
<
VERTEX
>(
d
)
;
}
m_map
.
cutEdge
(
d
)
;
...
...
@@ -79,7 +79,7 @@ void Map2MR<PFP>::addNewLevel(bool triQuad, bool embedNewVertices)
travE
.
skip
(
m_map
.
phi1
(
d
))
;
if
(
embedNewVertices
)
m_map
.
template
embed
NewCell
<
VERTEX
>(
m_map
.
phi1
(
d
))
;
m_map
.
template
setOrbitEmbedding
NewCell
<
VERTEX
>(
m_map
.
phi1
(
d
))
;
}
// split faces
...
...
@@ -124,7 +124,7 @@ void Map2MR<PFP>::addNewLevel(bool triQuad, bool embedNewVertices)
travF
.
skip
(
dd
)
;
if
(
embedNewVertices
)
m_map
.
template
embed
NewCell
<
VERTEX
>(
m_map
.
phi1
(
ne
))
;
m_map
.
template
setOrbitEmbedding
NewCell
<
VERTEX
>(
m_map
.
phi1
(
ne
))
;
dd
=
m_map
.
phi1
(
m_map
.
phi1
(
next
))
;
while
(
dd
!=
ne
)
// turn around the face and insert new edges
...
...
@@ -169,7 +169,7 @@ void Map2MR<PFP>::addNewLevelSqrt3(bool embedNewVertices)
Dart
cd
=
m_map
.
phi2
(
x
);
if
(
embedNewVertices
)
m_map
.
template
embed
NewCell
<
VERTEX
>(
cd
)
;
m_map
.
template
setOrbitEmbedding
NewCell
<
VERTEX
>(
cd
)
;
Dart
fit
=
cd
;
do
...
...
include/Algo/Multiresolution/Map3MR/map3MR_PrimalAdapt.hpp
View file @
17225370
...
...
@@ -83,7 +83,7 @@ void Map3MR<PFP>::swapEdges(Dart d, Dart e)
}
if
(
m_map
.
template
isOrbitEmbedded
<
VOLUME
>())
m_map
.
template
embed
NewCell
<
VOLUME
>(
d
);
m_map
.
template
setOrbitEmbedding
NewCell
<
VOLUME
>(
d
);
// propagateDartRelation(d, m_phi2) ;
...
...
@@ -630,7 +630,7 @@ void Map3MR<PFP>::subdivideVolume(Dart d)
for
(
Dart
ditWV
=
traWV
.
begin
();
ditWV
!=
traWV
.
end
();
ditWV
=
traWV
.
next
())
{
m_map
.
setCurrentLevel
(
m_map
.
getMaxLevel
())
;
m_map
.
template
embedOrbit
<
VERTEX
>(
ditWV
,
EMBNULL
);
m_map
.
template
setOrbitEmbedding
<
VERTEX
>(
ditWV
,
EMBNULL
);
(
*
vertexVertexFunctor
)(
ditWV
)
;
Dart
e
=
ditWV
;
...
...
@@ -703,9 +703,9 @@ void Map3MR<PFP>::subdivideVolume(Dart d)
}
}
m_map
.
template
embedOrbit
<
VERTEX
>(
centralDart
,
EMBNULL
);
m_map
.
template
setOrbitEmbedding
<
VERTEX
>(
centralDart
,
EMBNULL
);
(
*
volumeVertexFunctor
)(
centralDart
)
;
m_map
.
template
embedOrbit
<
VERTEX
>(
centralDart
,
m_map
.
template
getEmbedding
<
VERTEX
>(
centralDart
));
m_map
.
template
setOrbitEmbedding
<
VERTEX
>(
centralDart
,
m_map
.
template
getEmbedding
<
VERTEX
>(
centralDart
));
propagateOrbitEmbedding
<
VERTEX
>
(
centralDart
)
;
...
...
@@ -716,7 +716,7 @@ void Map3MR<PFP>::subdivideVolume(Dart d)
{
m_map
.
setCurrentLevel
(
m_map
.
getMaxLevel
())
;
m_map
.
setCurrentLevel
(
m_map
.
getMaxLevel
()
-
1
)
;
m_map
.
template
embedOrbit
<
VERTEX
>(
m_map
.
phi1
(
d
),
m_map
.
template
getEmbedding
<
VERTEX
>(
m_map
.
phi1
(
d
)));
m_map
.
template
setOrbitEmbedding
<
VERTEX
>(
m_map
.
phi1
(
d
),
m_map
.
template
getEmbedding
<
VERTEX
>(
m_map
.
phi1
(
d
)));
}
m_map
.
setCurrentLevel
(
m_map
.
getMaxLevel
())
;
...
...
@@ -725,7 +725,7 @@ void Map3MR<PFP>::subdivideVolume(Dart d)
for
(
Dart
d
=
travF2
.
begin
();
d
!=
travF2
.
end
();
d
=
travF2
.
next
())
{
m_map
.
setCurrentLevel
(
m_map
.
getMaxLevel
())
;
m_map
.
template
embedOrbit
<
VERTEX
>(
m_map
.
phi2
(
m_map
.
phi1
(
d
)),
map
.
template
getEmbedding
<
VERTEX
>(
m_map
.
phi2
(
m_map
.
phi1
(
d
))));
m_map
.
template
setOrbitEmbedding
<
VERTEX
>(
m_map
.
phi2
(
m_map
.
phi1
(
d
)),
map
.
template
getEmbedding
<
VERTEX
>(
m_map
.
phi2
(
m_map
.
phi1
(
d
))));
m_map
.
setCurrentLevel
(
m_map
.
getMaxLevel
()
-
1
)
;
}
m_map
.
setCurrentLevel
(
m_map
.
getMaxLevel
())
;
...
...
@@ -780,7 +780,7 @@ void Map3MR<PFP>::subdivideVolumeTetOcta(Dart d)
setCurrentLevel
(
vLevel
+
1
)
;
for
(
Dart
dit
=
traV
.
begin
();
dit
!=
traV
.
end
();
dit
=
traV
.
next
())
{
embedOrbit
<
VERTEX
>
(
dit
,
EMBNULL
);
setOrbitEmbedding
<
VERTEX
>
(
dit
,
EMBNULL
);
(
*
vertexVertexFunctor
)(
dit
)
;
Dart
f1
=
phi1
(
dit
);
...
...
@@ -859,8 +859,8 @@ void Map3MR<PFP>::subdivideVolumeTetOcta(Dart d)
}
while
(
f
!=
x
);
}
embedOrbit
<
VERTEX
>
(
centralDart
,
EMBNULL
);
embedOrbit
<
VERTEX
>
(
centralDart
,
getEmbedding
<
VERTEX
>
(
centralDart
));
setOrbitEmbedding
<
VERTEX
>
(
centralDart
,
EMBNULL
);
setOrbitEmbedding
<
VERTEX
>
(
centralDart
,
getEmbedding
<
VERTEX
>
(
centralDart
));
(
*
volumeVertexFunctor
)(
centralDart
)
;
propagateOrbitEmbedding
<
VERTEX
>
(
centralDart
)
;
}
...
...
include/Algo/Multiresolution/Map3MR/map3MR_PrimalRegular.hpp
View file @
17225370
...
...
@@ -73,7 +73,7 @@ void Map3MR<PFP>::swapEdges(Dart d, Dart e)
}
if
(
m_map
.
template
isOrbitEmbedded
<
VOLUME
>())
m_map
.
template
embed
NewCell
<
VOLUME
>(
d
);
m_map
.
template
setOrbitEmbedding
NewCell
<
VOLUME
>(
d
);
}
}
...
...
@@ -203,9 +203,9 @@ void Map3MR<PFP>::addNewLevelTetraOcta(bool embedNewVertices)
// if(!shareVertexEmbeddings)
// {
// if(getEmbedding<VERTEX>(d) == EMBNULL)
//
embed
NewCell<VERTEX>(d) ;
//
setOrbitEmbedding
NewCell<VERTEX>(d) ;
// if(getEmbedding<VERTEX>(phi1(d)) == EMBNULL)
//
embed
NewCell<VERTEX>(d) ;
//
setOrbitEmbedding
NewCell<VERTEX>(d) ;
// }
m_map
.
cutEdge
(
d
)
;
...
...
@@ -214,7 +214,7 @@ void Map3MR<PFP>::addNewLevelTetraOcta(bool embedNewVertices)
// When importing MR files
// if(embedNewVertices)
// m_map.template
embed
NewCell<VERTEX>(m_map.phi1(d)) ;
// m_map.template
setOrbitEmbedding
NewCell<VERTEX>(m_map.phi1(d)) ;