Headset Fit
API to query the status of the Headset fit. More...
Classes
Name | |
---|---|
struct | MLHeadsetFitState Headset fit state. |
Types
Name | |
---|---|
typedef struct MLHeadsetFitState | MLHeadsetFitState Headset fit state. |
Enums
Name | |
---|---|
enum | MLHeadsetFitStatus { MLHeadsetFitStatus_Unknown = 0, MLHeadsetFitStatus_NotWorn, MLHeadsetFitStatus_GoodFit, MLHeadsetFitStatus_BadFit, MLHeadsetFitStatus_Ensure32Bits = 0x7FFFFFFF } Represents the different fit status that the system can report. |
Functions
Name | |
---|---|
void | MLHeadsetFitStateInit(MLHeadsetFitState * inout_state) Initialize MLHeadsetFitState. |
MLResult | MLHeadsetFitCreateClient(MLHandle * out_handle) Creates a headset fit client. |
MLResult | MLHeadsetFitDestroyClient(MLHandle handle) Destroys headset fit client. |
MLResult | MLHeadsetFitGetState(MLHandle handle, MLHeadsetFitState * out_state) Gets information about the user's current headset fit. |
Detailed Description
API to query the status of the Headset fit.
This API can be used to determine the fit of the headset on the user. The API will only look to see if the pupil location corresponding to the neutral gaze is centered on the image. What this means is that we can only look for a certain type of bad fits. However this covers majority of the bad fit cases.
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
MLHeadsetFitStatus
Enumerator | Value | Description |
---|---|---|
MLHeadsetFitStatus_Unknown | 0 | Headset fit status not available for unknown reason. |
MLHeadsetFitStatus_NotWorn | Headset not worn. | |
MLHeadsetFitStatus_GoodFit | Good fit. | |
MLHeadsetFitStatus_BadFit | Bad fit. | |
MLHeadsetFitStatus_Ensure32Bits | 0x7FFFFFFF | Ensure enum is represented as 32 bits. |
Represents the different fit status that the system can report.
If status is neither NotWorn nor Unknown, then headset is being worn.
Deprecated since 1.6.0. Scheduled for removal.
API Level:
- 20
Types Documentation
MLHeadsetFitState
typedef struct MLHeadsetFitState MLHeadsetFitState;
Headset fit state.
Deprecated since 1.6.0. Scheduled for removal.
API Level:
- 20
Functions Documentation
MLHeadsetFitStateInit
static inline void MLHeadsetFitStateInit(
MLHeadsetFitState * inout_state
)
Initialize MLHeadsetFitState.
Parameters
MLHeadsetFitState * | 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
MLHeadsetFitCreateClient
MLResult MLHeadsetFitCreateClient(
MLHandle * out_handle
)
Creates a headset fit client.
Parameters
MLHandle * | out_handle | A pointer to an MLHandle to the newly created headset fit client. |
Returns
MLResult | MLResult_InvalidParam | Failed to create headset fit client due to an invalid input parameter. |
MLResult | MLResult_Ok | Successfully created headset fit client. |
MLResult | MLResult_UnspecifiedFailure | Failed to create headset fit client due to an unknown failure. |
Required Permissions:
- None
Deprecated since 1.6.0. Scheduled for removal.
API Level:
- 20
MLHeadsetFitDestroyClient
MLResult MLHeadsetFitDestroyClient(
MLHandle handle
)
Destroys headset fit client.
Parameters
MLHandle | handle | MLHandle to the headset fit client created by MLHeadsetFitCreateClient. |
Returns
MLResult | MLResult_Ok | Successfully destroyed headset fit client. |
MLResult | MLResult_InvalidParam | MLHandle is invalid. |
MLResult | MLResult_UnspecifiedFailure | Failed to destroy headset fit client due to an unknown failure. |
Required Permissions:
- None
Deprecated since 1.6.0. Scheduled for removal.
API Level:
- 20
MLHeadsetFitGetState
MLResult MLHeadsetFitGetState(
MLHandle handle,
MLHeadsetFitState * out_state
)
Gets information about the user's current headset fit.
Parameters
MLHandle | handle | Handle to the headset fit information created by MLHeadsetFitCreateClient. |
MLHeadsetFitState * | out_state | Information about headset fit state. |
Returns
MLResult | MLResult_InvalidParam | Failed to receive headset fit state due to an invalid input parameter. |
MLResult | MLResult_Ok | Successfully returned headset fit state. |
MLResult | MLResult_UnspecifiedFailure | Failed to receive headset fit state due to an unknown failure. |
Required Permissions:
- None
Deprecated since 1.6.0. Scheduled for removal.
API Level:
- 20