NDEVR
API Documentation

Forward declaration of HSLColor. More...

Inheritance diagram for XYZColor:
[legend]
Collaboration diagram for XYZColor:
[legend]

Public Member Functions

constexpr XYZColor ()
 Constructs an invalid XYZColor with all components set to Invalid.
 XYZColor (const ACIColor &)
 Constructs an XYZColor by converting from an ACIColor.
 XYZColor (const HSBColor &)
 Constructs an XYZColor by converting from an HSBColor.
 XYZColor (const HSLColor &)
 Constructs an XYZColor by converting from an HSLColor.
 XYZColor (const LABColor &)
 Constructs an XYZColor by converting from a LABColor.
 XYZColor (const RGBColor &)
 Constructs an XYZColor by converting from an RGBColor.
constexpr XYZColor (const Vector< 4, fltp04 > &color)
 Constructs an XYZColor from a 4-component vector.
constexpr XYZColor (fltp04 x, fltp04 y, fltp04 z, fltp04 a=1.0f)
 Constructs an XYZColor from individual X, Y, Z, and alpha components, clamped to valid ranges.
void setA (fltp04 a)
 Sets the alpha component.
void setX (fltp04 x)
 Sets the X component, clamped to [0, 0.9505].
void setY (fltp04 y)
 Sets the Y component, clamped to [0, 1.0].
void setZ (fltp04 z)
 Sets the Z component, clamped to [0, 1.089].
Public Member Functions inherited from Vector< 4, fltp04 >
constexpr Vector (const fltp04 &prefix, typename std::enable_if< tdims >=2, const Vector< t_dims - 1, fltp04 > & >::type vector)
 Creates a vector where the prefix scaler is combined with the suffix vector.
constexpr Vector (const fltp04 &prefix_a, const fltp04 &prefix_b, typename std::enable_if< tdims >=3, const Vector< tdims - 1, fltp04 > & >::type vector)
 Creates a vector where the prefix scaler values are combined with the suffix vector.
constexpr Vector (const fltp04 &scaler) noexcept
constexpr Vector (const fltp04 &x, const fltp04 &y, const fltp04 &z, typename std::enable_if< tdims==4, const fltp04 & >::type w)
 Sets values in each dimension to the respective value in the passed in scaler.
constexpr Vector (const fltp04 &x, const fltp04 &y, const typename std::enable_if< tdims==3, const fltp04 & >::type z)
 Sets values in each dimension to the respective value in the passed in scaler.
constexpr Vector (const fltp04 &x, typename std::enable_if< tdims==2, const fltp04 & >::type y)
 Sets values in each dimension to the respective value in the passed in scaler.
constexpr Vector (const fltp04(&vector)[t_dims])
 Given a container of statically determined array, transforms it to a vector.
constexpr Vector (const Vector< getMax(tdims - 2, 0), fltp04 > &vector, const fltp04 &suffix_a, typename std::enable_if< tdims >=3, const fltp04 & >::type suffix_b)
 Creates a vector where the prefix vector is combined with the suffix scalers.
constexpr Vector (const Vector< t_dims, t_vec_type > &vector) noexcept
constexpr Vector (const Vector< tdims - 1, fltp04 > &vector, typename std::enable_if< tdims >=2, const fltp04 & >::type suffix)
 Creates a vector where the prefix vector is combined with the suffix scalers.
constexpr decltype(auto) as () const
 Returns the vector as a new time of vector.
constexpr uint01 dimensionalIndex () const
 Used with template arguments MAX or MIN, Gets the dimensional index for the value that is either max or min.
constexpr fltp04 dimensionalValue () const
 Used with template arguments MAX or MIN, Gets the dimensional value for the value that is either max or min.
constexpr t_magnitude_type magnitude () const
 Vectors are commonly used to model forces such as wind, sea current, gravity, and electromagnetism.
constexpr fltp04 magnitudeSquared () const
 Vectors are commonly used to model forces such as wind, sea current, gravity, and electromagnetism.
constexpr Vector< t_dims, t_norm_type > normalized (Vector< t_dims, t_norm_type > value_if_nan=Constant< Vector< t_dims, t_norm_type > >::Invalid) const
 Gets the normalized, or unit length representation of this vector.
constexpr operator fltp04 & ()
 For Single dimensional objects, they may also be considered a scaler, thus allow implicit conversion from a vector to a scaler when the dimension of the vector is 1.
constexpr operator fltp04 & ()
 For Single dimensional objects, they may also be considered a scaler, thus allow implicit conversion from a vector to a scaler when the dimension of the vector is 1.
constexpr Vector< t_dims, fltp04operator- () const
 Negation operator.
constexpr Vector< t_dims, fltp04 > & operator= (const fltp04 &scaler)
 Assignment operator.
