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 
00007 struct rgb {
00008         unsigned char r, g, b;
00009 };
00010 
00011 struct rgba {
00012         unsigned char r, g, b, a;
00013 };
00014 
00016 class Color {
00017 public:
00018         float r, g, b;
00019 
00020         Color() { r = 0.0; g = 0.0; b = 0.0;};
00021         Color(rgb col);
00022         Color(float rf, float gf, float bf);
00023         ~Color() {};
00024         const Color operator + (const Color& col) const;
00025         const Color operator * (const float& alpha) const;
00026         const Color operator / (const float& scalar) const;
00027         const Color operator = (const Color& col);
00028         const Color operator += (const Color& col);
00029         rgb toRGB();
00030 };
00031 
00032 #endif

Generated on Thu Jan 30 21:35:43 2003 for 3DVis by doxygen1.3-rc2