raylib-cpp
C++ object-oriented wrapper library for raylib.
Loading...
Searching...
No Matches
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
7namespace raylib {
11class VrStereoConfig : public ::VrStereoConfig {
12 public:
13 VrStereoConfig(const ::VrDeviceInfo& info) {
14 Load(info);
15 }
16
20 void Load(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 void Unload() {
51 ::UnloadVrStereoConfig(*this);
52 }
53
54 protected:
55 void set(const ::VrStereoConfig& config) {
56 projection[0] = config.projection[0];
57 projection[1] = config.projection[1];
58 viewOffset[0] = config.viewOffset[0];
59 viewOffset[1] = config.viewOffset[1];
60 leftLensCenter[0] = config.leftLensCenter[0];
61 leftLensCenter[1] = config.leftLensCenter[1];
62 rightLensCenter[0] = config.rightLensCenter[0];
63 rightLensCenter[1] = config.rightLensCenter[1];
64 leftScreenCenter[0] = config.leftScreenCenter[0];
65 leftScreenCenter[1] = config.leftScreenCenter[1];
66 rightScreenCenter[0] = config.rightScreenCenter[0];
67 rightScreenCenter[1] = config.rightScreenCenter[1];
68 scale[0] = config.scale[0];
69 scale[1] = config.scale[1];
70 scaleIn[0] = config.scaleIn[0];
71 scaleIn[1] = config.scaleIn[1];
72 }
73};
74} // namespace raylib
75
77
78#endif // RAYLIB_CPP_INCLUDE_VRSTEREOCONFIG_HPP_
VR stereo config functions for VR simulator.
VrStereoConfig & BeginMode()
Begin stereo rendering.
void Load(const ::VrDeviceInfo &info)
Load VR stereo config for VR simulator device parameters.
VrStereoConfig & EndMode()
End stereo rendering.
void Unload()
Unload VR stereo config.
~VrStereoConfig()
Unload VR stereo config.