]> git.tdb.fi Git - libs/vr.git/blobdiff - source/openvr/openvrsystem.h
Store matrices for all tracked OpenVR devices, not just the HMD
[libs/vr.git] / source / openvr / openvrsystem.h
index 06881f8b531370ff63b2464d8b098cb3493055a2..ca5411e287181e08b1cfd7875e67d5f3e1b98671 100644 (file)
@@ -12,7 +12,8 @@ namespace VR {
 class OpenVRSystem: public System
 {
 private:
-       GL::Matrix hmd_matrix;
+       unsigned n_tracked_devices;
+       std::vector<GL::Matrix> tracking_matrices;
 
        static unsigned n_instances;
 
@@ -31,7 +32,8 @@ public:
        virtual OpenVRCombiner *create_combiner(GL::View &);
 
        void update_pose_matrices();
-       const GL::Matrix &get_hmd_matrix() const { return hmd_matrix; }
+       const GL::Matrix &get_tracking_matrix(unsigned) const;
+       const GL::Matrix &get_hmd_matrix() const;
 };
 
 } // namespace VR