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
Etienne Schmitt
CGoGN
Commits
6bba6520
Commit
6bba6520
authored
Mar 22, 2011
by
Kenneth Vanhoey
Browse files
correction sur vector.normalize() --> division par zero
parent
68dfe535
Changes
3
Hide whitespace changes
Inline
Side-by-side
include/Algo/Decimation/geometryApproximator.hpp
View file @
6bba6520
...
...
@@ -166,12 +166,6 @@ void Approximator_QEMhalfEdge<PFP>::approximate(Dart d)
this
->
m_approx
[
d
]
=
this
->
m_attrV
[
d
]
;
else
this
->
m_approx
[
d
]
=
res
;
if
(
isnan
((
res
[
0
])))
{
std
::
cout
<<
"res("
<<
opt
<<
") = "
<<
this
->
m_approx
[
d
]
<<
std
::
endl
;
std
::
cout
<<
q1
<<
std
::
endl
;
std
::
cout
<<
q2
<<
std
::
endl
;
}
}
/************************************************************************************
...
...
include/Geometry/vector_gen.hpp
View file @
6bba6520
...
...
@@ -242,10 +242,9 @@ template <unsigned int DIM, typename T>
inline
double
Vector
<
DIM
,
T
>::
normalize
()
{
double
n
=
norm
()
;
if
(
n
==
T
(
0.0
))
n
=
T
(
0.0001
)
;
for
(
unsigned
int
i
=
0
;
i
<
DIM
;
++
i
)
m_data
[
i
]
/=
T
(
n
)
;
if
(
n
!=
T
(
0.0
))
for
(
unsigned
int
i
=
0
;
i
<
DIM
;
++
i
)
m_data
[
i
]
/=
T
(
n
)
;
return
n
;
}
...
...
include/Utils/quadricRGBfunctions.hpp
View file @
6bba6520
...
...
@@ -358,8 +358,8 @@ void QuadricRGBfunctions<REAL>::buildRotateMatrix(MATRIX66 &N, const REAL gamma)
N
(
3
,
1
)
=
REAL
(
0
);
N
(
3
,
2
)
=
REAL
(
0
);
N
(
3
,
3
)
=
cosinus
;
N
(
3
,
5
)
=
REAL
(
0
);
N
(
3
,
4
)
=
sinus
;
N
(
3
,
5
)
=
REAL
(
0
);
N
(
4
,
0
)
=
REAL
(
0
);
N
(
4
,
1
)
=
REAL
(
0
);
...
...
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