Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Thomas Pitiot
CGoGN
Commits
29130379
Commit
29130379
authored
Apr 24, 2014
by
Sylvain Thery
Browse files
traversor & foreach macros tutos
parent
40687654
Changes
5
Hide whitespace changes
Inline
Side-by-side
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
Supports
Markdown
0%
Try again
or
attach a new 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