Color cast vec4i to vec4f

git-svn-id: http://www.openmesh.org/svnrepo/OpenMesh/trunk@444 fdac6126-5c0c-442c-9429-916003d36597
This commit is contained in:
Jan Möbius
2011-10-25 09:59:20 +00:00
parent 1215bd7436
commit 4862bb176e

View File

@@ -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>
{