|
| SColor () |
| Constructor of the Color. Does nothing. More...
|
|
| SColor (std::uint32_t a, std::uint32_t r, std::uint32_t g, std::uint32_t b) |
| Constructs the color from 4 values representing the alpha, red, green and blue component. More...
|
|
| SColor (std::uint32_t clr) |
| Constructs the color from a 32 bit value. Could be another color. More...
|
|
std::uint32_t | getAlpha () const |
| Returns the alpha component of the color. More...
|
|
std::uint32_t | getRed () const |
| Returns the red component of the color. More...
|
|
std::uint32_t | getGreen () const |
| Returns the green component of the color. More...
|
|
std::uint32_t | getBlue () const |
| Returns the blue component of the color. More...
|
|
float | getLightness () const |
| Get lightness of the color in the range [0,255]. More...
|
|
float | getLuminance () const |
| Get luminance of the color in the range [0,255]. More...
|
|
std::uint32_t | getAverage () const |
| Get average intensity of the color in the range [0,255]. More...
|
|
void | setAlpha (std::uint32_t a) |
| Sets the alpha component of the Color. More...
|
|
void | setRed (std::uint32_t r) |
| Sets the red component of the Color. More...
|
|
void | setGreen (std::uint32_t g) |
| Sets the green component of the Color. More...
|
|
void | setBlue (std::uint32_t b) |
| Sets the blue component of the Color. More...
|
|
std::uint16_t | toA1R5G5B5 () const |
| Calculates a 16 bit A1R5G5B5 value of this color. More...
|
|
void | toOpenGLColor (std::uint8_t *dest) const |
| Converts color to OpenGL color format. More...
|
|
glm::uvec4 | toGLM () const |
|
void | set (std::uint32_t a, std::uint32_t r, std::uint32_t g, std::uint32_t b) |
| Sets all four components of the color at once. More...
|
|
void | set (std::uint32_t col) |
|
bool | operator== (const SColor &other) const |
| Compares the color to another color. More...
|
|
bool | operator!= (const SColor &other) const |
| Compares the color to another color. More...
|
|
bool | operator< (const SColor &other) const |
| comparison operator More...
|
|
SColor | operator+ (const SColor &other) const |
| Adds two colors, result is clamped to 0..255 values. More...
|
|
SColor | getInterpolated (const SColor &other, float d) const |
| Interpolates the color with a float value to another color. More...
|
|
SColor | getInterpolated_quadratic (const SColor &c1, const SColor &c2, float d) const |
| Returns interpolated color. (quadratic) More...
|
|
void | setData (const void *data, E_PIXEL_FORMAT format) |
| set the color by expecting data in the given format More...
|
|
void | getData (void *data, E_PIXEL_FORMAT format) const |
| Write the color to data in the defined format. More...
|
|
Class representing a 32 bit ARGB color.
The color values for alpha, red, green, and blue are stored in a single std::uint32_t. So all four values may be between 0 and 255. Alpha in Irrlicht is opacity, so 0 is fully transparent, 255 is fully opaque (solid). This class is used by most parts of the Irrlicht Engine to specify a color. Another way is using the class SColorf, which stores the color values in 4 floats. This class must consist of only one std::uint32_t and must not use virtual functions.
Definition at line 197 of file SColor.h.