Photon Engine 2.0.0-beta
A physically based renderer.
Loading...
Searching...
No Matches
color_spaces.ipp File Reference
#include "Math/Color/color_spaces.h"
#include "Math/TMatrix3.h"
#include "Math/Color/spectral_samples.h"
#include "Utility/IUninstantiable.h"
#include "Math/math_exceptions.h"
#include "Math/TArithmeticArray.h"
#include "Math/math.h"
#include "Math/Color/chromatic_adaptations.h"
#include <Common/assertion.h>
#include <cmath>

Go to the source code of this file.

Classes

class  ph::math::TColorSpaceDefinitionHelper< COLOR_SPACE, REF_WHITE >
 
class  ph::math::TTristimulusColorSpaceDefinitionHelper< COLOR_SPACE, REF_WHITE >
 
class  ph::math::TSpectralColorSpaceDefinitionHelper< COLOR_SPACE, BOUND_TRISTIMULUS_COLOR_SPACE >
 
class  ph::math::TColorSpaceDefinition< EColorSpace::CIE_XYZ, T >
 
class  ph::math::TColorSpaceDefinition< EColorSpace::Linear_sRGB, T >
 Linear sRGB color space definitions. More...
 
class  ph::math::TColorSpaceDefinition< EColorSpace::sRGB, T >
 
class  ph::math::TColorSpaceDefinition< EColorSpace::CIE_xyY, T >
 
class  ph::math::TColorSpaceDefinition< EColorSpace::ACEScg, T >
 
struct  ph::math::detail::TSmitsSPDBasis< T, SampleProps >
 
class  ph::math::TColorSpaceDefinition< EColorSpace::Spectral_Smits, T >
 

Namespaces

namespace  ph
 The root for all renderer implementations.
 
namespace  ph::math
 Math functions and utilities.
 
namespace  ph::math::detail
 

Functions

bool ph::math::is_tristimulus (EColorSpace colorSpace)
 Check whether colorSpace is a tristimulus color space. This is a runtime check. For compile-time check, use TColorSpaceDef<?>::isTristimulus().
 
template<typename InColorValuesType , EColorSpace COLOR_SPACE>
constexpr bool ph::math::is_compatible ()
 Check whether InColorValuesType is suitable to represent values in COLOR_SPACE.
 
template<EColorSpace SRC_COLOR_SPACE, EColorSpace DST_COLOR_SPACE, typename T , EChromaticAdaptation ALGORITHM = EChromaticAdaptation::Default>
auto ph::math::transform_color (const auto &srcColorValues, EColorUsage usage)
 
template<EColorSpace SRC_COLOR_SPACE, typename T , EChromaticAdaptation ALGORITHM = EChromaticAdaptation::Default>
ph::math::relative_luminance (const auto &srcColorValues, EColorUsage usage=EColorUsage::EMR)
 
template<EColorSpace SRC_COLOR_SPACE, typename T , EColorSpace SPECTRAL_COLOR_SPACE = EColorSpace::Spectral, EChromaticAdaptation ALGORITHM = EChromaticAdaptation::Default>
ph::math::estimate_color_energy (const auto &srcColorValues)
 
template<EColorSpace SRC_COLOR_SPACE, typename T , EColorSpace SPECTRAL_COLOR_SPACE = EColorSpace::Spectral, EChromaticAdaptation ALGORITHM = EChromaticAdaptation::Default>
auto ph::math::normalize_color_energy (const auto &srcColorValues)
 
template<EColorSpace SRC_COLOR_SPACE, typename T , EColorSpace SPECTRAL_COLOR_SPACE = EColorSpace::Spectral, EChromaticAdaptation ALGORITHM = EChromaticAdaptation::Default>
auto ph::math::put_color_energy (const auto &srcColorValues, T energyLevel)
 
template<typename T >
TTristimulusValues< T > ph::math::sRGB_nonlinear_to_linear (const TTristimulusValues< T > &nonlinearSRGB)
 Helper for converting from sRGB to linear-sRGB.
 
template<typename T >
TTristimulusValues< T > ph::math::sRGB_linear_to_nonlinear (const TTristimulusValues< T > &linearSRGB)
 Helper for converting from linear-sRGB to sRGB.
 
template<EColorSpace DST_COLOR_SPACE, typename T >
auto ph::math::transform_from_sRGB (const TTristimulusValues< T > &nonlinearSRGB, EColorUsage usage)
 Helper for converting from sRGB to any color space.
 
template<EColorSpace DST_COLOR_SPACE, typename T >
auto ph::math::transform_from_linear_sRGB (const TTristimulusValues< T > &linearSRGB, EColorUsage usage)
 Helper for converting from linear-sRGB to any color space.
 
template<EColorSpace SRC_COLOR_SPACE, typename T >
TTristimulusValues< T > ph::math::transform_to_sRGB (const auto &srcColorValues, EColorUsage usage)
 Helper for converting any color space to sRGB.
 
template<EColorSpace SRC_COLOR_SPACE, typename T >
TTristimulusValues< T > ph::math::transform_to_linear_sRGB (const auto &srcColorValues, EColorUsage usage)
 Helper for converting any color space to linear-sRGB.