Photon Engine
2.0.0-beta
A physically based renderer.
Loading...
Searching...
No Matches
ESurfaceRefineMode.h
Go to the documentation of this file.
1
#pragma once
2
3
#include <Common/assertion.h>
4
5
#include <string_view>
6
7
namespace
ph
8
{
9
10
enum class
ESurfaceRefineMode
11
{
12
Manual
,
13
Empirical
,
14
Iterative
,
15
16
// Special values
17
Default
=
Iterative
,
18
};
19
20
inline
std::string_view
refine_mode_to_str
(
const
ESurfaceRefineMode
mode)
21
{
22
switch
(mode)
23
{
24
case
ESurfaceRefineMode::Manual
:
return
"manual"
;
25
case
ESurfaceRefineMode::Empirical
:
return
"empirical"
;
26
case
ESurfaceRefineMode::Iterative
:
return
"iterative"
;
27
28
default
:
29
PH_ASSERT_UNREACHABLE_SECTION();
30
return
""
;
31
}
32
}
33
34
inline
ESurfaceRefineMode
str_to_refine_mode
(std::string_view mode)
35
{
36
if
(mode ==
"manual"
)
37
{
38
return
ESurfaceRefineMode::Manual
;
39
}
40
else
if
(mode ==
"empirical"
)
41
{
42
return
ESurfaceRefineMode::Empirical
;
43
}
44
else
if
(mode ==
"iterative"
)
45
{
46
return
ESurfaceRefineMode::Iterative
;
47
}
48
else
if
(mode ==
"default"
)
49
{
50
return
ESurfaceRefineMode::Default
;
51
}
52
else
53
{
54
PH_ASSERT_UNREACHABLE_SECTION();
55
return
ESurfaceRefineMode::Default
;
56
}
57
}
58
59
}
// end namespace ph
ph
The root for all renderer implementations.
Definition
EEngineProject.h:6
ph::ESurfaceRefineMode
ESurfaceRefineMode
Definition
ESurfaceRefineMode.h:11
ph::ESurfaceRefineMode::Iterative
@ Iterative
ph::ESurfaceRefineMode::Empirical
@ Empirical
ph::ESurfaceRefineMode::Default
@ Default
ph::ESurfaceRefineMode::Manual
@ Manual
ph::str_to_refine_mode
ESurfaceRefineMode str_to_refine_mode(std::string_view mode)
Definition
ESurfaceRefineMode.h:34
ph::refine_mode_to_str
std::string_view refine_mode_to_str(const ESurfaceRefineMode mode)
Definition
ESurfaceRefineMode.h:20
Include
ESurfaceRefineMode.h
Generated by
1.11.0