Typedefs | Functions
Interaction Library

C interface to the features exposed by the Interaction Library. More...

Typedefs

typedef struct IL_Context_ IL_Context
 A "handle" type that identifies an actual underlying Interaction Library implementation instance. More...
 

Functions

IL_C_API IL_Result IL_CreateInteractionLib (IL_Context **context, IL_FieldOfUse fieldOfUse)
 Creates an Interaction Library instance with a default adapter, if available. More...
 
IL_C_API IL_Result IL_CreateInteractionLibWithLogger (IL_Context **context, IL_FieldOfUse fieldOfUse, IL_Logger *logger)
 Creates an Interaction Library instance with a default adapter, if available. More...
 
IL_C_API IL_Result IL_CreateInteractionLibWithAdapter (IL_Context **context, IL_FieldOfUse fieldOfUse, IL_Logger *logger, IL_AdapterFunctions *adapterFunctions)
 Creates an Interaction Library instance with a custom adapter. More...
 
IL_C_API IL_Result IL_DestroyInteractionLib (IL_Context *context)
 Destroys an Interaction Library instance. More...
 
IL_C_API IL_Result IL_SetAdapter (IL_Context *context, IL_AdapterFunctions *adapterFunctions)
 Sets a custom adapter, or resets the current adapter. More...
 
IL_C_API IL_Result IL_CoordinateTransformAddOrUpdateDisplayArea (IL_Context *context, float widthUserUnits, float heightUserUnits, float widthVirtualUnits, float heightVirtualUnits, float xOriginVirtualUnits, float yOriginVirtualUnits, const char *virtualDisplayAreaId)
 Adds a display area (usually a screen) to the coordinate transform setup. Typically call this method multiple times to add information on dpi scaling and location of all screens in the system (see sample/separate documention for details). More...
 
IL_C_API IL_Result IL_CoordinateTransformSetOriginOffset (IL_Context *context, float xOriginOffsetVirtualUnits, float yOriginOffsetVirtualUnits)
 Sets your origin position, as it is in the virtual coordinate system. Typically used to set the window position to use window local coordinates for streams and interactors, or one could set the display center to use a centered, left-handed coordinate system. More...
 
IL_C_API IL_Result IL_CoordinateTransformSetDisplayDensity (IL_Context *context, float xUnitsPerMm, float yUnitsPerMm)
 An alternative to IL_CoordinateTransformAddOrUpdateDisplayArea(), normally only used in special circumstances. More...
 
IL_C_API IL_Result IL_BeginInteractorUpdates (IL_Context *context)
 Begins an interactor update transaction, in which many add/update/remove/clear calls are batched. More...
 
IL_C_API IL_Result IL_CommitInteractorUpdates (IL_Context *context)
 Commits all batched interactor add/update/remove/clear calls done since IL_BeginInteractorUpdates() was called. More...
 
IL_C_API IL_Result IL_AddOrUpdateInteractor (IL_Context *context, IL_InteractorId id, IL_Rectangle bounds, float z)
 Adds an interactor or updates an existing one, specifying its bounds and z value (the value increases towards the user). More...
 
IL_C_API IL_Result IL_UpdateInteractorBounds (IL_Context *context, IL_InteractorId id, IL_Rectangle bounds)
 Updates the bounds for an existing interactor. More...
 
IL_C_API IL_Result IL_UpdateInteractorZ (IL_Context *context, IL_InteractorId id, float z)
 Updates the z value for an existing interactor (the value increases towards the user). More...
 
IL_C_API IL_Result IL_RemoveInteractor (IL_Context *context, IL_InteractorId id)
 Removes an existing interactor and all its related data. More...
 
IL_C_API IL_Result IL_ClearInteractors (IL_Context *context)
 Removes all existing interactors. More...
 
IL_C_API IL_Result IL_UpdateInteractorStandardWeightDistributionTypes (IL_Context *context, IL_InteractorId id, IL_WeightDistributionType weightDistributionTypes)
 Sets the built-in standard weight distribution of an interactor, e.g., center weighted or flat. More...
 
IL_C_API IL_Result IL_AddOrUpdateCustomWeightDistributionBitmap (IL_Context *context, IL_WeightDistributionId weightDistributionId, bool isWeightDistribution, bool isStencilMap, int bitmapColumns, int bitmapRows, const unsigned char *bitmap)
 Adds a new custom weight distribution bitmap or updates an existing one. More...
 
