Provides State instances on-demand.
Use the StateUpdater instance provided at TrackerManager::getStateUpdater() to request the latest available data for all configured trackers, decoupled from the update rate of the camera. (For comparison, the UpdateCallback mechanism is synchronous with the update rate of the camera.)
Typically, if you call updateState() multiple times during a single camera frame, the TrackableResult instances available on the returned State objects will not change.
However, some Tracker types implement predictive tracking and/or use data that does not come from the camera (such as a DeviceTracker that tracks a VR headset's position and orientation at high frequency). If you have configured any such trackers, the State instances provided by updateState() may include updated TrackableResult instances reflecting updated predictions or non-camera tracking data that are newer than the camera frame.
Public Member Functions | |
virtual State | updateState ()=0 |
Get a State instance that reflects the newest available tracking data. More... | |
virtual State | getLatestState () const =0 |
Get the State as it was the last time updateState() was called. More... | |
virtual double | getCurrentTimeStamp () const =0 |
Get the current time stamp. More... | |
|
pure virtual |
Get a State instance that reflects the newest available tracking data.
The returned State includes results from all configured Tracker instances.
It may contain TrackableResults that are newer than the latest camera frame for
This can be useful when the required update rate is higher than the camera frame acquisition rate, such as VR applications or AR on see-through eyewear devices, where visuals must be tightly synchronized to the user's movement, rather than to a rendered video background.
|
pure virtual |
Get the State as it was the last time updateState() was called.
When updateState() is called, the State instance is cached. getLatestState() provides access to this cached State. If updateState() has not yet been called, this method will return an empty State.
Note that updateState() is called internally when you call Renderer::begin(const RenderData*), which may cause getLatestState() to unexpectedly return different results. To prevent this from happening, obtain a State yourself and call Renderer::begin(State, const RenderData*) instead.
|
pure virtual |
Get the current time stamp.