Skip to main content
Version: 21 Aug 2024

NativeBindings

See ml_world_camera.h for additional comments.

Inherits from:
MagicLeapNativeBindings

Public Methods

MLResult.Code MLWorldCameraConnect

Connect to world cameras.

public MLResult.Code MLWorldCameraConnect(
in MLWorldCameraSettings settings,
out ulong handle
)

Parameters

TypeNameDescription
in MLWorldCameraSettingssettingsA structure to encapsulate the camera settings.
out ulonghandle

MLResult.Code MLWorldCameraDisconnect

Disconnect from world camera. This will disconnect from all the world camera currently connected.

public MLResult.Code MLWorldCameraDisconnect(
ulong handle
)

Parameters

TypeNameDescription
ulonghandle

MLResult.Code MLWorldCameraGetLatestWorldCameraData

Poll for Frames. Returns #MLWorldCameraData with this latest data when available. The memory is owned by the system. Application should copy the data it needs to cache it and then release the memory by calling #MLWorldCameraReleaseCameraData. This is a blocking call. API is not thread safe. If there are no new world camera data frames for a given duration (duration determined by the system) then the API will return MLResult_Timeout.

public MLResult.Code MLWorldCameraGetLatestWorldCameraData(
ulong handle,
uint timeOutMs,
ref IntPtr cameraData
)

Parameters

TypeNameDescription
ulonghandle
uinttimeOutMs
ref IntPtrcameraData

MLResult.Code MLWorldCameraReleaseCameraData

Releases specified #MLWorldCameraData object. This function should be called exactly once for each call to #MLWorldCameraGetLatestCameraData.

public MLResult.Code MLWorldCameraReleaseCameraData(
ulong handle,
IntPtr cameraData
)

Parameters

TypeNameDescription
ulonghandle
IntPtrcameraData

MLResult.Code MLWorldCameraUpdateSettings

Update the world camera settings.

public MLResult.Code MLWorldCameraUpdateSettings(
ulong handle,
in MLWorldCameraSettings settings
)

Parameters

TypeNameDescription
ulonghandle
in MLWorldCameraSettingssettingsA structure to encapsulate the camera settings.