nw::ut::FloatColor Structure

Syntax

struct FloatColor
{
   f32 r;
   f32 g;
   f32 b;
   f32 a;
};

Description

Structure representing floating-point colors.

Member Constants

S ELEMENT_MIN const int The minimum value of the color component.
S ELEMENT_MAX const int The maximum value of the color component.
S ALPHA_MIN const int The minimum alpha value.
S ALPHA_MAX const int The minimum alpha value.
S ALPHA_OPACITY const int The alpha value for transparency.
S ALPHA_TRANSPARENT const int The alpha value for transparency.

Member Variables

r f32 The R color component.
g f32 The G color component.
b f32 The B color component.
a f32 The A color component.

Member Functions

Constructors and Destructors
FloatColor This is the default constructor.
~FloatColor Destructor.
Overloaded Operators
operator= An assignment operator that sets a FloatColor value equal to an RGBA8 color.
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 & The const version of an operator for casting to a VEC4 value.
operator + An addition operator for two colors.
operator - A subtraction operator for two colors.
operator * A multiplication operator for two colors.
operator / A division operator for two colors.
operator += A compound assignment operator for adding two colors.
operator -= A compound assignment operator for subtracting two colors.
operator *= A compound assignment operator for multiplying two colors.
operator /= A compound assignment operator for dividing two colors.
operator== A comparison operator.
operator!= The inequality operator.
Set/Get
Set Sets color values.
SetColor Sets color values.
SetAlpha Sets value to the alpha.
Clamp Clamps each component to a value between 0.0 and 1.0.
ToArray Converts values into an array of floating-point numbers.
ToPicaU32 Converts values into the PICA u32 type.

CONFIDENTIAL