constexpr fltp04operator[] (uint01 dimension_index)
 Accesses the value of a certain dimension.
constexpr fltp04 product () const
 Returns the product, or value of each dimension multiplied together.
constexpr fltp04 sum () const
 Returns the sum, or value of each dimension added together.

Static Public Member Functions

static XYZColor getD65 ()
 Returns the CIE standard illuminant D65 reference white point.
Static Public Member Functions inherited from Vector< 4, fltp04 >
static constexpr uint01 NumberOfDimensions ()
 Number of dimensions in this vector class.
static constexpr fltp04 Type ()
 Returns the type of this class.

Additional Inherited Members

Protected Attributes inherited from Vector< 4, fltp04 >
fltp04 m_values [t_dims]
 The values[t dims].

Detailed Description

Forward declaration of HSLColor.


A color defined in the CIE 1931 XYZ absolute color space.

In opposition to the previous models, the CIE XYZ model defines an absolute color space. It is also known as the CIE 1931 XYZ color space and stands for: X, which can be compared to red Ranges from 0 to 0.9505 Y, which can be compared to green Ranges from 0 to 1.0 Z, which can be compared to blue Ranges from 0 to 1.089

See also
RGBColor, LABColor, HSBColor

Definition at line 54 of file XYZColor.h.

Constructor & Destructor Documentation

◆ XYZColor() [1/7]

XYZColor::XYZColor ( const Vector< 4, fltp04 > & color)
inlineexplicitconstexpr

Constructs an XYZColor from a 4-component vector.

Parameters
[in]colorThe vector containing X, Y, Z, and alpha components.

Definition at line 67 of file XYZColor.h.

◆ XYZColor() [2/7]

XYZColor::XYZColor ( fltp04 x,
fltp04 y,
fltp04 z,
fltp04 a = 1.0f )
inlineconstexpr

Constructs an XYZColor from individual X, Y, Z, and alpha components, clamped to valid ranges.

Parameters
[in]xThe X component (red-like), clamped to [0, 0.9505].
[in]yThe Y component (green-like), clamped to [0, 1.0].
[in]zThe Z component (blue-like), clamped to [0, 1.0].
[in]aThe alpha component. Defaults to 1.0 (fully opaque).

Definition at line 77 of file XYZColor.h.

References clip().

◆ XYZColor() [3/7]

XYZColor::XYZColor ( const RGBColor & )
explicit

Constructs an XYZColor by converting from an RGBColor.

Parameters
[in]colorThe RGBColor to convert.

◆ XYZColor() [4/7]

XYZColor::XYZColor ( const ACIColor & )
explicit

Constructs an XYZColor by converting from an ACIColor.

Parameters
[in]colorThe ACIColor to convert.

◆ XYZColor() [5/7]

XYZColor::XYZColor ( const LABColor & )
explicit

Constructs an XYZColor by converting from a LABColor.

Parameters
[in]colorThe LABColor to convert.

◆ XYZColor() [6/7]

XYZColor::XYZColor ( const HSBColor & )
explicit

Constructs an XYZColor by converting from an HSBColor.

Parameters
[in]colorThe HSBColor to convert.

◆ XYZColor() [7/7]

XYZColor::XYZColor ( const HSLColor & )
explicit

Constructs an XYZColor by converting from an HSLColor.

Parameters
[in]colorThe HSLColor to convert.

Member Function Documentation

◆ getD65()

XYZColor XYZColor::getD65 ( )
inlinestatic

Returns the CIE standard illuminant D65 reference white point.

Returns
The D65 white point as an XYZColor.

Definition at line 145 of file XYZColor.h.

References XYZColor().

◆ setA()

void XYZColor::setA ( fltp04 a)
inline

Sets the alpha component.

Parameters
[in]aThe alpha value to set.

Definition at line 137 of file XYZColor.h.

References Vector< 4, fltp04 >::m_values.

◆ setX()

void XYZColor::setX ( fltp04 x)
inline

Sets the X component, clamped to [0, 0.9505].

Parameters
[in]xThe X component value to set.

Definition at line 113 of file XYZColor.h.

References Vector< 4, fltp04 >::m_values.

◆ setY()

void XYZColor::setY ( fltp04 y)
inline

Sets the Y component, clamped to [0, 1.0].

Parameters
[in]yThe Y component value to set.

Definition at line 121 of file XYZColor.h.

References Vector< 4, fltp04 >::m_values.

◆ setZ()

void XYZColor::setZ ( fltp04 z)
inline

Sets the Z component, clamped to [0, 1.089].

Parameters
[in]zThe Z component value to set.

Definition at line 129 of file XYZColor.h.

References Vector< 4, fltp04 >::m_values.


The documentation for this class was generated from the following file: