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
David Cazier
CGoGN
Commits
2503edce
Commit
2503edce
authored
May 12, 2014
by
Pierre Kraemer
Browse files
bug fix (thread parameter)
parent
7f5f7fe0
Changes
2
Hide whitespace changes
Inline
Side-by-side
include/Algo/Geometry/curvature.h
View file @
2503edce
...
...
@@ -58,7 +58,8 @@ void computeCurvatureVertices_QuadraticFitting(
VertexAttribute
<
typename
PFP
::
REAL
,
typename
PFP
::
MAP
::
IMPL
>&
kmax
,
VertexAttribute
<
typename
PFP
::
REAL
,
typename
PFP
::
MAP
::
IMPL
>&
kmin
,
VertexAttribute
<
typename
PFP
::
VEC3
,
typename
PFP
::
MAP
::
IMPL
>&
Kmax
,
VertexAttribute
<
typename
PFP
::
VEC3
,
typename
PFP
::
MAP
::
IMPL
>&
Kmin
)
;
VertexAttribute
<
typename
PFP
::
VEC3
,
typename
PFP
::
MAP
::
IMPL
>&
Kmin
,
unsigned
int
thread
=
0
)
;
template
<
typename
PFP
>
void
computeCurvatureVertex_QuadraticFitting
(
...
...
include/Algo/Geometry/curvature.hpp
View file @
2503edce
...
...
@@ -47,7 +47,8 @@ void computeCurvatureVertices_QuadraticFitting(
VertexAttribute
<
typename
PFP
::
REAL
,
typename
PFP
::
MAP
::
IMPL
>&
kmax
,
VertexAttribute
<
typename
PFP
::
REAL
,
typename
PFP
::
MAP
::
IMPL
>&
kmin
,
VertexAttribute
<
typename
PFP
::
VEC3
,
typename
PFP
::
MAP
::
IMPL
>&
Kmax
,
VertexAttribute
<
typename
PFP
::
VEC3
,
typename
PFP
::
MAP
::
IMPL
>&
Kmin
)
VertexAttribute
<
typename
PFP
::
VEC3
,
typename
PFP
::
MAP
::
IMPL
>&
Kmin
,
unsigned
int
thread
)
{
if
((
CGoGN
::
Parallel
::
NumberOfThreads
>
1
)
&&
(
thread
==
0
))
...
...
@@ -60,7 +61,7 @@ void computeCurvatureVertices_QuadraticFitting(
{
computeCurvatureVertex_QuadraticFitting
<
PFP
>
(
map
,
v
,
position
,
normal
,
kmax
,
kmin
,
Kmax
,
Kmin
)
;
}
,
FORCE_CELL_MARKING
,
thread
);
,
FORCE_CELL_MARKING
,
thread
);
// TraversorV<typename PFP::MAP> t(map) ;
// for(Vertex v = t.begin(); v != t.end(); v = t.next())
...
...
@@ -639,6 +640,7 @@ void normalCycles_ProjectTensor(Geom::Matrix<3,3,typename PFP::REAL>& tensor, co
namespace
Parallel
{
template
<
typename
PFP
>
void
computeCurvatureVertices_NormalCycles
(
typename
PFP
::
MAP
&
map
,
...
...
@@ -654,28 +656,20 @@ void computeCurvatureVertices_NormalCycles(
{
// WAHOO BIG PROBLEM WITH LAZZY EMBEDDING !!!
if
(
!
map
.
template
isOrbitEmbedded
<
VERTEX
>())
{
CellMarkerNoUnmark
<
typename
PFP
::
MAP
,
VERTEX
>
cm
(
map
);
map
.
template
initAllOrbitsEmbedding
<
VERTEX
>();
}
Algo
::
Topo
::
initAllOrbitsEmbedding
<
VERTEX
>
(
map
);
if
(
!
map
.
template
isOrbitEmbedded
<
EDGE
>())
{
CellMarkerNoUnmark
<
typename
PFP
::
MAP
,
EDGE
>
cm
(
map
);
map
.
template
initAllOrbitsEmbedding
<
EDGE
>();
}
Algo
::
Topo
::
initAllOrbitsEmbedding
<
EDGE
>
(
map
);
if
(
!
map
.
template
isOrbitEmbedded
<
FACE
>())
{
CellMarkerNoUnmark
<
typename
PFP
::
MAP
,
FACE
>
cm
(
map
);
map
.
template
initAllOrbitsEmbedding
<
FACE
>();
}
Algo
::
Topo
::
initAllOrbitsEmbedding
<
FACE
>
(
map
);
Parallel
::
foreach_cell
<
VERTEX
>
(
map
,[
&
](
Vertex
v
,
unsigned
int
threadID
)
CGoGN
::
Parallel
::
foreach_cell
<
VERTEX
>
(
map
,[
&
](
Vertex
v
,
unsigned
int
threadID
)
{
computeCurvatureVertex_NormalCycles
<
PFP
>
(
map
,
v
,
radius
,
position
,
normal
,
edgeangle
,
kmax
,
kmin
,
Kmax
,
Kmin
,
Knormal
,
threadID
)
;
},
true
,
FORCE_CELL_MARKING
);
}
template
<
typename
PFP
>
void
computeCurvatureVertices_NormalCycles_Projected
(
typename
PFP
::
MAP
&
map
,
...
...
@@ -689,24 +683,17 @@ void computeCurvatureVertices_NormalCycles_Projected(
VertexAttribute
<
typename
PFP
::
VEC3
,
typename
PFP
::
MAP
::
IMPL
>&
Kmin
,
VertexAttribute
<
typename
PFP
::
VEC3
,
typename
PFP
::
MAP
::
IMPL
>&
Knormal
)
{
// WAHOO BIG PROBLEM WITH LAZZY EMBEDDING !!!
//
// WAHOO BIG PROBLEM WITH LAZZY EMBEDDING !!!
if
(
!
map
.
template
isOrbitEmbedded
<
VERTEX
>())
{
CellMarkerNoUnmark
<
typename
PFP
::
MAP
,
VERTEX
>
cm
(
map
);
map
.
template
initAllOrbitsEmbedding
<
VERTEX
>();
}
Algo
::
Topo
::
initAllOrbitsEmbedding
<
VERTEX
>
(
map
);
if
(
!
map
.
template
isOrbitEmbedded
<
EDGE
>())
{
CellMarkerNoUnmark
<
typename
PFP
::
MAP
,
EDGE
>
cm
(
map
);
map
.
template
initAllOrbitsEmbedding
<
EDGE
>();
}
Algo
::
Topo
::
initAllOrbitsEmbedding
<
EDGE
>
(
map
);
if
(
!
map
.
template
isOrbitEmbedded
<
FACE
>())
{
CellMarkerNoUnmark
<
typename
PFP
::
MAP
,
FACE
>
cm
(
map
);
map
.
template
initAllOrbitsEmbedding
<
FACE
>();
}
Algo
::
Topo
::
initAllOrbitsEmbedding
<
FACE
>
(
map
);
Parallel
::
foreach_cell
<
VERTEX
>
(
map
,[
&
](
Vertex
v
,
unsigned
int
threadID
)
CGoGN
::
Parallel
::
foreach_cell
<
VERTEX
>
(
map
,[
&
](
Vertex
v
,
unsigned
int
threadID
)
{
computeCurvatureVertex_NormalCycles_Projected
<
PFP
>
(
map
,
v
,
radius
,
position
,
normal
,
edgeangle
,
kmax
,
kmin
,
Kmax
,
Kmin
,
Knormal
,
threadID
)
;
},
true
,
FORCE_CELL_MARKING
);
...
...
@@ -724,7 +711,7 @@ void computeCurvatureVertices_QuadraticFitting(
VertexAttribute
<
typename
PFP
::
VEC3
,
typename
PFP
::
MAP
::
IMPL
>&
Kmax
,
VertexAttribute
<
typename
PFP
::
VEC3
,
typename
PFP
::
MAP
::
IMPL
>&
Kmin
)
{
Parallel
::
foreach_cell
<
VERTEX
>
(
map
,[
&
](
Vertex
v
,
unsigned
int
threadID
)
CGoGN
::
Parallel
::
foreach_cell
<
VERTEX
>
(
map
,[
&
](
Vertex
v
,
unsigned
int
threadID
)
{
computeCurvatureVertex_QuadraticFitting
<
PFP
>
(
map
,
v
,
position
,
normal
,
kmax
,
kmin
,
Kmax
,
Kmin
,
threadID
)
;
},
true
,
FORCE_CELL_MARKING
);
...
...
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