|
| TTristimulusSpectrum ()=default |
|
| TTristimulusSpectrum (const TTristimulusSpectrum &other)=default |
|
| TTristimulusSpectrum (TTristimulusSpectrum &&other)=default |
|
TTristimulusSpectrum & | operator= (const TTristimulusSpectrum &rhs)=default |
|
TTristimulusSpectrum & | operator= (TTristimulusSpectrum &&rhs)=default |
|
| ~TTristimulusSpectrum ()=default |
|
| TTristimulusSpectrum (T c0, T c1, T c2) |
|
template<typename U > |
| TTristimulusSpectrum (const TTristimulusSpectrum< COLOR_SPACE, U > &other) |
|
| TSpectrumBase (const TRawColorValues< U, N > &values) |
| Set color values directly. Calling setColorValues() has the same effect. This is the most general form that allows type conversion. Basically, all other overloads with value inputs is equivalent to calling setColorValues() , too (unless otherwise noted).
|
|
std::size_t | minComponent () const |
|
std::size_t | maxComponent () const |
|
TTristimulusSpectrum< COLOR_SPACE, T > & | setTransformed (const auto &srcColorValues, EColorUsage usage) |
|
TTristimulusSpectrum< COLOR_SPACE, T > & | setTransformed (const ImplType &srcColorValues, EColorUsage usage) |
|
auto | setTransformed (const auto &srcColorValues, const EColorUsage usage) -> TTristimulusSpectrum< COLOR_SPACE, T > & |
|
auto | setTransformed (const ImplType &srcColorValues, const EColorUsage usage) -> TTristimulusSpectrum< COLOR_SPACE, T > & |
|
auto | toTransformed (EColorUsage usage) const |
|
void | transformFrom (const auto &srcColorValues, EColorSpace srcColorSpace, EColorUsage usage) |
|
void | transformTo (auto *out_dstColorValues, EColorSpace dstColorSpace, EColorUsage usage) const |
|
TTristimulusSpectrum< COLOR_SPACE, T > & | setSpectral (const TSpectralSampleValues< T > &sampleValues, EColorUsage usage) |
| Helper for setting spectral values to this spectrum.
|
|
TTristimulusSpectrum< COLOR_SPACE, T > & | setSpectral (const ImplType &sampleValues, EColorUsage usage) |
| Helper for setting spectral values to this spectrum.
|
|
auto | setSpectral (const TSpectralSampleValues< T > &sampleValues, const EColorUsage usage) -> TTristimulusSpectrum< COLOR_SPACE, T > & |
|
auto | setSpectral (const ImplType &sampleValues, const EColorUsage usage) -> TTristimulusSpectrum< COLOR_SPACE, T > & |
|
TSpectralSampleValues< T > | toSpectral (EColorUsage usage) const |
| Helper for getting spectral values from this spectrum.
|
|
T | relativeLuminance (EColorUsage usage=EColorUsage::EMR) const |
|
TTristimulusSpectrum< COLOR_SPACE, T > & | setLinearSRGB (const TRawColorValues< T, 3 > &linearSRGB, EColorUsage usage) |
| Helper for setting linear-sRGB color to this spectrum.
|
|
TRawColorValues< T, 3 > | toLinearSRGB (EColorUsage usage) const |
| Helper for converting this spectrum to linear-sRGB color.
|
|
TTristimulusSpectrum< COLOR_SPACE, T > & | putEnergy (T energyLevel) |
|
TTristimulusSpectrum< COLOR_SPACE, T > | add (const TTristimulusSpectrum< COLOR_SPACE, T > &rhs) const |
|
TTristimulusSpectrum< COLOR_SPACE, T > | add (T rhs) const |
|
TTristimulusSpectrum< COLOR_SPACE, T > & | addLocal (const TTristimulusSpectrum< COLOR_SPACE, T > &rhs) |
|
TTristimulusSpectrum< COLOR_SPACE, T > & | addLocal (T rhs) |
|
TTristimulusSpectrum< COLOR_SPACE, T > | sub (const TTristimulusSpectrum< COLOR_SPACE, T > &rhs) const |
|
TTristimulusSpectrum< COLOR_SPACE, T > | sub (T rhs) const |
|
TTristimulusSpectrum< COLOR_SPACE, T > & | subLocal (const TTristimulusSpectrum< COLOR_SPACE, T > &rhs) |
|
TTristimulusSpectrum< COLOR_SPACE, T > & | subLocal (T rhs) |
|
TTristimulusSpectrum< COLOR_SPACE, T > | mul (const TTristimulusSpectrum< COLOR_SPACE, T > &rhs) const |
|
TTristimulusSpectrum< COLOR_SPACE, T > | mul (T rhs) const |
|
TTristimulusSpectrum< COLOR_SPACE, T > & | mulLocal (const TTristimulusSpectrum< COLOR_SPACE, T > &rhs) |
|
TTristimulusSpectrum< COLOR_SPACE, T > & | mulLocal (T rhs) |
|
TTristimulusSpectrum< COLOR_SPACE, T > | div (const TTristimulusSpectrum< COLOR_SPACE, T > &rhs) const |
|
TTristimulusSpectrum< COLOR_SPACE, T > | div (T rhs) const |
|
TTristimulusSpectrum< COLOR_SPACE, T > & | divLocal (const TTristimulusSpectrum< COLOR_SPACE, T > &rhs) |
|
TTristimulusSpectrum< COLOR_SPACE, T > & | divLocal (T rhs) |
|
TTristimulusSpectrum< COLOR_SPACE, T > | pow (U exponent) const |
|
TTristimulusSpectrum< COLOR_SPACE, T > | pow (const TTristimulusSpectrum< COLOR_SPACE, T > &exponent) const |
|
TTristimulusSpectrum< COLOR_SPACE, T > & | powLocal (U exponent) |
|
TTristimulusSpectrum< COLOR_SPACE, T > & | powLocal (const TTristimulusSpectrum< COLOR_SPACE, T > &exponent) |
|
TTristimulusSpectrum< COLOR_SPACE, T > | exp (U exponent) const |
| Sets the array to \( e^exponent \).
|
|
TTristimulusSpectrum< COLOR_SPACE, T > | exp (const TTristimulusSpectrum< COLOR_SPACE, T > &exponent) const |
| Sets the array to \( e^{exponent_i} \).
|
|
TTristimulusSpectrum< COLOR_SPACE, T > & | expLocal (U exponent) |
|
TTristimulusSpectrum< COLOR_SPACE, T > & | expLocal (const TTristimulusSpectrum< COLOR_SPACE, T > &exponent) |
|
TTristimulusSpectrum< COLOR_SPACE, T > | sqrt () const |
|
TTristimulusSpectrum< COLOR_SPACE, T > & | sqrtLocal () |
|
TTristimulusSpectrum< COLOR_SPACE, T > | clamp (T lowerBound, T upperBound) const |
| Clamps current array's elements to specific range. None of value , lowerBound and upperBound can be NaN, or the method's behavior is undefined.
|
|
TTristimulusSpectrum< COLOR_SPACE, T > | clamp (const TTristimulusSpectrum< COLOR_SPACE, T > &lowerBound, const TTristimulusSpectrum< COLOR_SPACE, T > &upperBound) const |
|
TTristimulusSpectrum< COLOR_SPACE, T > & | clampLocal (T lowerBound, T upperBound) |
|
TTristimulusSpectrum< COLOR_SPACE, T > & | clampLocal (const TTristimulusSpectrum< COLOR_SPACE, T > &lowerBound, const TTristimulusSpectrum< COLOR_SPACE, T > &upperBound) |
|
TTristimulusSpectrum< COLOR_SPACE, T > | safeClamp (T lowerBound, T upperBound) const |
| Clamps current array's elements to specific range. If a floating-point value is non-finite (e.g., being Inf, NaN), its value is clamped to lowerBound . Neither lowerBound nor upperBound can be NaN, or the method's behavior is undefined.
|
|
TTristimulusSpectrum< COLOR_SPACE, T > | safeClamp (const TTristimulusSpectrum< COLOR_SPACE, T > &lowerBound, const TTristimulusSpectrum< COLOR_SPACE, T > &upperBound) const |
|
TTristimulusSpectrum< COLOR_SPACE, T > & | safeClampLocal (T lowerBound, T upperBound) |
|
TTristimulusSpectrum< COLOR_SPACE, T > & | safeClampLocal (const TTristimulusSpectrum< COLOR_SPACE, T > &lowerBound, const TTristimulusSpectrum< COLOR_SPACE, T > &upperBound) |
|
TTristimulusSpectrum< COLOR_SPACE, T > | abs () const |
|
TTristimulusSpectrum< COLOR_SPACE, T > & | absLocal () |
|
TTristimulusSpectrum< COLOR_SPACE, T > | rcp () const |
|
TTristimulusSpectrum< COLOR_SPACE, T > & | rcpLocal () |
|
TTristimulusSpectrum< COLOR_SPACE, T > | complement () const |
| Complements the array's elements. Effectively performing 1 - (*this)[i] for each element.
|
|
TTristimulusSpectrum< COLOR_SPACE, T > & | complementLocal () |
|
TTristimulusSpectrum< COLOR_SPACE, T > | negate () const |
| Applies a negative sign to the array's elements. These methods is only defined for signed element types.
|
|
TTristimulusSpectrum< COLOR_SPACE, T > & | negateLocal () |
|
T | sum () const |
|
T | avg () const |
|
T | min () const |
|
TTristimulusSpectrum< COLOR_SPACE, T > | min (const TTristimulusSpectrum< COLOR_SPACE, T > &other) const |
|
T | max () const |
|
TTristimulusSpectrum< COLOR_SPACE, T > | max (const TTristimulusSpectrum< COLOR_SPACE, T > &other) const |
|
TTristimulusSpectrum< COLOR_SPACE, T > | ceil () const |
|
TTristimulusSpectrum< COLOR_SPACE, T > | floor () const |
|
T | product () const |
|
TTristimulusSpectrum< COLOR_SPACE, T > | lerp (const TTristimulusSpectrum< COLOR_SPACE, T > &rhs, U factor) const |
|
bool | isZero () const |
|
bool | isNonNegative () const |
|
bool | isFinite () const |
|
auto | begin () noexcept -> typename std::array< T, N >::iterator |
|
auto | begin () const noexcept -> typename std::array< T, N >::const_iterator |
|
auto | end () noexcept -> typename std::array< T, N >::iterator |
|
auto | end () const noexcept -> typename std::array< T, N >::const_iterator |
|
bool | isEqual (const TTristimulusSpectrum< COLOR_SPACE, T > &other) const |
|
bool | isNear (const TTristimulusSpectrum< COLOR_SPACE, T > &other, T margin) const |
|
std::string | toString () const |
|
std::vector< T > | toVector () const |
|
TTristimulusSpectrum< COLOR_SPACE, T > & | setColorValues (const TRawColorValues< T, N > &values) |
| Set and get raw color values directly.
|
|
TTristimulusSpectrum< COLOR_SPACE, T > & | setColorValues (T rawColorValue) |
|
const TRawColorValues< T, N > & | getColorValues () const |
|
| TArithmeticArrayBase (T value) |
|
| TArithmeticArrayBase (Elements values) |
|
auto | pow (const U exponent) const -> TTristimulusSpectrum< COLOR_SPACE, T > |
|
auto | powLocal (const U exponent) -> TTristimulusSpectrum< COLOR_SPACE, T > & |
|
auto | exp (const U exponent) const -> TTristimulusSpectrum< COLOR_SPACE, T > |
|
auto | expLocal (const U exponent) -> TTristimulusSpectrum< COLOR_SPACE, T > & |
|
auto | lerp (const TTristimulusSpectrum< COLOR_SPACE, T > &rhs, const U factor) const -> TTristimulusSpectrum< COLOR_SPACE, T > |
|
|
using | Elements |
|
static consteval EColorSpace | getColorSpace () noexcept |
|
static constexpr auto | NUM_VALUES |
|
| PH_DEFINE_INLINE_RULE_OF_5_MEMBERS (TSpectrumBase) |
|
| PH_DEFINE_INLINE_RULE_OF_5_MEMBERS (TArithmeticArrayBase) |
|
constexpr std::size_t | size () const noexcept |
| Number of elements of the array.
|
|
TTristimulusSpectrum< COLOR_SPACE, T > | add (const TTristimulusSpectrum< COLOR_SPACE, T > &rhs) const |
|
TTristimulusSpectrum< COLOR_SPACE, T > | add (T rhs) const |
|
TTristimulusSpectrum< COLOR_SPACE, T > & | addLocal (const TTristimulusSpectrum< COLOR_SPACE, T > &rhs) |
|
TTristimulusSpectrum< COLOR_SPACE, T > & | addLocal (T rhs) |
|
TTristimulusSpectrum< COLOR_SPACE, T > | sub (const TTristimulusSpectrum< COLOR_SPACE, T > &rhs) const |
|
TTristimulusSpectrum< COLOR_SPACE, T > | sub (T rhs) const |
|
TTristimulusSpectrum< COLOR_SPACE, T > & | subLocal (const TTristimulusSpectrum< COLOR_SPACE, T > &rhs) |
|
TTristimulusSpectrum< COLOR_SPACE, T > & | subLocal (T rhs) |
|
TTristimulusSpectrum< COLOR_SPACE, T > | mul (const TTristimulusSpectrum< COLOR_SPACE, T > &rhs) const |
|
TTristimulusSpectrum< COLOR_SPACE, T > | mul (T rhs) const |
|
TTristimulusSpectrum< COLOR_SPACE, T > & | mulLocal (const TTristimulusSpectrum< COLOR_SPACE, T > &rhs) |
|
TTristimulusSpectrum< COLOR_SPACE, T > & | mulLocal (T rhs) |
|
TTristimulusSpectrum< COLOR_SPACE, T > | div (const TTristimulusSpectrum< COLOR_SPACE, T > &rhs) const |
|
TTristimulusSpectrum< COLOR_SPACE, T > | div (T rhs) const |
|
TTristimulusSpectrum< COLOR_SPACE, T > & | divLocal (const TTristimulusSpectrum< COLOR_SPACE, T > &rhs) |
|
TTristimulusSpectrum< COLOR_SPACE, T > & | divLocal (T rhs) |
|
TTristimulusSpectrum< COLOR_SPACE, T > | pow (U exponent) const |
|
TTristimulusSpectrum< COLOR_SPACE, T > | pow (const TTristimulusSpectrum< COLOR_SPACE, T > &exponent) const |
|
TTristimulusSpectrum< COLOR_SPACE, T > & | powLocal (U exponent) |
|
TTristimulusSpectrum< COLOR_SPACE, T > & | powLocal (const TTristimulusSpectrum< COLOR_SPACE, T > &exponent) |
|
TTristimulusSpectrum< COLOR_SPACE, T > | sqrt () const |
|
TTristimulusSpectrum< COLOR_SPACE, T > & | sqrtLocal () |
|
TTristimulusSpectrum< COLOR_SPACE, T > | abs () const |
|
TTristimulusSpectrum< COLOR_SPACE, T > & | absLocal () |
|
TTristimulusSpectrum< COLOR_SPACE, T > | rcp () const |
|
TTristimulusSpectrum< COLOR_SPACE, T > & | rcpLocal () |
|
T | sum () const |
|
T | avg () const |
|
T | product () const |
|
T | min () const |
|
TTristimulusSpectrum< COLOR_SPACE, T > | min (const TTristimulusSpectrum< COLOR_SPACE, T > &other) const |
|
std::size_t | minIndex () const |
|
T | max () const |
|
TTristimulusSpectrum< COLOR_SPACE, T > | max (const TTristimulusSpectrum< COLOR_SPACE, T > &other) const |
|
std::size_t | maxIndex () const |
|
TTristimulusSpectrum< COLOR_SPACE, T > | ceil () const |
|
TTristimulusSpectrum< COLOR_SPACE, T > | floor () const |
|
TTristimulusSpectrum< COLOR_SPACE, T > | lerp (const TTristimulusSpectrum< COLOR_SPACE, T > &rhs, U factor) const |
|
bool | isZero () const |
|
bool | isNonNegative () const |
|
bool | isFinite () const |
|
TTristimulusSpectrum< COLOR_SPACE, T > & | set (T value) |
|
TTristimulusSpectrum< COLOR_SPACE, T > & | set (std::size_t index, T value) |
|
TTristimulusSpectrum< COLOR_SPACE, T > & | set (const std::array< T, N > &values) |
|
T & | operator[] (std::size_t index) |
|
const T & | operator[] (std::size_t index) const |
|
bool | isEqual (const TTristimulusSpectrum< COLOR_SPACE, T > &other) const |
|
bool | isNear (const TTristimulusSpectrum< COLOR_SPACE, T > &other, T margin) const |
|
bool | operator== (const TTristimulusSpectrum< COLOR_SPACE, T > &other) const |
|
bool | operator!= (const TTristimulusSpectrum< COLOR_SPACE, T > &other) const |
|
TTristimulusSpectrum< COLOR_SPACE, T > | operator+ (const TTristimulusSpectrum< COLOR_SPACE, T > &rhs) const |
|
TTristimulusSpectrum< COLOR_SPACE, T > | operator+ (T rhs) const |
|
TTristimulusSpectrum< COLOR_SPACE, T > | operator- (const TTristimulusSpectrum< COLOR_SPACE, T > &rhs) const |
|
TTristimulusSpectrum< COLOR_SPACE, T > | operator- (T rhs) const |
|
TTristimulusSpectrum< COLOR_SPACE, T > | operator- () const |
|
TTristimulusSpectrum< COLOR_SPACE, T > | operator* (const TTristimulusSpectrum< COLOR_SPACE, T > &rhs) const |
|
TTristimulusSpectrum< COLOR_SPACE, T > | operator* (T rhs) const |
|
TTristimulusSpectrum< COLOR_SPACE, T > | operator/ (const TTristimulusSpectrum< COLOR_SPACE, T > &rhs) const |
|
TTristimulusSpectrum< COLOR_SPACE, T > | operator/ (T rhs) const |
|
TTristimulusSpectrum< COLOR_SPACE, T > & | operator+= (const TTristimulusSpectrum< COLOR_SPACE, T > &rhs) |
|
TTristimulusSpectrum< COLOR_SPACE, T > & | operator+= (T rhs) |
|
TTristimulusSpectrum< COLOR_SPACE, T > & | operator-= (const TTristimulusSpectrum< COLOR_SPACE, T > &rhs) |
|
TTristimulusSpectrum< COLOR_SPACE, T > & | operator-= (T rhs) |
|
TTristimulusSpectrum< COLOR_SPACE, T > & | operator*= (const TTristimulusSpectrum< COLOR_SPACE, T > &rhs) |
|
TTristimulusSpectrum< COLOR_SPACE, T > & | operator*= (T rhs) |
|
TTristimulusSpectrum< COLOR_SPACE, T > & | operator/= (const TTristimulusSpectrum< COLOR_SPACE, T > &rhs) |
|
TTristimulusSpectrum< COLOR_SPACE, T > & | operator/= (T rhs) |
|
auto | begin () noexcept -> typename std::array< T, N >::iterator |
|
auto | begin () const noexcept -> typename std::array< T, N >::const_iterator |
|
auto | end () noexcept -> typename std::array< T, N >::iterator |
|
auto | end () const noexcept -> typename std::array< T, N >::const_iterator |
|
std::string | toString () const |
|
std::vector< T > | toVector () const |
|
std::array< T, N > | toArray () const |
|
TSpan< T, N > | toSpan () |
|
TSpanView< T, N > | toView () const |
|
TTristimulusSpectrum< COLOR_SPACE, T > | exp (U exponent) const |
| Sets the array to \( e^exponent \).
|
|
TTristimulusSpectrum< COLOR_SPACE, T > & | expLocal (U exponent) |
|
TTristimulusSpectrum< COLOR_SPACE, T > | exp (const TTristimulusSpectrum< COLOR_SPACE, T > &exponent) const |
| Sets the array to \( e^{exponent_i} \).
|
|
TTristimulusSpectrum< COLOR_SPACE, T > & | expLocal (const TTristimulusSpectrum< COLOR_SPACE, T > &exponent) |
|
TTristimulusSpectrum< COLOR_SPACE, T > | clamp (T lowerBound, T upperBound) const |
| Clamps current array's elements to specific range. None of value , lowerBound and upperBound can be NaN, or the method's behavior is undefined.
|
|
TTristimulusSpectrum< COLOR_SPACE, T > | clamp (const TTristimulusSpectrum< COLOR_SPACE, T > &lowerBound, const TTristimulusSpectrum< COLOR_SPACE, T > &upperBound) const |
|
TTristimulusSpectrum< COLOR_SPACE, T > & | clampLocal (T lowerBound, T upperBound) |
|
TTristimulusSpectrum< COLOR_SPACE, T > & | clampLocal (const TTristimulusSpectrum< COLOR_SPACE, T > &lowerBound, const TTristimulusSpectrum< COLOR_SPACE, T > &upperBound) |
|
TTristimulusSpectrum< COLOR_SPACE, T > | safeClamp (T lowerBound, T upperBound) const |
| Clamps current array's elements to specific range. If a floating-point value is non-finite (e.g., being Inf, NaN), its value is clamped to lowerBound . Neither lowerBound nor upperBound can be NaN, or the method's behavior is undefined.
|
|
TTristimulusSpectrum< COLOR_SPACE, T > | safeClamp (const TTristimulusSpectrum< COLOR_SPACE, T > &lowerBound, const TTristimulusSpectrum< COLOR_SPACE, T > &upperBound) const |
|
TTristimulusSpectrum< COLOR_SPACE, T > & | safeClampLocal (T lowerBound, T upperBound) |
|
TTristimulusSpectrum< COLOR_SPACE, T > & | safeClampLocal (const TTristimulusSpectrum< COLOR_SPACE, T > &lowerBound, const TTristimulusSpectrum< COLOR_SPACE, T > &upperBound) |
|
TTristimulusSpectrum< COLOR_SPACE, T > | complement () const |
| Complements the array's elements. Effectively performing 1 - (*this)[i] for each element.
|
|
TTristimulusSpectrum< COLOR_SPACE, T > & | complementLocal () |
|
TTristimulusSpectrum< COLOR_SPACE, T > | negate () const |
| Applies a negative sign to the array's elements. These methods is only defined for signed element types.
|
|
TTristimulusSpectrum< COLOR_SPACE, T > & | negateLocal () |
|
std::array< T, N > | m |
|
std::array< T, N > | m |
|
static constexpr auto | NUM_ELEMENTS |
|