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

Color.h

Go to the documentation of this file.
00001 
00002 #ifndef __COLOR_H
00003 #define __COLOR_H
00004 
00005 #include <ostream>
00006 
00018 class Color {
00019 private:
00021     float m_data[4];
00022 
00024     void initialize(float r, float g, float b);
00025 
00027     void initialize(float r, float g, float b, float a);
00028 
00029 public:
00031     static const int R;
00033     static const int G;
00035     static const int B;
00037     static const int A;
00038 
00041     Color();
00044     Color(float r, float g, float b);
00046     Color(float r, float g, float b, float a);
00047 
00049     float& operator[](int which);
00050 
00052     float operator[](int which) const;
00053 
00055     const float* toArray() const;
00056 
00061     friend std::ostream& operator<< (std::ostream& out, const Color& col);
00062 };
00063 
00064 #endif // __COLOR_H

Generated on Mon Aug 25 23:40:57 2003 for Shadow by doxygen 1.3.2