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
7namespace ph
8{
9
11{
12 Manual,
15
16 // Special values
18};
19
20inline 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
34inline ESurfaceRefineMode str_to_refine_mode(std::string_view mode)
35{
36 if(mode == "manual")
37 {
39 }
40 else if(mode == "empirical")
41 {
43 }
44 else if(mode == "iterative")
45 {
47 }
48 else if(mode == "default")
49 {
51 }
52 else
53 {
54 PH_ASSERT_UNREACHABLE_SECTION();
56 }
57}
58
59}// end namespace ph
The root for all renderer implementations.
Definition EEngineProject.h:6
ESurfaceRefineMode
Definition ESurfaceRefineMode.h:11
ESurfaceRefineMode str_to_refine_mode(std::string_view mode)
Definition ESurfaceRefineMode.h:34
std::string_view refine_mode_to_str(const ESurfaceRefineMode mode)
Definition ESurfaceRefineMode.h:20