Class representing a color with four floats. More...
#include <SColor.h>
Class representing a color with four floats.
The color values for red, green, blue and alpha are each stored in a 32 bit floating point variable. So all four values may be between 0.0f and 1.0f. Another, faster way to define colors is using the class SColor, which stores the color values in a single 32 bit integer.
irr::video::SColorf::SColorf | ( | ) | [inline] |
Default constructor for SColorf.
Sets red, green and blue to 0.0f and alpha to 1.0f.
Definition at line 463 of file SColor.h.
Referenced by getInterpolated(), and getInterpolated_quadratic().
Constructs a color from up to four color values: red, green, blue, and alpha.
r,: | Red color component. Should be a value between 0.0f meaning no red and 1.0f, meaning full red. |
g,: | Green color component. Should be a value between 0.0f meaning no green and 1.0f, meaning full green. |
b,: | Blue color component. Should be a value between 0.0f meaning no blue and 1.0f, meaning full blue. |
a,: | Alpha color component of the color. The alpha component defines how transparent a color should be. Has to be a value between 0.0f and 1.0f, 1.0f means not transparent (opaque), 0.0f means fully transparent. |
irr::video::SColorf::SColorf | ( | SColor | c | ) | [inline] |
Constructs a color from 32 bit Color.
c,: | 32 bit color from which this SColorf class is constructed from. |
Definition at line 481 of file SColor.h.
References a, b, g, irr::video::SColor::getAlpha(), irr::video::SColor::getBlue(), irr::video::SColor::getGreen(), irr::video::SColor::getRed(), and r.
f32 irr::video::SColorf::getAlpha | ( | ) | const [inline] |
f32 irr::video::SColorf::getBlue | ( | ) | const [inline] |
Returns the blue component of the color in the range 0.0 to 1.0.
Definition at line 571 of file SColor.h.
References b.
Referenced by irr::video::SColorHSL::fromRGB().
f32 irr::video::SColorf::getGreen | ( | ) | const [inline] |
Returns the green component of the color in the range 0.0 to 1.0.
Definition at line 568 of file SColor.h.
References g.
Referenced by irr::video::SColorHSL::fromRGB().
f32 irr::video::SColorf::getRed | ( | ) | const [inline] |
Returns the red component of the color in the range 0.0 to 1.0.
Definition at line 565 of file SColor.h.
References r.
Referenced by irr::video::SColorHSL::fromRGB().
Sets three color components to new values at once.
rr,: | Red color component. Should be a value between 0.0f meaning no red (=black) and 1.0f, meaning full red. |
gg,: | Green color component. Should be a value between 0.0f meaning no green (=black) and 1.0f, meaning full green. |
bb,: | Blue color component. Should be a value between 0.0f meaning no blue (=black) and 1.0f, meaning full blue. |
Definition at line 503 of file SColor.h.
Referenced by irr::video::SColorHSL::toRGB().
Sets all four color components to new values at once.
aa,: | Alpha component. Should be a value between 0.0f meaning fully transparent and 1.0f, meaning opaque. |
rr,: | Red color component. Should be a value between 0.0f meaning no red and 1.0f, meaning full red. |
gg,: | Green color component. Should be a value between 0.0f meaning no green and 1.0f, meaning full green. |
bb,: | Blue color component. Should be a value between 0.0f meaning no blue and 1.0f, meaning full blue. |
SColor irr::video::SColorf::toSColor | ( | ) | const [inline] |
alpha color component
Definition at line 583 of file SColor.h.
Referenced by getAlpha(), getInterpolated(), getInterpolated_quadratic(), SColorf(), set(), setColorComponentValue(), and toSColor().
blue component
Definition at line 580 of file SColor.h.
Referenced by getBlue(), getInterpolated(), getInterpolated_quadratic(), SColorf(), set(), setColorComponentValue(), and toSColor().
green color component
Definition at line 577 of file SColor.h.
Referenced by getGreen(), getInterpolated(), getInterpolated_quadratic(), SColorf(), set(), setColorComponentValue(), and toSColor().
red color component
Definition at line 574 of file SColor.h.
Referenced by getInterpolated(), getInterpolated_quadratic(), getRed(), SColorf(), set(), setColorComponentValue(), and toSColor().