4 #include <boost/shared_ptr.hpp>
9 typedef boost::shared_ptr<Color> ColorRef;
11 //! convienece class for handling opengl colors
17 //! initialize with red, green, blue, alpha
18 Color(float r, float g, float b, float a=1.0);
19 Color(const ColorRef);
21 //! set all channels simultaneously
22 void set(float r, float g, float b, float a=1.0);
23 //! return an array of 4 colors (stored by class)
24 const float* const get() const;
34 enum color_channels { RedChannel, GreenChannel, BlueChannel, AlphaChannel };
35 friend bool operator==(const Color&, const Color&);
36 friend std::ostream& operator<<(std::ostream&, const Color&);