Commit 6459395b authored by Janis Born's avatar Janis Born

use three-parameter ctors for Vec3 in visualizeVectorAsColorForEntity

parent 689fcf54
......@@ -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));
}
}
......
......@@ -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);
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment