-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathParameterHandler.h
More file actions
150 lines (121 loc) · 3.54 KB
/
ParameterHandler.h
File metadata and controls
150 lines (121 loc) · 3.54 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
#ifndef PARAMETERHANDLER_H
#define PARAMETERHANDLER_H
#include <cmath>
class ParameterHandler
{
private:
int m_scene;
int m_threadCount;
bool m_filter;
bool m_interactiveRender;
bool m_ambientOcclusion;
bool m_pathTracing;
bool m_rayTracing;
unsigned int m_maxRayDepth;
unsigned int m_pathTracingDiffuseRayCount;
bool m_antiAliasing;
unsigned short m_antiAliasingFactor;
bool m_shadows;
bool m_hardShadows;
bool m_softShadows;
float m_lightRadius;
unsigned int m_lightSamples;
bool m_kdTreeDone;
private:
ParameterHandler ()
: m_scene(0),
m_threadCount(2),
m_filter(false),
m_interactiveRender(false),
m_ambientOcclusion ( false ),
m_pathTracing ( false ),
m_rayTracing ( true ),
m_maxRayDepth ( 3 ),
m_pathTracingDiffuseRayCount ( 5 ),
m_antiAliasing ( true ),
m_antiAliasingFactor ( 2 ),
m_shadows ( true ),
m_hardShadows ( false ),
m_softShadows ( true ),
m_lightRadius ( 0.5f ),
m_lightSamples ( 20u ),
m_kdTreeDone ( false )
{}
~ParameterHandler ()
{}
public:
static inline ParameterHandler* Instance ()
{
static ParameterHandler _instance;
return &_instance;
}
void SetScene (
const int& iScene
);
const int& GetScene () const;
void SetThreadCount (
const int& iThread
);
const int& GetThreadCount () const;
void SetFilter (
const bool& iFilter
);
const bool& GetFilter () const;
void SetInteractiveRender (
const bool& interactive
);
const bool& GetInteractiveRender () const;
void SetAo (
const bool& iAoFlag
);
const bool& GetAo () const;
void SetPathTracing (
const bool& iPathTracingFlag
);
const bool& GetPathTracing () const;
void SetMaxRayDepth (
const unsigned int& iMaxRayDepth
);
const unsigned int& GetMaxRayDepth () const;
void SetPathTracingDiffuseRayCount (
const unsigned int& iPathTracingDiffuseRayCount
);
const unsigned int& GetPathTracingDiffuseRayCount () const;
void SetRayTracing (
const bool& iRayTracingFlag
);
const bool& GetRayTracing () const;
void SetAa (
const bool& iAaFlag
);
const bool& GetAa () const;
void SetAaFactor (
const unsigned short& iAaFactor
);
const unsigned short &GetAaFactor() const;
void SetShadows (
const bool& iShadowsFlag
);
const bool& GetShadows () const;
void SetHardShadows (
const bool& iHardShadowsFlag
);
const bool& GetHardShadows () const;
void SetSoftShadows (
const bool& iSoftShadowsFlag
);
const bool& GetSoftShadows () const;
void SetLightRadius (
const float& iLightRadius
);
const float& GetLightRadius () const;
void SetLightSamples (
const unsigned int& iLightSamples
);
const unsigned int& GetLightSamples () const;
void SetKdTreeBuilt (
const bool& iKdTreeBuiltFlag
);
const bool& GetKdTreeBuilt () const;
};
#endif // PARAMETERHANDLER_H