Loading [MathJax]/extensions/tex2jax.js
Photon Engine
2.0.0-beta
A physically based renderer.
Toggle main menu visibility
Home
Components
Main Page
Related Pages
Namespaces
Namespace List
Namespace Members
All
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Functions
a
b
c
d
e
f
g
h
i
l
m
n
o
p
q
r
s
t
u
v
w
x
Variables
a
b
c
d
e
f
g
h
k
m
p
r
s
t
u
x
y
z
Typedefs
a
b
c
d
e
f
h
i
k
l
m
p
q
r
s
t
v
Enumerations
e
Enumerator
Concepts
Classes
Class List
Class Index
Class Hierarchy
Class Members
All
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Variables
a
b
c
d
e
f
g
i
k
l
m
n
o
p
r
s
t
u
v
w
x
y
Typedefs
a
b
c
d
e
f
i
k
m
n
o
p
r
s
t
v
w
Enumerations
Related Symbols
Files
File List
File Members
All
b
c
f
i
k
m
p
s
Functions
Typedefs
Macros
▼
Photon Engine
Home
Components
►
Engine
►
Engine Directories
Bibliography
►
Namespaces
►
Concepts
►
Classes
▼
Files
▼
File List
Documentation
►
Include
▼
Source
►
Actor
►
Api
►
Common
▼
Core
►
Emitter
►
Estimator
►
Filmic
►
Intersection
►
LTA
►
Quantity
►
Receiver
▼
Renderer
►
Attribute
▼
PM
►
FullPhoton.h
►
FullViewpoint.h
►
photon_map_light_transport.h
►
PMAtomicStatistics.h
►
PMCommonParams.h
►
PMRendererBase.cpp
►
PMRendererBase.h
ProbabilisticProgressivePMRenderer.cpp
►
ProbabilisticProgressivePMRenderer.h
ProgressivePMRenderer.cpp
►
ProgressivePMRenderer.h
StochasticProgressivePMRenderer.cpp
►
StochasticProgressivePMRenderer.h
►
TPhoton.h
►
TPhotonMap.h
►
TPhotonPathTracingWork.h
TPhotonPathTracingWork.ipp
►
TPPMRadianceEvaluationWork.h
TPPMRadianceEvaluationWork.ipp
►
TPPMViewpointCollector.h
►
TSPPMRadianceEvaluator.h
►
TViewPathHandler.h
►
TViewPathTracingWork.h
TViewPathTracingWork.ipp
►
TViewpoint.h
►
TVPMRadianceEvaluator.h
VanillaPMRenderer.cpp
►
VanillaPMRenderer.h
►
ViewPathTracingPolicy.h
►
Sampling
►
AttributeTags.h
►
EAttribute.h
►
ERegionStatus.h
►
Renderer.cpp
►
Renderer.h
RendererProxy.cpp
►
RendererProxy.h
►
RenderObservationInfo.h
►
RenderProgress.h
►
RenderRegionStatus.h
►
RenderStats.h
RenderWork.cpp
►
RenderWork.h
RenderWorker.cpp
►
RenderWorker.h
►
Statistics.h
►
SampleGenerator
►
Scheduler
►
SurfaceBehavior
►
Texture
►
VolumeBehavior
►
ECoordSys.h
►
Engine.cpp
►
Engine.h
►
FaceTopology.h
FullRay.cpp
►
FullRay.h
HitDetail.cpp
►
HitDetail.h
HitInfo.cpp
►
HitInfo.h
HitProbe.cpp
►
HitProbe.h
►
Ray.h
RayDifferential.cpp
►
RayDifferential.h
►
Sample.h
SurfaceHit.cpp
►
SurfaceHit.h
►
DataIO
►
EngineEnv
►
Frame
►
Math
►
SDL
►
Utility
►
World
►
File Members
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Pages
Concepts
Loading...
Searching...
No Matches
TPhoton.h
Go to the documentation of this file.
1
#pragma once
2
3
#include "
Utility/utility.h
"
4
#include "
Utility/traits.h
"
5
#include "
Math/TVector3.h
"
6
#include "
Core/LTA/SidednessAgreement.h
"
7
8
#include <utility>
9
#include <type_traits>
10
11
namespace
ph
12
{
13
14
enum class
EPhotonData
15
{
16
ThroughputRadiance
,
17
Pos
,
18
FromDir
,
19
GeometryNormal
,
20
PathLength
21
};
14
enum class
EPhotonData
{
…
};
22
23
template
<
typename
T>
24
concept
CPhoton
= std::is_trivially_copyable_v<T> &&
requires
25
{
26
typename
T::PMPhotonTag;
27
};
24
concept
CPhoton
= std::is_trivially_copyable_v<T> &&
requires
{
…
}
28
29
template
<
typename
Derived>
30
class
TPhoton
31
{
32
public
:
33
using
PMPhotonTag
= void;
34
35
template
<EPhotonData TYPE>
36
static
constexpr
bool
has
();
37
38
template
<EPhotonData TYPE>
39
decltype
(
auto
)
get
()
const
;
40
41
template
<EPhotonData TYPE,
typename
T>
42
void
set
(
const
T& value);
43
44
// Hide special members as this class is not intended to be used polymorphically.
45
// It is derived class's choice to expose them (by defining them in public) or not.
46
protected
:
47
PH_DEFINE_INLINE_RULE_OF_5_MEMBERS
(
TPhoton
);
48
};
49
50
template
<
typename
Derived>
51
template
<EPhotonData TYPE>
52
inline
constexpr
bool
TPhoton<Derived>::has
()
53
{
54
static_assert
(
requires
55
{
56
{ Derived::template impl_has<TYPE>() } ->
CSame<bool>
;
57
},
58
"A photon mapping photon type must implement a static method callable as "
59
"`impl_has<EPhotonData{}>() -> bool`."
);
60
61
return
Derived::template impl_has<TYPE>();
62
}
52
inline
constexpr
bool
TPhoton<Derived>::has
() {
…
}
63
64
template
<
typename
Derived>
65
template
<EPhotonData TYPE>
66
inline
decltype
(
auto
)
TPhoton<Derived>::get
()
const
67
{
68
static_assert
(
requires
(
const
Derived derived)
69
{
70
{ derived.template impl_get<TYPE>() } ->
CNotSame<void>
;
71
},
72
"A photon mapping photon type must implement a method callable as "
73
"`impl_get<EPhotonData{}>() const -> (any type)`."
);
74
75
return
static_cast<
const
Derived&
>
(*this).template impl_get<TYPE>();
76
}
66
inline
decltype
(
auto
)
TPhoton<Derived>::get
()
const
{
…
}
77
78
template
<
typename
Derived>
79
template
<EPhotonData TYPE,
typename
T>
80
inline
void
TPhoton<Derived>::set
(
const
T& value)
81
{
82
static_assert
(
requires
(Derived derived, T value)
83
{
84
{ derived.template impl_set<TYPE>(value) } ->
CSame<void>
;
85
},
86
"A photon mapping photon type must implement a method callable as "
87
"`impl_set<EPhotonData{}, T{}>(T{}) -> void`."
);
88
89
static_cast<
Derived&
>
(*this).template impl_set<TYPE>(value);
90
}
80
inline
void
TPhoton<Derived>::set
(
const
T& value) {
…
}
42
void
set
(
const
T& value); {
…
}
91
92
}
// end namespace ph
39
decltype
(
auto
)
get
()
const
; {
…
}
36
static
constexpr
bool
has
(); {
…
}
30
class
TPhoton
{
…
};
SidednessAgreement.h
TVector3.h
ph::TPhoton
Definition
TPhoton.h:31
ph::TPhoton::has
static constexpr bool has()
Definition
TPhoton.h:52
ph::TPhoton::get
decltype(auto) get() const
Definition
TPhoton.h:66
ph::TPhoton::set
void set(const T &value)
Definition
TPhoton.h:80
ph::TPhoton::PH_DEFINE_INLINE_RULE_OF_5_MEMBERS
PH_DEFINE_INLINE_RULE_OF_5_MEMBERS(TPhoton)
ph::TPhoton::PMPhotonTag
void PMPhotonTag
Definition
TPhoton.h:33
ph::CNotSame
Definition
traits.h:116
ph::CPhoton
Definition
TPhoton.h:24
ph::CSame
Definition
traits.h:113
ph
The root for all renderer implementations.
Definition
EEngineProject.h:6
ph::EPhotonData
EPhotonData
Definition
TPhoton.h:15
ph::EPhotonData::PathLength
@ PathLength
ph::EPhotonData::ThroughputRadiance
@ ThroughputRadiance
ph::EPhotonData::GeometryNormal
@ GeometryNormal
ph::EPhotonData::FromDir
@ FromDir
ph::EPhotonData::Pos
@ Pos
traits.h
utility.h
Source
Core
Renderer
PM
TPhoton.h
Generated by
1.11.0