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
Operations
Operations
Incidents
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
David Cazier
CGoGN
Commits
c6855883
Commit
c6855883
authored
Nov 15, 2012
by
Basile Sauvage
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
normal cycles : corection bug tenseur
parent
5f822d8a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
10 deletions
+13
-10
include/Algo/Geometry/curvature.hpp
include/Algo/Geometry/curvature.hpp
+13
-10
No files found.
include/Algo/Geometry/curvature.hpp
View file @
c6855883
...
...
@@ -343,7 +343,7 @@ void computeCurvatureVertex_NormalCycles(
// solve eigen problem
Eigen
::
Matrix3f
m3
;
m3
<<
tensor
(
0
,
0
)
,
tensor
(
0
,
1
)
,
tensor
(
0
,
1
)
,
tensor
(
1
,
0
)
,
tensor
(
1
,
1
)
,
tensor
(
1
,
2
)
,
tensor
(
2
,
0
)
,
tensor
(
2
,
1
)
,
tensor
(
2
,
2
)
;
m3
<<
tensor
(
0
,
0
)
,
tensor
(
0
,
1
)
,
tensor
(
0
,
2
)
,
tensor
(
1
,
0
)
,
tensor
(
1
,
1
)
,
tensor
(
1
,
2
)
,
tensor
(
2
,
0
)
,
tensor
(
2
,
1
)
,
tensor
(
2
,
2
)
;
Eigen
::
SelfAdjointEigenSolver
<
Eigen
::
Matrix3f
>
solver
(
m3
);
Eigen
::
Vector3f
ev
=
solver
.
eigenvalues
();
Eigen
::
Matrix3f
evec
=
solver
.
eigenvectors
();
...
...
@@ -356,22 +356,25 @@ void computeCurvatureVertex_NormalCycles(
if
(
ev
[
s
[
2
]]
<
ev
[
s
[
1
]])
{
tmp
=
s
[
1
]
;
s
[
1
]
=
s
[
2
]
;
s
[
2
]
=
tmp
;
}
// set curvatures from sorted eigen components
// warning : Kmin and Kmax are switched w.r.t. kmin and kmax
// normal direction : minimal absolute eigen value
VEC3
&
dirNormal
=
Knormal
[
dart
]
;
dirNormal
[
0
]
=
evec
(
0
,
s
[
0
]);
dirNormal
[
1
]
=
evec
(
1
,
s
[
0
]);
dirNormal
[
2
]
=
evec
(
2
,
s
[
0
]);
if
(
dirNormal
*
normal
[
dart
]
<
0
)
dirNormal
*=
-
1
;
// change orientation
// min curvature
kmin
[
dart
]
=
ev
[
s
[
1
]]
;
kmax
[
dart
]
=
ev
[
s
[
2
]]
;
VEC3
&
dirMin
=
Kmin
[
dart
]
;
dirMin
[
0
]
=
evec
(
0
,
s
[
2
]);
dirMin
[
1
]
=
evec
(
1
,
s
[
2
]);
dirMin
[
2
]
=
evec
(
2
,
s
[
2
]);
// warning : Kmin and Kmax are switched
dirMin
[
2
]
=
evec
(
2
,
s
[
2
]);
// max curvature
kmax
[
dart
]
=
ev
[
s
[
2
]]
;
VEC3
&
dirMax
=
Kmax
[
dart
]
;
dirMax
[
0
]
=
evec
(
0
,
s
[
1
]);
dirMax
[
1
]
=
evec
(
1
,
s
[
1
]);
dirMax
[
2
]
=
evec
(
2
,
s
[
1
]);
// warning : Kmin and Kmax are switched
VEC3
&
dirNormal
=
Knormal
[
dart
]
;
dirNormal
[
0
]
=
evec
(
0
,
s
[
0
]);
dirNormal
[
1
]
=
evec
(
1
,
s
[
0
]);
dirNormal
[
2
]
=
evec
(
2
,
s
[
0
]);
if
(
dirNormal
*
normal
[
dart
]
<
0
)
dirNormal
*=
-
1
;
// change orientation
dirMax
[
2
]
=
evec
(
2
,
s
[
1
]);
}
...
...
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