Rework wivrn_session to be a xrt_system_devices
This will allow changing roles dynamically, and fixes some object lifetime issues.
This commit is contained in:
@@ -26,28 +26,19 @@
|
||||
#include "xrt/xrt_device.h"
|
||||
|
||||
#include <cstdint>
|
||||
#include <memory>
|
||||
#include <mutex>
|
||||
|
||||
namespace wivrn
|
||||
{
|
||||
|
||||
class wivrn_session;
|
||||
|
||||
class wivrn_eye_tracker : public xrt_device
|
||||
{
|
||||
std::mutex mutex;
|
||||
xrt_input gaze_input;
|
||||
pose_list gaze;
|
||||
|
||||
std::shared_ptr<wivrn::wivrn_session> cnx;
|
||||
|
||||
public:
|
||||
wivrn_eye_tracker(xrt_device * hmd, std::shared_ptr<wivrn::wivrn_session> cnx);
|
||||
void unregister()
|
||||
{
|
||||
cnx = nullptr;
|
||||
}
|
||||
wivrn_eye_tracker(xrt_device * hmd);
|
||||
|
||||
void update_inputs();
|
||||
void update_tracking(const from_headset::tracking &, const clock_offset &);
|
||||
|
||||
Reference in New Issue
Block a user