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
Hurstel
CGoGN
Commits
235c12d8
Commit
235c12d8
authored
Nov 22, 2011
by
Pierre Kraemer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
suite feature detection
parent
13003306
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
30 additions
and
5 deletions
+30
-5
include/Algo/Geometry/feature.hpp
include/Algo/Geometry/feature.hpp
+27
-2
include/Algo/Geometry/normal.h
include/Algo/Geometry/normal.h
+1
-1
include/Algo/Geometry/normal.hpp
include/Algo/Geometry/normal.hpp
+2
-2
No files found.
include/Algo/Geometry/feature.hpp
View file @
235c12d8
...
...
@@ -164,8 +164,8 @@ std::vector<typename PFP::VEC3> featureLinesDetection(typename PFP::MAP& map, co
{
mf
.
mark
(
d
)
;
Dart
v1
=
d
;
Dart
v2
=
m
yM
ap
.
phi1
(
d
)
;
Dart
v3
=
m
yM
ap
.
phi_1
(
d
)
;
Dart
v2
=
map
.
phi1
(
d
)
;
Dart
v3
=
map
.
phi_1
(
d
)
;
VEC3
v3v2
=
position
[
v3
]
-
position
[
v2
]
;
VEC3
v1v3
=
position
[
v1
]
-
position
[
v3
]
;
VEC3
v2v1
=
position
[
v2
]
-
position
[
v1
]
;
...
...
@@ -178,6 +178,31 @@ std::vector<typename PFP::VEC3> featureLinesDetection(typename PFP::MAP& map, co
kminGrad
[
d
]
=
g2
;
}
}
AttributeHandler
<
VEC3
>
Ekmax
=
map
.
template
addAttribute
<
VEC3
>(
VERTEX
,
"kmaxGradV"
)
;
AttributeHandler
<
VEC3
>
Ekmin
=
map
.
template
addAttribute
<
VEC3
>(
VERTEX
,
"kminGradV"
)
;
CellMarker
mv
(
map
,
VERTEX
)
;
for
(
Dart
d
=
map
.
begin
();
d
!=
map
.
end
();
map
.
next
(
d
))
{
if
(
!
mv
.
isMarked
(
d
))
{
mv
.
mark
(
d
)
;
REAL
res
=
0
;
REAL
sumArea
=
0
;
Dart
it
=
d
;
do
{
REAL
area
=
Algo
::
Geometry
::
triangleArea
<
PFP
>
(
map
,
it
,
position
)
;
res
+=
area
*
(
kmaxGrad
[
it
]
*
Kmax
[
d
])
;
sumArea
+=
area
;
it
=
map
.
alpha1
(
it
)
;
}
while
(
it
!=
d
)
;
res
/=
sumArea
;
}
}
return
featureLines
;
}
}
// namespace Geometry
...
...
include/Algo/Geometry/normal.h
View file @
235c12d8
...
...
@@ -63,7 +63,7 @@ template <typename PFP>
typename
PFP
::
REAL
computeAngleBetweenNormalsOnEdge
(
typename
PFP
::
MAP
&
map
,
Dart
d
,
typename
PFP
::
TVEC3
&
position
)
;
template
<
typename
PFP
>
void
computeAnglesBetweenNormalsOnEdges
(
typename
PFP
::
MAP
&
map
,
typename
PFP
::
TVEC3
&
position
,
typename
PFP
::
TREAL
&
angles
,
const
FunctorSelect
&
select
=
SelectorTrue
(),
unsigned
int
thread
=
0
)
;
void
computeAnglesBetweenNormalsOnEdges
(
typename
PFP
::
MAP
&
map
,
const
typename
PFP
::
TVEC3
&
position
,
typename
PFP
::
TREAL
&
angles
,
const
FunctorSelect
&
select
=
SelectorTrue
(),
unsigned
int
thread
=
0
)
;
}
// namespace Geometry
...
...
include/Algo/Geometry/normal.hpp
View file @
235c12d8
...
...
@@ -145,7 +145,7 @@ void computeNormalVertices(typename PFP::MAP& map, const typename PFP::TVEC3& po
}
template
<
typename
PFP
>
typename
PFP
::
REAL
computeAngleBetweenNormalsOnEdge
(
typename
PFP
::
MAP
&
map
,
Dart
d
,
typename
PFP
::
TVEC3
&
position
)
typename
PFP
::
REAL
computeAngleBetweenNormalsOnEdge
(
typename
PFP
::
MAP
&
map
,
Dart
d
,
const
typename
PFP
::
TVEC3
&
position
)
{
typedef
typename
PFP
::
VEC3
VEC3
;
...
...
@@ -175,7 +175,7 @@ typename PFP::REAL computeAngleBetweenNormalsOnEdge(typename PFP::MAP& map, Dart
}
template
<
typename
PFP
>
void
computeAnglesBetweenNormalsOnEdges
(
typename
PFP
::
MAP
&
map
,
typename
PFP
::
TVEC3
&
position
,
typename
PFP
::
TREAL
&
angles
,
const
FunctorSelect
&
select
,
unsigned
int
thread
)
void
computeAnglesBetweenNormalsOnEdges
(
typename
PFP
::
MAP
&
map
,
const
typename
PFP
::
TVEC3
&
position
,
typename
PFP
::
TREAL
&
angles
,
const
FunctorSelect
&
select
,
unsigned
int
thread
)
{
CellMarker
me
(
map
,
EDGE
,
thread
)
;
for
(
Dart
d
=
map
.
begin
();
d
!=
map
.
end
();
map
.
next
(
d
))
...
...
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