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