cee::Color4f
-
class Color4f
Class for storing an RGBA color.
Each color component is floating point value in the interval [0.0, 1.0].
Public Functions
-
Color4f()
Constructs a default color object.
Initializes RGB color components to 0.0. Alpha is set to 1.0
-
Color4f(float r, float g, float b, float a)
Constructs a color using the color components r, g, b, a.
-
Color4f &operator=(const Color4f &rhs)
Assigns rhs to this color and returns a reference to this color.
-
bool operator==(const Color4f &rhs) const
Returns true if rhs is equal to this color; otherwise returns false.
-
bool operator!=(const Color4f &rhs) const
Returns true if rhs is not equal to this color; otherwise returns false.
-
const float &r() const
Red color component.
Used for setting or getting the red color component of the color, e.g.
color.r = 0.5f; float red = color.r;
-
const float &g() const
Green color component.
Used for setting or getting the green color component of the color, e.g.
color.g = 0.5f; float green = color.g;
-
const float &b() const
Blue color component.
Used for setting or getting the blue color component of the color, e.g.
color.b = 0.5f; float blue = color.b;
-
const float &a() const
Alpha color component.
Used for setting or getting the alpha color component of the color, e.g.
color.a = 0.5f; float alpha = color.a;
-
float &r()
Red color component.
Used for setting or getting the red color component of the color, e.g.
color.r = 0.5f; float red = color.r;
-
float &g()
Green color component.
Used for setting or getting the green color component of the color, e.g.
color.g = 0.5f; float green = color.g;
-
float &b()
Blue color component.
Used for setting or getting the blue color component of the color, e.g.
color.b = 0.5f; float blue = color.b;
-
float &a()
Alpha color component.
Used for setting or getting the alpha color component of the color, e.g.
color.a = 0.5f; float alpha = color.a;
-
bool isValid() const
Returns true if the color is valid (all components in the range 0.0 -> 1.0)
-
Color4f()