X-Git-Url: http://git.tdb.fi/?p=libs%2Fgl.git;a=blobdiff_plain;f=source%2Fcolor.h;h=e57689bffe559d8f411670f910cceaa2ed94ead0;hp=c45751d02642b4f2434614889f0f2d360efbeebe;hb=HEAD;hpb=033de13fa0a81be466666ed0d0080b1c2221baec diff --git a/source/color.h b/source/color.h deleted file mode 100644 index c45751d0..00000000 --- a/source/color.h +++ /dev/null @@ -1,24 +0,0 @@ -#ifndef MSP_GL_COLOR_H_ -#define MSP_GL_COLOR_H_ - -namespace Msp { -namespace GL { - -struct Color -{ - float r, g, b, a; - - Color(): r(1), g(1), b(1), a(1) { } - Color(float v): r(v), g(v), b(v), a(1) { } - Color(float r_, float g_, float b_): r(r_), g(g_), b(b_), a(1) { } - Color(float r_, float g_, float b_, float a_): r(r_), g(g_), b(b_), a(a_) { } - Color operator*(float f) const { return Color(r*f, g*f, b*f, a); } - Color operator+(const Color &c) const { return Color(r+c.r, g+c.g, b+c.b, 1-(1-a)*(1-c.a)); } - bool operator==(const Color &c) const { return (r==c.r && g==c.g && b==c.b && a==c.a); } - bool operator!=(const Color &c) const { return !operator==(c); } -}; - -} // namespace GL -} // namespace Msp - -#endif