IL_C_API IL_Result IL_RemoveCustomWeightDistributionBitmap (IL_Context *context, IL_WeightDistributionId weightDistributionId)
 Removes an existing custom weight distribution bitmap. More...
 
IL_C_API IL_Result IL_AddOrUpdateBindingToCustomWeightDistribution (IL_Context *context, IL_InteractorId id, IL_WeightDistributionId weightDistributionId)
 Adds a new custom weight distribution bitmap and binds it to an existing interactor, or changes an existing binding. More...
 
IL_C_API IL_Result IL_RemoveBindingToCustomWeightDistribution (IL_Context *context, IL_InteractorId id, IL_WeightDistributionId weightDistributionId)
 Removes an existing binding to a custom weight distribution bitmap for the specified interactor. More...
 
IL_C_API IL_Result IL_SubscribeGazeFocusEvents (IL_Context *context, IL_GazeFocusEventCallback callback, void *callbackContext)
 Subscribes to interactor gaze focus events. More...
 
IL_C_API IL_Result IL_UnsubscribeGazeFocusEvents (IL_Context *context)
 Unsubscribes from interactor gaze focus events. More...
 
IL_C_API IL_Result IL_SubscribeGazePointData (IL_Context *context, IL_GazePointDataCallback callback, void *callbackContext)
 Subscribes to gaze point data. More...
 
IL_C_API IL_Result IL_SubscribeGazeOriginData (IL_Context *context, IL_GazeOriginDataCallback callback, void *callbackContext)
 Subscribes to gaze origin data. More...
 
IL_C_API IL_Result IL_SubscribePresenceData (IL_Context *context, IL_PresenceDataCallback callback, void *callbackContext)
 Subscribes to presence data. More...
 
IL_C_API IL_Result IL_SubscribeHeadPoseData (IL_Context *context, IL_HeadPoseDataCallback callback, void *callbackContext)
 Subscribes to head pose data. More...
 
IL_C_API IL_Result IL_UnsubscribeGazePointData (IL_Context *context)
 Unsubscribes from gaze point data. More...
 
IL_C_API IL_Result IL_UnsubscribeGazeOriginData (IL_Context *context)
 Unsubscribes from gaze origin data. More...
 
IL_C_API IL_Result IL_UnsubscribePresenceData (IL_Context *context)
 Unsubscribes from presence data. More...
 
IL_C_API IL_Result IL_UnsubscribeHeadPoseData (IL_Context *context)
 Unsubscribes from head pose data. More...
 
IL_C_API IL_Result IL_GetDataStreamCapability (IL_Context *context, IL_StreamType streamType, IL_Capability *capability)
 Get information on the current system capabilities for a data stream. More...
 
IL_C_API IL_Result IL_SubscribeDataStreamCapabilitiesChanged (IL_Context *context, IL_DataStreamCapabilitiesChangedCallback callback, void *callbackContext)
 This callback will be triggered on IL_UpdateStreamingDataOutput()/IL_Update()/IL_WaitAndUpdate() if capabilities have changed. Querying capabilites with GetDataStreamCapability(...) on this callback is allowed. More...
 
IL_C_API IL_Result IL_UnsubscribeDataStreamCapabilitiesChanged (IL_Context *context)
 Unsubscribes from data stream capabilities changed notifications. More...
 
IL_C_API IL_Result IL_WaitAndUpdate (IL_Context *context, unsigned long connectionIntervalMs)
 Checks/waits for device connection, waits for data, and updates. More...
 
IL_C_API IL_Result IL_WaitForDeviceConnection (IL_Context *context)
 Waits for a device to be available and a connection to be established. More...
 
IL_C_API IL_Result IL_Update (IL_Context *context)
 Updates the system and receives event callbacks that are called on the calling thread. More...
 
IL_C_API IL_Result IL_WaitForDeviceDataAvailable (IL_Context *context)
 Waits for data from the current device. More...
 
IL_C_API IL_Result IL_UpdateStreamingDataOutput (IL_Context *context)
 Updates stream buffers and process filters only, and publishes results on the calling thread via the registered streaming data callbacks. More...
 
