-
Notifications
You must be signed in to change notification settings - Fork 8
/
preset.cpp
40 lines (37 loc) · 846 Bytes
/
preset.cpp
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
#include "preset.h"
Preset::Preset(const QString & name)
{
m_preset_name=name;
m_eye_seperation=2.5;
m_observer_distance=20;
m_minimum_depth=5;
m_maximum_depth=9;
m_dpi = 150;
m_isParallel=true;
m_result_width=2048;
m_result_height=1536;
}
Preset::Preset(QDataStream &qdata)
{
qdata>>m_preset_name;
qdata>>m_eye_seperation;
qdata>>m_observer_distance;
qdata>>m_minimum_depth;
qdata>>m_maximum_depth;
qdata>>m_dpi;
qdata>>m_result_width;
qdata>>m_result_height;
qdata>>m_isParallel;
}
void Preset::toStream(QDataStream &qdata)
{
qdata<<m_preset_name;
qdata<<m_eye_seperation;
qdata<<m_observer_distance;
qdata<<m_minimum_depth;
qdata<<m_maximum_depth;
qdata<<m_dpi;
qdata<<m_result_width;
qdata<<m_result_height;
qdata<<m_isParallel;
}