Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
CGoGN
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Sauvage
CGoGN
Commits
f548bb67
Commit
f548bb67
authored
Jan 09, 2012
by
untereiner
Browse files
Options
Browse Files
Download
Plain Diff
Merge cgogn:~cgogn/CGoGN
parents
f642a77e
7a24e258
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
0 additions
and
88 deletions
+0
-88
include/Algo/Geometry/feature.h
include/Algo/Geometry/feature.h
+0
-3
include/Algo/Geometry/feature.hpp
include/Algo/Geometry/feature.hpp
+0
-85
No files found.
include/Algo/Geometry/feature.h
View file @
f548bb67
...
@@ -40,9 +40,6 @@ void featureEdgeDetection(typename PFP::MAP& map, const typename PFP::TVEC3& pos
...
@@ -40,9 +40,6 @@ void featureEdgeDetection(typename PFP::MAP& map, const typename PFP::TVEC3& pos
template
<
typename
PFP
>
template
<
typename
PFP
>
std
::
vector
<
typename
PFP
::
VEC3
>
occludingContoursDetection
(
typename
PFP
::
MAP
&
map
,
const
typename
PFP
::
VEC3
&
cameraPosition
,
const
typename
PFP
::
TVEC3
&
position
,
const
typename
PFP
::
TVEC3
&
normal
)
;
std
::
vector
<
typename
PFP
::
VEC3
>
occludingContoursDetection
(
typename
PFP
::
MAP
&
map
,
const
typename
PFP
::
VEC3
&
cameraPosition
,
const
typename
PFP
::
TVEC3
&
position
,
const
typename
PFP
::
TVEC3
&
normal
)
;
template
<
typename
PFP
>
std
::
vector
<
typename
PFP
::
VEC3
>
featureLinesDetection
(
typename
PFP
::
MAP
&
map
,
const
typename
PFP
::
TVEC3
&
position
,
const
typename
PFP
::
TVEC3
&
normal
)
;
}
// namespace Geometry
}
// namespace Geometry
}
// namespace Algo
}
// namespace Algo
...
...
include/Algo/Geometry/feature.hpp
View file @
f548bb67
...
@@ -112,91 +112,6 @@ std::vector<typename PFP::VEC3> occludingContoursDetection(typename PFP::MAP& ma
...
@@ -112,91 +112,6 @@ std::vector<typename PFP::VEC3> occludingContoursDetection(typename PFP::MAP& ma
return
occludingContours
;
return
occludingContours
;
}
}
template
<
typename
PFP
>
std
::
vector
<
typename
PFP
::
VEC3
>
featureLinesDetection
(
typename
PFP
::
MAP
&
map
,
const
typename
PFP
::
TVEC3
&
position
,
const
typename
PFP
::
TVEC3
&
normal
)
{
typedef
typename
PFP
::
VEC3
VEC3
;
typedef
typename
PFP
::
REAL
REAL
;
std
::
vector
<
VEC3
>
featureLines
;
Geom
::
BoundingBox
<
VEC3
>
bb
=
Algo
::
Geometry
::
computeBoundingBox
<
PFP
>
(
map
,
position
)
;
AttributeHandler
<
REAL
>
edgeangle
=
map
.
template
getAttribute
<
REAL
>(
EDGE
,
"edgeangle"
)
;
if
(
!
edgeangle
.
isValid
())
{
edgeangle
=
map
.
template
addAttribute
<
REAL
>(
EDGE
,
"edgeangle"
)
;
Algo
::
Geometry
::
computeAnglesBetweenNormalsOnEdges
<
PFP
>
(
map
,
position
,
edgeangle
)
;
}
AttributeHandler
<
REAL
>
kmax
=
map
.
template
getAttribute
<
REAL
>(
VERTEX
,
"kmax"
)
;
AttributeHandler
<
REAL
>
kmin
=
map
.
template
getAttribute
<
REAL
>(
VERTEX
,
"kmin"
)
;
AttributeHandler
<
VEC3
>
Kmax
=
map
.
template
getAttribute
<
VEC3
>(
VERTEX
,
"Kmax"
)
;
AttributeHandler
<
VEC3
>
Kmin
=
map
.
template
getAttribute
<
VEC3
>(
VERTEX
,
"Kmin"
)
;
AttributeHandler
<
VEC3
>
Knormal
=
map
.
template
getAttribute
<
VEC3
>(
VERTEX
,
"Knormal"
)
;
// as all these attributes are computed simultaneously by computeCurvatureVertices
// one can assume that if one of them is not valid, the others must be created too
if
(
!
kmax
.
isValid
())
{
kmax
=
map
.
template
addAttribute
<
REAL
>(
VERTEX
,
"kmax"
)
;
kmin
=
map
.
template
addAttribute
<
REAL
>(
VERTEX
,
"kmin"
)
;
Kmax
=
map
.
template
addAttribute
<
VEC3
>(
VERTEX
,
"Kmax"
)
;
Kmin
=
map
.
template
addAttribute
<
VEC3
>(
VERTEX
,
"Kmin"
)
;
Knormal
=
map
.
template
addAttribute
<
VEC3
>(
VERTEX
,
"Knormal"
)
;
Algo
::
Geometry
::
computeCurvatureVertices_NormalCycles
<
PFP
>
(
map
,
0.01
f
*
bb
.
diagSize
(),
position
,
normal
,
edgeangle
,
kmax
,
kmin
,
Kmax
,
Kmin
,
Knormal
)
;
}
AttributeHandler
<
VEC3
>
kmaxGrad
=
map
.
template
addAttribute
<
VEC3
>(
FACE
,
"kmaxGrad"
)
;
AttributeHandler
<
VEC3
>
kminGrad
=
map
.
template
addAttribute
<
VEC3
>(
FACE
,
"kminGrad"
)
;
CellMarker
mf
(
map
,
FACE
)
;
for
(
Dart
d
=
map
.
begin
();
d
!=
map
.
end
();
map
.
next
(
d
))
{
if
(
!
mf
.
isMarked
(
d
))
{
mf
.
mark
(
d
)
;
Dart
v1
=
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
]
;
VEC3
n
=
Geom
::
triangleNormal
(
position
[
v1
],
position
[
v2
],
position
[
v3
])
;
n
.
normalize
()
;
VEC3
g1
=
(
n
^
v3v2
*
kmax
[
v1
])
+
(
n
^
v1v3
*
kmax
[
v2
])
+
(
n
^
v2v1
*
kmax
[
v3
])
;
VEC3
g2
=
(
n
^
v3v2
*
kmin
[
v1
])
+
(
n
^
v1v3
*
kmin
[
v2
])
+
(
n
^
v2v1
*
kmin
[
v3
])
;
g1
.
normalize
()
;
kmaxGrad
[
d
]
=
g1
;
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
}
// namespace Geometry
}
// namespace Algo
}
// namespace Algo
...
...
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