Skip to main content
Version: 20 Mar 2024

NativeBindings

See ml_gaze_recognition.h for additional comments.

Inherits from:
MagicLeapNativeBindings

Public Methods

MLResult.Code MLGazeRecognitionCreate

Create Gaze Recognition.

public MLResult.Code MLGazeRecognitionCreate(
out ulong handle
)

Parameters

TypeNameDescription
out ulonghandleA pointer to an #MLHandle which will contain a handle to Gaze Recognition. If this operation fails, out_handle will be #ML_INVALID_HANDLE.

Returns: MLResult_InvalidParam The out_handle parameter was not valid (null). MLResult_Ok Gaze Recognition was successfully created. MLResult_UnspecifiedFaiure Gaze Recognition was not created successfully. MLResult_PermissionDenied


MLResult.Code MLGazeRecognitionDestroy

Destroy Gaze Recognition.

public MLResult.Code MLGazeRecognitionDestroy(
ulong handle
)

Parameters

TypeNameDescription
ulonghandleA handle to Gaze Recognition created by MLGazeRecognitionCreate()

Returns: MLResult_Ok The Gaze Recognition was successfully destroyed. MLResult_UnspecifiedFailure The Gaze Recognition was not successfully destroyed. MLResult_InvalidParam The Gaze Recognition handle was not valid.


MLResult.Code MLGazeRecognitionGetState

Get information about the user's gaze.

public MLResult.Code MLGazeRecognitionGetState(
ulong handle,
ref MLGazeRecognitionState state
)

Parameters

TypeNameDescription
ulonghandleA handle to Gaze Recognition created byvMLGazeRecognitionCreate().
ref MLGazeRecognitionStatestateInformation about the gaze.

Returns: MLResult_InvalidParam The state parameter was not valid (null). MLResult_Ok gaze Recognition static was successfully received. MLResult_UnspecifiedFailure Failed to receive gaze Recognition state data.


MLResult.Code MLGazeRecognitionGetStaticData

Get static information about Gaze Recognition.

public MLResult.Code MLGazeRecognitionGetStaticData(
ulong handle,
ref MLGazeRecognitionStaticData data
)

Parameters

TypeNameDescription
ulonghandleA handle to Gaze Recognition created by MLGazeRecognitionCreate().
ref MLGazeRecognitionStaticDatadataTarget to populate the data about Gaze Recognition..

Returns: MLResult_InvalidParam The data parameter was not valid (null). MLResult_Ok gaze Recognition data was successfully received. MLResult_UnspecifiedFailure Failed to receive gaze Recognition static data.