Commit 4862bb17 authored by Jan Möbius's avatar Jan Möbius
Browse files

Color cast vec4i to vec4f

git-svn-id: http://www.openmesh.org/svnrepo/OpenMesh/trunk@444 fdac6126-5c0c-442c-9429-916003d36597
parent 1215bd74
......@@ -156,6 +156,18 @@ struct color_caster<Vec4uc,Vec4f>
}
};
template <>
struct color_caster<Vec4f,Vec4i>
{
typedef Vec4f return_type;
inline static return_type cast(const Vec4i& _src)
{
const float f = 1.0f / 255.0f;
return Vec4f( _src[0] * f, _src[1] * f, _src[2] * f , _src[3] * f );
}
};
template <>
struct color_caster<Vec4uc,Vec3uc>
{
......
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