IL_C_API IL_Result IL_UpdateInteraction (IL_Context *context)
 Updates interaction buffers, performs interactor selection calculations, and publishes results on calling thread via the registered interaction event callbacks. More...
 

Detailed Description

C interface to the features exposed by the Interaction Library.

Typedef Documentation

◆ IL_Context

typedef struct IL_Context_ IL_Context

A "handle" type that identifies an actual underlying Interaction Library implementation instance.

Function Documentation

◆ IL_CreateInteractionLib()

IL_C_API IL_Result IL_CreateInteractionLib ( IL_Context **  context,
IL_FieldOfUse  fieldOfUse 
)

Creates an Interaction Library instance with a default adapter, if available.

See also
IL_SetAdapter()
Parameters
fieldOfUseThis mandatory flag denotes if the Interaction Library is used for interactive or analytical purposes. Please see the EULA and documentation for more information.
[out]contextPointer to an IL_Context structure used internally to identify an actual underlying Interaction Library implementation.
Returns
IL_Result_Ok If successful; otherwise another IL_Result warning or error code.

◆ IL_CreateInteractionLibWithLogger()

IL_C_API IL_Result IL_CreateInteractionLibWithLogger ( IL_Context **  context,
IL_FieldOfUse  fieldOfUse,
IL_Logger logger 
)

Creates an Interaction Library instance with a default adapter, if available.

See also
IL_SetAdapter()
Parameters
fieldOfUseThis mandatory flag denotes if the Interaction Library is used for interactive or analytical purposes. Please see the EULA and documentation for more information.
loggerOptional pointer to a structure with information about a callback function that will be called by the Interaction Library for logging purposes. If logger is NULL, the Interaction Library does no logging related processing. The callback function is set in the callback field of the @IL_Logger structure. The level parameter denotes the highest log level at which the callback function will be called. For example, if "info" is specified, then the callback will be called for "error", "warning" and "info", but not for "debug" and "trace". The text parameter passed to the callback function points at a null terminated character array formatted in a format specified by Tobii. The parameter is only valid in the scope of the callback. The context parameter passed to the callback function is set in the context field of the @IL_Logger structure.
[out]contextPointer to an IL_Context structure used internally to identify an actual underlying Interaction Library implementation.
Returns
IL_Result_Ok If successful; otherwise another IL_Result warning or error code.

◆ IL_CreateInteractionLibWithAdapter()

IL_C_API IL_Result IL_CreateInteractionLibWithAdapter ( IL_Context **  context,
IL_FieldOfUse  fieldOfUse,
IL_Logger logger,
IL_AdapterFunctions adapterFunctions 
)

Creates an Interaction Library instance with a custom adapter.

See also
IL_SetAdapter()
Parameters
fieldOfUseThis mandatory flag denotes if the Interaction Library is used for interactive or analytical purposes. Please see the EULA and documentation for more information.
loggerOptional pointer to a structure with information about a callback function that will be called by the Interaction Library for logging purposes. If logger is NULL, the Interaction Library does no logging related processing. The callback function is set in the callback field of the @IL_Logger structure. The level parameter denotes the highest log level at which the callback function will be called. For example, if "info" is specified, then the callback will be called for "error", "warning" and "info", but not for "debug" and "trace". The text parameter passed to the callback function points at a null terminated character array formatted in a format specified by Tobii. The parameter is only valid in the scope of the callback. The context parameter passed to the callback function is set in the context field of the @IL_Logger structure.
adapterFunctionsPointer to an IL_AdapterFunctions structure defining the custom adapter. NULL is a valid parameter value which means the default adapter will not be set. Without a valid adapter the following functions will do nothing and return Result_Warning_NoAdapterSet: will return IL_Result_Error_NoAdapterSet: IL_Update(), IL_UpdateStreamingDataOutput(), IL_UpdateInteraction(), IL_SubscribeGazePointData(), IL_SubscribeGazeOriginData(), IL_SubscribePresenceData(), and IL_SubscribeHeadPoseData(). However, it is still possible to add interactors and subscribe to gaze focus events.
[out]contextPointer to an IL_Context structure used internally to identify an actual underlying Interaction Library implementation.
Returns
IL_Result_Ok If successful; otherwise another IL_Result warning or error code.

◆ IL_DestroyInteractionLib()

IL_C_API IL_Result IL_DestroyInteractionLib ( IL_Context context)

