Support Forum G3D Web Page |
Simulates the presence of a gaze tracker by assuming that the user is always looking straight forward, and making the eyes converge on the point hit by a ray cast. More...
Inherits G3D::GazeTracker.
Public Member Functions | |
virtual const String & | className () const override |
Which subclass of GazeTracker is this? More... | |
virtual void | getInstantaneousGaze (Gaze &left, Gaze &right) const override |
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 override |
When in calibration mode, the application should draw the calibration target at this location in head space. More... | |
virtual void | setCalibrationMode (bool c) override |
The application should call with c = true to begin calibration, and then poll headSpaceCalibrationPoint() every frame to draw the target. More... | |
Static Public Member Functions | |
static shared_ptr< EmulatedGazeTracker > | create (GApp *app, bool monocular=false, const shared_ptr< GameController > &gameController=nullptr) |
The app is used for GApp::scene() ray casts and GApp::headFrame() More... | |
Protected Member Functions | |
EmulatedGazeTracker (GApp *app, bool monocular, const shared_ptr< GameController > &gameController) | |
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... | |
Protected Attributes | |
GApp * | m_app |
int | m_calibrationIndex = -1 |
if -1, not calibrating More... | |
RealTime | m_currentCalibrationPointStartTime = 0 |
shared_ptr< GameController > | m_gameController |
const bool | m_monocular |
Simulates the presence of a gaze tracker by assuming that the user is always looking straight forward, and making the eyes converge on the point hit by a ray cast.
|
inlineprotected |
|
overridevirtual |
Which subclass of GazeTracker is this?
Implements G3D::GazeTracker.
|
static |
The app is used for GApp::scene() ray casts and GApp::headFrame()
monocular | If set, no ray casts are used but both eyes act as if they are in the center of the head |
gameController | If set, use the right stick to control the eye direction relative to the head and the right shoulder button to blink. |
|
inlinestaticprotectedinherited |
Like std::make_shared, but works for protected constructors.
Call as createShared<myclass>.
|
overridevirtual |
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.
Implements G3D::GazeTracker.
|
inlinevirtualinherited |
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.
|
overridevirtual |
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 from G3D::GazeTracker.
|
overridevirtual |
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 from G3D::GazeTracker.
|
protected |
|
mutableprotected |
if -1, not calibrating
|
mutableprotected |
|
protected |
|
protected |