Photon Engine 2.0.0-beta
A physically based renderer.
Loading...
Searching...
No Matches
chromatic_adaptations.h
Go to the documentation of this file.
1#pragma once
2
5#include "Math/TMatrix3.h"
6
7#include <concepts>
8
9namespace ph::math
10{
11
12template<typename DefType, typename T>
14 EReferenceWhite srcRefWhite,
15 EReferenceWhite dstRefWhite,
16 TTristimulusValues<T> CIEXYZColor)
17{
18 { DefType::getAlgorithm() } noexcept -> std::same_as<EChromaticAdaptation>;
19 { DefType::adapt(CIEXYZColor, srcRefWhite, dstRefWhite) } -> std::same_as<TTristimulusValues<T>>;
20};
21
26template<EChromaticAdaptation ALGORITHM, typename T>
28{
29 // Available algorithms must provide definition and thus should not end up here.
30 static_assert(ALGORITHM == EChromaticAdaptation::Unspecified,
31 "No definition for the specified chromatic adaptation ALGORITHM.");
32};
33
34template<EChromaticAdaptation ALGORITHM, typename T>
36 const TTristimulusValues<T>& srcCIEXYZColor,
37 EReferenceWhite srcRefWhite,
38 EReferenceWhite dstRefWhite);
39
40template<typename T>
42 const TMatrix3<T>& CIEXYZToConeResponse,
43 const TMatrix3<T>& ConeResponseToCIEXYZ,
44 const EReferenceWhite srcRefWhite,
45 const EReferenceWhite dstRefWhite);
46
47template<typename T>
49 const TMatrix3<T>& CIEXYZToConeResponse,
50 const TMatrix3<T>& ConeResponseToCIEXYZ,
51 const TTristimulusValues<T>& srcRefWhite,
52 const TTristimulusValues<T>& dstRefWhite);
53
54}// end namespace ph::math
55
Sinkhole for undefined chromatic adaptation routines. Specialize the class to provide definitions for...
Definition chromatic_adaptations.h:28
Represents a 3x3 matrix.
Definition TMatrix3.h:16
Definition chromatic_adaptations.h:13
Math functions and utilities.
Definition TransformInfo.h:10
TTristimulusValues< T > chromatic_adapt(const TTristimulusValues< T > &srcCIEXYZColor, EReferenceWhite srcRefWhite, EReferenceWhite dstRefWhite)
Definition chromatic_adaptations.ipp:195
TMatrix3< T > create_von_kries_linear_CAT_matrix(const TMatrix3< T > &CIEXYZToConeResponse, const TMatrix3< T > &ConeResponseToCIEXYZ, const EReferenceWhite srcRefWhite, const EReferenceWhite dstRefWhite)
Definition chromatic_adaptations.ipp:30
TRawColorValues< T, 3 > TTristimulusValues
Definition color_basics.h:48
EReferenceWhite
Definition color_enums.h:49