Destroys an Interaction Library instance.

Parameters
contextPointer to an IL_Context structure used internally to identify an actual underlying Interaction Library implementation.
Returns
IL_Result_Ok If successful; otherwise another IL_Result warning or error code.

◆ IL_SetAdapter()

IL_C_API IL_Result IL_SetAdapter ( IL_Context context,
IL_AdapterFunctions adapterFunctions 
)

Sets a custom adapter, or resets the current adapter.

Parameters
contextPointer to an IL_Context structure used internally to identify an actual underlying Interaction Library implementation.
adapterFunctionsPointer to an IL_AdapterFunctions structure defining the custom adapter. NULL is a valid parameter value, with will cause the current adapter to be removed. Without a valid adapter the following functions will do nothing and return Result_Warning_NoAdapterSet: will return IL_Result_Error_NoAdapterSet: IL_Update(), IL_UpdateStreamingDataOutput(), IL_UpdateInteraction(), IL_SubscribeGazePointData(), IL_SubscribeGazeOriginData(), IL_SubscribePresenceData(), and IL_SubscribeHeadPoseData(). However, it is still possible to add interactors and subscribe to gaze focus events.
Returns
IL_Result_Ok If successful; otherwise another IL_Result warning or error code.

◆ IL_CoordinateTransformAddOrUpdateDisplayArea()

IL_C_API IL_Result IL_CoordinateTransformAddOrUpdateDisplayArea ( IL_Context context,
float  widthUserUnits,
float  heightUserUnits,
float  widthVirtualUnits,
float  heightVirtualUnits,
float  xOriginVirtualUnits,
float  yOriginVirtualUnits,
const char *  virtualDisplayAreaId 
)

Adds a display area (usually a screen) to the coordinate transform setup. Typically call this method multiple times to add information on dpi scaling and location of all screens in the system (see sample/separate documention for details).

If you are in a single screen environment, or a defacto single screen environment (see above), or use other (external) mechanisms to handle multiple displays areas, you may call this only once and then omit (set to zero/null) all parameters except the first two.

If you are unable to determine this information in your environment, please use CoordinateTransformSetDisplayDensity() instead (see below).

Note
If you are using a UI binding, it will usually take care of setting up all display areas.
Parameters
contextPointer to an IL_Context structure used internally to identify an actual underlying Interaction Library implementation.
widthUserUnitsThe width in your preferred units (eg. with dpi scaling in your environment, or other preferred units)
heightUserUnitsThe height in your preferred units (eg. with dpi scaling in your environment, or other preferred units)
widthVirtualUnitsThe width in system virtual screen units (or custom units that you use for system display setup)
heightVirtualUnitsThe height in system virtual screen units (or custom units that you use for system display setup)
xOriginVirtualUnitsThe display origin x coordinate in the system virtual screen coordinate system (or your custom space for system display setup)
yOriginVirtualUnitsThe display origin y coordinate in the system virtual screen coordinate system (or your custom space for system display setup)
virtualDisplayAreaIdThe virtual display id as a null terminated string (eg. on Windows this is a number)
Returns
IL_Result_Ok if the operation succeeded; otherwise an IL_Result warning or error code.

◆ IL_CoordinateTransformSetOriginOffset()

IL_C_API IL_Result IL_CoordinateTransformSetOriginOffset ( IL_Context context,
float  xOriginOffsetVirtualUnits,
float  yOriginOffsetVirtualUnits 
)

Sets your origin position, as it is in the virtual coordinate system. Typically used to set the window position to use window local coordinates for streams and interactors, or one could set the display center to use a centered, left-handed coordinate system.

Note
This command is optional. Not setting this will assume system virtual screen coordinates are being used for all on-display coordinates (or the custom coordinate system units that you used for system display setup).
Parameters
contextPointer to an IL_Context structure used internally to identify an actual underlying Interaction Library implementation.
xOriginOffsetVirtualUnitsThe x offset in the system virtual screen coordinate system (or your custom space)
yOriginOffsetVirtualUnitsThe y offset in the system virtual screen coordinate system (or your custom space)
Returns
IL_Result_Ok if the operation succeeded; otherwise an IL_Result warning or error code.

◆ IL_CoordinateTransformSetDisplayDensity()

