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
OpenFlipper-Free
Plugin-PropertyVis
Commits
6459395b
Commit
6459395b
authored
Dec 20, 2017
by
Janis Born
Browse files
use three-parameter ctors for Vec3 in visualizeVectorAsColorForEntity
parent
689fcf54
Changes
2
Hide whitespace changes
Inline
Side-by-side
OpenMesh/OMPropertyVisualizerVectorT.cc
View file @
6459395b
...
...
@@ -99,9 +99,9 @@ void visualizeVectorAsColorForEntity(MeshT *mesh, const ENTITY_IT e_begin, const
using
point_t
=
typename
MeshT
::
Point
;
point_t
v
=
mesh
->
property
(
prop
,
*
e_it
);
if
(
normalized
)
v
=
v
.
normalized
()
*
.5
+
point_t
(
.5
);
v
=
v
.
normalized
()
*
0
.5
+
point_t
(
0
.5
);
else
v
=
v
.
min
(
point_t
(
1
)).
max
(
point_t
(
0
));
v
=
v
.
min
(
point_t
(
1
,
1
,
1
)).
max
(
point_t
(
0
,
0
,
0
));
mesh
->
set_color
(
*
e_it
,
typename
MeshT
::
Color
(
v
[
0
],
v
[
1
],
v
[
2
],
1.0
));
}
}
...
...
OpenVolumeMesh/OVMPropertyVisualizerVectorT.cc
View file @
6459395b
...
...
@@ -93,9 +93,9 @@ void OVMPropertyVisualizerVector<MeshT>::visualizeVectorAsColorForEntity(PropTyp
for
(
EntityIterator
e_it
=
e_begin
;
e_it
!=
e_end
;
++
e_it
)
{
ACG
::
Vec3d
v
=
prop
[
*
e_it
];
if
(
normalized
)
v
=
v
.
normalized
()
*
.5
+
ACG
::
Vec3d
(
.5
);
v
=
v
.
normalized
()
*
0
.5
+
ACG
::
Vec3d
(
0
.5
);
else
v
=
v
.
min
(
ACG
::
Vec3d
(
1
)).
max
(
ACG
::
Vec3d
(
0
));
v
=
v
.
min
(
ACG
::
Vec3d
(
1
,
1
,
1
)).
max
(
ACG
::
Vec3d
(
0
,
0
,
0
));
object
->
colors
()[
*
e_it
]
=
ACG
::
Vec4f
(
v
[
0
],
v
[
1
],
v
[
2
],
1.0
);
}
}
...
...
Write
Preview
Supports
Markdown
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