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
995544b7
Commit
995544b7
authored
Mar 14, 2014
by
Pierre Kraemer
Browse files
update algos
parent
95da611e
Changes
2
Show whitespace changes
Inline
Side-by-side
include/Algo/BooleanOperator/mergeVertices.h
View file @
995544b7
...
...
@@ -42,13 +42,13 @@ namespace BooleanOperator
{
template
<
typename
PFP
>
bool
isBetween
(
typename
PFP
::
MAP
&
map
,
const
VertexAttribute
<
typename
PFP
::
VEC3
>&
positions
,
Dart
d
,
Dart
e
,
Dart
f
)
;
bool
isBetween
(
typename
PFP
::
MAP
&
map
,
const
VertexAttribute
<
typename
PFP
::
VEC3
,
typename
PFP
::
MAP
::
IMPL
>&
positions
,
Dart
d
,
Dart
e
,
Dart
f
)
;
template
<
typename
PFP
>
void
mergeVertex
(
typename
PFP
::
MAP
&
map
,
VertexAttribute
<
typename
PFP
::
VEC3
>&
positions
,
Dart
d
,
Dart
e
);
void
mergeVertex
(
typename
PFP
::
MAP
&
map
,
VertexAttribute
<
typename
PFP
::
VEC3
,
typename
PFP
::
MAP
::
IMPL
>&
positions
,
Dart
d
,
Dart
e
);
template
<
typename
PFP
>
void
mergeVertices
(
typename
PFP
::
MAP
&
map
,
VertexAttribute
<
typename
PFP
::
VEC3
>&
positions
);
void
mergeVertices
(
typename
PFP
::
MAP
&
map
,
VertexAttribute
<
typename
PFP
::
VEC3
,
typename
PFP
::
MAP
::
IMPL
>&
positions
);
}
...
...
include/Algo/BooleanOperator/mergeVertices.hpp
View file @
995544b7
...
...
@@ -35,7 +35,7 @@ namespace BooleanOperator
{
template
<
typename
PFP
>
bool
isBetween
(
typename
PFP
::
MAP
&
map
,
const
VertexAttribute
<
typename
PFP
::
VEC3
>&
positions
,
Dart
d
,
Dart
e
,
Dart
f
)
bool
isBetween
(
typename
PFP
::
MAP
&
map
,
const
VertexAttribute
<
typename
PFP
::
VEC3
,
typename
PFP
::
MAP
::
IMPL
>&
positions
,
Dart
d
,
Dart
e
,
Dart
f
)
{
return
CGoGN
::
Geom
::
isBetween
(
positions
[
map
.
phi1
(
d
)]
-
positions
[
d
],
positions
[
map
.
phi1
(
e
)]
-
positions
[
e
],
...
...
@@ -43,7 +43,7 @@ bool isBetween(typename PFP::MAP& map, const VertexAttribute<typename PFP::VEC3>
}
template
<
typename
PFP
>
void
mergeVertex
(
typename
PFP
::
MAP
&
map
,
VertexAttribute
<
typename
PFP
::
VEC3
>&
positions
,
Dart
d
,
Dart
e
,
int
precision
)
void
mergeVertex
(
typename
PFP
::
MAP
&
map
,
VertexAttribute
<
typename
PFP
::
VEC3
,
typename
PFP
::
MAP
::
IMPL
>&
positions
,
Dart
d
,
Dart
e
,
int
precision
)
{
assert
(
positions
[
d
].
isNear
(
positions
[
e
],
precision
)
&&
!
map
.
sameVertex
(
d
,
e
))
;
...
...
@@ -76,12 +76,12 @@ void mergeVertex(typename PFP::MAP& map, VertexAttribute<typename PFP::VEC3>& po
}
template
<
typename
PFP
>
void
mergeVertices
(
typename
PFP
::
MAP
&
map
,
VertexAttribute
<
typename
PFP
::
VEC3
>&
positions
,
int
precision
)
void
mergeVertices
(
typename
PFP
::
MAP
&
map
,
VertexAttribute
<
typename
PFP
::
VEC3
,
typename
PFP
::
MAP
::
IMPL
>&
positions
,
int
precision
)
{
// TODO optimiser en triant les sommets
// map.template enableQuickTraversal<VERTEX>();
TraversorV
<
typename
PFP
::
MAP
>
travV1
(
map
)
;
CellMarker
<
VERTEX
>
vM
(
map
);
CellMarker
<
typename
PFP
::
MAP
,
VERTEX
>
vM
(
map
);
for
(
Dart
d1
=
travV1
.
begin
()
;
d1
!=
travV1
.
end
()
;
d1
=
travV1
.
next
())
{
vM
.
mark
(
d1
);
...
...
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