IL_C_API IL_Result IL_CoordinateTransformSetDisplayDensity ( IL_Context context,
float  xUnitsPerMm,
float  yUnitsPerMm 
)

An alternative to IL_CoordinateTransformAddOrUpdateDisplayArea(), normally only used in special circumstances.

This method exists as an alternative or addition to IL_CoordinateTransformAddOrUpdateDisplayArea(). It is mainly intended to be used in edge cases where you are in a sandboxed environment and cannot access information about displays, or if a specialized adapter is used that you cannot access or modify for some reason and IL_CoordinateTransformAddOrUpdateDisplayArea() is insufficient to solve the dpi scaling problem. You can see if you need to use IL_CoordinateTransformSetDisplayDensity() by checking the return value from IL_CoordinateTransformAddOrUpdateDisplayArea(). In almost all situations, using only IL_CoordinateTransformAddOrUpdateDisplayArea() is sufficient.

Note
Only to be used in special circumstances!
Parameters
contextPointer to an IL_Context structure used internally to identify an actual underlying Interaction Library implementation.
xUnitsPerMmThe number of horizontal units per mm.
yUnitsPerMmThe number of vertical units per mm.
Returns
IL_Result_Ok if the operation succeeded; otherwise an IL_Result warning or error code.

◆ IL_BeginInteractorUpdates()

IL_C_API IL_Result IL_BeginInteractorUpdates ( IL_Context context)

Begins an interactor update transaction, in which many add/update/remove/clear calls are batched.

Note
Must be called before any add/update/remove/clear calls.
Parameters
contextPointer to an IL_Context structure used internally to identify an actual underlying Interaction Library implementation.
Returns
IL_Result_Ok If successful; otherwise another IL_Result warning or error code.

◆ IL_CommitInteractorUpdates()

IL_C_API IL_Result IL_CommitInteractorUpdates ( IL_Context context)

Commits all batched interactor add/update/remove/clear calls done since IL_BeginInteractorUpdates() was called.

Note
Must be called for any interactor or interactor weights modifications to have effect.
Parameters
contextPointer to an IL_Context structure used internally to identify an actual underlying Interaction Library implementation.
Returns
IL_Result_Ok If successful; otherwise another IL_Result warning or error code.

◆ IL_AddOrUpdateInteractor()

IL_C_API IL_Result IL_AddOrUpdateInteractor ( IL_Context context,
IL_InteractorId  id,
IL_Rectangle  bounds,
float  z 
)

Adds an interactor or updates an existing one, specifying its bounds and z value (the value increases towards the user).

Parameters
contextPointer to an IL_Context structure used internally to identify an actual underlying Interaction Library implementation.
id
bounds
z
Returns
IL_Result_Ok If successful; otherwise another IL_Result warning or error code.

◆ IL_UpdateInteractorBounds()

IL_C_API IL_Result IL_UpdateInteractorBounds ( IL_Context context,
IL_InteractorId  id,
IL_Rectangle  bounds 
)

Updates the bounds for an existing interactor.

Parameters
contextPointer to an IL_Context structure used internally to identify an actual underlying Interaction Library implementation.
id
bounds
Returns
IL_Result_Ok If successful; otherwise another IL_Result warning or error code.

◆ IL_UpdateInteractorZ()

IL_C_API IL_Result IL_UpdateInteractorZ ( IL_Context context,
IL_InteractorId  id,
float  z 
)

Updates the z value for an existing interactor (the value increases towards the user).

Parameters
contextPointer to an IL_Context structure used internally to identify an actual underlying Interaction Library implementation.
id
z
Returns
IL_Result_Ok If successful; otherwise another IL_Result warning or error code.

◆ IL_RemoveInteractor()

IL_C_API IL_Result IL_RemoveInteractor ( IL_Context context,
IL_InteractorId  id 
)

Removes an existing interactor and all its related data.

Note
Custom weight distribution bitmaps are not removed, since they may be shared between interactors. However, the binding between the interactor and the custom weight distribution bitmaps are removed.
Parameters
contextPointer to an IL_Context structure used internally to identify an actual underlying Interaction Library implementation.
id
Returns
IL_Result_Ok If successful; otherwise another IL_Result warning or error code.

◆ IL_ClearInteractors()

IL_C_API IL_Result IL_ClearInteractors ( IL_Context context)

Removes all existing interactors.

