colorExtensions.h

Go to the documentation of this file.
00001 // -*- Mode: C++; tab-width: 2; -*-
00002 // vi: set ts=2:
00003 //
00004 // $Id: colorExtensions.h,v 1.1.4.1 2007/03/25 21:25:40 oliver Exp $
00005 //
00006 
00007 #ifndef BALL_VIEW_DATATYPE_COLOREXTENSIONS_H
00008 #define BALL_VIEW_DATATYPE_COLOREXTENSIONS_H
00009 
00010 #ifndef BALL_VIEW_DATATYPE_COLORRGBA_H
00011 # include <BALL/VIEW/DATATYPE/colorRGBA.h>
00012 #endif
00013 
00014 namespace BALL
00015 {
00016   namespace VIEW
00017   {
00018 
00025     class BALL_VIEW_EXPORT ColorExtension2
00026     {
00027       public:
00028 
00029       BALL_CREATE(ColorExtension2)
00030       
00031       
00034 
00038       ColorExtension2();
00039 
00042       ColorExtension2(const ColorExtension2& color_extension);
00043 
00046       virtual ~ColorExtension2();
00047 
00053       virtual void clear();
00054 
00056 
00059 
00062       void set(const ColorExtension2& color_extension);
00063 
00067       const ColorExtension2& operator = (const ColorExtension2& color_extension);
00068 
00071       void swap(ColorExtension2& color_extension);
00072       
00074 
00077 
00080       void setColor2(const ColorRGBA& color);
00081     
00084       ColorRGBA& getColor2();
00085 
00088       const ColorRGBA& getColor2() const;
00089 
00092       void getColor2(ColorRGBA& color) const;
00093 
00095 
00097 
00105       virtual void dump(std::ostream& s = std::cout, Size depth = 0) const;
00107 
00108       private:
00109     
00110       /* color 2 */
00111       ColorRGBA color2_;
00112     };
00113 
00120     class BALL_VIEW_EXPORT MultiColorExtension
00121     {
00122       public:
00123 
00124       BALL_CREATE(MultiColorExtension)
00125       
00126       
00129 
00132       MultiColorExtension();
00133 
00136       MultiColorExtension(const MultiColorExtension& color_extension);
00137 
00140       virtual ~MultiColorExtension();
00141 
00145       virtual void clear();
00146 
00148 
00151 
00154       void set(const MultiColorExtension& color_extension);
00155 
00159       const MultiColorExtension& operator = (const MultiColorExtension& color_extension);
00160 
00163       void swap(MultiColorExtension& color_extension);
00164       
00166 
00169 
00172       void setColors(const vector<ColorRGBA>& colors);
00173     
00176       vector<ColorRGBA>& getColors();
00177 
00180       const vector<ColorRGBA>& getColors() const;
00181 
00183       void setAlphas(Size alpha);
00184 
00186 
00188 
00196       virtual void dump(std::ostream& s = std::cout, Size depth = 0) const;
00198 
00199       vector<ColorRGBA> colors;
00200     };
00201 
00202 
00203 #   ifndef BALL_NO_INLINE_FUNCTIONS
00204 #     include <BALL/VIEW/DATATYPE/colorExtensions.iC>
00205 #   endif
00206 
00207   } // namespace VIEW
00208 } // namespace BALL
00209 
00210 #endif // BALL_VIEW_KERNEL_COLOREXTENSIONS_H