Skip to main content
Version: 20 Mar 2024

NativeBindings

See ml_facial_expression.h for additional comments.

Inherits from:
MagicLeapNativeBindings

Public Methods

MLResult.Code MLFacialExpressionCreateClient

Creates a Facial Expression Client handle. Although multiple client handles can be created they all represent the same facial expressions backend system.

public MLResult.Code MLFacialExpressionCreateClient(
ref MLFacialExpressionSettings settings,
out ulong handle
)

Parameters

TypeNameDescription
ref MLFacialExpressionSettingssettingsSettings that configures the facial expressions system.
out ulonghandleThe handle to be created.

Details*

API Level 29

permissions com.magicleap.permission.FACIAL_EXPRESSION (protection level: dangerous)

Returns: MLResult.Code.InvalidParam: One or more input parameters are not valid. MLResult.Code.Ok: Facial expressions client was successfully created. MLResult.Code.PerceptionSystemNotStarted: Perception System has not been started. MLResult.Code.PermissionDenied: Necessary permission is missing. MLResult.Code.UnspecifiedFailure: Operation failed for unknown reason.


MLResult.Code MLFacialExpressionDestroyClient

Destroy client handle and free client resources.

public MLResult.Code MLFacialExpressionDestroyClient(
ulong handle
)

Parameters

TypeNameDescription
ulonghandleFacial expression client handle created by MLFacialExpressionCreateClient.

Details*

API Level 29

permissions None

Returns: MLResult.Code.InvalidParam: One or more input parameters are not valid. MLResult.Code.Ok: Client handle was successfully destroyed. MLResult.Code.PerceptionSystemNotStarted: Perception System has not been started. MLResult.Code.UnspecifiedFailure: Operation failed for unknown reason.


MLResult.Code MLFacialExpressionGetEyeData

Get facial expressions data. handle Facial expression client handle created by MLFacialExpressionCreateClient.

public MLResult.Code MLFacialExpressionGetEyeData(
ulong handle,
out MLFacialExpressionEyeData eye_data
)

Parameters

TypeNameDescription
ulonghandleFacial expressions client handle created by MLFacialExpressionCreateClient.
out MLFacialExpressionEyeDataout_eye_dataEye expressions data.

Details*

API Level 29

permissions None

Returns: MLResult.Code.InvalidParam: One or more input parameters are not valid. MLResult.Code.Ok: Facial expressions data was retrieved successfully. MLResult.Code.PerceptionSystemNotStarted: Perception System has not been started. MLResult.Code.UnspecifiedFailure: Operation failed for unknown reason. MLResult.Code.HeadsetFitIssue: Operation failed because unable to detect the eyes, check MLHeadsetFitStatus.


MLResult.Code MLFacialExpressionUpdateSettings

Update the Facial Expression system with new settings

public MLResult.Code MLFacialExpressionUpdateSettings(
ulong handle,
in MLFacialExpressionSettings settings
)

Parameters

TypeNameDescription
ulonghandleHandle Facial expressions client handle created by MLFacialExpressionCreateClient.
in MLFacialExpressionSettingssettingsSettings New Facial Expression settings..

Details*

API Level 29

permissions None

Returns: MLResult.Code.InvalidParam: One or more input parameters are not valid. MLResult.Code.Ok: Facial expression settings was updated successfully. MLResult.Code.PerceptionSystemNotStarted: Perception System has not been started. MLResult.Code.UnspecifiedFailure: Operation failed for unknown reason.