Parameters
contextPointer to an IL_Context structure used internally to identify an actual underlying Interaction Library implementation.
Returns
IL_Result_Ok If successful; otherwise another IL_Result warning or error code.

◆ IL_UpdateInteractorStandardWeightDistributionTypes()

IL_C_API IL_Result IL_UpdateInteractorStandardWeightDistributionTypes ( IL_Context context,
IL_InteractorId  id,
IL_WeightDistributionType  weightDistributionTypes 
)

Sets the built-in standard weight distribution of an interactor, e.g., center weighted or flat.

Parameters
contextPointer to an IL_Context structure used internally to identify an actual underlying Interaction Library implementation.
id
weightDistributionTypes
Returns
IL_Result_Ok If successful; otherwise another IL_Result warning or error code.

◆ IL_AddOrUpdateCustomWeightDistributionBitmap()

IL_C_API IL_Result IL_AddOrUpdateCustomWeightDistributionBitmap ( IL_Context context,
IL_WeightDistributionId  weightDistributionId,
bool  isWeightDistribution,
bool  isStencilMap,
int  bitmapColumns,
int  bitmapRows,
const unsigned char *  bitmap 
)

Adds a new custom weight distribution bitmap or updates an existing one.

Parameters
contextPointer to an IL_Context structure used internally to identify an actual underlying Interaction Library implementation.
weightDistributionId
isWeightDistribution
isStencilMap
bitmapColumns
bitmapRows
bitmap
Returns
IL_Result_Ok If successful; otherwise another IL_Result warning or error code.

◆ IL_RemoveCustomWeightDistributionBitmap()

IL_C_API IL_Result IL_RemoveCustomWeightDistributionBitmap ( IL_Context context,
IL_WeightDistributionId  weightDistributionId 
)

Removes an existing custom weight distribution bitmap.

Parameters
contextPointer to an IL_Context structure used internally to identify an actual underlying Interaction Library implementation.
weightDistributionId
Returns
IL_Result_Ok If successful; otherwise another IL_Result warning or error code.

◆ IL_AddOrUpdateBindingToCustomWeightDistribution()

IL_C_API IL_Result IL_AddOrUpdateBindingToCustomWeightDistribution ( IL_Context context,
IL_InteractorId  id,
IL_WeightDistributionId  weightDistributionId 
)

Adds a new custom weight distribution bitmap and binds it to an existing interactor, or changes an existing binding.

Parameters
contextPointer to an IL_Context structure used internally to identify an actual underlying Interaction Library implementation.
id
weightDistributionId
Returns
IL_Result_Ok If successful; otherwise another IL_Result warning or error code.

◆ IL_RemoveBindingToCustomWeightDistribution()

IL_C_API IL_Result IL_RemoveBindingToCustomWeightDistribution ( IL_Context context,
IL_InteractorId  id,
IL_WeightDistributionId  weightDistributionId 
)

Removes an existing binding to a custom weight distribution bitmap for the specified interactor.

Parameters
contextPointer to an IL_Context structure used internally to identify an actual underlying Interaction Library implementation.
id
weightDistributionId
Returns
IL_Result_Ok If successful; otherwise another IL_Result warning or error code.

◆ IL_SubscribeGazeFocusEvents()

IL_C_API IL_Result IL_SubscribeGazeFocusEvents ( IL_Context context,
IL_GazeFocusEventCallback  callback,
void *  callbackContext 
)

Subscribes to interactor gaze focus events.

Parameters
contextPointer to an IL_Context structure used internally to identify an actual underlying Interaction Library implementation.
callback
callbackContextWill be passed to the callback when the callback is invoked.
Returns
IL_Result_Ok If successful; otherwise another IL_Result warning or error code.

◆ IL_UnsubscribeGazeFocusEvents()

IL_C_API IL_Result IL_UnsubscribeGazeFocusEvents ( IL_Context context)

Unsubscribes from interactor gaze focus events.

Parameters
contextPointer to an IL_Context structure used internally to identify an actual underlying Interaction Library implementation.
Returns
IL_Result_Ok If successful; otherwise another IL_Result warning or error code.

◆ IL_SubscribeGazePointData()

IL_C_API IL_Result IL_SubscribeGazePointData ( IL_Context context,
IL_GazePointDataCallback  callback,
void *  callbackContext 
)

