Allolib
1.0
C++ Components For Interactive Multimedia
|
Color represented by hue, saturation, and value. More...
Public Member Functions | |
HSV (float h=0, float s=1, float v=1) | |
template<class T > | |
HSV (const T *hsv) | |
HSV (const Color &v) | |
HSV (const Colori &v) | |
HSV (const RGB &v) | |
HSV (const CIE_XYZ &xyz) | |
HSV (const Lab &lab) | |
HSV (const HCLab &hclab) | |
HSV (const Luv &luv) | |
HSV (const HCLuv &hcluv) | |
float & | operator[] (int i) |
Set color component at index with no bounds checking. | |
const float & | operator[] (int i) const |
Get color component at index with no bounds checking. | |
HSV & | operator= (const Color &v) |
Set from RGBA color. | |
HSV & | operator= (const Colori &v) |
Set from RGBA color. | |
HSV & | operator= (const RGB &v) |
Set from RGB color. | |
HSV & | operator= (const CIE_XYZ &v) |
Set from CIE_XYZ color. | |
HSV & | operator= (const Lab &v) |
Set from Lab color. | |
HSV & | operator= (const HCLab &v) |
Set from HCLab color. | |
HSV & | operator= (const Luv &v) |
Set from Luv color. | |
HSV & | operator= (const HCLuv &v) |
Set from HCLuv color. | |
HSV | operator* (float a) const |
Get new HSV with value component multiplied by a scalar. | |
HSV & | operator*= (float a) |
Multiply value component by a scalar. | |
HSV & | rotateHue (float dh) |
Rotate hue in interval [0, 1) | |
HSV & | wrapHue () |
Wrap hue value into valid interval [0, 1) | |
Public Attributes | |
union { | |
struct { | |
float h | |
Hue component in [0, 1]. | |
float s | |
Saturation component in [0, 1]. | |
float v | |
Value component in [0, 1]. | |
} | |
float components [3] | |
HSV component vector. | |
}; | |
Color represented by hue, saturation, and value.
Definition at line 397 of file al_Color.hpp.
|
inline |
[in] | h | hue |
[in] | s | saturation |
[in] | v | value |
Definition at line 410 of file al_Color.hpp.
|
inline |
[in] | hsv | 3-vector of HSV components |
Definition at line 414 of file al_Color.hpp.
|
inline |
[in] | v | RGB color to convert from |
Definition at line 417 of file al_Color.hpp.
|
inline |
[in] | v | RGB color to convert from |
Definition at line 420 of file al_Color.hpp.
|
inline |
[in] | v | RGB color to convert from |
Definition at line 423 of file al_Color.hpp.
|
inline |
[in] | xyz | CIE_XYZ color to convert from |
Definition at line 426 of file al_Color.hpp.
|
inline |
[in] | lab | Lab color to convert from |
Definition at line 429 of file al_Color.hpp.
|
inline |
[in] | hclab | HCLab color to convert from |
Definition at line 432 of file al_Color.hpp.
|
inline |
[in] | luv | Luv color to convert from |
Definition at line 435 of file al_Color.hpp.
|
inline |
[in] | hcluv | HCLuv color to convert from |
Definition at line 438 of file al_Color.hpp.