Skip to main content
Version: 12 Dec 2024

Eye Calibration

APIs for querying the eye calibration state. More...

Classes

Name
structMLEyeCalibrationState
A struct representing the eye calibration state.

Types

Name
typedef struct MLEyeCalibrationStateMLEyeCalibrationState
A struct representing the eye calibration state.

Enums

Name
enumMLEyeCalibrationStatus
{
MLEyeCalibrationStatus_None = 0,
MLEyeCalibrationStatus_Coarse = 1,
MLEyeCalibrationStatus_Fine = 2,
MLEyeCalibrationStatus_Ensure32Bits = 0x7FFFFFFF
}
A set of possible eye calibration codes that the eye calibration system can report.

Functions

Name
voidMLEyeCalibrationStateInit(MLEyeCalibrationState * inout_state)
Initialize MLEyeCalibrationState with version.
MLResultMLEyeCalibrationCreateClient(MLHandle * out_handle)
Creates an eye calibration client.
MLResultMLEyeCalibrationDestroyClient(MLHandle handle)
Destroys an eye calibration client.
MLResultMLEyeCalibrationGetState(MLHandle handle, MLEyeCalibrationState * out_state)
Gets information about the user's current eye calibration.

Attributes

Name
uint32_tversion
MLEyeCalibrationStatuseye_calibration
int64_tepoch_timestamp_us

Detailed Description

APIs for querying the eye calibration state.

Warning

THIS API IS DEPRECATED IN FAVOR OF OPENXR XR_ML_user_calibration EXTENSION: https://registry.khronos.org/OpenXR/specs/1.0/html/xrspec.html#XR_ML_user_calibration

Shared Object:

  • perception.magicleap*

Enums Documentation

MLEyeCalibrationStatus

EnumeratorValueDescription
MLEyeCalibrationStatus_None0No valid calibration was found for eyes.
MLEyeCalibrationStatus_Coarse1Calibration is of lower accuracy.
MLEyeCalibrationStatus_Fine2Calibration is of higher accuracy.
MLEyeCalibrationStatus_Ensure32Bits0x7FFFFFFFEnsure enum is represented as 32 bits.

A set of possible eye calibration codes that the eye calibration system can report.

Has a calibration occurred. If so, what was the granularity.

Deprecated

Deprecated since 1.6.0. Scheduled for removal.

API Level:

  • 20

Types Documentation

MLEyeCalibrationState

typedef struct MLEyeCalibrationState MLEyeCalibrationState;

A struct representing the eye calibration state.

More Info

Deprecated

Deprecated since 1.6.0. Scheduled for removal.

API Level:

  • 20

Functions Documentation

MLEyeCalibrationStateInit

static inline void MLEyeCalibrationStateInit(
MLEyeCalibrationState * inout_state
)

Initialize MLEyeCalibrationState with version.

Parameters

MLEyeCalibrationState *inout_stateSet up the version for inout_state and zero all other fields.
Deprecated

Deprecated since 1.6.0. Scheduled for removal.

API Level:

  • 20

MLEyeCalibrationCreateClient

MLResult MLEyeCalibrationCreateClient(
MLHandle * out_handle
)

Creates an eye calibration client.

Parameters

MLHandle *out_handleA pointer to an MLHandle to the newly created eye calibration client.

Returns

MLResultMLResult_InvalidParamFailed to create eye calibration client due to an invalid input parameter.
MLResultMLResult_OkSuccessfully created eye calibration client.
MLResultMLResult_UnspecifiedFaiureFailed to create eye calibration client due to an unknown failure.

Required Permissions:

  • None
Deprecated

Deprecated since 1.6.0. Scheduled for removal.

API Level:

  • 20

MLEyeCalibrationDestroyClient

MLResult MLEyeCalibrationDestroyClient(
MLHandle handle
)

Destroys an eye calibration client.

Parameters

MLHandlehandleMLHandle to the eye calibration cleint created by MLEyeCalibrationCreateClient.

Returns

MLResultMLResult_InvalidParamMLHandle is invalid.
MLResultMLResult_OkSuccessfully destroyed eye calibration client.
MLResultMLResult_UnspecifiedFaiureFailed to destroy eye calibration client due to an unknown failure.

Required Permissions:

  • None
Deprecated

Deprecated since 1.6.0. Scheduled for removal.

API Level:

  • 20

MLEyeCalibrationGetState

MLResult MLEyeCalibrationGetState(
MLHandle handle,
MLEyeCalibrationState * out_state
)

Gets information about the user's current eye calibration.

Parameters

MLHandlehandleA handle to an Eye calibration client created by MLEyeCalibrationCreateClient.
MLEyeCalibrationState *out_stateA pointer to MLEyeCalibrationState where information about the eye calibration state is to be stored.

Returns

MLResultMLResult_InvalidParamFailed to receive eye calibration state due to an invalid input parameter.
MLResultMLResult_OkSuccessfully received eye calibration state.
MLResultMLResult_UnspecifiedFailureFailed to receive eye calibration state due to an unknown failure.

Required Permissions:

  • None
Deprecated

Deprecated since 1.6.0. Scheduled for removal.

API Level:

  • 20

Attributes Documentation

version

uint32_t version;

Version of this structure.


eye_calibration

MLEyeCalibrationStatus eye_calibration;
TypeDescription
MLEyeCalibrationStatusA set of possible eye calibration codes that the eye calibration system can report.

MLEyeCalibrationStatus enum defined above.


epoch_timestamp_us

int64_t epoch_timestamp_us;

Epoch timestamp of last calibration in microseconds.