raylib-cpp
C++ object-oriented wrapper library for raylib.
VrSimulator.hpp
1 #ifndef RAYLIB_CPP_VRSIMULATOR_HPP_
2 #define RAYLIB_CPP_VRSIMULATOR_HPP_
3 
4 #ifdef __cplusplus
5 extern "C"{
6 #endif
7 #include "raylib.h"
8 #ifdef __cplusplus
9 }
10 #endif
11 
12 #include "utils.hpp"
13 
14 namespace raylib {
15  class VrSimulator {
16  public:
18  Init();
19  };
20  VrSimulator(VrDeviceInfo info, Shader distortion) {
21  Init();
22  Set(info, distortion);
23  };
24 
25  inline void Init() {
26  InitVrSimulator();
27  }
28 
30  Close();
31  }
32 
33  inline bool IsReady() {
34  return ::IsVrSimulatorReady();
35  }
36 
37  inline VrSimulator& Update(Camera *camera) {
38  ::UpdateVrTracking(camera);
39  return *this;
40  }
41  inline VrSimulator& Set(VrDeviceInfo info, Shader distortion) {
42  ::SetVrConfiguration(info, distortion);
43  return *this;
44  }
45  inline VrSimulator& Toggle() {
46  ::ToggleVrMode();
47  return *this;
48  }
49  inline VrSimulator& Begin() {
50  ::BeginVrDrawing();
51  return *this;
52  }
53  inline VrSimulator& End() {
54  ::EndVrDrawing();
55  return *this;
56  }
57  inline void Close() {
58  ::CloseVrSimulator();
59  }
60  };
61 }
62 
63 #endif
VrSimulator & Toggle()
Definition: VrSimulator.hpp:45
VrSimulator & Set(VrDeviceInfo info, Shader distortion)
Definition: VrSimulator.hpp:41
VrSimulator & Begin()
Definition: VrSimulator.hpp:49
VrSimulator & Update(Camera *camera)
Definition: VrSimulator.hpp:37
Provides all the classes associated with raylib-cpp.
Definition: AudioDevice.hpp:14
VrSimulator(VrDeviceInfo info, Shader distortion)
Definition: VrSimulator.hpp:20
VrSimulator & End()
Definition: VrSimulator.hpp:53