-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvrdevices.cpp
71 lines (61 loc) · 2.13 KB
/
vrdevices.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
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
#include "vrdevices.h"
/*
const VrGogglesDevices::Device VrGogglesDevices::cardboard={
0.06f, //interpupillaryDistance
0.035f, //verticalDistanceToLensCenter
0.025f, //lensDiameter
0.037f, //screenToLensDistance
0.011f, //eyeToLensDistance
0.06f, //visibleViewportSize
1.0f, //coefficients[0]
250.0f, //coefficients[1]
50000.0f, //coefficients[2]
0.0f //coefficients[3]
};
const VrGogglesDevices::Device VrGogglesDevices::colorcross={
0.065f, //interpupillaryDistance
0.035f, //verticalDistanceToLensCenter
0.034f, //lensDiameter;
0.075f, //screenToLensDistance
0.011f, //eyeToLensDistance
0.06f, //visibleViewportSize
1.0f, //coefficients[0]
128, //coefficients[1]
256, //coefficients[2]
0.0f //coefficients[3]
};*/
VrDevices::VrDevices()
{
data.insert(cardboard.name(), &cardboard);
data.insert(colorcross.name(), &colorcross);
}
const VrGoggles *VrDevices::device(const QString &name) const
{
return data.value(name);
}
QList<QString> VrDevices::devices() const
{
return data.keys();
}
const VrGoggles VrDevices::cardboard("cardboard",
0.06f, //interpupillaryDistance
0.035f, //verticalDistanceToLensCenter
0.025f, //lensDiameter
0.037f, //screenToLensDistance
0.011f, //eyeToLensDistance
(float[]){1.0f, //coefficients[0]
250.0f, //coefficients[1]
50000.0f, //coefficients[2]
0.0f //coefficients[3]
});
const VrGoggles VrDevices::colorcross("colorcross",
0.065f, //interpupillaryDistance
0.035f, //verticalDistanceToLensCenter
0.034f, //lensDiameter;
0.075f, //screenToLensDistance
0.025f, //eyeToLensDistance
(float[]){ 1.0f, //coefficients[0]
128, //coefficients[1]
256, //coefficients[2]
0.0f //coefficients[3]
});