Voxellancer  0.3
A game about voxels in space
 All Classes Functions Pages
stereorenderinfo.h
1 #pragma once
2 
3 #include <vector>
4 
5 #include <glm/glm.hpp>
6 
7 #include "property/property.h"
8 
9 
10 namespace OVR {
11  class HMDInfo;
12 }
13 
15 public:
16  static StereoRenderInfo fromOVRInfo(const OVR::HMDInfo& hmdInfo);
17  static StereoRenderInfo dummy();
18 
19 
21 
22  float hScreenSize() const;
23  float vScreenSize() const;
24 
25  float vScreenCenter() const;
26 
27  float eyeToScreenDistance() const;
28 
29  float lensSeparationDistance() const;
30 
31  float interpupillaryDistance() const;
32 
33  int hResolution() const;
34  int vResolution() const;
35 
36  float distortionK(int index) const;
37  std::vector<float> distortionKs() const;
38 
39  float distortionScale() const;
40 
41  float fovy() const;
42 
43  glm::vec2 leftEyeLensCenter() const;
44  glm::vec2 rightEyeLensCenter() const;
45 
46  glm::vec3 leftEyeOffset() const;
47  glm::vec3 rightEyeOffset() const;
48 
49  glm::vec3 leftEyeProjectionOffset() const;
50  glm::vec3 rightEyeProjectionOffset() const;
51 
52 
53 protected:
54  float m_hScreenSize;
55  float m_vScreenSize;
56  float m_vScreenCenter;
57  float m_eyeToScreenDistance;
58  float m_lensSeparationDistance;
59  float m_interpupillaryDistance;
60  int m_hResolution;
61  int m_vResolution;
62  std::vector<float> m_distortionKs;
63  float m_distortionScale;
64  float m_fovy;
65  Property<float> m_eyeZOffset;
66 
67  float projectionCenterOffset() const;
68 };
69 
Definition: stereorenderinfo.h:14