Photon Engine 2.0.0-beta
A physically based renderer.
Loading...
Searching...
No Matches
color_basics.h File Reference
#include "Math/Color/color_enums.h"
#include "Utility/utility.h"
#include "Utility/traits.h"
#include <Common/assertion.h>
#include <Common/config.h>
#include <Common/primitive_type.h>
#include <array>
#include <cstddef>
#include <concepts>
#include <type_traits>
#include <utility>

Go to the source code of this file.

Classes

class  ph::math::DefaultSpectralSampleProps
 
class  ph::math::detail::TColorSpaceDummy< COLOR_SPACE >
 

Namespaces

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

Concepts

concept  ph::math::CSpectralSampleProps
 
concept  ph::math::CColorValuesInterface
 Satisfying this concept makes ImplType usable as color values.
 
concept  ph::math::CRawColorValues
 Whether ColorValuesType is a raw color values type.
 

Typedefs

using ph::math::ColorValue = real
 
template<typename T , std::size_t N>
using ph::math::TRawColorValues = std::array<T, N>
 
template<typename T >
using ph::math::TTristimulusValues = TRawColorValues<T, 3>
 
template<typename T , CSpectralSampleProps SampleProps = DefaultSpectralSampleProps>
using ph::math::TSpectralSampleValues = TRawColorValues<T, SampleProps::NUM_SAMPLES>
 
template<typename T >
using ph::math::TChromaticityValues = TRawColorValues<T, 2>
 
using ph::math::TristimulusValues = TTristimulusValues<ColorValue>
 
using ph::math::SpectralSampleValues = TSpectralSampleValues<ColorValue>
 
using ph::math::ChromaticityValues = TChromaticityValues<ColorValue>
 
template<typename ColorValuesType >
using ph::math::detail::TColorValuesElementType = decltype(get_any_element_from_color_values(std::declval<ColorValuesType>()))
 

Functions

template<typename T >
auto ph::math::detail::make_chromaticity_table () -> std::array< TChromaticityValues< T >, static_cast< std::size_t >(EReferenceWhite::NUM)>
 
template<typename ColorValuesType >
constexpr auto ph::math::detail::get_any_element_from_color_values (const ColorValuesType &colorValues)
 
template<typename T = ColorValue>
TChromaticityValues< T > ph::math::chromaticity_of (const EReferenceWhite refWhite)
 
template<typename T = ColorValue>
TTristimulusValues< T > ph::math::CIEXYZ_of_custom_reference_white (const TChromaticityValues< T > &refWhite)
 
template<typename T = ColorValue>
TTristimulusValues< T > ph::math::CIEXYZ_of (const EReferenceWhite refWhite)