struct FloatColor
{
f32 r;
f32 g;
f32 b;
f32 a;
};
Structure representing a floating point color.
| S | ELEMENT_MIN | Minimum value of color elements. |
|---|---|---|
| S | ELEMENT_MAX | Maximum value of color elements. |
| S | ALPHA_MIN | Minimum value of alpha. |
| S | ALPHA_MAX | Minimum value of alpha. |
| S | ALPHA_OPACITY | Alpha value for opacity. |
| S | ALPHA_TRANSPARENT | Alpha value for transparency. |
| r | R component of a color. | |
|---|---|---|
| g | G component of a color. | |
| b | B component of a color. | |
| a | A component of a color. |
| Constructors and Destructors | ||
|---|---|---|
| FloatColor | This is the default constructor. | |
~FloatColor
|
Destructor. | |
| Operator Overload | ||
| operator= | Assignment operator for setting an RGBA8 color in FloatColor. | |
operator f32 *
|
An operator for casting to an f32 array. |
|
operator const f32 *
|
The const version of an operator for casting to an f32 array. |
|
operator Color8
|
An operator for casting to an RGBA8 color. | |
| operator nw::math::VEC4 & | An operator for casting to a VEC4 value. |
|
| operator const nw::math::VEC4 & | Operator for casting to VEC4 (const type). | |
| operator + | Addition operator for same colors. | |
| operator - | Subtraction operator for same colors. | |
| operator * | Multiplication operator for same colors. | |
| operator / | Division operator for same colors. | |
| operator += | Addition assignment operator for same colors. | |
| operator -= | Subtraction assignment operator for same colors. | |
| operator *= | Multiplication assignment operator for same colors. | |
| operator /= | Division assignment operator for same colors. | |
operator ==
|
Comparison operator. | |
operator !=
|
Negative comparison function. | |
| Set/Get | ||
Set
|
Sets values for a color. | |
| SetColor | Sets values for a color. | |
SetAlpha
|
Sets value to the alpha. | |
| Clamp | Clamps each element in the range between 0.0 and 1.0. | |
| ToArray | Converts to a floating point number array. | |
| ToPicaU32 | Converts to Pica u32 type. | |
CONFIDENTIAL