51 virtual bool processEvent(
const vr::VREvent_t *event,
bool is_consumed) = 0;
54 typedef std::array<vr::TrackedDevicePose_t, vr::k_unMaxTrackedDeviceCount>
66 void setUseVideo(
bool on);
73 void setManifestPath(std::filesystem::path);
80 void setActionSet(std::string name);
82 void initialize()
override;
95 std::optional<pose_list_t> &getPoseList();
103 void addEventConsumer(std::weak_ptr<EventConsumer> ec);
110 void removeEventConsumer(EventConsumer *ec);
115 Updateable::clock::time_point getLastTime();
120 std::optional<vr::InputAnalogActionData_t>
121 getAnalog(std::string action,
122 vr::VRInputValueHandle_t device = vr::k_ulInvalidInputValueHandle);
127 std::optional<vr::InputDigitalActionData_t>
128 getDigital(std::string action,
129 vr::VRInputValueHandle_t device = vr::k_ulInvalidInputValueHandle);
135 vr::ETrackedDeviceClass getType(
size_t);
141 vr::ETrackedControllerRole getRole(
size_t);
147 std::string getSerial(
size_t);
152 vr::IVRSystem *ptr();
157 static Eigen::Matrix4f convert(
const vr::HmdMatrix34_t &m);
162 static std::string typeToString(vr::ETrackedDeviceClass type);
167 static std::string roleToString(vr::ETrackedControllerRole role);
173 std::unique_ptr<Impl> _impl;