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
Philip Trettner
polymesh
Commits
43a4968a
Commit
43a4968a
authored
Jul 23, 2018
by
Philip Trettner
Browse files
farthest point
parent
d1c71af7
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/polymesh/algorithms/topology.hh
View file @
43a4968a
...
...
@@ -4,19 +4,22 @@
#include
"../Mesh.hh"
namespace
polymesh
{
namespace
polymesh
{
/// Given a face handle, returns the topologically farthest (but finite) face
/// (i.e. the last face that would be visited in a BFS)
face_handle
farthest_face
(
face_handle
f
);
/// ======== IMPLEMENTATION ========
/*
inline face_handle farthest_face(face_handle f)
inline
face_handle
farthest_face
(
face_handle
f
)
{
std
::
vector
<
face_index
>
q_curr
;
std
::
vector
<
face_index
>
q_next
;
auto
const
&
m
=
*
f
.
mesh
;
auto
visited
=
m
.
faces
().
make_attribute_with_default
(
false
);
q_curr
.
push_back
(
f
.
idx
);
face_handle
last_f
=
f
;
...
...
@@ -24,14 +27,21 @@ face_handle farthest_face(face_handle f);
while
(
!
q_curr
.
empty
())
{
for
(
auto
f
:
q_curr
)
{
// TODO
}
// visit neighbors
for
(
auto
ff
:
m
[
f
].
adjacent_faces
())
if
(
ff
.
is_valid
())
{
if
(
visited
[
ff
])
continue
;
visited
[
ff
]
=
true
;
last_f
=
ff
;
q_next
.
push_back
(
ff
);
}
std
::
swap
(
q_curr
,
q_next
);
}
return
last_f
;
}*/
}
}
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