Simulated Reality SDK 7500c78d v1.30.2.51085 2024-04-26T11:23:03Z
Stable
Public Member Functions | Static Public Member Functions | List of all members
SR::PredictingEyeTracker Class Reference

Sense class which provides predictive eye tracking functionality. More...

#include <predictingeyetracker.h>

Inheritance diagram for SR::PredictingEyeTracker:
[legend]
Collaboration diagram for SR::PredictingEyeTracker:
[legend]

Public Member Functions

 PredictingEyeTracker (EyeTracker *rawEyeTracker)
 Constructs a PredictingEyeTracker. More...
 
void predict (uint64_t latency, SR_eyePair &output)
 Predict for a certain latency, output an SR_eyePair and trigger stream output. More...
 
void predict (uint64_t latency)
 Predict for a certain latency and trigger stream output. More...
 
void setFaceLostDelay (uint64_t delay)
 Set the delay from the moment the eyetracker loses the user to the moment the eye position for both eyes will start moving to the default position. More...
 
virtual std::string getName () override
 Return the name of the sense. More...
 
virtual std::string getDescription () override
 Return a description of the sense. More...
 
virtual void start () override
 Start continuous updates, default behaviour is defined in the updater() function. More...
 
virtual void stop () override
 Stop continuous updates. More...
 
virtual std::shared_ptr< EyePairStreamopenEyePairStream (EyePairListener *listener) override
 Creates a EyePairStream for listener to be connected to. More...
 
virtual void streamClosed (EyePairStream *stream) override
 Closes a specific EyePairStream. More...
 
virtual void accept (const SR_eyePair &frame) override
 Receives SR_eyePair to filter and use in predictions. More...
 
- Public Member Functions inherited from SR::Sense
void setCalibration (Transformation calibration)
 Sets a Transformation object to represent the sense's calibration with respect to the display. More...
 
Transformation getCalibration ()
 Gets callibration. More...
 
virtual ~Sense ()
 Ensures the proper destruction of the sense implementation. More...
 

Static Public Member Functions

static PredictingEyeTrackercreate (SRContext &context)
 Returns a class of PredictingEyeTracker. More...
 
- Static Public Member Functions inherited from SR::EyeTracker
static EyeTrackercreate (SRContext &context)
 Creates a functional EyeTracker instance. More...
 
static EyeTrackercreateRaw (SRContext &context)
 Creates a functional EyeTracker instance providing unfiltered data. More...
 

Additional Inherited Members

- Protected Attributes inherited from SR::Sense
Transformation calibration
 

Detailed Description

Sense class which provides predictive eye tracking functionality.

Constructor & Destructor Documentation

◆ PredictingEyeTracker()

SR::PredictingEyeTracker::PredictingEyeTracker ( EyeTracker rawEyeTracker)

Constructs a PredictingEyeTracker.

Member Function Documentation

◆ accept()

virtual void SR::PredictingEyeTracker::accept ( const SR_eyePair frame)
overridevirtual

Receives SR_eyePair to filter and use in predictions.

Parameters
frameof incoming SR_eyePair

Implements SR::EyePairListener.

◆ create()

static PredictingEyeTracker * SR::PredictingEyeTracker::create ( SRContext context)
static

Returns a class of PredictingEyeTracker.

Only one PredictingEyeTracker can be created per context, if one has already been created a pointer to that one is returned. If one had not been created yet, a new one will be added to the context.

Parameters
contextto contain the PredictingEyeTracker

◆ getDescription()

virtual std::string SR::PredictingEyeTracker::getDescription ( )
overridevirtual

Return a description of the sense.

Implements SR::Sense.

◆ getName()

virtual std::string SR::PredictingEyeTracker::getName ( )
overridevirtual

Return the name of the sense.

Implements SR::Sense.

◆ openEyePairStream()

virtual std::shared_ptr< EyePairStream > SR::PredictingEyeTracker::openEyePairStream ( EyePairListener listener)
overridevirtual

Creates a EyePairStream for listener to be connected to.

Parameters
listenerwill receive eyepair updates from now on
Returns
std::shared_ptr<EyePairStream> to be used to close the stream correctly when it is no longer required

Implements SR::EyeTracker.

◆ predict() [1/2]

void SR::PredictingEyeTracker::predict ( uint64_t  latency)

Predict for a certain latency and trigger stream output.

Listeners will receive a new SR_eyePair after predict is called

Parameters
uint64_tlatency in microseconds to predict for

◆ predict() [2/2]

void SR::PredictingEyeTracker::predict ( uint64_t  latency,
SR_eyePair output 
)

Predict for a certain latency, output an SR_eyePair and trigger stream output.

Listeners will receive a new SR_eyePair after predict is called

Parameters
uint64_tlatency in microseconds to predict for
SR_eyePairto output

◆ setFaceLostDelay()

void SR::PredictingEyeTracker::setFaceLostDelay ( uint64_t  delay)

Set the delay from the moment the eyetracker loses the user to the moment the eye position for both eyes will start moving to the default position.

The default position of the eyes is (0, 100, 600). As it is the same for the left and right eye, this effectively causes a transition from 3D to 2D. However, the lens will remain on and eyetracking will remain active, continuously looking for a new user to track.

Parameters
uint64_tdelay in milliseconds

◆ start()

virtual void SR::PredictingEyeTracker::start ( )
overridevirtual

Start continuous updates, default behaviour is defined in the updater() function.

Implements SR::Sense.

◆ stop()

virtual void SR::PredictingEyeTracker::stop ( )
overridevirtual

Stop continuous updates.

Implements SR::Sense.

◆ streamClosed()

virtual void SR::PredictingEyeTracker::streamClosed ( EyePairStream stream)
overridevirtual

Closes a specific EyePairStream.

Parameters
streamwill no longer supply eyepair updates

Implements SR::EyeTracker.


The documentation for this class was generated from the following file: