]> git.tdb.fi Git - libs/vr.git/blob - source/openvr/openvrcamera.cpp
6166d3ad30f4191b2b7da9d128d5dfa3a62895e8
[libs/vr.git] / source / openvr / openvrcamera.cpp
1 #include <openvr.h>
2 #include "openvrcamera.h"
3 #include "openvrdevice.h"
4
5 namespace Msp {
6 namespace VR {
7
8 OpenVRCamera::OpenVRCamera(const OpenVRDevice &d, const GL::Camera &c):
9         HeadTrackingCamera(c),
10         device(d)
11 { }
12
13 void OpenVRCamera::reset_tracking()
14 {
15         vr::VRSystem()->ResetSeatedZeroPose();
16 }
17
18 void OpenVRCamera::update()
19 {
20         update_from_matrix(device.get_hmd_matrix());
21 }
22
23 } // namespace VR
24 } // namespace Msp