Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
CGoGN
CGoGN
Commits
2ef13a72
Commit
2ef13a72
authored
Jul 13, 2011
by
Basile Sauvage
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
correction de Collector_WithinSphere::collectBorder()
parent
e6552f85
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
5 deletions
+16
-5
include/Algo/Selection/collector.hpp
include/Algo/Selection/collector.hpp
+16
-5
No files found.
include/Algo/Selection/collector.hpp
View file @
2ef13a72
...
...
@@ -208,9 +208,13 @@ void Collector_WithinSphere<PFP>::collectBorder(Dart d)
this
->
init
(
d
);
this
->
border
.
reserve
(
100
);
this
->
insideVertices
.
reserve
(
100
);
CellMarkerStore
vm
(
this
->
map
,
VERTEX
);
// mark the collected inside-vertices
CellMarkerStore
em
(
this
->
map
,
EDGE
);
// mark the collected inside-edges + border-edges
CellMarkerStore
fm
(
this
->
map
,
FACE
);
// mark the collected inside-faces + border-faces
this
->
insideVertices
.
push_back
(
this
->
centerDart
);
vm
.
mark
(
this
->
centerDart
);
VEC3
centerPosition
=
this
->
position
[
d
];
unsigned
int
i
=
0
;
...
...
@@ -220,22 +224,29 @@ void Collector_WithinSphere<PFP>::collectBorder(Dart d)
Dart
e
=
end
;
do
{
if
(
!
em
.
isMarked
(
e
)
||
!
fm
.
isMarked
(
e
))
// are both tests useful ?
if
(
!
em
.
isMarked
(
e
)
)
{
const
Dart
f
=
this
->
map
.
phi1
(
e
);
const
Dart
g
=
this
->
map
.
phi1
(
f
);
if
(
!
Geom
::
isPointInSphere
(
this
->
position
[
f
],
centerPosition
,
this
->
radius
))
{
this
->
border
.
push_back
(
e
);
// add to border
em
.
mark
(
e
);
fm
.
mark
(
e
);
// is it useful ?
}
else
{
if
(
!
vm
.
isMarked
(
f
))
{
this
->
insideVertices
.
push_back
(
f
);
vm
.
mark
(
f
);
}
}
em
.
mark
(
e
);
}
e
=
this
->
map
.
alpha1
(
e
);
}
while
(
e
!=
end
);
++
i
;
}
this
->
insideVertices
.
clear
();
}
template
<
typename
PFP
>
...
...
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