color representation in HSVA
More...
#include <color.hpp>
|
|
| HSVA ()=default |
| | default ctor
|
| |
| | HSVA (float h, float s, float v, float a) |
| | construct
|
| |
|
| HSVA (glm::vec4) |
| |
|
| operator glm::vec4 () const |
| |
| | HSVA (RGBA) |
| | convert rgba to hsva
|
| |
|
| operator RGBA () const |
| | convert hsva to rgba
|
| |
|
| operator std::string () const |
| | serialize
|
| |
| bool | operator== (const HSVA &other) |
| | comparison operator
|
| |
| bool | operator!= (const HSVA &other) |
| | comparison operator
|
| |
|
|
float | h = 0 |
| | hue component
|
| |
|
float | s = 0 |
| | saturation component
|
| |
|
float | v = 0 |
| | value component
|
| |
|
float | a = 1 |
| | transparency component
|
| |
color representation in HSVA
◆ HSVA() [1/2]
| mousetrap::HSVA::HSVA |
( |
float |
h, |
|
|
float |
s, |
|
|
float |
v, |
|
|
float |
a |
|
) |
| |
construct
- Parameters
-
| h | hue, in [0, 1] |
| s | saturation, in [0, 1] |
| v | value, in [0, 1] |
| a | alpha, in [0, 1] |
◆ HSVA() [2/2]
| mousetrap::HSVA::HSVA |
( |
RGBA |
rgba | ) |
|
|
explicit |
convert rgba to hsva
- Parameters
-
References a, h, s, and v.
◆ operator!=()
| bool mousetrap::HSVA::operator!= |
( |
const HSVA & |
other | ) |
|
comparison operator
- Parameters
-
- Returns
- true if all components do not exaclty equal eachother, false otherwise. This is subject to issues stemming from float precision, consider quantizing the colors before comparison
◆ operator==()
| bool mousetrap::HSVA::operator== |
( |
const HSVA & |
other | ) |
|
comparison operator
- Parameters
-
- Returns
- true if all components exactly equal eachother, false otherwise. This is subject to issues stemming from float precision, consider quantizing the colors before comparison
References a, h, s, and v.
The documentation for this struct was generated from the following files:
- /home/clem/Workspace/mousetrap/include/mousetrap/color.hpp
- /home/clem/Workspace/mousetrap/src/color.cpp