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
OpenMesh
OpenMesh
Commits
e75a7077
Commit
e75a7077
authored
Nov 07, 2016
by
Jan Möbius
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Next bunch of warning fixes
parent
85e183ae
Pipeline
#3520
failed with stage
in 7 minutes and 15 seconds
Changes
6
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
14 additions
and
14 deletions
+14
-14
src/OpenMesh/Tools/Decimater/ModHausdorffT.cc
src/OpenMesh/Tools/Decimater/ModHausdorffT.cc
+1
-1
src/OpenMesh/Tools/Subdivider/Adaptive/Composite/RulesT.cc
src/OpenMesh/Tools/Subdivider/Adaptive/Composite/RulesT.cc
+5
-5
src/OpenMesh/Tools/Subdivider/Uniform/CatmullClarkT.cc
src/OpenMesh/Tools/Subdivider/Uniform/CatmullClarkT.cc
+1
-1
src/OpenMesh/Tools/Subdivider/Uniform/Composite/CompositeT.cc
...OpenMesh/Tools/Subdivider/Uniform/Composite/CompositeT.cc
+3
-3
src/OpenMesh/Tools/Subdivider/Uniform/LoopT.hh
src/OpenMesh/Tools/Subdivider/Uniform/LoopT.hh
+2
-2
src/OpenMesh/Tools/Subdivider/Uniform/ModifiedButterFlyT.hh
src/OpenMesh/Tools/Subdivider/Uniform/ModifiedButterFlyT.hh
+2
-2
No files found.
src/OpenMesh/Tools/Decimater/ModHausdorffT.cc
View file @
e75a7077
...
...
@@ -89,7 +89,7 @@ distPointTriangleSquared( const Point& _p,
if
(
d
<
FLT_MIN
&&
d
>
-
FLT_MIN
)
{
return
-
1.0
;
}
const
double
invD
=
1.0
/
d
;
const
Scalar
invD
=
static_cast
<
Scalar
>
(
1.0
)
/
d
;
// these are not needed for every point, should still perform
// better with many points against one triangle
...
...
src/OpenMesh/Tools/Subdivider/Adaptive/Composite/RulesT.cc
View file @
e75a7077
...
...
@@ -229,17 +229,17 @@ Tvv3<M>::raise(typename M::FaceHandle& _fh, state_t _target_state)
MOBJ
(
vh1
).
set_state
(
_target_state
);
MOBJ
(
vh1
).
set_not_final
();
MOBJ
(
vh0
).
set_position
(
_target_state
,
MOBJ
(
vh0
).
position
(
_target_state
-
1
)
*
3.0
);
MOBJ
(
vh0
).
set_position
(
_target_state
,
MOBJ
(
vh0
).
position
(
_target_state
-
1
)
*
static_cast
<
typename
M
::
Point
::
value_type
>
(
3.0
)
)
;
MOBJ
(
vh0
).
set_state
(
_target_state
);
MOBJ
(
vh0
).
set_not_final
();
// set display position and attributes for old vertices
Base
::
mesh_
.
set_point
(
vh2
,
(
Base
::
mesh_
.
point
(
vh3
)
*
2.0
+
Base
::
mesh_
.
point
(
vh0
))
/
3.0
);
Base
::
mesh_
.
set_point
(
vh2
,
(
Base
::
mesh_
.
point
(
vh3
)
*
static_cast
<
typename
M
::
Point
::
value_type
>
(
2.0
)
+
Base
::
mesh_
.
point
(
vh0
))
/
static_cast
<
typename
M
::
Point
::
value_type
>
(
3.0
)
)
;
MOBJ
(
vh2
).
set_position
(
_target_state
,
zero_point
);
MOBJ
(
vh2
).
set_state
(
_target_state
);
MOBJ
(
vh2
).
set_not_final
();
MOBJ
(
vh3
).
set_position
(
_target_state
,
MOBJ
(
vh3
).
position
(
_target_state
-
1
)
*
3.0
);
MOBJ
(
vh3
).
set_position
(
_target_state
,
MOBJ
(
vh3
).
position
(
_target_state
-
1
)
*
static_cast
<
typename
M
::
Point
::
value_type
>
(
3.0
)
)
;
MOBJ
(
vh3
).
set_state
(
_target_state
);
MOBJ
(
vh3
).
set_not_final
();
...
...
@@ -326,7 +326,7 @@ void Tvv3<M>::raise(typename M::VertexHandle& _vh, state_t _target_state) {
this
->
update
(
_vh
,
_target_state
);
// multiply old position by 3
MOBJ
(
_vh
).
set_position
(
_target_state
,
MOBJ
(
_vh
).
position
(
_target_state
-
1
)
*
3.0
);
MOBJ
(
_vh
).
set_position
(
_target_state
,
MOBJ
(
_vh
).
position
(
_target_state
-
1
)
*
static_cast
<
typename
M
::
Point
::
value_type
>
(
3.0
)
)
;
MOBJ
(
_vh
).
inc_state
();
...
...
@@ -2004,7 +2004,7 @@ EdEc<M>::raise(typename M::EdgeHandle& _eh, state_t _target_state)
// choose coefficient c
c
=
Base
::
coeff
();
position
*=
(
1.0
-
c
);
position
*=
(
static_cast
<
M
:
Scalar
>
(
1.0
)
-
c
);
position
+=
MOBJ
(
_eh
).
position
(
_target_state
-
1
)
*
c
;
...
...
src/OpenMesh/Tools/Subdivider/Uniform/CatmullClarkT.cc
View file @
e75a7077
...
...
@@ -346,7 +346,7 @@ CatmullClarkT<MeshType,RealType>::update_vertex( MeshType& _m, const VertexHandl
for
(
ve_itr
=
_m
.
ve_iter
(
_vh
);
ve_itr
.
is_valid
();
++
ve_itr
)
if
(
_m
.
is_boundary
(
*
ve_itr
))
pos
+=
_m
.
property
(
ep_pos_
,
*
ve_itr
);
pos
/=
static_cast
<
MeshType
::
Point
::
value_type
>
(
3.0
);
pos
/=
static_cast
<
typename
MeshType
::
Point
::
value_type
>
(
3.0
);
}
else
// inner vertex
{
...
...
src/OpenMesh/Tools/Subdivider/Uniform/Composite/CompositeT.cc
View file @
e75a7077
...
...
@@ -116,7 +116,7 @@ void CompositeT<MeshType,RealType>::Tvv3()
// set new positions for vertices
v_it
=
mesh_
.
vertices_begin
();
for
(
j
=
0
;
j
<
n_vertices
;
++
j
)
{
mesh_
.
data
(
*
v_it
).
set_position
(
mesh_
.
data
(
*
v_it
).
position
()
*
static_cast
<
MeshType
::
Point
::
value_type
>
(
3.0
)
);
mesh_
.
data
(
*
v_it
).
set_position
(
mesh_
.
data
(
*
v_it
).
position
()
*
static_cast
<
typename
MeshType
::
Point
::
value_type
>
(
3.0
)
);
++
v_it
;
}
...
...
@@ -180,7 +180,7 @@ void CompositeT<MeshType,RealType>::Tvv4()
// set new positions for vertices
v_it
=
mesh_
.
vertices_begin
();
for
(
j
=
0
;
j
<
n_vertices
;
++
j
)
{
mesh_
.
data
(
*
v_it
).
set_position
(
mesh_
.
data
(
*
v_it
).
position
()
*
static_cast
<
MeshType
::
Point
::
value_type
>
(
4.0
)
);
mesh_
.
data
(
*
v_it
).
set_position
(
mesh_
.
data
(
*
v_it
).
position
()
*
static_cast
<
typename
MeshType
::
Point
::
value_type
>
(
4.0
)
);
++
v_it
;
}
...
...
@@ -1250,7 +1250,7 @@ CompositeT<MeshType,RealType>::split_edge(HalfedgeHandle _heh)
vh2
(
mesh_
.
from_vertex_handle
(
_heh
));
// Calculate and Insert Midpoint of Edge
vh
=
mesh_
.
add_vertex
((
mesh_
.
point
(
vh2
)
+
mesh_
.
point
(
vh1
))
/
static_cast
<
MeshType
::
Point
::
value_type
>
(
2.0
)
);
vh
=
mesh_
.
add_vertex
((
mesh_
.
point
(
vh2
)
+
mesh_
.
point
(
vh1
))
/
static_cast
<
typename
MeshType
::
Point
::
value_type
>
(
2.0
)
);
// Re-Set Handles
heh2
=
mesh_
.
opposite_halfedge_handle
(
_heh
);
...
...
src/OpenMesh/Tools/Subdivider/Uniform/LoopT.hh
View file @
e75a7077
...
...
@@ -326,7 +326,7 @@ private: // topological modifiers
typename
mesh_t
::
VertexHandle
vh1
(
_m
.
to_vertex_handle
(
heh
));
typename
mesh_t
::
Point
midP
(
_m
.
point
(
_m
.
to_vertex_handle
(
heh
)));
midP
+=
_m
.
point
(
_m
.
to_vertex_handle
(
opp_heh
));
midP
*=
static_cast
<
mesh_t
::
Point
::
value_type
>
(
0.5
);
midP
*=
static_cast
<
typename
mesh_t
::
Point
::
value_type
>
(
0.5
);
// new vertex
vh
=
_m
.
new_vertex
(
midP
);
...
...
@@ -394,7 +394,7 @@ private: // geometry helper
// boundary edge: just average vertex positions
if
(
_m
.
is_boundary
(
_eh
)
)
{
pos
*=
static_cast
<
MeshType
::
Point
::
value_type
>
(
0.5
);
pos
*=
static_cast
<
typename
MeshType
::
Point
::
value_type
>
(
0.5
);
}
else
// inner edge: add neighbouring Vertices to sum
{
...
...
src/OpenMesh/Tools/Subdivider/Uniform/ModifiedButterFlyT.hh
View file @
e75a7077
...
...
@@ -390,7 +390,7 @@ private: // geometry helper
{
pos
=
_m
.
point
(
a_0
);
pos
+=
_m
.
point
(
a_1
);
pos
*=
static_cast
<
mesh_t
::
Point
::
value_type
>
(
9.0
/
16.0
);
pos
*=
static_cast
<
typename
mesh_t
::
Point
::
value_type
>
(
9.0
/
16.0
);
typename
mesh_t
::
Point
tpos
;
if
(
_m
.
is_boundary
(
heh
))
{
...
...
@@ -403,7 +403,7 @@ private: // geometry helper
tpos
=
_m
.
point
(
_m
.
to_vertex_handle
(
_m
.
next_halfedge_handle
(
opp_heh
)));
tpos
+=
_m
.
point
(
_m
.
to_vertex_handle
(
_m
.
opposite_halfedge_handle
(
_m
.
prev_halfedge_handle
(
opp_heh
))));
}
tpos
*=
static_cast
<
mesh_t
::
Point
::
value_type
>
(
-
1.0
/
16.0
);
tpos
*=
static_cast
<
typename
mesh_t
::
Point
::
value_type
>
(
-
1.0
/
16.0
);
pos
+=
tpos
;
}
else
...
...
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