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
KennethVanhoey
CGoGN
Commits
2d102c8d
Commit
2d102c8d
authored
Aug 27, 2012
by
Sylvain Thery
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
debug // version of curvature
parent
5feedc27
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
83 additions
and
4 deletions
+83
-4
include/Algo/Geometry/curvature.h
include/Algo/Geometry/curvature.h
+15
-2
include/Algo/Geometry/curvature.hpp
include/Algo/Geometry/curvature.hpp
+68
-2
No files found.
include/Algo/Geometry/curvature.h
View file @
2d102c8d
...
...
@@ -117,7 +117,7 @@ void computeCurvatureVertex_NormalCycles(
VertexAttribute
<
typename
PFP
::
VEC3
>&
Kmin
,
VertexAttribute
<
typename
PFP
::
VEC3
>&
Knormal
,
unsigned
int
thread
=
0
)
;
}
// namespace Geometry
namespace
Parallel
{
...
...
@@ -135,8 +135,21 @@ void computeCurvatureVertices_NormalCycles(
VertexAttribute
<
typename
PFP
::
VEC3
>&
Knormal
,
const
FunctorSelect
&
select
=
allDarts
,
unsigned
int
nbth
=
0
,
unsigned
int
current_thread
=
0
)
;
}
template
<
typename
PFP
>
void
computeCurvatureVertices_QuadraticFitting
(
typename
PFP
::
MAP
&
map
,
const
VertexAttribute
<
typename
PFP
::
VEC3
>&
position
,
const
VertexAttribute
<
typename
PFP
::
VEC3
>&
normal
,
VertexAttribute
<
typename
PFP
::
REAL
>&
kmax
,
VertexAttribute
<
typename
PFP
::
REAL
>&
kmin
,
VertexAttribute
<
typename
PFP
::
VEC3
>&
Kmax
,
VertexAttribute
<
typename
PFP
::
VEC3
>&
Kmin
,
const
FunctorSelect
&
select
=
allDarts
,
unsigned
int
nbth
=
0
,
unsigned
int
current_thread
=
0
);
}
// namespace Parallel
}
// namespace Geometry
}
// namespace Algo
...
...
include/Algo/Geometry/curvature.hpp
View file @
2d102c8d
...
...
@@ -415,12 +415,12 @@ public:
m_kmin
(
kmin
),
m_Kmax
(
Kmax
),
m_Kmin
(
Kmin
),
m_Knormal
(
normal
)
m_Knormal
(
K
normal
)
{
}
void
run
(
Dart
d
,
unsigned
int
threadID
)
{
computeCurvatureVertex_NormalCycles
<
PFP
>
(
map
,
d
,
radius
,
position
,
normal
,
edgeangle
,
kmax
,
kmin
,
Kmax
,
Kmin
,
Knormal
,
threadID
)
;
computeCurvatureVertex_NormalCycles
<
PFP
>
(
this
->
m_
map
,
d
,
m_
radius
,
m_
position
,
m_
normal
,
m_
edgeangle
,
m_
kmax
,
m_
kmin
,
m_
Kmax
,
m_
Kmin
,
m_
Knormal
,
threadID
)
;
}
};
...
...
@@ -438,12 +438,78 @@ void computeCurvatureVertices_NormalCycles(
VertexAttribute
<
typename
PFP
::
VEC3
>&
Knormal
,
const
FunctorSelect
&
select
,
unsigned
int
nbth
,
unsigned
int
current_thread
)
{
// WAHOO BIG PROBLEM WITH LAZZY EMBEDDING !!!
if
(
!
map
.
template
isOrbitEmbedded
<
VERTEX
>())
{
CellMarkerNoUnmark
<
VERTEX
>
cm
(
map
);
map
.
template
initOrbitEmbedding
<
VERTEX
>();
}
if
(
!
map
.
template
isOrbitEmbedded
<
EDGE
>())
{
CellMarkerNoUnmark
<
EDGE
>
cm
(
map
);
map
.
template
initOrbitEmbedding
<
EDGE
>();
}
if
(
!
map
.
template
isOrbitEmbedded
<
FACE
>())
{
CellMarkerNoUnmark
<
FACE
>
cm
(
map
);
map
.
template
initOrbitEmbedding
<
FACE
>();
}
FunctorComputeCurvatureVertices_NormalCycles
<
PFP
>
funct
(
map
,
radius
,
position
,
normal
,
edgeangle
,
kmax
,
kmin
,
Kmax
,
Kmin
,
Knormal
);
Algo
::
Parallel
::
foreach_cell
<
typename
PFP
::
MAP
,
VERTEX
>
(
map
,
funct
,
nbth
,
true
,
select
,
current_thread
);
}
template
<
typename
PFP
>
class
FunctorComputeCurvatureVertices_QuadraticFitting
:
public
FunctorMapThreaded
<
typename
PFP
::
MAP
>
{
const
VertexAttribute
<
typename
PFP
::
VEC3
>&
m_position
;
const
VertexAttribute
<
typename
PFP
::
VEC3
>&
m_normal
;
VertexAttribute
<
typename
PFP
::
REAL
>&
m_kmax
;
VertexAttribute
<
typename
PFP
::
REAL
>&
m_kmin
;
VertexAttribute
<
typename
PFP
::
VEC3
>&
m_Kmax
;
VertexAttribute
<
typename
PFP
::
VEC3
>&
m_Kmin
;
public:
FunctorComputeCurvatureVertices_QuadraticFitting
(
typename
PFP
::
MAP
&
map
,
const
VertexAttribute
<
typename
PFP
::
VEC3
>&
position
,
const
VertexAttribute
<
typename
PFP
::
VEC3
>&
normal
,
VertexAttribute
<
typename
PFP
::
REAL
>&
kmax
,
VertexAttribute
<
typename
PFP
::
REAL
>&
kmin
,
VertexAttribute
<
typename
PFP
::
VEC3
>&
Kmax
,
VertexAttribute
<
typename
PFP
::
VEC3
>&
Kmin
)
:
FunctorMapThreaded
<
typename
PFP
::
MAP
>
(
map
),
m_position
(
position
),
m_normal
(
normal
),
m_kmax
(
kmax
),
m_kmin
(
kmin
),
m_Kmax
(
Kmax
),
m_Kmin
(
Kmin
)
{
}
void
run
(
Dart
d
,
unsigned
int
threadID
)
{
computeCurvatureVertex_QuadraticFitting
<
PFP
>
(
this
->
m_map
,
d
,
m_position
,
m_normal
,
m_kmax
,
m_kmin
,
m_Kmax
,
m_Kmin
)
;
}
};
template
<
typename
PFP
>
void
computeCurvatureVertices_QuadraticFitting
(
typename
PFP
::
MAP
&
map
,
const
VertexAttribute
<
typename
PFP
::
VEC3
>&
position
,
const
VertexAttribute
<
typename
PFP
::
VEC3
>&
normal
,
VertexAttribute
<
typename
PFP
::
REAL
>&
kmax
,
VertexAttribute
<
typename
PFP
::
REAL
>&
kmin
,
VertexAttribute
<
typename
PFP
::
VEC3
>&
Kmax
,
VertexAttribute
<
typename
PFP
::
VEC3
>&
Kmin
,
const
FunctorSelect
&
select
,
unsigned
int
nbth
,
unsigned
int
current_thread
)
{
FunctorComputeCurvatureVertices_QuadraticFitting
<
PFP
>
funct
(
map
,
position
,
normal
,
kmax
,
kmin
,
Kmax
,
Kmin
);
Algo
::
Parallel
::
foreach_cell
<
typename
PFP
::
MAP
,
VERTEX
>
(
map
,
funct
,
nbth
,
true
,
select
,
current_thread
);
}
}
// namespace Parallel
}
// namespace Geometry
...
...
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