Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
CGoGN
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Thomas Pitiot
CGoGN
Commits
29130379
Commit
29130379
authored
Apr 24, 2014
by
Sylvain Thery
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
traversor & foreach macros tutos
parent
40687654
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
21 additions
and
6 deletions
+21
-6
Apps/CMakeLists.txt
Apps/CMakeLists.txt
+2
-0
Apps/Tuto/CMakeLists.txt
Apps/Tuto/CMakeLists.txt
+5
-5
include/Topology/generic/cells.h
include/Topology/generic/cells.h
+2
-0
include/Topology/generic/cells_macros.h
include/Topology/generic/cells_macros.h
+11
-0
include/Topology/generic/dart.h
include/Topology/generic/dart.h
+1
-1
No files found.
Apps/CMakeLists.txt
View file @
29130379
...
...
@@ -34,3 +34,5 @@ IF (WITH_QT)
ENDIF
(
WITH_QT
)
add_subdirectory
(
Examples/Tests
)
add_subdirectory
(
Tuto/Traversals
)
Apps/Tuto/CMakeLists.txt
View file @
29130379
...
...
@@ -71,11 +71,11 @@ add_executable( tuto_orbits tuto_orbits.cpp ${tuto_orbits_ui} ${tuto_orbits_moc}
target_link_libraries
(
tuto_orbits
${
CGoGN_LIBS_D
}
${
CGoGN_EXT_LIBS
}
)
QT4_WRAP_UI
(
show_traversors_ui show_traversors.ui
)
QT4_WRAP_CPP
(
show_traversors_moc show_traversors.h
)
add_executable
(
show_traversors show_traversors.cpp
${
show_traversors_ui
}
${
show_traversors_moc
}
)
target_link_libraries
(
show_traversors
${
CGoGN_LIBS_D
}
${
CGoGN_EXT_LIBS
}
)
#
QT4_WRAP_UI( show_traversors_ui show_traversors.ui )
#
QT4_WRAP_CPP(show_traversors_moc show_traversors.h)
#
add_executable( show_traversors show_traversors.cpp ${show_traversors_ui} ${show_traversors_moc})
#
target_link_libraries( show_traversors
#
${CGoGN_LIBS_D} ${CGoGN_EXT_LIBS} )
add_executable
(
tuto_subdivision tuto_subdivision.cpp
)
target_link_libraries
(
tuto_subdivision
...
...
include/Topology/generic/cells.h
View file @
29130379
...
...
@@ -52,6 +52,8 @@ public:
inline
Cell
(
const
Cell
<
ORBIT
>&
c
)
:
dart
(
c
.
dart
)
{}
/// Dart cast operator
inline
operator
Dart
()
const
{
return
dart
;}
friend
std
::
ostream
&
operator
<<
(
std
::
ostream
&
out
,
const
Cell
<
ORBIT
>&
fa
)
{
return
out
<<
fa
.
dart
;
}
inline
bool
valid
()
const
{
return
!
dart
.
isNil
();}
};
typedef
Cell
<
VERTEX
>
Vertex
;
...
...
include/Topology/generic/cells_macros.h
View file @
29130379
...
...
@@ -101,6 +101,17 @@ for (Cell<ORBIT> Cell_ITER ( Cell_ITER##_TraversalMacroLocalLoop##LNN.begin()),
#define foreachCellMT(ORBIT, Cell_ITER, MAP_TYPE, MAP_PARAM, THREAD) XforeachCellMT(ORBIT, Cell_ITER, MAP_TYPE, MAP_PARAM, THREAD,__LINE__)
#define YfindCell(ORBIT, Cell_ITER, MAP_TYPE, MAP_PARAM, COND, LNN)\
TraversorCell<MAP_TYPE,ORBIT> Cell_ITER##_TraversalMacroLocalLoop##LNN(MAP_PARAM);\
Dart Cell_ITER##_endTMLoop = Cell_ITER##_TraversalMacroLocalLoop##LNN.end();\
Cell_ITER = Cell_ITER##_TraversalMacroLocalLoop##LNN.begin(); \
while( (Cell_ITER.dart != Cell_ITER##_endTMLoop) && (!(COND)) )\
Cell_ITER.dart = Cell_ITER##_TraversalMacroLocalLoop##LNN.next();
#define XfindCell(ORBIT, Cell_ITER, MAP_TYPE, MAP_PARAM, COND, LNN) YfindCell(ORBIT, Cell_ITER, MAP_TYPE, MAP_PARAM,COND,LNN)
#define findCell(ORBIT, Cell_ITER, MAP_TYPE, MAP_PARAM, COND) XfindCell(ORBIT, Cell_ITER, MAP_TYPE, MAP_PARAM,COND,__LINE__)
}
#endif
/* __CELLS_MACRO_H_ */
include/Topology/generic/dart.h
View file @
29130379
...
...
@@ -67,7 +67,7 @@ struct Dart
Dart
(
unsigned
int
v
)
:
index
(
v
)
{}
bool
isNil
()
{
return
index
==
0xffffffff
;
}
bool
isNil
()
const
{
return
index
==
0xffffffff
;
}
/**
* affectation operator
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment