Home Forums Software Development Get Eye XYZ Position – cannot find the functions for TX_INTERACTIONBEHAVIORTYPE_ Reply To: Get Eye XYZ Position – cannot find the functions for TX_INTERACTIONBEHAVIORTYPE_

#1876
Edward Ryklin
Participant

Since upgrading to TobiiEyeXSdk-Cpp-0.32.384, this problem reemerges.

Code used before the upgrade that use to work, but now only the first call to CreateIteractorBehavior will work (in this case gaze data) :

BOOL BeethovenTobiiEyeX::InitializeGlobalInteractorSnapshot(TX_CONTEXTHANDLE hContext)
{
TX_HANDLE hInteractor = TX_EMPTY_HANDLE;
TX_HANDLE hBehavior = TX_EMPTY_HANDLE;
TX_GAZEPOINTDATAPARAMS params = { TX_GAZEPOINTDATAMODE_LIGHTLYFILTERED };
BOOL success;

success = txCreateGlobalInteractorSnapshot(
hContext,
InteractorId,
&g_hGlobalInteractorSnapshot,
&hInteractor) == TX_RESULT_OK;

success &= txCreateInteractorBehavior(hInteractor, &hBehavior, TX_BEHAVIORTYPE_GAZEPOINTDATA) == TX_RESULT_OK;
success &= txSetGazePointDataBehaviorParams(hBehavior, &params) == TX_RESULT_OK;

success &= txCreateInteractorBehavior(hInteractor, &hBehavior, TX_BEHAVIORTYPE_EYEPOSITIONDATA) == TX_RESULT_OK;
success &= txSetGazePointDataBehaviorParams(hBehavior, &params) == TX_RESULT_OK;

txReleaseObject(&hBehavior);
txReleaseObject(&hInteractor);
return success;
}

Code after :

BOOL BeethovenTobiiEyeX::InitializeGlobalInteractorSnapshot(TX_CONTEXTHANDLE hContext)
{
TX_HANDLE hInteractor = TX_EMPTY_HANDLE;

TX_GAZEPOINTDATAPARAMS params = { TX_GAZEPOINTDATAMODE_UNFILTERED };
BOOL success;

success = txCreateGlobalInteractorSnapshot(
hContext,
InteractorId,
&g_hGlobalInteractorSnapshot,
&hInteractor) == TX_RESULT_OK;

success &= txCreateGazePointDataBehavior(hInteractor, &params) == TX_RESULT_OK;

txReleaseObject(&hInteractor);
return success;
}

Note, that here the function
txCreateInteractorBehavior

has been replaced with
txCreateGazePointDataBehavior

and
txSetGazePointDataBehaviorParams
has been removed.

there is no function “like” txCreateGazePointDataBehavior for EyePointData.