X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fopenvr%2Fopenvrsystem.h;h=7799ad298405914f198d41c7ddd676eae902b59b;hb=80785cc981166c5faacfcc41476b3d2ffdb65c4a;hp=06881f8b531370ff63b2464d8b098cb3493055a2;hpb=7ad8d41683649816d3d162f614dc8bb585053311;p=libs%2Fvr.git diff --git a/source/openvr/openvrsystem.h b/source/openvr/openvrsystem.h index 06881f8..7799ad2 100644 --- a/source/openvr/openvrsystem.h +++ b/source/openvr/openvrsystem.h @@ -5,6 +5,7 @@ #include #include "openvrcamera.h" #include "openvrcombiner.h" +#include "openvrcontroller.h" namespace Msp { namespace VR { @@ -12,7 +13,10 @@ namespace VR { class OpenVRSystem: public System { private: - GL::Matrix hmd_matrix; + unsigned n_tracked_devices; + std::vector tracking_matrices; + std::vector controllers; + std::vector unclaimed_controllers; static unsigned n_instances; @@ -29,9 +33,15 @@ public: virtual bool get_absolute_tracking() const; virtual OpenVRCamera *create_camera(const GL::Camera &); virtual OpenVRCombiner *create_combiner(GL::View &); + virtual OpenVRController *create_controller(); + + virtual void tick(); 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; + void add_controller(OpenVRController &); + void remove_controller(OpenVRController &); }; } // namespace VR