Simulated Reality SDK 7500c78d v1.30.2.51085 2024-04-26T11:23:03Z
Stable
predictingeyetracker.h
Go to the documentation of this file.
1
10#pragma once
11
14
15#ifdef WIN32
16# ifdef COMPILING_DLL_SimulatedRealityFaceTrackers
17# define DIMENCOSR_API __declspec(dllexport)
18# else
19# define DIMENCOSR_API __declspec(dllimport)
20# endif
21#else
22# define DIMENCOSR_API
23#endif
24
25namespace SR {
26
34 class Impl;
40#pragma warning(suppress: 4251)
41 std::unique_ptr<Impl> pimpl;
42
43public:
53
58
67 void predict(uint64_t latency, SR_eyePair& output);
68
76 void predict(uint64_t latency);
77
84 void setFaceLostDelay(uint64_t delay);
85
86 // Inherited via EyeTracker
87 virtual std::string getName() override;
88 virtual std::string getDescription() override;
89 virtual void start() override;
90 virtual void stop() override;
91 virtual std::shared_ptr<EyePairStream> openEyePairStream(EyePairListener* listener) override;
92 virtual void streamClosed(EyePairStream* stream) override;
93
94 // Inherited via EyePairListener
95
101 virtual void accept(const SR_eyePair& frame) override;
102};
103
104}
105
106#undef DIMENCOSR_API
Interface for listening to SR_eyePair updates.
Definition: eyepairlistener.h:20
Stream of SR_eyePair objects.
Definition: eyepairstream.h:36
Sense class which provides face tracking functionality to the SR system.
Definition: eyetracker.h:40
Sense class which provides predictive eye tracking functionality.
Definition: predictingeyetracker.h:33
virtual std::string getName() override
Return the name of the sense.
virtual std::string getDescription() override
Return a description of the sense.
virtual std::shared_ptr< EyePairStream > openEyePairStream(EyePairListener *listener) override
Creates a EyePairStream for listener to be connected to.
virtual void start() override
Start continuous updates, default behaviour is defined in the updater() function.
PredictingEyeTracker(EyeTracker *rawEyeTracker)
Constructs a PredictingEyeTracker.
virtual void streamClosed(EyePairStream *stream) override
Closes a specific EyePairStream.
void predict(uint64_t latency, SR_eyePair &output)
Predict for a certain latency, output an SR_eyePair and trigger stream output.
void predict(uint64_t latency)
Predict for a certain latency and trigger stream output.
virtual void stop() override
Stop continuous updates.
virtual void accept(const SR_eyePair &frame) override
Receives SR_eyePair to filter and use in predictions.
static PredictingEyeTracker * create(SRContext &context)
Returns a class of PredictingEyeTracker.
void setFaceLostDelay(uint64_t delay)
Set the delay from the moment the eyetracker loses the user to the moment the eye position for both e...
Maintains WorldObject and Sense objects during the application lifetime.
Definition: srcontext.h:80
Namespace containing all C++ Simulated Reality classes.
Definition: srconfiguration.h:25
#define DIMENCOSR_API
Definition: predictingeyetracker.h:22
C-compatible struct containing the position of two eyes.
Definition: eyepair.h:28