Photon Engine
2.0.0-beta
A physically based renderer.
Loading...
Searching...
No Matches
ApiHelper.h
Go to the documentation of this file.
1
#pragma once
2
3
#include "
ph_core.h
"
4
#include "
Core/Renderer/EAttribute.h
"
5
6
#include <Common/assertion.h>
7
8
#include <iostream>
9
10
namespace
ph
11
{
12
13
class
ApiHelper
final
14
{
15
public
:
16
static
EAttribute
toCppAttribute
(PH_EATTRIBUTE attribute);
17
};
18
19
// In-header Implementations:
20
21
inline
EAttribute
ApiHelper::toCppAttribute
(
const
PH_EATTRIBUTE attribute)
22
{
23
switch
(attribute)
24
{
25
case
PH_EATTRIBUTE::LIGHT_ENERGY:
26
return
EAttribute::LIGHT_ENERGY
;
27
break
;
28
29
case
PH_EATTRIBUTE::NORMAL:
30
return
EAttribute::NORMAL
;
31
break
;
32
33
case
PH_EATTRIBUTE::DEPTH:
34
return
EAttribute::DEPTH
;
35
break
;
36
37
default
:
38
std::cerr <<
"warning: cannot convert to cpp attribute"
<< std::endl;
39
return
EAttribute::LIGHT_ENERGY
;
40
break
;
41
}
42
43
PH_ASSERT_UNREACHABLE_SECTION();
44
}
45
46
}
// end namespace ph
EAttribute.h
ph::ApiHelper
Definition
ApiHelper.h:14
ph::ApiHelper::toCppAttribute
static EAttribute toCppAttribute(PH_EATTRIBUTE attribute)
Definition
ApiHelper.h:21
ph
The root for all renderer implementations.
Definition
EEngineProject.h:6
ph::EAttribute
EAttribute
Definition
EAttribute.h:7
ph::EAttribute::NORMAL
@ NORMAL
ph::EAttribute::LIGHT_ENERGY
@ LIGHT_ENERGY
ph::EAttribute::DEPTH
@ DEPTH
ph_core.h
Source
Api
ApiHelper.h
Generated by
1.11.0