Commit 15572ed0 authored by Henrik Zimmer's avatar Henrik Zimmer

updated to use new OpenMesh colors Vec4f instead of Vec3u

git-svn-id: http://www.openflipper.org/svnrepo/CoMISo/trunk@100 1355f012-dd97-4b2f-ae87-10fa9f823a57
parent 48eceab1
......@@ -93,6 +93,13 @@ public:
if(signed_mode_) c=color_signed(_v); else c=color_unsigned(_v);
return (ACG::Vec3f(c[0],c[1],c[2])/255.f);
}
//
/// color coding
ACG::Vec4f color_floata(float _v) const {
ACG::Vec3uc c;
if(signed_mode_) c=color_signed(_v); else c=color_unsigned(_v);
return (ACG::Vec4f(c[0],c[1],c[2], 255)/255.f);
}
/// min scalar value
......
......@@ -216,6 +216,21 @@ add_boundary_constraints()
last_bdry_vidx = first_vidx;
}
}
if( boundaries == 0) // add 1 and zero to marked vertices
{
for( VIter v_it = mesh_.vertices_begin(); v_it != mesh_.vertices_end(); ++v_it)
{
if( mesh_.status(v_it).selected())
{
std::cerr << " setting selected point to " << constraints << std::endl;
constraints_(constraints, v_it.handle().idx()) = 1.0;
constraints_(constraints, mesh_.n_vertices()) = constraints;
constraints++;
}
}
}
return constraints;
}
......@@ -231,6 +246,7 @@ color_mesh()
double vmin = (double)*std::min_element( x_.begin(), x_.end());
double vmax = (double)*std::max_element( x_.begin(), x_.end());
std::cerr << "vmin " << vmin << " vmax " << vmax << std::endl;
// create ColorCoder
COMISO::ColorCoder cc( vmin, vmax, false);
......@@ -248,7 +264,7 @@ color_mesh()
//v_cur = v_cur - int_part;
// set vertex color
mesh_.set_color(v_it, cc.color(v_cur));
mesh_.set_color(v_it, cc.color_floata(v_cur));
}
}
......
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