Antilatency.Alt.Tracking.ITrackingDataCallback

Antilatency.Alt.Tracking.ITrackingDataCallback

Interface in Antilatency.Alt.Tracking
The callback interface users must implement to receive tracking data from a tracking data cotask. Note that this callback's methods will usually be called from one of the ADN internal threads. This means they may need to use mutexes or other synchronization means for access their shared state. Moreover, they must not throw exceptions to the caller or the ADN thread may terminate.
interface ITrackingDataCallback : InterfaceContract.IInterface {
void onTrackingFrame(​OpticRay[] rays, Math.float3 inertialUp, InertialLeap inertialLeap, bool accelerometerOverflowOccured, bool gyroscopeOverflowOccured);
void onAdnFinalize(​);
}

Methods

Handles a full frame of tracking data. This callback gets called after every new optic frame becomes available and also contains the inertial data integrated over the time since the previous optic frame. This callback is typically called 20-50 times a second.
Handles an incomplete, mid-frame inertial leap. This callback is typically called several times more frequently than ITrackingDataCallback.onTrackingFrame. It is provided for cases that require a more fine-grained measurement of inertial data evolution.
Handles the termination request. The call to this mathod is guaranteed to be the last one in the communication between the ADN thread and the callback. It may be the appropriate point to free some of the resources that the callback may have acquired.