CIE XYZ color value. More...
#include <xyzcolor.h>
Public Types | |
| using | DataType = Array< double, 3 > |
| Underlying storage type for the three XYZ components. | |
Public Member Functions | |
| XYZColor () | |
| Constructs an invalid XYZColor with all components set to -1.0. | |
| XYZColor (const DataType &val) | |
| Constructs an XYZColor from a DataType array. | |
| XYZColor (double x, double y, double z) | |
| Constructs an XYZColor from individual component values. | |
| bool | isValid () const |
| Returns true if all components are in the valid [0.0, 1.0] range. | |
| const DataType & | data () const |
| Returns a const reference to the underlying data array. | |
| DataType & | data () |
| Returns a mutable reference to the underlying data array. | |
| double | x () |
| Returns the X component. | |
| double | y () |
| Returns the Y component. | |
| double | z () |
| Returns the Z component. | |
| void | set (double x, double y, double z) |
| Sets all three XYZ components. | |
| void | setX (double val) |
| Sets the X component. | |
| void | setY (double val) |
| Sets the Y component. | |
| void | setZ (double val) |
| Sets the Z component. | |
| XYZColor | lerp (const XYZColor &val, double t) const |
| Returns a linearly interpolated XYZColor between this and val. | |
| operator String () | |
| Converts to a String using toString(). | |
| String | toString () const |
| Returns a string representation of the XYZ color. | |
CIE XYZ color value.
Represents a color in the CIE 1931 XYZ color space as three double-precision components. Valid component values are in the [0.0, 1.0] range. A default-constructed XYZColor uses -1.0 for all components to indicate an invalid/uninitialized state.
Constructs an XYZColor from a DataType array.
| val | The array containing X, Y, and Z values. |
Constructs an XYZColor from individual component values.
| x | The X (luminance-related) component. |
| y | The Y (luminance) component. |
| z | The Z (blue-related) component. |