Support Forum G3D Web Page |
API for low-level gaze tracking. More...
Inherits G3D::ReferenceCountedObject.
Inherited by G3D::EmulatedGazeTracker.
Classes | |
class | Gaze |
Public Member Functions | |
virtual const String & | className () const =0 |
Which subclass of GazeTracker is this? More... | |
virtual void | getInstantaneousGaze (Gaze &left, Gaze &right) const =0 |
Raw data with minimal latency. More... | |
virtual void | getTrackedGaze (Gaze &left, Gaze &right) const |
All values are in world space. More... | |
virtual Point3 | headSpaceCalibrationPoint () const |
When in calibration mode, the application should draw the calibration target at this location in head space. More... | |
virtual void | setCalibrationMode (bool c) |
The application should call with c = true to begin calibration, and then poll headSpaceCalibrationPoint() every frame to draw the target. More... | |
Static Protected Member Functions | |
template<class T , class ... ArgTypes> | |
static shared_ptr< T > | createShared (ArgTypes &&... args) |
Like std::make_shared, but works for protected constructors. More... | |
API for low-level gaze tracking.
|
pure virtual |
Which subclass of GazeTracker is this?
Implemented in G3D::EmulatedGazeTracker.
|
inlinestaticprotectedinherited |
Like std::make_shared, but works for protected constructors.
Call as createShared<myclass>.
|
pure virtual |
Raw data with minimal latency.
Because this will likely be called at the frame rate of the display, we recommend that subclasses model the rate and phase of calls and only process gaze information on a separate thread right before the anticipated time of the next call. This avoids the typical behavior of gaze trackers, which is to run continuously at high rates and throw out most frames without spending resources processing them unless those intermediate frames are needed to reduce error.
Implemented in G3D::EmulatedGazeTracker.
Referenced by getTrackedGaze().
All values are in world space.
You can convert them to screen space by the usual method: transform to the camera's reference frame and intersect these rays with the image plane.
This may be a filtered version of getInstantaneousGaze().
The default implementation directly returns getInstantaneousGaze(), but will likely contain automatic filtering in a future release.
|
inlinevirtual |
When in calibration mode, the application should draw the calibration target at this location in head space.
When this returns Point3::nan(), calibration has ended.
Reimplemented in G3D::EmulatedGazeTracker.
|
inlinevirtual |
The application should call with c = true to begin calibration, and then poll headSpaceCalibrationPoint() every frame to draw the target.
Calibration will end on its own. To abort calibration early and return to the previous calibrated value, invoke setCalibrationMode(false)
.
Reimplemented in G3D::EmulatedGazeTracker.