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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
KennethVanhoey
CGoGN
Commits
29b48c13
Commit
29b48c13
authored
Jul 30, 2014
by
Sylvain Thery
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
new traversal (c++11 for) syntax cell/neighbours
parent
c40a4912
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
492 additions
and
12 deletions
+492
-12
Apps/Tuto/Attributes/simple_attribs.cpp
Apps/Tuto/Attributes/simple_attribs.cpp
+1
-1
Apps/Tuto/Traversals/traverse_attributes.cpp
Apps/Tuto/Traversals/traverse_attributes.cpp
+1
-1
Apps/Tuto/Traversals/traverse_cells.cpp
Apps/Tuto/Traversals/traverse_cells.cpp
+6
-3
Apps/Tuto/Traversals/traverse_neighbours.cpp
Apps/Tuto/Traversals/traverse_neighbours.cpp
+11
-0
include/Topology/generic/traversor/traversor2.h
include/Topology/generic/traversor/traversor2.h
+184
-0
include/Topology/generic/traversor/traversor3.h
include/Topology/generic/traversor/traversor3.h
+231
-5
include/Topology/generic/traversor/traversorCell.h
include/Topology/generic/traversor/traversorCell.h
+53
-2
include/Topology/generic/traversor/traversorDoO.h
include/Topology/generic/traversor/traversorDoO.h
+5
-0
No files found.
Apps/Tuto/Attributes/simple_attribs.cpp
View file @
29b48c13
...
...
@@ -136,7 +136,7 @@ void VertexTyped(MAP& map, T& va)
// });
// other syntax for traversal
for
(
Vertex
v
:
allVertices
<
MAP
>
(
map
))
for
(
Vertex
v
:
allVertices
Of
(
map
))
{
va
[
v
]
=
1.1
*
va
[
v
];
std
::
cout
<<
"V:"
<<
v
<<
" -> "
<<
va
[
v
]
<<
std
::
endl
;
...
...
Apps/Tuto/Traversals/traverse_attributes.cpp
View file @
29b48c13
...
...
@@ -73,7 +73,7 @@ int main()
// using parallel foreach
// parameter position must be captured explicitly even if it used as first parameter of foreach !
Parallel
::
foreach_attribute
(
position
,
[
&
position
]
(
unsigned
int
id
,
unsigned
int
thread
)
// for each elt of the position attribute
Parallel
::
foreach_attribute
(
position
,
[
&
position
]
(
unsigned
int
id
,
unsigned
int
/*thread*/
)
// for each elt of the position attribute
{
position
[
id
]
*=
2.0
f
;
},
4
);
// 4:4 thread, false for no need for markers in threaded code.
...
...
Apps/Tuto/Traversals/traverse_cells.cpp
View file @
29b48c13
...
...
@@ -111,17 +111,18 @@ int main()
});
// 4:4 thread, false for no need for markers in threaded code.
std
::
cout
<<
"After // processing"
<<
std
::
endl
;
foreach_cell
<
VERTEX
>
(
myMap
,
[
&
]
(
Vertex
v
)
// for each Vertex v of the MAP myMap
// last and simple traversal method (new for c++11 syntax)
for
(
Vertex
v
:
allVerticesOf
(
myMap
))
{
std
::
cout
<<
position
[
v
]
<<
" / "
;
}
);
}
std
::
cout
<<
std
::
endl
;
// Example with // accumulation
// computing the sum of area faces
// force number of threads to 4 (0 for traverse, 1,2,3 for computation)
CGoGN
::
Parallel
::
NumberOfThreads
=
4
;
...
...
@@ -137,6 +138,8 @@ int main()
std
::
cout
<<
surf
[
0
]
<<
"/"
<<
surf
[
1
]
<<
"/"
<<
surf
[
2
]
<<
"/"
<<
std
::
endl
;
std
::
cout
<<
"Total="
<<
surf
[
0
]
+
surf
[
1
]
+
surf
[
2
]
<<
std
::
endl
;
// example of traversal in two pass (optimizing marking/unmarking)
TraversorV
<
MAP
>
tv0
(
myMap
);
TraversorCellEven
<
MAP
,
VERTEX
>
tv1
(
tv0
);
TraversorCellOdd
<
MAP
,
VERTEX
>
tv2
(
tv0
);
...
...
Apps/Tuto/Traversals/traverse_neighbours.cpp
View file @
29b48c13
...
...
@@ -102,5 +102,16 @@ int main()
std
::
cout
<<
"vertex of dart "
<<
x
<<
" adjacent to vertex of dart "
<<
v
.
dart
<<
" by a face"
<<
std
::
endl
;
});
// WITH FOR C++11 SYNTAX
for
(
Face
f
:
facesIncidentToVertex2
(
myMap
,
v
))
{
std
::
cout
<<
"Face of dart "
<<
f
<<
" incident to vertex of dart "
<<
v
.
dart
<<
std
::
endl
;
}
for
(
Vertex
x
:
verticesAdjacentByFace2
(
myMap
,
v
))
{
std
::
cout
<<
"vertex of dart "
<<
x
<<
" adjacent to vertex of dart "
<<
v
.
dart
<<
" by a face"
<<
std
::
endl
;
}
return
0
;
}
include/Topology/generic/traversor/traversor2.h
View file @
29b48c13
...
...
@@ -51,6 +51,10 @@ public:
inline
Edge
begin
()
;
inline
Edge
end
()
;
inline
Edge
next
()
;
typedef
Edge
IterType
;
typedef
Vertex
ParamType
;
typedef
MAP
MapType
;
}
;
// Traverse the faces incident to a given vertex
...
...
@@ -69,6 +73,10 @@ public:
inline
Face
begin
()
;
inline
Face
end
()
;
inline
Face
next
()
;
typedef
Face
IterType
;
typedef
Vertex
ParamType
;
typedef
MAP
MapType
;
}
;
// Traverse the vertices adjacent to a given vertex through sharing a common edge
...
...
@@ -87,6 +95,10 @@ public:
inline
Vertex
begin
()
;
inline
Vertex
end
()
;
inline
Vertex
next
()
;
typedef
Vertex
IterType
;
typedef
Vertex
ParamType
;
typedef
MAP
MapType
;
}
;
// Traverse the vertices adjacent to a given vertex through sharing a common face
...
...
@@ -107,6 +119,10 @@ public:
inline
Vertex
begin
()
;
inline
Vertex
end
()
;
inline
Vertex
next
()
;
typedef
Vertex
IterType
;
typedef
Vertex
ParamType
;
typedef
MAP
MapType
;
}
;
/*******************************************************************************
...
...
@@ -129,6 +145,10 @@ public:
inline
Vertex
begin
()
;
inline
Vertex
end
()
;
inline
Vertex
next
()
;
typedef
Vertex
IterType
;
typedef
Edge
ParamType
;
typedef
MAP
MapType
;
}
;
// Traverse the faces incident to a given edge
...
...
@@ -147,6 +167,10 @@ public:
inline
Face
begin
()
;
inline
Face
end
()
;
inline
Face
next
()
;
typedef
Face
IterType
;
typedef
Edge
ParamType
;
typedef
MAP
MapType
;
}
;
// Traverse the edges adjacent to a given edge through sharing a common vertex
...
...
@@ -167,6 +191,10 @@ public:
inline
Edge
begin
()
;
inline
Edge
end
()
;
inline
Edge
next
()
;
typedef
Edge
IterType
;
typedef
Edge
ParamType
;
typedef
MAP
MapType
;
}
;
// Traverse the edges adjacent to a given edge through sharing a common face
...
...
@@ -187,6 +215,10 @@ public:
inline
Edge
begin
()
;
inline
Edge
end
()
;
inline
Edge
next
()
;
typedef
Edge
IterType
;
typedef
Edge
ParamType
;
typedef
MAP
MapType
;
}
;
/*******************************************************************************
...
...
@@ -209,6 +241,10 @@ public:
inline
Vertex
begin
()
;
inline
Vertex
end
()
;
inline
Vertex
next
()
;
typedef
Vertex
IterType
;
typedef
Face
ParamType
;
typedef
MAP
MapType
;
}
;
...
...
@@ -236,6 +272,10 @@ public:
inline
Edge
begin
()
;
inline
Edge
end
()
;
inline
Edge
next
()
;
typedef
Edge
IterType
;
typedef
Face
ParamType
;
typedef
MAP
MapType
;
}
;
...
...
@@ -257,6 +297,10 @@ public:
inline
Face
begin
()
;
inline
Face
end
()
;
inline
Face
next
()
;
typedef
Face
IterType
;
typedef
Face
ParamType
;
typedef
MAP
MapType
;
}
;
// Traverse the faces adjacent to a given face through sharing a common edge
...
...
@@ -276,6 +320,10 @@ public:
inline
Face
begin
()
;
inline
Face
end
()
;
inline
Face
next
()
;
typedef
Face
IterType
;
typedef
Face
ParamType
;
typedef
MAP
MapType
;
}
;
...
...
@@ -394,6 +442,7 @@ public:
AdjacentTrav2
(
const
MAP
&
m
,
Face
d
)
:
t
(
m
,
d
)
{}
};
// foreach traversal function
template
<
unsigned
int
ORBIT_TO
,
unsigned
int
ORBIT_FROM
,
typename
MAP
,
typename
FUNC
>
inline
void
foreach_incident2
(
MAP
&
map
,
Cell
<
ORBIT_FROM
>
c
,
FUNC
f
)
...
...
@@ -411,6 +460,141 @@ inline void foreach_adjacent2(MAP& map, Cell<ORBIT> c, FUNC f)
f
(
c
);
}
/**
* template classs that add iterator to Traversor
* to allow the use of c++11 syntax for (auto d : v)
*/
template
<
typename
TRAV
>
class
Iteratorize
:
public
TRAV
{
public:
typedef
typename
TRAV
::
MapType
MAP
;
typedef
typename
TRAV
::
IterType
ITER
;
typedef
typename
TRAV
::
ParamType
PARAM
;
Iteratorize
(
const
MAP
&
map
,
PARAM
p
)
:
TRAV
(
map
,
p
){}
class
iterator
{
Iteratorize
<
TRAV
>*
m_ptr
;
ITER
m_index
;
public:
inline
iterator
(
Iteratorize
<
TRAV
>*
p
,
ITER
i
)
:
m_ptr
(
p
),
m_index
(
i
){}
inline
iterator
&
operator
++
()
{
m_index
=
m_ptr
->
next
();
return
*
this
;
}
inline
ITER
&
operator
*
()
{
return
m_index
;
}
inline
bool
operator
!=
(
const
iterator
&
it
)
{
return
m_index
.
dart
!=
it
.
m_index
.
dart
;
}
};
inline
iterator
begin
()
{
return
iterator
(
this
,
TRAV
::
begin
());
}
inline
iterator
end
()
{
return
iterator
(
this
,
TRAV
::
end
());
}
};
// functions that return the traversor+iterator
// functions instead of typedef because function
// allows the compiler to deduce template param
template
<
typename
MAP
>
inline
Iteratorize
<
Traversor2VE
<
MAP
>
>
edgesIncidentToVertex2
(
const
MAP
&
m
,
Vertex
c
)
{
return
Iteratorize
<
Traversor2VE
<
MAP
>
>
(
m
,
c
);
}
template
<
typename
MAP
>
inline
Iteratorize
<
Traversor2VF
<
MAP
>
>
facesIncidentToVertex2
(
const
MAP
&
m
,
Vertex
c
)
{
return
Iteratorize
<
Traversor2VF
<
MAP
>
>
(
m
,
c
);
}
template
<
typename
MAP
>
inline
Iteratorize
<
Traversor2EV
<
MAP
>
>
verticesIncidentToEdge2
(
const
MAP
&
m
,
Edge
c
)
{
return
Iteratorize
<
Traversor2EV
<
MAP
>
>
(
m
,
c
);
}
template
<
typename
MAP
>
inline
Iteratorize
<
Traversor2EF
<
MAP
>
>
facesIncidentToEdge2
(
const
MAP
&
m
,
Edge
c
)
{
return
Iteratorize
<
Traversor2EF
<
MAP
>
>
(
m
,
c
);
}
template
<
typename
MAP
>
inline
Iteratorize
<
Traversor2FV
<
MAP
>
>
verticesIncidentToFace2
(
const
MAP
&
m
,
Face
c
)
{
return
Iteratorize
<
Traversor2FV
<
MAP
>
>
(
m
,
c
);
}
template
<
typename
MAP
>
inline
Iteratorize
<
Traversor2FE
<
MAP
>
>
edgesIncidentToFace2
(
const
MAP
&
m
,
Face
c
)
{
return
Iteratorize
<
Traversor2FE
<
MAP
>
>
(
m
,
c
);
}
template
<
typename
MAP
>
inline
Iteratorize
<
Traversor2VVaE
<
MAP
>
>
verticesAdjacentByEdge2
(
const
MAP
&
m
,
Vertex
c
)
{
return
Iteratorize
<
Traversor2VVaE
<
MAP
>
>
(
m
,
c
);
}
template
<
typename
MAP
>
inline
Iteratorize
<
Traversor2VVaF
<
MAP
>
>
verticesAdjacentByFace2
(
const
MAP
&
m
,
Vertex
c
)
{
return
Iteratorize
<
Traversor2VVaF
<
MAP
>
>
(
m
,
c
);
}
template
<
typename
MAP
>
inline
Iteratorize
<
Traversor2EEaV
<
MAP
>
>
edgesAdjacentByVertex2
(
const
MAP
&
m
,
Edge
c
)
{
return
Iteratorize
<
Traversor2EEaV
<
MAP
>
>
(
m
,
c
);
}
template
<
typename
MAP
>
inline
Iteratorize
<
Traversor2EEaF
<
MAP
>
>
edgesAdjacentByFace2
(
const
MAP
&
m
,
Edge
c
)
{
return
Iteratorize
<
Traversor2EEaF
<
MAP
>
>
(
m
,
c
);
}
template
<
typename
MAP
>
inline
Iteratorize
<
Traversor2FFaV
<
MAP
>
>
facesAdjacentByVertex2
(
const
MAP
&
m
,
Face
c
)
{
return
Iteratorize
<
Traversor2FFaV
<
MAP
>
>
(
m
,
c
);
}
template
<
typename
MAP
>
inline
Iteratorize
<
Traversor2FFaE
<
MAP
>
>
facesAdjacentByEdge2
(
const
MAP
&
m
,
Face
c
)
{
return
Iteratorize
<
Traversor2FFaE
<
MAP
>
>
(
m
,
c
);
}
}
// namespace CGoGN
#include "Topology/generic/traversor/traversor2.hpp"
...
...
include/Topology/generic/traversor/traversor3.h
View file @
29b48c13
...
...
@@ -82,9 +82,22 @@ public:
Traversor3XY
(
const
MAP
&
map
,
Cell
<
ORBX
>
c
,
MarkerForTraversor
<
MAP
,
ORBY
>&
tmo
,
bool
forceDartMarker
=
false
,
unsigned
int
thread
=
0
)
;
~
Traversor3XY
();
Traversor3XY
(
Traversor3XY
<
MAP
,
ORBX
,
ORBY
>&&
tra
)
:
m_map
(
tra
.
m_map
),
m_tradoo
(
std
::
move
(
tra
.
m_tradoo
))
{
m_dmark
=
tra
.
m_dmark
;
m_cmark
=
tra
.
m_cmark
;
m_current
=
tra
.
m_current
;
// m_tradoo = std::move(tra.m_tradoo);
}
Cell
<
ORBY
>
begin
()
;
Cell
<
ORBY
>
end
()
;
Cell
<
ORBY
>
next
()
;
typedef
Cell
<
ORBY
>
IterType
;
typedef
Cell
<
ORBX
>
ParamType
;
typedef
MAP
MapType
;
}
;
/**
...
...
@@ -108,6 +121,10 @@ public:
Cell
<
ORBX
>
begin
();
Cell
<
ORBX
>
end
();
Cell
<
ORBX
>
next
();
typedef
Cell
<
ORBX
>
IterType
;
typedef
Cell
<
ORBX
>
ParamType
;
typedef
MAP
MapType
;
};
/**
...
...
@@ -123,12 +140,15 @@ public:
/**
* Traverse edges incident to volume
*/
//template <typename MAP>
//class Traversor3WE: public Traversor3XY<MAP, VOLUME, EDGE>
//{
//public:
// Traversor3WE(const MAP& m, Vol dart, bool forceDartMarker = false, unsigned int thread = 0) : Traversor3XY<MAP, VOLUME, EDGE>(m, dart, forceDartMarker, thread) {}
//};
template
<
typename
MAP
>
class
Traversor3WE
:
public
Traversor3XY
<
MAP
,
VOLUME
,
EDGE
>
{
public:
Traversor3WE
(
const
MAP
&
m
,
Vol
dart
,
bool
forceDartMarker
=
false
,
unsigned
int
thread
=
0
)
:
Traversor3XY
<
MAP
,
VOLUME
,
EDGE
>
(
m
,
dart
,
forceDartMarker
,
thread
)
{}
};
using
Traversor3WE
=
Traversor3XY
<
MAP
,
VOLUME
,
EDGE
>
;
/**
* Traverse faces incident to volume
...
...
@@ -369,6 +389,212 @@ inline void foreach_adjacent3(MAP& map, Cell<ORBIT> c, FUNC f, bool forceDartMar
}
/**
* template classs that add iterator to Traversor
* to allow the use of c++11 syntax for (auto d : v)
*/
template
<
typename
TRAV
>
class
Iteratorize3
:
public
TRAV
{
public:
typedef
typename
TRAV
::
MapType
MAP
;
typedef
typename
TRAV
::
IterType
ITER
;
typedef
typename
TRAV
::
ParamType
PARAM
;
Iteratorize3
(
const
MAP
&
map
,
PARAM
p
)
:
TRAV
(
map
,
p
){}
class
iterator
{
Iteratorize3
<
TRAV
>*
m_ptr
;
ITER
m_index
;
public:
inline
iterator
(
Iteratorize3
<
TRAV
>*
p
,
ITER
i
)
:
m_ptr
(
p
),
m_index
(
i
){}
inline
iterator
&
operator
++
()
{
m_index
=
m_ptr
->
next
();
return
*
this
;
}
inline
ITER
&
operator
*
()
{
return
m_index
;
}
inline
bool
operator
!=
(
const
iterator
&
it
)
{
return
m_index
.
dart
!=
it
.
m_index
.
dart
;
}
};
inline
iterator
begin
()
{
return
iterator
(
this
,
TRAV
::
begin
());
}
inline
iterator
end
()
{
return
iterator
(
this
,
TRAV
::
end
());
}
};
// functions that return the traversor+iterator
// functions instead of typedef because function
// allows the compiler to deduce template param
template
<
typename
MAP
>
inline
Iteratorize3
<
Traversor3VE
<
MAP
>
>
edgesIncidentToVertex3
(
const
MAP
&
m
,
Vertex
c
)
{
return
Iteratorize3
<
Traversor3VE
<
MAP
>
>
(
m
,
c
);
}
template
<
typename
MAP
>
inline
Iteratorize3
<
Traversor3VF
<
MAP
>
>
facesIncidentToVertex3
(
const
MAP
&
m
,
Vertex
c
)
{
return
Iteratorize3
<
Traversor3VF
<
MAP
>
>
(
m
,
c
);
}
template
<
typename
MAP
>
inline
Iteratorize3
<
Traversor3VW
<
MAP
>
>
VolumesIncidentToVertex3
(
const
MAP
&
m
,
Vertex
c
)
{
return
Iteratorize3
<
Traversor3VW
<
MAP
>
>
(
m
,
c
);
}
template
<
typename
MAP
>
inline
Iteratorize3
<
Traversor3EV
<
MAP
>
>
verticesIncidentToEdge3
(
const
MAP
&
m
,
Edge
c
)
{
return
Iteratorize3
<
Traversor3EV
<
MAP
>
>
(
m
,
c
);
}
template
<
typename
MAP
>
inline
Iteratorize3
<
Traversor3EF
<
MAP
>
>
facesIncidentToEdge3
(
const
MAP
&
m
,
Edge
c
)
{
return
Iteratorize3
<
Traversor3EF
<
MAP
>
>
(
m
,
c
);
}
template
<
typename
MAP
>
inline
Iteratorize3
<
Traversor3EW
<
MAP
>
>
volumesIncidentToEdge3
(
const
MAP
&
m
,
Edge
c
)
{
return
Iteratorize3
<
Traversor3EW
<
MAP
>
>
(
m
,
c
);
}
template
<
typename
MAP
>
inline
Iteratorize3
<
Traversor3FV
<
MAP
>
>
verticesIncidentToFace3
(
const
MAP
&
m
,
Face
c
)
{
return
Iteratorize3
<
Traversor3FV
<
MAP
>
>
(
m
,
c
);
}
template
<
typename
MAP
>
inline
Iteratorize3
<
Traversor3FE
<
MAP
>
>
edgesIncidentToFace3
(
const
MAP
&
m
,
Face
c
)
{
return
Iteratorize3
<
Traversor3FE
<
MAP
>
>
(
m
,
c
);
}
template
<
typename
MAP
>
inline
Iteratorize3
<
Traversor3FW
<
MAP
>
>
volumesIncidentToFace3
(
const
MAP
&
m
,
Face
c
)
{
return
Iteratorize3
<
Traversor3FW
<
MAP
>
>
(
m
,
c
);
}
template
<
typename
MAP
>
inline
Iteratorize3
<
Traversor3WV
<
MAP
>
>
verticesIncidentToVolume3
(
const
MAP
&
m
,
Vol
c
)
{
return
Iteratorize3
<
Traversor3WV
<
MAP
>
>
(
m
,
c
);
}
template
<
typename
MAP
>
inline
Iteratorize3
<
Traversor3WE
<
MAP
>
>
edgesIncidentToVolume3
(
const
MAP
&
m
,
Vol
c
)
{
return
Iteratorize3
<
Traversor3WE
<
MAP
>
>
(
m
,
c
);
}
template
<
typename
MAP
>
inline
Iteratorize3
<
Traversor3WF
<
MAP
>
>
facesIncidentToVolume3
(
const
MAP
&
m
,
Vol
c
)
{
return
Iteratorize3
<
Traversor3WF
<
MAP
>
>
(
m
,
c
);
}
template
<
typename
MAP
>
inline
Iteratorize3
<
Traversor3VVaE
<
MAP
>
>
verticesAdjacentByEdge3
(
const
MAP
&
m
,
Vertex
c
)
{
return
Iteratorize3
<
Traversor3VVaE
<
MAP
>
>
(
m
,
c
);
}
template
<
typename
MAP
>
inline
Iteratorize3
<
Traversor3VVaF
<
MAP
>
>
verticesAdjacentByFace3
(
const
MAP
&
m
,
Vertex
c
)
{
return
Iteratorize3
<
Traversor3VVaF
<
MAP
>
>
(
m
,
c
);
}
template
<
typename
MAP
>
inline
Iteratorize3
<
Traversor3VVaW
<
MAP
>
>
verticesAdjacentByVolume3
(
const
MAP
&
m
,
Vertex
c
)
{
return
Iteratorize3
<
Traversor3VVaW
<
MAP
>
>
(
m
,
c
);
}
template
<
typename
MAP
>
inline
Iteratorize3
<
Traversor3EEaV
<
MAP
>
>
edgesAdjacentByVertex3
(
const
MAP
&
m
,
Edge
c
)
{
return
Iteratorize3
<
Traversor3EEaV
<
MAP
>
>
(
m
,
c
);
}
template
<
typename
MAP
>
inline
Iteratorize3
<
Traversor3EEaF
<
MAP
>
>
edgesAdjacentByFace3
(
const
MAP
&
m
,
Edge
c
)
{
return
Iteratorize3
<
Traversor3EEaF
<
MAP
>
>
(
m
,
c
);
}
template
<
typename
MAP
>
inline
Iteratorize3
<
Traversor3EEaW
<
MAP
>
>
edgesAdjacentByVolume3
(
const
MAP
&
m
,
Edge
c
)
{
return
Iteratorize3
<
Traversor3EEaW
<
MAP
>
>
(
m
,
c
);
}
template
<
typename
MAP
>
inline
Iteratorize3
<
Traversor3FFaV
<
MAP
>
>
facesAdjacentByVertex3
(
const
MAP
&
m
,
Face
c
)
{
return
Iteratorize3
<
Traversor3FFaV
<
MAP
>
>
(
m
,
c
);
}
template
<
typename
MAP
>
inline
Iteratorize3
<
Traversor3FFaE
<
MAP
>
>
facesAdjacentByEdge3
(
const
MAP
&
m
,
Face
c
)
{
return
Iteratorize3
<
Traversor3FFaE
<
MAP
>
>
(
m
,
c
);
}
template
<
typename
MAP
>
inline
Iteratorize3
<
Traversor3FFaW
<
MAP
>
>
facesAdjacentByVolume3
(
const
MAP
&
m
,
Face
c
)
{
return
Iteratorize3
<
Traversor3FFaW
<
MAP
>
>
(
m
,
c
);
}
template
<
typename
MAP
>
inline
Iteratorize3
<
Traversor3WWaV
<
MAP
>
>
volumesAdjacentByVertex3
(
const
MAP
&
m
,
Vol
c
)
{
return
Iteratorize3
<
Traversor3WWaV
<
MAP
>
>
(
m
,
c
);
}
template
<
typename
MAP
>
inline
Iteratorize3
<
Traversor3WWaE
<
MAP
>
>
volumesAdjacentByEdge3
(
const
MAP
&
m
,
Vol
c
)
{
return
Iteratorize3
<
Traversor3WWaE
<
MAP
>
>
(
m
,
c
);
}
template
<
typename
MAP
>
inline
Iteratorize3
<
Traversor3WWaF
<
MAP
>
>
volumesAdjacentByFace3
(
const
MAP
&
m
,
Vol
c
)
{
return
Iteratorize3
<
Traversor3WWaF
<
MAP
>
>
(
m
,
c
);
}
}
// namespace CGoGN
...
...
include/Topology/generic/traversor/traversorCell.h
View file @
29b48c13
...
...
@@ -186,8 +186,8 @@ public:
class
iterator
{
Cell
<
ORBIT
>
m_index
;
TraversorCell
<
MAP
,
ORBIT
,
OPT
>*
m_ptr
;
Cell
<
ORBIT
>
m_index
;
public:
...
...
@@ -223,6 +223,57 @@ public:
};
template
<
typename
MAP
>