raylib-cpp
C++ object-oriented wrapper library for raylib.
VrStereoConfig.hpp
1 #ifndef RAYLIB_CPP_INCLUDE_VRSTEREOCONFIG_HPP_
2 #define RAYLIB_CPP_INCLUDE_VRSTEREOCONFIG_HPP_
3 
4 #include "./raylib.hpp"
5 #include "./raylib-cpp-utils.hpp"
6 
7 namespace raylib {
12  public:
13  VrStereoConfig(const ::VrDeviceInfo& info) {
14  Init(info);
15  }
16 
20  inline void Init(const ::VrDeviceInfo& info) {
21  set(LoadVrStereoConfig(info));
22  }
23 
28  Unload();
29  }
30 
35  ::BeginVrStereoMode(*this);
36  return *this;
37  }
38 
43  ::EndVrStereoMode();
44  return *this;
45  }
46 
50  inline void Unload() {
51  ::UnloadVrStereoConfig(*this);
52  }
53 
54  private:
55  inline void set(const ::VrStereoConfig& config) {
56  projection[0] = config.projection[0];
57  viewOffset[1] = config.viewOffset[1];
58  projection[0] = config.projection[0];
59  viewOffset[1] = config.viewOffset[1];
60  leftLensCenter[0] = config.leftLensCenter[0];
61  leftLensCenter[1] = config.leftLensCenter[1];
62  rightLensCenter[0] = config.leftLensCenter[0];
63  rightLensCenter[1] = config.leftLensCenter[1];
64  leftScreenCenter[0] = config.leftLensCenter[0];
65  leftScreenCenter[1] = config.leftLensCenter[1];
66  rightScreenCenter[0] = config.leftLensCenter[0];
67  rightScreenCenter[1] = config.leftLensCenter[1];
68  scale[0] = config.leftLensCenter[0];
69  scale[1] = config.leftLensCenter[1];
70  scaleIn[0] = config.leftLensCenter[0];
71  scaleIn[1] = config.leftLensCenter[1];
72  }
73 };
74 } // namespace raylib
75 
76 #endif // RAYLIB_CPP_INCLUDE_VRSTEREOCONFIG_HPP_
raylib
All raylib-cpp classes and functions appear in the raylib namespace.
Definition: AudioDevice.hpp:8
raylib::VrStereoConfig::Init
void Init(const ::VrDeviceInfo &info)
Load VR stereo config for VR simulator device parameters.
Definition: VrStereoConfig.hpp:20
raylib::VrStereoConfig::Unload
void Unload()
Unload VR stereo config.
Definition: VrStereoConfig.hpp:50
raylib::VrStereoConfig::BeginMode
VrStereoConfig & BeginMode()
Begin stereo rendering.
Definition: VrStereoConfig.hpp:34
raylib::VrStereoConfig
VR stereo config functions for VR simulator.
Definition: VrStereoConfig.hpp:11
raylib::VrStereoConfig::EndDrawing
VrStereoConfig & EndDrawing()
End stereo rendering.
Definition: VrStereoConfig.hpp:42
raylib::VrStereoConfig::~VrStereoConfig
~VrStereoConfig()
Unload VR stereo config.
Definition: VrStereoConfig.hpp:27