Photon Engine
2.0.0-beta
A physically based renderer.
Loading...
Searching...
No Matches
TSampledSpectrum.h
Go to the documentation of this file.
1
#pragma once
2
3
#include "
Math/Color/TSpectrumBase.h
"
4
#include "
Math/Color/color_basics.h
"
5
6
#include <cstddef>
7
8
namespace
ph::math
9
{
10
11
template
<EColorSpace COLOR_SPACE,
typename
T, CSpectralSampleProps Props>
12
class
TSampledSpectrum
final :
13
public
TSpectrumBase
<TSampledSpectrum<COLOR_SPACE, T, Props>, COLOR_SPACE, T, Props::NUM_SAMPLES>
14
{
15
private
:
16
using
Base
=
TSpectrumBase<TSampledSpectrum<COLOR_SPACE, T, Props>
, COLOR_SPACE, T, Props::NUM_SAMPLES>;
17
18
protected
:
19
using
Base::m
;
20
21
public
:
22
inline
TSampledSpectrum
() =
default
;
23
inline
TSampledSpectrum
(
const
TSampledSpectrum
& other) =
default
;
24
inline
TSampledSpectrum
(
TSampledSpectrum
&& other) =
default
;
25
inline
TSampledSpectrum
&
operator =
(
const
TSampledSpectrum
& rhs) =
default
;
26
inline
TSampledSpectrum
&
operator =
(
TSampledSpectrum
&& rhs) =
default
;
27
inline
~TSampledSpectrum
() =
default
;
28
29
using
Base::Base
;
30
31
template
<
typename
U>
32
explicit
TSampledSpectrum
(
const
TSampledSpectrum<COLOR_SPACE, U, Props>
& other);
33
34
static
consteval
std::size_t
numSamples
() noexcept;
35
static consteval
std
::
size_t
minWavelengthNM
() noexcept;
36
static consteval
std
::
size_t
maxWavelengthNM
() noexcept;
37
static
constexpr
T
sampleInterval
() noexcept;
38
static
constexpr
std
::pair<T, T>
wavelengthRangeOf
(
std
::
size_t
sampleIndex) noexcept;
39
40
template<typename U>
41
static
TSampledSpectrum
makeResampled
(
42
const U* wavelengthsNM,
43
const U* values,
44
std
::
size_t
numPoints);
45
};
46
47
}
// end namespace ph::math
48
49
#include "Math/Color/TSampledSpectrum.ipp"
constexpr
if constexpr(IS_ROBUST)
Definition
TBvhSimdComputingContext.h:561
TSpectrumBase.h
ph::math::TArithmeticArrayBase< TSampledSpectrum< COLOR_SPACE, T, Props >, T, N >
ph::math::TSampledSpectrum
Definition
TSampledSpectrum.h:14
ph::math::TSampledSpectrum::minWavelengthNM
static consteval std::size_t minWavelengthNM() noexcept
Definition
TSampledSpectrum.ipp:27
ph::math::TSampledSpectrum::~TSampledSpectrum
~TSampledSpectrum()=default
ph::math::TSampledSpectrum::numSamples
static consteval std::size_t numSamples() noexcept
Definition
TSampledSpectrum.ipp:21
ph::math::TSampledSpectrum::TSampledSpectrum
TSampledSpectrum()=default
ph::math::TSampledSpectrum::TSampledSpectrum
TSampledSpectrum(TSampledSpectrum &&other)=default
ph::math::TSampledSpectrum::makeResampled
static TSampledSpectrum makeResampled(const U *wavelengthsNM, const U *values, std::size_t numPoints)
ph::math::TSampledSpectrum::sampleInterval
static constexpr T sampleInterval() noexcept
Definition
TSampledSpectrum.ipp:39
ph::math::TSampledSpectrum::operator=
TSampledSpectrum & operator=(const TSampledSpectrum &rhs)=default
ph::math::TSampledSpectrum::TSampledSpectrum
TSampledSpectrum(const TSampledSpectrum &other)=default
ph::math::TSampledSpectrum::wavelengthRangeOf
static constexpr std::pair< T, T > wavelengthRangeOf(std::size_t sampleIndex) noexcept
Definition
TSampledSpectrum.ipp:46
ph::math::TSampledSpectrum::maxWavelengthNM
static consteval std::size_t maxWavelengthNM() noexcept
Definition
TSampledSpectrum.ipp:33
ph::math::TSpectrumBase
Base for spectrum implementations.
Definition
TSpectrumBase.h:28
ph::math::TSpectrumBase< TSampledSpectrum< COLOR_SPACE, T, Props >, COLOR_SPACE, T, Props::NUM_SAMPLES >::m
std::array< T, N > m
Definition
TArithmeticArrayBase.h:217
color_basics.h
ph::math
Math functions and utilities.
Definition
TransformInfo.h:10
std
Definition
TAABB2D.h:96
Source
Math
Color
TSampledSpectrum.h
Generated by
1.11.0