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
Hurstel
CGoGN
Commits
c6662a5f
Commit
c6662a5f
authored
Jan 16, 2013
by
Sauvage
Browse files
collector : ajout du bord dans le calcul des courbures par normal Cycles
parent
6041d67d
Changes
1
Hide whitespace changes
Inline
Side-by-side
include/Algo/Selection/collector.hpp
View file @
c6662a5f
...
...
@@ -165,6 +165,15 @@ void Collector_OneRing<PFP>::computeNormalCyclesTensor (const VertexAttribute<VE
tensor
+=
Geom
::
transposed_vectors_mult
(
e
,
e
)
*
edgeangle
[
*
it
]
*
(
1
/
e
.
norm
())
;
}
// collect edges on the border
// TODO : should be an option ?
// TODO : not boundary safe
for
(
std
::
vector
<
Dart
>::
const_iterator
it
=
this
->
border
.
begin
();
it
!=
this
->
border
.
end
();
++
it
)
{
const
VEC3
e
=
Algo
::
Geometry
::
vectorOutOfDart
<
PFP
>
(
this
->
map
,
*
it
,
pos
)
;
tensor
+=
Geom
::
transposed_vectors_mult
(
e
,
e
)
*
edgeangle
[
*
it
]
*
(
1
/
e
.
norm
())
;
}
tensor
/=
computeArea
(
pos
)
;
}
...
...
@@ -182,6 +191,16 @@ void Collector_OneRing<PFP>::computeNormalCyclesTensor (const VertexAttribute<VE
tensor
+=
Geom
::
transposed_vectors_mult
(
e
,
e
)
*
edgeangle
*
(
1
/
e
.
norm
())
;
}
// collect edges on the border
// TODO : should be an option ?
// TODO : not boundary safe
for
(
std
::
vector
<
Dart
>::
const_iterator
it
=
this
->
border
.
begin
();
it
!=
this
->
border
.
end
();
++
it
)
{
const
VEC3
e
=
Algo
::
Geometry
::
vectorOutOfDart
<
PFP
>
(
this
->
map
,
*
it
,
pos
)
;
const
REAL
edgeangle
=
Algo
::
Geometry
::
computeAngleBetweenNormalsOnEdge
<
PFP
>
(
this
->
map
,
*
it
,
pos
)
;
tensor
+=
Geom
::
transposed_vectors_mult
(
e
,
e
)
*
edgeangle
*
(
1
/
e
.
norm
())
;
}
tensor
/=
computeArea
(
pos
)
;
}
...
...
@@ -271,6 +290,15 @@ void Collector_OneRing_AroundEdge<PFP>::computeNormalCyclesTensor (const VertexA
tensor
+=
Geom
::
transposed_vectors_mult
(
e
,
e
)
*
edgeangle
[
*
it
]
*
(
1
/
e
.
norm
())
;
}
// collect edges on the border
// TODO : should be an option ?
// TODO : not boundary safe
for
(
std
::
vector
<
Dart
>::
const_iterator
it
=
this
->
border
.
begin
();
it
!=
this
->
border
.
end
();
++
it
)
{
const
VEC3
e
=
Algo
::
Geometry
::
vectorOutOfDart
<
PFP
>
(
this
->
map
,
*
it
,
pos
)
;
tensor
+=
Geom
::
transposed_vectors_mult
(
e
,
e
)
*
edgeangle
[
*
it
]
*
(
1
/
e
.
norm
())
;
}
tensor
/=
computeArea
(
pos
)
;
}
...
...
@@ -288,6 +316,16 @@ void Collector_OneRing_AroundEdge<PFP>::computeNormalCyclesTensor (const VertexA
tensor
+=
Geom
::
transposed_vectors_mult
(
e
,
e
)
*
edgeangle
*
(
1
/
e
.
norm
())
;
}
// collect edges on the border
// TODO : should be an option ?
// TODO : not boundary safe
for
(
std
::
vector
<
Dart
>::
const_iterator
it
=
this
->
border
.
begin
();
it
!=
this
->
border
.
end
();
++
it
)
{
const
VEC3
e
=
Algo
::
Geometry
::
vectorOutOfDart
<
PFP
>
(
this
->
map
,
*
it
,
pos
)
;
const
REAL
edgeangle
=
Algo
::
Geometry
::
computeAngleBetweenNormalsOnEdge
<
PFP
>
(
this
->
map
,
*
it
,
pos
)
;
tensor
+=
Geom
::
transposed_vectors_mult
(
e
,
e
)
*
edgeangle
*
(
1
/
e
.
norm
())
;
}
tensor
/=
computeArea
(
pos
)
;
}
...
...
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