ml_eye_calibration.h
Classes
Name | |
---|---|
struct | MLEyeCalibrationState A struct representing the eye calibration state. |
Types
Name | |
---|---|
typedef struct MLEyeCalibrationState | MLEyeCalibrationState A struct representing the eye calibration state. |
Enums
Name | |
---|---|
enum | MLEyeCalibrationStatus { 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 | |
---|---|
void | MLEyeCalibrationStateInit(MLEyeCalibrationState * inout_state) Initialize MLEyeCalibrationState with version. |
MLResult | MLEyeCalibrationCreateClient(MLHandle * out_handle) Creates an eye calibration client. |
MLResult | MLEyeCalibrationDestroyClient(MLHandle handle) Destroys an eye calibration client. |
MLResult | MLEyeCalibrationGetState(MLHandle handle, MLEyeCalibrationState * out_state) Gets information about the user's current eye calibration. |
Enums Documentation
MLEyeCalibrationStatus
Enumerator | Value | Description |
---|---|---|
MLEyeCalibrationStatus_None | 0 | No valid calibration was found for eyes. |
MLEyeCalibrationStatus_Coarse | 1 | Calibration is of lower accuracy. |
MLEyeCalibrationStatus_Fine | 2 | Calibration is of higher accuracy. |
MLEyeCalibrationStatus_Ensure32Bits | 0x7FFFFFFF | Ensure 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 since 1.6.0. Scheduled for removal.
API Level:
- 20
Types Documentation
MLEyeCalibrationState
typedef struct MLEyeCalibrationState MLEyeCalibrationState;
A struct representing the eye calibration state.
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_state | Set up the version for inout_state and zero all other fields. |
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_handle | A pointer to an MLHandle to the newly created eye calibration client. |
Returns
MLResult | MLResult_InvalidParam | Failed to create eye calibration client due to an invalid input parameter. |
MLResult | MLResult_Ok | Successfully created eye calibration client. |
MLResult | MLResult_UnspecifiedFaiure | Failed to create eye calibration client due to an unknown failure. |
Required Permissions:
- None
Deprecated since 1.6.0. Scheduled for removal.
API Level:
- 20
MLEyeCalibrationDestroyClient
MLResult MLEyeCalibrationDestroyClient(
MLHandle handle
)
Destroys an eye calibration client.
Parameters
MLHandle | handle | MLHandle to the eye calibration cleint created by MLEyeCalibrationCreateClient. |
Returns
MLResult | MLResult_InvalidParam | MLHandle is invalid. |
MLResult | MLResult_Ok | Successfully destroyed eye calibration client. |
MLResult | MLResult_UnspecifiedFaiure | Failed to destroy eye calibration client due to an unknown failure. |
Required Permissions:
- None
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
MLHandle | handle | A handle to an Eye calibration client created by MLEyeCalibrationCreateClient. |
MLEyeCalibrationState * | out_state | A pointer to MLEyeCalibrationState where information about the eye calibration state is to be stored. |
Returns
MLResult | MLResult_InvalidParam | Failed to receive eye calibration state due to an invalid input parameter. |
MLResult | MLResult_Ok | Successfully received eye calibration state. |
MLResult | MLResult_UnspecifiedFailure | Failed to receive eye calibration state due to an unknown failure. |
Required Permissions:
- None
Deprecated since 1.6.0. Scheduled for removal.
API Level:
- 20
Source code
// %BANNER_BEGIN%
// ---------------------------------------------------------------------
// %COPYRIGHT_BEGIN%
// Copyright (c) 2022 Magic Leap, Inc. All Rights Reserved.
// Use of this file is governed by the Software License Agreement,
// located here: https://www.magicleap.com/software-license-agreement-ml2
// Terms and conditions applicable to third-party materials accompanying
// this distribution may also be found in the top-level NOTICE file
// appearing herein.
// %COPYRIGHT_END%
// ---------------------------------------------------------------------
// %BANNER_END%
#pragma once
#include "ml_api.h"
#include "ml_types.h"
#include <string.h>
ML_EXTERN_C_BEGIN
typedef enum MLEyeCalibrationStatus {
MLEyeCalibrationStatus_None = 0,
MLEyeCalibrationStatus_Coarse = 1,
MLEyeCalibrationStatus_Fine = 2,
MLEyeCalibrationStatus_Ensure32Bits = 0x7FFFFFFF
} MLEyeCalibrationStatus;
typedef ML_DEPRECATED_MSG("Use XR_ML_user_calibration OpenXR extention.") struct MLEyeCalibrationState {
uint32_t version;
MLEyeCalibrationStatus eye_calibration;
int64_t epoch_timestamp_us;
} MLEyeCalibrationState;
ML_DEPRECATED_MSG("Use XR_ML_user_calibration OpenXR extention.")
ML_STATIC_INLINE void MLEyeCalibrationStateInit(MLEyeCalibrationState *inout_state) {
if (inout_state) {
memset(inout_state, 0, sizeof(MLEyeCalibrationState));
inout_state->version = 1;
}
}
ML_DEPRECATED_MSG("Use XR_ML_user_calibration OpenXR extention.")
ML_API MLResult ML_CALL MLEyeCalibrationCreateClient(MLHandle *out_handle);
ML_DEPRECATED_MSG("Use XR_ML_user_calibration OpenXR extention.")
ML_API MLResult ML_CALL MLEyeCalibrationDestroyClient(MLHandle handle);
ML_DEPRECATED_MSG("Use XR_ML_user_calibration OpenXR extention.")
ML_API MLResult ML_CALL MLEyeCalibrationGetState(MLHandle handle, MLEyeCalibrationState *out_state);
ML_EXTERN_C_END