00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025 #ifndef _SB_COLORRGBA_H_
00026 #define _SB_COLORRGBA_H_
00027
00028 #include <Inventor/SbLinear.h>
00029
00030
00032
00033
00034
00035
00036
00037
00039
00040 class SbColorRGBA;
00041
00061 class SbColorRGBA : public SbVec4f {
00062 public:
00066 SbColorRGBA();
00067
00071 SbColorRGBA(const SbVec4f vec4f)
00072 { setValue(vec4f.getValue()); }
00073
00077 SbColorRGBA(const float rgba[4])
00078 { setValue(rgba); }
00079
00083 SbColorRGBA(float r, float g, float b, float a)
00084 { setValue(r, g, b, a); }
00085
00089 SbColorRGBA (uint32_t orderedRGBA);
00090
00106 SbColorRGBA &setPackedValue(uint32_t orderedRGBA);
00107
00112 uint32_t getPackedValue() const;
00113
00120 SbColorRGBA & setHSVAValue(float h, float s, float v, float a);
00121
00126 SbColorRGBA & setHSVAValue(const float hsva[4])
00127 { return setHSVAValue(hsva[0], hsva[1], hsva[2], hsva[3]); }
00128
00133 void getHSVAValue(float &h, float &s, float &v, float& a) const;
00134
00139 void getHSVAValue(float hsva[4]) const
00140 { getHSVAValue(hsva[0], hsva[1], hsva[2], hsva[3]); }
00141
00142 private:
00143
00145 static void initClass();
00146
00148 static void exitClass();
00149
00165 SbColorRGBA &setLEPackedValue(uint32_t littleEndianRGBA);
00166
00167 };
00168
00169 #endif
00170
00171
00172