37 : osg::
Vec4(color) {};
39 : osg::
Vec4(r, g, b, 1.0){}
40 Color(
float r,
float g,
float b,
float a)
41 : osg::
Vec4(r, g, b, a){}
43 static Color rgb255(
unsigned char r,
unsigned char g,
unsigned char b,
44 unsigned char a = 255){
45 return Color(((
float)r)/255.0, ((
float)g)/255.0, ((
float)b)/255.0, ((
float)a)/255.0);
48 void print(std::ostream& out)
const {
49 out <<
'(' << r() <<
',' <<
g() <<
',' << b() <<
',' << a() <<
')';
65 float alpha()
const {
return w(); }
float alpha() const
Definition: color.h:65
static Color rgb255(unsigned char r, unsigned char g, unsigned char b, unsigned char a=255)
Definition: color.h:43
Color(const osg::Vec4 &color)
Definition: color.h:36
float & alpha()
Definition: color.h:66
Color(float r, float g, float b)
Definition: color.h:38
Color(float r, float g, float b, float a)
Definition: color.h:40
double g(double z)
neuron transfer function
Definition: regularisation.h:35
void print(std::ostream &out) const
Definition: color.h:48
friend std::ostream & operator<<(std::ostream &out, const Color &col)
Definition: color.h:52
Vec4f Vec4
Definition: osgforwarddecl.h:44
Color()
Definition: color.h:35