NativeBindings
See ml_space.h for additional comments.
Inherits from:
MagicLeapNativeBindings
Public Methods
MLResult.Code MLSpaceExportSpace
Export an on device Magic Leap Space.
public MLResult.Code MLSpaceExportSpace(
in SpaceExportInfo exportInfo,
ref SpaceExportOutData data
)
Parameters
Type | Name | Description |
---|---|---|
in SpaceExportInfo | exportInfo | A structure containing information about the Space export settings. This structure must be initialized by calling #MLSpaceExportInfoInit before use. |
ref SpaceExportOutData | data | A structure containing information about the exported Space. |
MLResult.Code MLSpaceGetLocalizationResult
Get the localization results.
public MLResult.Code MLSpaceGetLocalizationResult(
ulong handle,
out SpaceLocalizationResult result
)
Parameters
Type | Name | Description |
---|---|---|
ulong | handle | |
out SpaceLocalizationResult | result | A structure containing information about the device's localization state. This structure must be initialized by calling #MLSpaceLocalizationResultInit before usebefore use. |
MLResult.Code MLSpaceGetSpaceList
The list memory is owned by the library, call MLSpaceReleaseSpaceList to release the memory. Each get MLSpaceGetSpaceList should have a corresponding MLSpaceReleaseSpaceList.
public MLResult.Code MLSpaceGetSpaceList(
ulong hanlde,
out SpaceFilter queryFilter,
out SpaceList spaceList
)
Parameters
Type | Name | Description |
---|---|---|
ulong | hanlde | |
out SpaceFilter | queryFilter | A collection of filters for Magic Leap Spaces. This structure must be initialized by calling #MLSpaceQueryFilterInit before use. There is no support for filters at this time. |
out SpaceList | spaceList | A structure containing list of #MLSpace. This structure must be initialized by calling #MLSpaceListInit before use. |
MLResult.Code MLSpaceImportSpace
The #MLSpaceImportInfo memory is owned by the app and the app should make sure to release the memory once the API call has returned
public MLResult.Code MLSpaceImportSpace(
in SpaceImportInfo importInfo,
ref SpaceImportOutData data
)
Parameters
Type | Name | Description |
---|---|---|
in SpaceImportInfo | importInfo | A structure containing information needed to import Magic Leap Space. This structure must be initialized by calling #MLSpaceImportInfoInit before use. |
ref SpaceImportOutData | data | A structure containing information about the imported Space. |
MLResult.Code MLSpaceManagerCreate
Creates a Magic Leap Space manager handle.
public MLResult.Code MLSpaceManagerCreate(
in Settings settings,
out ulong handle
)
Parameters
Type | Name | Description |
---|---|---|
in Settings | settings | A structure containing settings for the space manager. This structure must be initialized by calling #MLSpaceManagerSettingsInit before use. |
out ulong | handle |
MLResult.Code MLSpaceManagerDestroy
Destroys a Space manager handle.
public MLResult.Code MLSpaceManagerDestroy(
ulong handle
)
Parameters
Type | Name | Description |
---|---|---|
ulong | handle |
MLResult.Code MLSpaceReleaseExportData
Release resources acquired in MLSpaceExportSpace.
public MLResult.Code MLSpaceReleaseExportData(
ref SpaceExportOutData data
)
Parameters
Type | Name | Description |
---|---|---|
ref SpaceExportOutData | data | A structure containing information about the exported Space. |
MLResult.Code MLSpaceReleaseSpaceList
Release the list of available spaces.
public MLResult.Code MLSpaceReleaseSpaceList(
ulong handle,
out SpaceList list
)
Parameters
Type | Name | Description |
---|---|---|
ulong | handle | |
out SpaceList | list | A structure containing list of #MLSpace. This structure must be initialized by calling #MLSpaceListInit before use. |
MLResult.Code MLSpaceRequestLocalization
Send a request to localize to a given Magic Leap Space.
public MLResult.Code MLSpaceRequestLocalization(
ulong handle,
ref SpaceLocalizationInfo spaceList
)
Parameters
Type | Name | Description |
---|---|---|
ulong | handle | |
ref SpaceLocalizationInfo | spaceList | A collection of parameters to be used for localization request. This structure must be initialized by calling #MLSpaceLocalizationInfoInit before use. |
MLResult.Code MLSpaceSetCallbacks
Set the callbacks for events related to the Magic Leap Space.
public MLResult.Code MLSpaceSetCallbacks(
ulong handle,
ref SpaceCallbacks callbacks,
IntPtr userData
)
Parameters
Type | Name | Description |
---|---|---|
ulong | handle | |
ref SpaceCallbacks | callbacks | A structure containing callbacks for events related to the Space. This structure must be initialized by calling #MLSpaceCallbacksInit before use. Application can unregister(stop receiving callbacks) at any time by setting the corresponding callback to NULL. |
IntPtr | userData |