44#ifndef OPENMESH_KERNEL_OSG_COLOR_CAST_HH
45#define OPENMESH_KERNEL_OSG_COLOR_CAST_HH
48#include <OpenMesh/Core/Utils/color_cast.hh>
49#include <OpenSG/OSGGeometry.h>
56struct color_caster<osg::Color3ub,osg::Color3f>
58 typedef osg::Color3ub return_type;
59 typedef unsigned char ub;
61 inline static return_type cast(
const osg::Color3f& _src)
63 return return_type( (ub)std::min((_src[0]* 255.0f + 0.5f),255.0f),
64 (ub)std::min((_src[1]* 255.0f + 0.5f),255.0f),
65 (ub)std::min((_src[2]* 255.0f + 0.5f),255.0f) );
72struct color_caster<osg::Color3f,osg::Color3ub>
74 typedef osg::Color3f return_type;
76 inline static return_type cast(
const osg::Color3ub& _src)
78 return return_type( (
float)(_src[0] / 255.0f ),
79 (
float)(_src[1] / 255.0f ),
80 (
float)(_src[2] / 255.0f ) );
Contains all the mesh ingredients like the polygonal mesh, the triangle mesh, different mesh kernels ...
Definition: MeshItems.hh:59