Subscribes to gaze point data.

Parameters
contextPointer to an IL_Context structure used internally to identify an actual underlying Interaction Library implementation.
callback
callbackContextWill be passed to the callback when the callback is invoked.
Returns
IL_Result_Ok If successful; otherwise another IL_Result warning or error code.

◆ IL_SubscribeGazeOriginData()

IL_C_API IL_Result IL_SubscribeGazeOriginData ( IL_Context context,
IL_GazeOriginDataCallback  callback,
void *  callbackContext 
)

Subscribes to gaze origin data.

Parameters
contextPointer to an IL_Context structure used internally to identify an actual underlying Interaction Library implementation.
callback
callbackContextWill be passed to the callback when the callback is invoked.
Returns
IL_Result_Ok If successful; otherwise another IL_Result warning or error code.

◆ IL_SubscribePresenceData()

IL_C_API IL_Result IL_SubscribePresenceData ( IL_Context context,
IL_PresenceDataCallback  callback,
void *  callbackContext 
)

Subscribes to presence data.

Parameters
contextPointer to an IL_Context structure used internally to identify an actual underlying Interaction Library implementation.
callback
callbackContextWill be passed to the callback when the callback is invoked.
Returns
IL_Result_Ok If successful; otherwise another IL_Result warning or error code.

◆ IL_SubscribeHeadPoseData()

IL_C_API IL_Result IL_SubscribeHeadPoseData ( IL_Context context,
IL_HeadPoseDataCallback  callback,
void *  callbackContext 
)

Subscribes to head pose data.

Parameters
contextPointer to an IL_Context structure used internally to identify an actual underlying Interaction Library implementation.
callback
callbackContextWill be passed to the callback when the callback is invoked.
Returns
IL_Result_Ok If successful; otherwise another IL_Result warning or error code.

◆ IL_UnsubscribeGazePointData()

IL_C_API IL_Result IL_UnsubscribeGazePointData ( IL_Context context)

Unsubscribes from gaze point data.

Parameters
contextPointer to an IL_Context structure used internally to identify an actual underlying Interaction Library implementation.
Returns
IL_Result_Ok If successful; otherwise another IL_Result warning or error code.

◆ IL_UnsubscribeGazeOriginData()

IL_C_API IL_Result IL_UnsubscribeGazeOriginData ( IL_Context context)

Unsubscribes from gaze origin data.

Parameters
contextPointer to an IL_Context structure used internally to identify an actual underlying Interaction Library implementation.
Returns
IL_Result_Ok If successful; otherwise another IL_Result warning or error code.

◆ IL_UnsubscribePresenceData()

IL_C_API IL_Result IL_UnsubscribePresenceData ( IL_Context context)

Unsubscribes from presence data.

Parameters
contextPointer to an IL_Context structure used internally to identify an actual underlying Interaction Library implementation.
Returns
IL_Result_Ok If successful; otherwise another IL_Result warning or error code.

◆ IL_UnsubscribeHeadPoseData()

IL_C_API IL_Result IL_UnsubscribeHeadPoseData ( IL_Context context)

Unsubscribes from head pose data.

Parameters
contextPointer to an IL_Context structure used internally to identify an actual underlying Interaction Library implementation.
Returns
IL_Result_Ok If successful; otherwise another IL_Result warning or error code.

◆ IL_GetDataStreamCapability()

IL_C_API IL_Result IL_GetDataStreamCapability ( IL_Context context,
IL_StreamType  streamType,
IL_Capability *  capability 
)

Get information on the current system capabilities for a data stream.

Data stream availability is dependent on if a device is present, what type of device it is and current system state of the device being used. Data streams are typically not enabled unless the they are subscribed to, either internally by the Interaction Library or from this api.

Parameters
contextPointer to an IL_Context structure used internally to identify an actual underlying Interaction Library implementation.
streamTypeThe stream type to get capability information on.
[out]capabilityWill be set to the system capability for the stream type.
Returns
IL_Result_Ok If successful; otherwise another IL_Result warning or error code.

◆ IL_SubscribeDataStreamCapabilitiesChanged()

IL_C_API IL_Result IL_SubscribeDataStreamCapabilitiesChanged ( IL_Context context,
IL_DataStreamCapabilitiesChangedCallback  callback,
void *  callbackContext 
)

