Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
OpenMesh
OpenMesh
Commits
08160c15
Commit
08160c15
authored
Oct 28, 2016
by
Jan Möbius
Browse files
More warning fixes
parent
7a1cad00
Pipeline
#3412
passed with stage
in 63 minutes and 59 seconds
Changes
3
Pipelines
1
Show whitespace changes
Inline
Side-by-side
src/OpenMesh/Tools/Decimater/ModHausdorffT.cc
View file @
08160c15
...
@@ -82,7 +82,7 @@ distPointTriangleSquared( const Point& _p,
...
@@ -82,7 +82,7 @@ distPointTriangleSquared( const Point& _p,
const
Point
v0v1
=
_v1
-
_v0
;
const
Point
v0v1
=
_v1
-
_v0
;
const
Point
v0v2
=
_v2
-
_v0
;
const
Point
v0v2
=
_v2
-
_v0
;
const
Point
n
=
v0v1
%
v0v2
;
// not normalized !
const
Point
n
=
v0v1
%
v0v2
;
// not normalized !
const
double
d
=
n
.
sqrnorm
();
const
Scalar
d
=
n
.
sqrnorm
();
// Check if the triangle is degenerated
// Check if the triangle is degenerated
...
@@ -94,16 +94,16 @@ distPointTriangleSquared( const Point& _p,
...
@@ -94,16 +94,16 @@ distPointTriangleSquared( const Point& _p,
// these are not needed for every point, should still perform
// these are not needed for every point, should still perform
// better with many points against one triangle
// better with many points against one triangle
const
Point
v1v2
=
_v2
-
_v1
;
const
Point
v1v2
=
_v2
-
_v1
;
const
double
inv_v0v2_2
=
1.0
/
v0v2
.
sqrnorm
();
const
Scalar
inv_v0v2_2
=
static_cast
<
Scalar
>
(
1.0
)
/
v0v2
.
sqrnorm
();
const
double
inv_v0v1_2
=
1.0
/
v0v1
.
sqrnorm
();
const
Scalar
inv_v0v1_2
=
static_cast
<
Scalar
>
(
1.0
)
/
v0v1
.
sqrnorm
();
const
double
inv_v1v2_2
=
1.0
/
v1v2
.
sqrnorm
();
const
Scalar
inv_v1v2_2
=
static_cast
<
Scalar
>
(
1.0
)
/
v1v2
.
sqrnorm
();
Point
v0p
=
_p
-
_v0
;
Point
v0p
=
_p
-
_v0
;
Point
t
=
v0p
%
n
;
Point
t
=
v0p
%
n
;
typename
Point
::
value_type
s01
,
s02
,
s12
;
typename
Point
::
value_type
s01
,
s02
,
s12
;
const
double
a
=
(
t
|
v0v2
)
*
-
invD
;
const
Scalar
a
=
(
t
|
v0v2
)
*
-
invD
;
const
double
b
=
(
t
|
v0v1
)
*
invD
;
const
Scalar
b
=
(
t
|
v0v1
)
*
invD
;
if
(
a
<
0
)
if
(
a
<
0
)
{
{
...
...
src/OpenMesh/Tools/Subdivider/Adaptive/Composite/RulesT.cc
View file @
08160c15
...
@@ -992,7 +992,7 @@ void FFc<M>::raise(typename M::FaceHandle& _fh, state_t _target_state)
...
@@ -992,7 +992,7 @@ void FFc<M>::raise(typename M::FaceHandle& _fh, state_t _target_state)
// choose coefficient c
// choose coefficient c
typename
M
::
Scalar
c
=
Base
::
coeff
();
typename
M
::
Scalar
c
=
Base
::
coeff
();
position
*=
(
1.0
-
c
);
position
*=
(
static_cast
<
typename
M
::
Scalar
>
(
1.0
)
-
c
);
position
+=
MOBJ
(
_fh
).
position
(
_target_state
-
1
)
*
c
;
position
+=
MOBJ
(
_fh
).
position
(
_target_state
-
1
)
*
c
;
MOBJ
(
_fh
).
set_position
(
_target_state
,
position
);
MOBJ
(
_fh
).
set_position
(
_target_state
,
position
);
...
...
src/OpenMesh/Tools/Subdivider/Uniform/Composite/CompositeT.cc
View file @
08160c15
...
@@ -882,7 +882,8 @@ void CompositeT<MeshType,RealType>::EVc(Coeff& _coeff)
...
@@ -882,7 +882,8 @@ void CompositeT<MeshType,RealType>::EVc(Coeff& _coeff)
++
valence
;
++
valence
;
}
}
c
=
_coeff
(
valence
);
// Coefficients always work on double so we cast them to the correct scalar here
c
=
static_cast
<
scalar_t
>
(
_coeff
(
valence
));
for
(
voh_it
=
mesh_
.
voh_iter
(
*
v_it
);
voh_it
.
is_valid
();
++
voh_it
)
{
for
(
voh_it
=
mesh_
.
voh_iter
(
*
v_it
);
voh_it
.
is_valid
();
++
voh_it
)
{
cog
+=
mesh_
.
data
(
mesh_
.
edge_handle
(
*
voh_it
)).
position
()
*
c
;
cog
+=
mesh_
.
data
(
mesh_
.
edge_handle
(
*
voh_it
)).
position
()
*
c
;
...
...
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