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
David Cazier
CGoGN
Commits
2ef13a72
Commit
2ef13a72
authored
Jul 13, 2011
by
Basile Sauvage
Browse files
correction de Collector_WithinSphere::collectBorder()
parent
e6552f85
Changes
1
Hide whitespace changes
Inline
Side-by-side
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
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