This callback will be triggered on IL_UpdateStreamingDataOutput()/IL_Update()/IL_WaitAndUpdate() if capabilities have changed. Querying capabilites with GetDataStreamCapability(...) on this callback is allowed.

Parameters
contextPointer to an IL_Context structure used internally to identify an actual underlying Interaction Library implementation.
callback
callbackContextWill be passed to the callback when the callback is invoked.
Returns
IL_Result_Ok If successful; otherwise another IL_Result warning or error code.

◆ IL_UnsubscribeDataStreamCapabilitiesChanged()

IL_C_API IL_Result IL_UnsubscribeDataStreamCapabilitiesChanged ( IL_Context context)

Unsubscribes from data stream capabilities changed notifications.

Parameters
contextPointer to an IL_Context structure used internally to identify an actual underlying Interaction Library implementation.
Returns
IL_Result_Ok If successful; otherwise another IL_Result warning or error code.

◆ IL_WaitAndUpdate()

IL_C_API IL_Result IL_WaitAndUpdate ( IL_Context context,
unsigned long  connectionIntervalMs 
)

Checks/waits for device connection, waits for data, and updates.

This is a convenience method that aggregates all necessary control methods into one, and sleeps the calling thread for the appropriate amount of time between connection attempts when no device is connected. The recommended connection attempt interval is one second, passing 0 means no sleep.

If you need granular control over updates and/or non-blocking calls use a suitable combination of the various other control methods.

Returns
IL_Result_Ok if all goes well. See the other control methods for information about other possible return codes.

◆ IL_WaitForDeviceConnection()

IL_C_API IL_Result IL_WaitForDeviceConnection ( IL_Context context)

Waits for a device to be available and a connection to be established.

Returns
IL_Result_Warning_NoDeviceAvailable if a device can't be connected to (wait time is short but varies with adapter).
IL_Result_Ok if a device is connected to. When a device connection has already been made previously and is still available, it returns IL_Result_Ok immediately.

◆ IL_Update()

IL_C_API IL_Result IL_Update ( IL_Context context)

Updates the system and receives event callbacks that are called on the calling thread.

Parameters
contextPointer to an IL_Context structure used internally to identify an actual underlying Interaction Library implementation.
Returns
IL_Result_Warning_NoAdapterSet if no adapter is set (see IL_CreateInteractionLib() and IL_SetAdapter()); otherwise another IL_Result code.

◆ IL_WaitForDeviceDataAvailable()

IL_C_API IL_Result IL_WaitForDeviceDataAvailable ( IL_Context context)

Waits for data from the current device.

May timeout or hang indefinitely depending on adapter implementation. Waiting is optional but if you do not wait, remember to call Update() or UpdateStreamingDataOutput() at least 10 times per second.

Parameters
contextPointer to an IL_Context structure used internally to identify an actual underlying Interaction Library implementation.
Returns
IL_Result_Warning_NoAdapterSet if no adapter is set (see IL_CreateInteractionLib() and IL_SetAdapter()); otherwise another IL_Result code.

◆ IL_UpdateStreamingDataOutput()

IL_C_API IL_Result IL_UpdateStreamingDataOutput ( IL_Context context)

Updates stream buffers and process filters only, and publishes results on the calling thread via the registered streaming data callbacks.

Use instead of IL_Update() if you need more granular control or use multiple threads.

Parameters
contextPointer to an IL_Context structure used internally to identify an actual underlying Interaction Library implementation.
Returns
IL_Result_Error_NoAdapterSet if no adapter is set (see IL_CreateInteractionLib() and IL_SetAdapter()); otherwise another IL_Result code.

◆ IL_UpdateInteraction()

IL_C_API IL_Result IL_UpdateInteraction ( IL_Context context)

Updates interaction buffers, performs interactor selection calculations, and publishes results on calling thread via the registered interaction event callbacks.

Use instead of IL_Update() if you need more granular control or use multiple threads.

Note
IL_UpdateStreamingDataOutput() needs to be called before this call.
Parameters
contextPointer to an IL_Context structure used internally to identify an actual underlying Interaction Library implementation.
Returns
IL_Result_Error_NoAdapterSet if no adapter is set (see IL_CreateInteractionLib() and IL_SetAdapter()); otherwise another IL_Result code.