MLGazeRecognition
NameSpace: MagicLeap
This API can be used to get info about gaze. More...
Inherits from:
MLAutoAPISingleton< MLGazeRecognition >,
MLLazySingleton< T >
Detailed Description
public class MLGazeRecognition : MLAutoAPISingleton< MLGazeRecognition >
Details*
Runs once per Unity Update loop.
Public Methods
MLResult GetState
Get information about the user's gaze.
public static MLResult GetState(
out State state
)
Parameters
Type | Name | Description |
---|---|---|
out State | state | Information 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 GetStaticData
Get static information about Gaze Recognition.
public static MLResult GetStaticData(
out StaticData data
)
Parameters
Type | Name | Description |
---|---|---|
out StaticData | data | Target 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.
Protected Methods
StartAPI
Start the API.
protected virtual override MLResult.Code StartAPI()
Reimplements: StartAPI
StopAPI
Stop the API.
protected virtual override MLResult.Code StopAPI()
Reimplements: StopAPI
Public Enums
Behavior
A set of mutually-exclusive behaviors that the Gaze Recognition system can report.
Enumerator | Value | Description |
---|---|---|
Unknown | Unknown. | |
EyesClosed | Both eyes closed. | |
Blink | Blink detected. | |
Fixation | User is fixating, eye position is stable. | |
Pursuit | User is pursuing, eye velocity is low but nonzero. | |
Saccade | User is making a saccade, eye velocity is high. | |
WinkLeft | User is winking with the left eye | |
WinkRight | User is winking with the right eye |
Error
A set of possible error codes that the Gaze Recognition system can report.
Enumerator | Value | Description |
---|---|---|
None | No error, tracking is nominal. | |
Generic | Gaze Recognition system failed. |