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
f587df38
Commit
f587df38
authored
Jul 23, 2018
by
Philip Trettner
Browse files
improved comp calc
parent
9cc357e2
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/polymesh/algorithms/components.hh
View file @
f587df38
...
...
@@ -28,7 +28,7 @@ inline vertex_attribute<int> vertex_components(Mesh const& m, int* comps)
for
(
auto
seed
:
m
.
vertices
())
if
(
comp
[
seed
]
==
-
1
)
{
std
::
queue
<
vertex_
handle
>
q
;
std
::
queue
<
vertex_
index
>
q
;
q
.
push
(
seed
);
seed
[
comp
]
=
c_cnt
;
...
...
@@ -37,7 +37,7 @@ inline vertex_attribute<int> vertex_components(Mesh const& m, int* comps)
auto
v
=
q
.
front
();
q
.
pop
();
for
(
auto
vv
:
v
.
adjacent_vertices
())
for
(
auto
vv
:
m
[
v
]
.
adjacent_vertices
())
if
(
vv
[
comp
]
!=
c_cnt
)
{
vv
[
comp
]
=
c_cnt
;
...
...
@@ -62,7 +62,7 @@ inline face_attribute<int> face_components(Mesh const& m, int* comps)
for
(
auto
seed
:
m
.
faces
())
if
(
comp
[
seed
]
==
-
1
)
{
std
::
queue
<
face_
handle
>
q
;
std
::
queue
<
face_
index
>
q
;
q
.
push
(
seed
);
seed
[
comp
]
=
c_cnt
;
...
...
@@ -71,7 +71,7 @@ inline face_attribute<int> face_components(Mesh const& m, int* comps)
auto
f
=
q
.
front
();
q
.
pop
();
for
(
auto
ff
:
f
.
adjacent_faces
())
for
(
auto
ff
:
m
[
f
]
.
adjacent_faces
())
if
(
ff
.
is_valid
())
if
(
ff
[
comp
]
!=
c_cnt
)
{
...
...
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