Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

color.h

Go to the documentation of this file.
00001 #ifndef COLOR_H
00002 #define COLOR_H
00003 
00004 #include "stdafx.h"
00005 
00006 struct rgb {
00007         unsigned char r, g, b;
00008 };
00009 
00010 struct rgba {
00011         unsigned char r, g, b, a;
00012 };
00013 
00014 class Color {
00015 public:
00016         float r, g, b;
00017 
00018         Color() { r = 0.0; g = 0.0; b = 0.0;};
00019         Color(rgb col);
00020         Color(float rf, float gf, float bf);
00021         ~Color() {};
00022         const Color operator + (const Color& col) const;
00023         const Color operator * (const float& alpha) const;
00024         const Color operator / (const float& scalar) const;
00025         const Color operator = (const Color& col);
00026         const Color operator += (const Color& col);
00027         rgb toRGB();
00028 };
00029 
00030 #endif

Generated on Thu Jan 23 12:32:15 2003 by doxygen1.3-rc2