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
David Cazier
CGoGN
Commits
cb1ede68
Commit
cb1ede68
authored
Apr 25, 2012
by
Pierre Kraemer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
orbit in template..
parent
ba596b91
Changes
71
Hide whitespace changes
Inline
Side-by-side
Showing
71 changed files
with
963 additions
and
966 deletions
+963
-966
Apps/deprecated/decimationVolumique.cpp
Apps/deprecated/decimationVolumique.cpp
+4
-4
Apps/deprecated/miniTest.cpp
Apps/deprecated/miniTest.cpp
+4
-4
Apps/deprecated/ter_meshes.cpp
Apps/deprecated/ter_meshes.cpp
+1
-1
include/Algo/Decimation/decimation.hpp
include/Algo/Decimation/decimation.hpp
+1
-1
include/Algo/Decimation/edgeSelector.hpp
include/Algo/Decimation/edgeSelector.hpp
+5
-5
include/Algo/Decimation/geometryApproximator.hpp
include/Algo/Decimation/geometryApproximator.hpp
+6
-6
include/Algo/Decimation/halfEdgeSelector.hpp
include/Algo/Decimation/halfEdgeSelector.hpp
+3
-3
include/Algo/Decimation/simplifMesh.hpp
include/Algo/Decimation/simplifMesh.hpp
+4
-4
include/Algo/DecimationVolumique/decimator.hpp
include/Algo/DecimationVolumique/decimator.hpp
+1
-1
include/Algo/Export/exportPov.h
include/Algo/Export/exportPov.h
+1
-1
include/Algo/Geometry/inclusion.hpp
include/Algo/Geometry/inclusion.hpp
+1
-1
include/Algo/Geometry/normal.hpp
include/Algo/Geometry/normal.hpp
+1
-1
include/Algo/Geometry/volume.hpp
include/Algo/Geometry/volume.hpp
+2
-2
include/Algo/ImplicitHierarchicalMesh/ihm.h
include/Algo/ImplicitHierarchicalMesh/ihm.h
+16
-16
include/Algo/ImplicitHierarchicalMesh/ihm.hpp
include/Algo/ImplicitHierarchicalMesh/ihm.hpp
+23
-23
include/Algo/ImplicitHierarchicalMesh/ihm3.h
include/Algo/ImplicitHierarchicalMesh/ihm3.h
+17
-17
include/Algo/ImplicitHierarchicalMesh/ihm3.hpp
include/Algo/ImplicitHierarchicalMesh/ihm3.hpp
+24
-24
include/Algo/ImplicitHierarchicalMesh/subdivision3.hpp
include/Algo/ImplicitHierarchicalMesh/subdivision3.hpp
+19
-19
include/Algo/Import/AHEMImporter.hpp
include/Algo/Import/AHEMImporter.hpp
+2
-2
include/Algo/Import/importMRDAT.h
include/Algo/Import/importMRDAT.h
+2
-2
include/Algo/Import/importMRDAT.hpp
include/Algo/Import/importMRDAT.hpp
+1
-1
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/Import/importNodeEle.hpp
include/Algo/Import/importNodeEle.hpp
+1
-1
include/Algo/Import/importObjEle.hpp
include/Algo/Import/importObjEle.hpp
+1
-1
include/Algo/Import/importTet.hpp
include/Algo/Import/importTet.hpp
+1
-1
include/Algo/Import/importTs.hpp
include/Algo/Import/importTs.hpp
+1
-1
include/Algo/Modelisation/polyhedron.hpp
include/Algo/Modelisation/polyhedron.hpp
+19
-19
include/Algo/Modelisation/primitives3d.hpp
include/Algo/Modelisation/primitives3d.hpp
+1
-1
include/Algo/Modelisation/subdivision.h
include/Algo/Modelisation/subdivision.h
+11
-11
include/Algo/Modelisation/subdivision.hpp
include/Algo/Modelisation/subdivision.hpp
+93
-93
include/Algo/Modelisation/subdivision3.hpp
include/Algo/Modelisation/subdivision3.hpp
+15
-15
include/Algo/Modelisation/tetrahedralization.hpp
include/Algo/Modelisation/tetrahedralization.hpp
+27
-27
include/Algo/Modelisation/triangulation.hpp
include/Algo/Modelisation/triangulation.hpp
+3
-3
include/Algo/ProgressiveMesh/pmesh.hpp
include/Algo/ProgressiveMesh/pmesh.hpp
+22
-22
include/Algo/Remeshing/pliant.hpp
include/Algo/Remeshing/pliant.hpp
+9
-9
include/Algo/Render/Deprecated/gl3mapRender.hpp
include/Algo/Render/Deprecated/gl3mapRender.hpp
+6
-6
include/Algo/Render/Deprecated/vbo_MapRender.hpp
include/Algo/Render/Deprecated/vbo_MapRender.hpp
+6
-6
include/Algo/Render/GL1/topo_render.hpp
include/Algo/Render/GL1/topo_render.hpp
+2
-2
include/Algo/Render/GL2/mapRender.hpp
include/Algo/Render/GL2/mapRender.hpp
+3
-3
include/Algo/Render/GL2/topo3Render.h
include/Algo/Render/GL2/topo3Render.h
+2
-2
include/Algo/Render/GL2/topo3Render.hpp
include/Algo/Render/GL2/topo3Render.hpp
+14
-14
include/Algo/Render/GL2/topoRender.h
include/Algo/Render/GL2/topoRender.h
+1
-2
include/Algo/Render/GL2/topoRender.hpp
include/Algo/Render/GL2/topoRender.hpp
+12
-22
include/Topology/generic/cellmarker.h
include/Topology/generic/cellmarker.h
+1
-1
include/Topology/generic/dartmarker.h
include/Topology/generic/dartmarker.h
+1
-1
include/Topology/generic/parameters.h
include/Topology/generic/parameters.h
+0
-2
include/Topology/generic/traversor3.h
include/Topology/generic/traversor3.h
+62
-62
include/Topology/generic/traversor3.hpp
include/Topology/generic/traversor3.hpp
+49
-61
include/Topology/generic/traversorCell.hpp
include/Topology/generic/traversorCell.hpp
+1
-1
include/Topology/gmap/gmap2.h
include/Topology/gmap/gmap2.h
+2
-0
include/Topology/gmap/gmap3.h
include/Topology/gmap/gmap3.h
+3
-0
include/Topology/map/map2.h
include/Topology/map/map2.h
+2
-0
include/Topology/map/map2MR/map2MR_PrimalAdapt.h
include/Topology/map/map2MR/map2MR_PrimalAdapt.h
+7
-2
include/Topology/map/map3.h
include/Topology/map/map3.h
+3
-0
include/Topology/map/map3MR/map3MR_PrimalAdapt.h
include/Topology/map/map3MR/map3MR_PrimalAdapt.h
+6
-2
include/Topology/map/map3MR/schemes_Primal.h
include/Topology/map/map3MR/schemes_Primal.h
+2
-2
src/Algo/ImplicitHierarchicalMesh/ihm.cpp
src/Algo/ImplicitHierarchicalMesh/ihm.cpp
+3
-3
src/Algo/ImplicitHierarchicalMesh/ihm3.cpp
src/Algo/ImplicitHierarchicalMesh/ihm3.cpp
+25
-25
src/Algo/Render/topo3Render.cpp
src/Algo/Render/topo3Render.cpp
+8
-5
src/Algo/Render/topoRender.cpp
src/Algo/Render/topoRender.cpp
+5
-6
src/Topology/gmap/embeddedGMap3.cpp
src/Topology/gmap/embeddedGMap3.cpp
+108
-108
src/Topology/map/embeddedMap2.cpp
src/Topology/map/embeddedMap2.cpp
+69
-69
src/Topology/map/embeddedMap3.cpp
src/Topology/map/embeddedMap3.cpp
+80
-80
src/Topology/map/map2.cpp
src/Topology/map/map2.cpp
+3
-3
src/Topology/map/map2MR/map2MR_PM.cpp
src/Topology/map/map2MR/map2MR_PM.cpp
+2
-2
src/Topology/map/map2MR/map2MR_PrimalAdapt.cpp
src/Topology/map/map2MR/map2MR_PrimalAdapt.cpp
+21
-19
src/Topology/map/map2MR/map2MR_PrimalRegular.cpp
src/Topology/map/map2MR/map2MR_PrimalRegular.cpp
+4
-4
src/Topology/map/map3.cpp
src/Topology/map/map3.cpp
+7
-10
src/Topology/map/map3MR/map3MR_PrimalAdapt.cpp
src/Topology/map/map3MR/map3MR_PrimalAdapt.cpp
+54
-52
src/Topology/map/map3MR/map3MR_PrimalRegular.cpp
src/Topology/map/map3MR/map3MR_PrimalRegular.cpp
+43
-43
No files found.
Apps/deprecated/decimationVolumique.cpp
View file @
cb1ede68
...
...
@@ -235,7 +235,7 @@ void MyGlutWin::myKeyboard(unsigned char keycode, int x, int y)
/** affichage **/
case
'd'
:
{
int
nbVertices
=
myMap
.
getNbOrbits
(
VERTEX
)
;
int
nbVertices
=
myMap
.
getNbOrbits
<
VERTEX
>
(
)
;
CGoGNout
<<
"nb darts = "
<<
myMap
.
getNbOrbits
(
DART
)
<<
CGoGNendl
;
...
...
@@ -399,9 +399,9 @@ int main(int argc, char **argv)
maillageTest
();
}
//CGoGNout << "Nb Tetrahedron = " << myMap.getNbOrbits
(
VOLUME) << CGoGNendl;
// " / Nb Edges = " << myMap.getNbOrbits
(
EDGE) <<
// " / Nb Vertices = " << myMap.getNbOrbits
(
VERTEX) << CGoGNendl;
//CGoGNout << "Nb Tetrahedron = " << myMap.getNbOrbits
<
VOLUME
>(
) << CGoGNendl;
// " / Nb Edges = " << myMap.getNbOrbits
<
EDGE
>(
) <<
// " / Nb Vertices = " << myMap.getNbOrbits
<
VERTEX
>(
) << CGoGNendl;
// un peu d'interface
MyGlutWin
*
mgw
=
new
MyGlutWin
(
&
argc
,
argv
,
1200
,
800
);
...
...
Apps/deprecated/miniTest.cpp
View file @
cb1ede68
...
...
@@ -558,7 +558,7 @@ void MyGlutWin::myKeyboard(unsigned char keycode, int x, int y)
case
's'
:
{
unsigned
int
nbVertices
=
myMap
.
getNbOrbits
(
VERTEX
)
;
unsigned
int
nbVertices
=
myMap
.
getNbOrbits
<
VERTEX
>
(
)
;
GLint
t1
=
glutGet
(
GLUT_ELAPSED_TIME
)
;
...
...
@@ -818,9 +818,9 @@ int main(int argc, char** argv)
// myMap.closeMap(m) ;
}
CGoGNout
<<
myMap
.
getNbOrbits
(
VERTEX
)
<<
CGoGNendl
;
CGoGNout
<<
myMap
.
getNbOrbits
(
EDGE
)
<<
CGoGNendl
;
CGoGNout
<<
myMap
.
getNbOrbits
(
FACE
)
<<
CGoGNendl
;
CGoGNout
<<
myMap
.
getNbOrbits
<
VERTEX
>
(
)
<<
CGoGNendl
;
CGoGNout
<<
myMap
.
getNbOrbits
<
EDGE
>
(
)
<<
CGoGNendl
;
CGoGNout
<<
myMap
.
getNbOrbits
<
FACE
>
(
)
<<
CGoGNendl
;
// compute width and position of object for centering
Geom
::
BoundingBox
<
PFP
::
VEC3
>
bb
=
Algo
::
Geometry
::
computeBoundingBox
<
PFP
>
(
myMap
,
mgw
->
position
)
;
...
...
Apps/deprecated/ter_meshes.cpp
View file @
cb1ede68
...
...
@@ -143,7 +143,7 @@ int main(int argc, char **argv)
{
fonction_exemple
<
PFP
>
(
myMap
,
position
,
d
);
// marque tous les brins de la face de d
mf
.
markOrbit
(
FACE
,
d
);
mf
.
markOrbit
<
FACE
>
(
d
);
}
}
...
...
include/Algo/Decimation/decimation.hpp
View file @
cb1ede68
...
...
@@ -142,7 +142,7 @@ void decimate(
if
(
!
selector
->
init
())
return
;
unsigned
int
nbVertices
=
map
.
getNbOrbits
(
VERTEX
)
;
unsigned
int
nbVertices
=
map
.
getNbOrbits
<
VERTEX
>
(
)
;
bool
finished
=
false
;
Dart
d
;
...
...
include/Algo/Decimation/edgeSelector.hpp
View file @
cb1ede68
...
...
@@ -322,7 +322,7 @@ bool EdgeSelector_QEM<PFP>::init()
quadric
[
d
]
+=
q
;
// and add the contribution of
quadric
[
d1
]
+=
q
;
// this quadric to the ones
quadric
[
d_1
]
+=
q
;
// of the 3 incident vertices
mark
.
markOrbit
(
FACE
,
d
)
;
mark
.
markOrbit
<
FACE
>
(
d
)
;
}
}
...
...
@@ -527,7 +527,7 @@ bool EdgeSelector_QEMml<PFP>::init()
quadric
[
d
]
+=
q
;
// and add the contribution of
quadric
[
d1
]
+=
q
;
// this quadric to the ones
quadric
[
d_1
]
+=
q
;
// of the 3 incident vertices
mark
.
markOrbit
(
FACE
,
d
)
;
mark
.
markOrbit
<
FACE
>
(
d
)
;
}
}
...
...
@@ -886,7 +886,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
.
embedNewCell
(
VERTEX
,
d2
)
;
unsigned
int
newV
=
m
.
embedNewCell
<
VERTEX
>
(
d2
)
;
this
->
m_position
[
newV
]
=
m_positionApproximator
->
getApprox
(
d
)
;
// compute things on the coarse version of the mesh
...
...
@@ -899,8 +899,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
.
embedOrbit
(
VERTEX
,
d
,
v1
)
;
m
.
embedOrbit
(
VERTEX
,
dd
,
v2
)
;
m
.
embedOrbit
<
VERTEX
>
(
d
,
v1
)
;
m
.
embedOrbit
<
VERTEX
>
(
dd
,
v2
)
;
REAL
err
=
0
;
...
...
include/Algo/Decimation/geometryApproximator.hpp
View file @
cb1ede68
...
...
@@ -211,7 +211,7 @@ void Approximator_MidEdge<PFP>::approximate(Dart d)
// temporary edge collapse
m
.
extractTrianglePair
(
d
)
;
unsigned
int
newV
=
m
.
embedNewCell
(
VERTEX
,
d2
)
;
unsigned
int
newV
=
m
.
embedNewCell
<
VERTEX
>
(
d2
)
;
this
->
m_attrV
[
newV
]
=
this
->
m_approx
[
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
.
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
))
;
}
}
...
...
@@ -259,7 +259,7 @@ void Approximator_HalfCollapse<PFP>::approximate(Dart d)
// temporary edge collapse
m
.
extractTrianglePair
(
d
)
;
unsigned
int
newV
=
m
.
embedNewCell
(
VERTEX
,
d2
)
;
unsigned
int
newV
=
m
.
embedNewCell
<
VERTEX
>
(
d2
)
;
this
->
m_attrV
[
newV
]
=
this
->
m_approx
[
d
]
;
// compute the detail vector
...
...
@@ -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/Decimation/halfEdgeSelector.hpp
View file @
cb1ede68
...
...
@@ -81,7 +81,7 @@ bool HalfEdgeSelector_QEMml<PFP>::init()
quadric
[
d
]
+=
q
;
// and add the contribution of
quadric
[
d1
]
+=
q
;
// this quadric to the ones
quadric
[
d_1
]
+=
q
;
// of the 3 incident vertices
mark
.
markOrbit
(
FACE
,
d
)
;
mark
.
markOrbit
<
FACE
>
(
d
)
;
}
}
...
...
@@ -339,7 +339,7 @@ bool HalfEdgeSelector_Lightfield<PFP>::init()
quadric
[
d
]
+=
q
;
// and add the contribution of
quadric
[
d1
]
+=
q
;
// this quadric to the ones
quadric
[
d_1
]
+=
q
;
// of the 3 incident vertices
mark
.
markOrbit
(
FACE
,
d
)
;
mark
.
markOrbit
<
FACE
>
(
d
)
;
}
}
...
...
@@ -617,7 +617,7 @@ bool EdgeSelector_Lightfield<PFP>::init()
quadric[d] += q ; // and add the contribution of
quadric[d1] += q ; // this quadric to the ones
quadric[d_1] += q ; // of the 3 incident vertices
mark.markOrbit
(
FACE
,
d) ;
mark.markOrbit
<
FACE
>(
d) ;
}
}
...
...
include/Algo/Decimation/simplifMesh.hpp
View file @
cb1ede68
...
...
@@ -67,7 +67,7 @@ SimplifTrian<PFP>::SimplifTrian(MAP& the_map, unsigned int idPos, CRIT* cr):
m_edgeEmb
[
d
]
=
it
;
// mark cell for traversal
m
.
markOrbit
(
EDGE
,
d
);
m
.
markOrbit
<
EDGE
>
(
d
);
}
}
}
...
...
@@ -101,7 +101,7 @@ void SimplifTrian<PFP>::changeCriteria(CRIT* cr)
m_edgeEmb
[
d
]
=
it
;
// mark cell for traversal
m
.
markOrbit
(
EDGE
,
d
);
m
.
markOrbit
<
EDGE
>
(
d
);
}
}
}
...
...
@@ -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
.
embedOrbit
<
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
.
embedOrbit
<
VERTEX
>
(
d2
,
emb
);
m_positions
[
d2
]
=
newPos
;
m_valences
[
d2
]
=
v_d
+
v_dd
-
4
;
...
...
include/Algo/DecimationVolumique/decimator.hpp
View file @
cb1ede68
...
...
@@ -47,7 +47,7 @@ void decimate(
selector
->
init
(
approximator
);
//Init nbCell in the mesh
unsigned
int
nbCell
=
map
.
getNbOrbits
(
VOLUME
);
unsigned
int
nbCell
=
map
.
getNbOrbits
<
VOLUME
>
(
);
CGoGNout
<<
"nbCell = "
<<
nbCell
<<
CGoGNendl
;
...
...
include/Algo/Export/exportPov.h
View file @
cb1ede68
...
...
@@ -109,7 +109,7 @@ void export3MeshPlainSmooth(std::ofstream& out, typename PFP::MAP& map, typename
if
(
good
(
d
)
&&
!
markF
.
isMarked
(
d
)
&&
map
.
phi3
(
d
)
==
d
)
{
markF
.
markOrbit
(
FACE
,
d
)
;
markF
.
markOrbit
<
FACE
>
(
d
)
;
std
::
vector
<
unsigned
int
>
fidx
;
fidx
.
reserve
(
4
)
;
Dart
dd
=
d
;
...
...
include/Algo/Geometry/inclusion.hpp
View file @
cb1ede68
...
...
@@ -54,7 +54,7 @@ bool isConvex(typename PFP::MAP& map, Dart d, const typename PFP::TVEC3& positio
Dart
e
=
*
it
;
if
(
!
m
.
isMarked
(
e
))
{
m
.
markOrbit
(
EDGE
,
e
)
;
m
.
markOrbit
<
EDGE
>
(
e
)
;
convex
=
isTetrahedronWellOriented
<
PFP
>
(
map
,
e
,
position
,
CCW
)
;
}
}
...
...
include/Algo/Geometry/normal.hpp
View file @
cb1ede68
...
...
@@ -122,7 +122,7 @@ typename PFP::VEC3 vertexBorderNormal(typename PFP::MAP& map, Dart d, const type
VEC3
N
(
0
)
;
std
::
vector
<
Dart
>
faces
;
CellMarker
f
(
map
,
FACE
);
CellMarker
<
FACE
>
f
(
map
);
FunctorStore
fs
(
faces
);
map
.
foreach_dart_of_oriented_vertex
(
d
,
fs
);
...
...
include/Algo/Geometry/volume.hpp
View file @
cb1ede68
...
...
@@ -74,7 +74,7 @@ typename PFP::REAL convexPolyhedronVolume(typename PFP::MAP& map, Dart d, const
std
::
vector
<
Dart
>
visitedFaces
;
visitedFaces
.
reserve
(
100
)
;
visitedFaces
.
push_back
(
d
)
;
mark
.
markOrbit
(
FACE
,
d
)
;
mark
.
markOrbit
<
FACE
>
(
d
)
;
for
(
typename
std
::
vector
<
Dart
>::
iterator
face
=
visitedFaces
.
begin
();
face
!=
visitedFaces
.
end
();
++
face
)
{
...
...
@@ -104,7 +104,7 @@ typename PFP::REAL convexPolyhedronVolume(typename PFP::MAP& map, Dart d, const
if
(
!
mark
.
isMarked
(
ee
))
// not already marked
{
visitedFaces
.
push_back
(
ee
)
;
mark
.
markOrbit
(
FACE
,
e
)
;
mark
.
markOrbit
<
FACE
>
(
e
)
;
}
e
=
map
.
phi1
(
e
)
;
}
while
(
e
!=
*
face
)
;
...
...
include/Algo/ImplicitHierarchicalMesh/ihm.h
View file @
cb1ede68
...
...
@@ -36,19 +36,19 @@ namespace Algo
namespace
IHM
{
template
<
typename
T
>
class
AttributeHandler_IHM
;
template
<
typename
T
,
unsigned
int
ORBIT
>
class
AttributeHandler_IHM
;
class
ImplicitHierarchicalMap
:
public
EmbeddedMap2
{
template
<
typename
T
>
friend
class
AttributeHandler_IHM
;
template
<
typename
T
,
unsigned
int
ORBIT
>
friend
class
AttributeHandler_IHM
;
private:
unsigned
int
m_curLevel
;
unsigned
int
m_maxLevel
;
unsigned
int
m_idCount
;
AttributeHandler
<
unsigned
int
>
m_dartLevel
;
AttributeHandler
<
unsigned
int
>
m_edgeId
;
AttributeHandler
<
unsigned
int
,
DART
>
m_dartLevel
;
AttributeHandler
<
unsigned
int
,
DART
>
m_edgeId
;
AttributeMultiVector
<
unsigned
int
>*
m_nextLevelCell
[
NB_ORBITS
]
;
...
...
@@ -63,11 +63,11 @@ public:
* ATTRIBUTES MANAGEMENT *
***************************************************/
template
<
typename
T
>
AttributeHandler_IHM
<
T
>
addAttribute
(
unsigned
int
orbit
,
const
std
::
string
&
nameAttr
)
;
template
<
typename
T
,
unsigned
int
ORBIT
>
AttributeHandler_IHM
<
T
,
ORBIT
>
addAttribute
(
const
std
::
string
&
nameAttr
)
;
template
<
typename
T
>
AttributeHandler_IHM
<
T
>
getAttribute
(
unsigned
int
orbit
,
const
std
::
string
&
nameAttr
)
;
template
<
typename
T
,
unsigned
int
ORBIT
>
AttributeHandler_IHM
<
T
,
ORBIT
>
getAttribute
(
const
std
::
string
&
nameAttr
)
;
/***************************************************
* MAP TRAVERSAL *
...
...
@@ -201,26 +201,26 @@ public:
bool
faceIsSubdividedOnce
(
Dart
d
)
;
}
;
template
<
typename
T
>
class
AttributeHandler_IHM
:
public
AttributeHandler
<
T
>
template
<
typename
T
,
unsigned
int
ORBIT
>
class
AttributeHandler_IHM
:
public
AttributeHandler
<
T
,
ORBIT
>
{
public:
typedef
T
DATA_TYPE
;
AttributeHandler_IHM
()
:
AttributeHandler
<
T
>
()
AttributeHandler_IHM
()
:
AttributeHandler
<
T
,
ORBIT
>
()
{}
AttributeHandler_IHM
(
GenericMap
*
m
,
AttributeMultiVector
<
T
>*
amv
)
:
AttributeHandler
<
T
>
(
m
,
amv
)
AttributeHandler_IHM
(
GenericMap
*
m
,
AttributeMultiVector
<
T
>*
amv
)
:
AttributeHandler
<
T
,
ORBIT
>
(
m
,
amv
)
{}
AttributeMultiVector
<
T
>*
getDataVector
()
const
{
return
AttributeHandler
<
T
>::
getDataVector
()
;
return
AttributeHandler
<
T
,
ORBIT
>::
getDataVector
()
;
}
bool
isValid
()
const
{
return
AttributeHandler
<
T
>::
isValid
()
;
return
AttributeHandler
<
T
,
ORBIT
>::
isValid
()
;
}
T
&
operator
[](
Dart
d
)
;
...
...
@@ -229,12 +229,12 @@ public:
T
&
operator
[](
unsigned
int
a
)
{
return
AttributeHandler
<
T
>::
operator
[](
a
)
;
return
AttributeHandler
<
T
,
ORBIT
>::
operator
[](
a
)
;
}
const
T
&
operator
[](
unsigned
int
a
)
const
{
return
AttributeHandler
<
T
>::
operator
[](
a
)
;
return
AttributeHandler
<
T
,
ORBIT
>::
operator
[](
a
)
;
}
}
;
...
...
include/Algo/ImplicitHierarchicalMesh/ihm.hpp
View file @
cb1ede68
...
...
@@ -35,32 +35,32 @@ namespace IHM
* ATTRIBUTES MANAGEMENT *
***************************************************/
template
<
typename
T
>
AttributeHandler_IHM
<
T
>
ImplicitHierarchicalMap
::
addAttribute
(
unsigned
int
orbit
,
const
std
::
string
&
nameAttr
)
template
<
typename
T
,
unsigned
int
ORBIT
>
AttributeHandler_IHM
<
T
,
ORBIT
>
ImplicitHierarchicalMap
::
addAttribute
(
const
std
::
string
&
nameAttr
)
{
bool
addNextLevelCell
=
false
;
if
(
!
isOrbitEmbedded
(
orbit
))
if
(
!
isOrbitEmbedded
(
ORBIT
))
addNextLevelCell
=
true
;
AttributeHandler
<
T
>
h
=
Map2
::
addAttribute
<
T
>
(
orbit
,
nameAttr
)
;
AttributeHandler
<
T
,
ORBIT
>
h
=
Map2
::
addAttribute
<
T
,
ORBIT
>
(
nameAttr
)
;
if
(
addNextLevelCell
)
{
AttributeContainer
&
cellCont
=
m_attribs
[
orbit
]
;
AttributeContainer
&
cellCont
=
m_attribs
[
ORBIT
]
;
AttributeMultiVector
<
unsigned
int
>*
amv
=
cellCont
.
addAttribute
<
unsigned
int
>
(
"nextLevelCell"
)
;
m_nextLevelCell
[
orbit
]
=
amv
;
m_nextLevelCell
[
ORBIT
]
=
amv
;
for
(
unsigned
int
i
=
cellCont
.
begin
();
i
<
cellCont
.
end
();
cellCont
.
next
(
i
))
amv
->
operator
[](
i
)
=
EMBNULL
;
}
return
AttributeHandler_IHM
<
T
>
(
this
,
h
.
getDataVector
())
;
return
AttributeHandler_IHM
<
T
,
ORBIT
>
(
this
,
h
.
getDataVector
())
;
}
template
<
typename
T
>
AttributeHandler_IHM
<
T
>
ImplicitHierarchicalMap
::
getAttribute
(
unsigned
int
orbit
,
const
std
::
string
&
nameAttr
)
template
<
typename
T
,
unsigned
int
ORBIT
>
AttributeHandler_IHM
<
T
,
ORBIT
>
ImplicitHierarchicalMap
::
getAttribute
(
const
std
::
string
&
nameAttr
)
{
AttributeHandler
<
T
>
h
=
Map2
::
getAttribute
<
T
>
(
orbit
,
nameAttr
)
;
return
AttributeHandler_IHM
<
T
>
(
this
,
h
.
getDataVector
())
;
AttributeHandler
<
T
,
ORBIT
>
h
=
Map2
::
getAttribute
<
T
,
ORBIT
>
(
nameAttr
)
;
return
AttributeHandler_IHM
<
T
,
ORBIT
>
(
this
,
h
.
getDataVector
())
;
}
/***************************************************
...
...
@@ -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
->
embedOrbit
<
FACE
>
(
d
,
this
->
getEmbedding
<
FACE
>
(
d
))
;
this
->
embedOrbit
<
FACE
>
(
e
,
this
->
getEmbedding
<
FACE
>
(
e
))
;
m_curLevel
=
cur
;
}
}
...
...
@@ -336,8 +336,8 @@ inline unsigned int ImplicitHierarchicalMap::edgeLevel(Dart d)
* ATTRIBUTE HANDLER *
***************************************************/
template
<
typename
T
>
T
&
AttributeHandler_IHM
<
T
>::
operator
[](
Dart
d
)
template
<
typename
T
,
unsigned
int
ORBIT
>
T
&
AttributeHandler_IHM
<
T
,
ORBIT
>::
operator
[](
Dart
d
)
{
ImplicitHierarchicalMap
*
m
=
reinterpret_cast
<
ImplicitHierarchicalMap
*>
(
this
->
m_map
)
;
assert
(
m
->
m_dartLevel
[
d
]
<=
m
->
m_curLevel
||
!
"Access to a dart introduced after current level"
)
;
...
...
@@ -345,15 +345,15 @@ T& AttributeHandler_IHM<T>::operator[](Dart d)
unsigned
int
orbit
=
this
->
getOrbit
()
;
unsigned
int
nbSteps
=
m
->
m_curLevel
-
m
->
vertexInsertionLevel
(
d
)
;
unsigned
int
index
=
m
->
getEmbedding
(
orbit
,
d
)
;
unsigned
int
index
=
m
->
getEmbedding
<
ORBIT
>
(
d
)
;
if
(
index
==
EMBNULL
)
{
index
=
m
->
embedNewCell
(
orbit
,
d
)
;
index
=
m
->
embedNewCell
<
ORBIT
>
(
d
)
;
m
->
m_nextLevelCell
[
orbit
]
->
operator
[](
index
)
=
EMBNULL
;
}
AttributeContainer
&
cont
=
m
->
getAttributeContainer
(
orbit
)
;
AttributeContainer
&
cont
=
m
->
getAttributeContainer
<
ORBIT
>
(
)
;
unsigned
int
step
=
0
;
while
(
step
<
nbSteps
)
{
...
...
@@ -361,8 +361,8 @@ T& AttributeHandler_IHM<T>::operator[](Dart d)
unsigned
int
nextIdx
=
m
->
m_nextLevelCell
[
orbit
]
->
operator
[](
index
)
;
if
(
nextIdx
==
EMBNULL
)
{
nextIdx
=
m
->
newCell
(
orbit
)
;
m
->
copyCell
(
orbit
,
nextIdx
,
index
)
;
nextIdx
=
m
->
newCell
<
ORBIT
>
(
)
;
m
->
copyCell
<
ORBIT
>
(
nextIdx
,
index
)
;
m
->
m_nextLevelCell
[
orbit
]
->
operator
[](
index
)
=
nextIdx
;
m
->
m_nextLevelCell
[
orbit
]
->
operator
[](
nextIdx
)
=
EMBNULL
;
cont
.
refLine
(
index
)
;
...
...
@@ -372,8 +372,8 @@ T& AttributeHandler_IHM<T>::operator[](Dart d)
return
this
->
m_attrib
->
operator
[](
index
);
}
template
<
typename
T
>
const
T
&
AttributeHandler_IHM
<
T
>::
operator
[](
Dart
d
)
const
template
<
typename
T
,
unsigned
int
ORBIT
>
const
T
&
AttributeHandler_IHM
<
T
,
ORBIT
>::
operator
[](
Dart
d
)
const
{
ImplicitHierarchicalMap
*
m
=
reinterpret_cast
<
ImplicitHierarchicalMap
*>
(
this
->
m_map
)
;
assert
(
m
->
m_dartLevel
[
d
]
<=
m
->
m_curLevel
||
!
"Access to a dart introduced after current level"
)
;
...
...
@@ -381,7 +381,7 @@ const T& AttributeHandler_IHM<T>::operator[](Dart d) const
unsigned
int
orbit
=
this
->
getOrbit
()
;
unsigned
int
nbSteps
=
m
->
m_curLevel
-
m
->
vertexInsertionLevel
(
d
)
;
unsigned
int
index
=
m
->
getEmbedding
(
orbit
,
d
)
;
unsigned
int
index
=
m
->
getEmbedding
<
ORBIT
>
(
d
)
;
unsigned
int
step
=
0
;
while
(
step
<
nbSteps
)
...
...
include/Algo/ImplicitHierarchicalMesh/ihm3.h
View file @
cb1ede68
...
...
@@ -36,11 +36,11 @@ namespace Algo
namespace
IHM
{
template
<
typename
T
>
class
AttributeHandler_IHM
;
template
<
typename
T
,
unsigned
int
ORBIT
>
class
AttributeHandler_IHM
;
class
ImplicitHierarchicalMap3
:
public
EmbeddedMap3
{
template
<
typename
T
>
friend
class
AttributeHandler_IHM
;
template
<
typename
T
,
unsigned
int
ORBIT
>
friend
class
AttributeHandler_IHM
;
public:
unsigned
int
m_curLevel
;
...
...
@@ -48,9 +48,9 @@ public:
unsigned
int
m_edgeIdCount
;
unsigned
int
m_faceIdCount
;
AttributeHandler
<
unsigned
int
>
m_dartLevel
;
AttributeHandler
<
unsigned
int
>
m_edgeId
;
AttributeHandler
<
unsigned
int
>
m_faceId
;
AttributeHandler
<
unsigned
int
,
DART
>
m_dartLevel
;
AttributeHandler
<
unsigned
int
,
DART
>
m_edgeId
;
AttributeHandler
<
unsigned
int
,
DART
>
m_faceId
;
AttributeMultiVector
<
unsigned
int
>*
m_nextLevelCell
[
NB_ORBITS
]
;
...
...
@@ -81,15 +81,15 @@ public:
/*!
*
*/
template
<
typename
T
>
AttributeHandler_IHM
<
T
>
addAttribute
(
unsigned
int
orbit
,
const
std
::
string
&
nameAttr
)
;
template
<
typename
T
,
unsigned
int
ORBIT
>
AttributeHandler_IHM
<
T
,
ORBIT
>
addAttribute
(
const
std
::
string
&
nameAttr
)
;
//!
/*!
*
*/
template
<
typename
T
>
AttributeHandler_IHM
<
T
>
getAttribute
(
unsigned
int
orbit
,
const
std
::
string
&
nameAttr
)
;
template
<
typename
T
,
unsigned
int
ORBIT
>
AttributeHandler_IHM
<
T
,
ORBIT
>
getAttribute
(
const
std
::
string
&
nameAttr
)
;
//@}
/*! @name Basic Topological Operators
...
...
@@ -389,26 +389,26 @@ public:
}
;
template
<
typename
T
>
class
AttributeHandler_IHM
:
public
AttributeHandler
<
T
>
template
<
typename
T
,
unsigned
int
ORBIT
>
class
AttributeHandler_IHM
:
public
AttributeHandler
<
T
,
ORBIT
>
{
public:
typedef
T
DATA_TYPE
;
AttributeHandler_IHM
()
:
AttributeHandler
<
T
>
()
AttributeHandler_IHM
()
:
AttributeHandler
<
T
,
ORBIT
>
()
{}
AttributeHandler_IHM
(
GenericMap
*
m
,
AttributeMultiVector
<
T
>*
amv
)
:
AttributeHandler
<
T
>
(
m
,
amv
)
AttributeHandler_IHM
(
GenericMap
*
m
,
AttributeMultiVector
<
T
>*
amv
)
:
AttributeHandler
<
T
,
ORBIT
>
(
m
,
amv
)
{}
AttributeMultiVector
<
T
>*
getDataVector
()
const
{
return
AttributeHandler
<
T
>::
getDataVector
()
;
return
AttributeHandler
<
T
,
ORBIT
>::
getDataVector
()
;
}
bool
isValid
()
const
{
return
AttributeHandler
<
T
>::
isValid
()
;
return
AttributeHandler
<
T
,
ORBIT
>::
isValid
()
;
}
T
&
operator
[](
Dart
d
)
;
...
...
@@ -417,12 +417,12 @@ public:
T
&
operator
[](
unsigned
int
a
)
{
return
AttributeHandler
<
T
>::
operator
[](
a
)
;
return
AttributeHandler
<
T
,
ORBIT
>::
operator
[](
a
)
;
}
const
T
&
operator
[](
unsigned
int
a
)
const
{
return
AttributeHandler
<
T
>::
operator
[](
a
)
;
return
AttributeHandler
<
T
,
ORBIT
>::
operator
[](
a
)
;
}
}
;
...
...
include/Algo/ImplicitHierarchicalMesh/ihm3.hpp
View file @
cb1ede68
...
...
@@ -35,41 +35,41 @@ namespace IHM
* ATTRIBUTES MANAGEMENT *
***************************************************/
template
<
typename
T
>
AttributeHandler_IHM
<
T
>
ImplicitHierarchicalMap3
::
addAttribute
(
unsigned
int
orbit
,
const
std
::
string
&
nameAttr
)
template
<
typename
T
,
unsigned
int
ORBIT
>
AttributeHandler_IHM
<
T
,
ORBIT
>
ImplicitHierarchicalMap3
::
addAttribute
(
const
std
::
string
&
nameAttr
)