Class MLLocalizationMap
A Magic Leap localization map is a container that holds metadata about the scanned environment. It is a digital copy of a physical place. A localization map holds spatial anchors, dense mesh, planes, feature points, and positional data.
- Spatial anchors - Used for persistent placement of content.
- Dense mesh - 3D triangulated geometry representing Magic Leap device understanding of the real-world geometry of an area.
- Planes - Large, flat surfaces derived from dense mesh data.
Localization maps can be created on device or in the Magic Leap AR Cloud. There are two types - "On Device" and "Cloud".
- "On Device" for OpenXR (local space for MagicLeap) - are for a single device and can be shared via the export/import mechanism.
- "Cloud" for OpenXR (shared space for MagicLeap) - can be shared across multiple MagicLeap devices in the AR Cloud.
Note
Localization Maps are called Spaces in the Magic Leap C-API.
Permissions
Android applications must have the com.magicleap.permission.SPACE_MANAGER permission listed in their manifest to use these functions:
(protection level: normal)
Android applications must have the com.magicleap.permission.SPACE_IMPORT_EXPORT permission listed in their manifest and granted to use these functions:
(protection level: dangerous)
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intExtendsXrResult.static final intExtendsXrResult.static final intExtendsXrResult.static final intExtendsXrResult.static final intExtendsXrResult.static final intExtendsXrResult.static final intExtendsXrResult.static final intXrLocalizationMapConfidenceML - Localization Confidencestatic final intXrLocalizationMapConfidenceML - Localization Confidencestatic final intXrLocalizationMapConfidenceML - Localization Confidencestatic final intXrLocalizationMapConfidenceML - Localization Confidencestatic final intXrLocalizationMapErrorFlagBitsML - The world meshing detector flags.static final intXrLocalizationMapErrorFlagBitsML - The world meshing detector flags.static final intXrLocalizationMapErrorFlagBitsML - The world meshing detector flags.static final intXrLocalizationMapErrorFlagBitsML - The world meshing detector flags.static final intXrLocalizationMapErrorFlagBitsML - The world meshing detector flags.static final intXrLocalizationMapErrorFlagBitsML - The world meshing detector flags.static final intXrLocalizationMapStateML - Localization Map Statestatic final intXrLocalizationMapStateML - Localization Map Statestatic final intXrLocalizationMapStateML - Localization Map Statestatic final intXrLocalizationMapStateML - Localization Map Statestatic final intXrLocalizationMapTypeML - Localization Map Typestatic final intXrLocalizationMapTypeML - Localization Map Typestatic final intXR_MAX_LOCALIZATION_MAP_NAME_LENGTH_MLstatic final StringThe extension name.static final intThe extension specification version.static final intExtendsXrObjectType.static final intExtendsXrReferenceSpaceType.static final intExtendsXrStructureType.static final intExtendsXrStructureType.static final intExtendsXrStructureType.static final intExtendsXrStructureType.static final intExtendsXrStructureType. -
Method Summary
Modifier and TypeMethodDescriptionstatic intnxrCreateExportedLocalizationMapML(XrSession session, long mapUuid, long map) Unsafe version of:CreateExportedLocalizationMapMLstatic intnxrEnableLocalizationEventsML(XrSession session, long info) Unsafe version of:EnableLocalizationEventsMLstatic intnxrGetExportedLocalizationMapDataML(XrExportedLocalizationMapML map, int bufferCapacityInput, long bufferCountOutput, long buffer) Unsafe version of:GetExportedLocalizationMapDataMLstatic intnxrImportLocalizationMapML(XrSession session, long importInfo, long mapUuid) Unsafe version of:ImportLocalizationMapMLstatic intnxrQueryLocalizationMapsML(XrSession session, long queryInfo, int mapCapacityInput, long mapCountOutput, long maps) Unsafe version of:QueryLocalizationMapsMLstatic intnxrRequestMapLocalizationML(XrSession session, long requestInfo) Unsafe version of:RequestMapLocalizationMLstatic intxrCreateExportedLocalizationMapML(XrSession session, XrUuidEXT mapUuid, org.lwjgl.PointerBuffer map) Creates an exported localization map handle.static intDestroys an exported localization map.static intRetrieve the current localization status.static intxrGetExportedLocalizationMapDataML(XrExportedLocalizationMapML map, IntBuffer bufferCountOutput, @Nullable ByteBuffer buffer) Returns the exported localization map data.static intxrImportLocalizationMapML(XrSession session, XrLocalizationMapImportInfoML importInfo, @Nullable XrUuidEXT mapUuid) Imports a localization map.static intxrQueryLocalizationMapsML(XrSession session, @Nullable XrLocalizationMapQueryInfoBaseHeaderML queryInfo, IntBuffer mapCountOutput, @Nullable XrLocalizationMapML.Buffer maps) Query the available localization maps.static intxrRequestMapLocalizationML(XrSession session, XrMapLocalizationRequestInfoML requestInfo) Requests a localization map.
-
Field Details
-
XR_ML_localization_map_SPEC_VERSION
public static final int XR_ML_localization_map_SPEC_VERSIONThe extension specification version.- See Also:
-
XR_ML_LOCALIZATION_MAP_EXTENSION_NAME
The extension name.- See Also:
-
XR_OBJECT_TYPE_EXPORTED_LOCALIZATION_MAP_ML
public static final int XR_OBJECT_TYPE_EXPORTED_LOCALIZATION_MAP_MLExtendsXrObjectType.- See Also:
-
XR_TYPE_LOCALIZATION_MAP_ML
public static final int XR_TYPE_LOCALIZATION_MAP_MLExtendsXrStructureType.Enum values:
- See Also:
-
XR_TYPE_EVENT_DATA_LOCALIZATION_CHANGED_ML
public static final int XR_TYPE_EVENT_DATA_LOCALIZATION_CHANGED_MLExtendsXrStructureType.Enum values:
- See Also:
-
XR_TYPE_MAP_LOCALIZATION_REQUEST_INFO_ML
public static final int XR_TYPE_MAP_LOCALIZATION_REQUEST_INFO_MLExtendsXrStructureType.Enum values:
- See Also:
-
XR_TYPE_LOCALIZATION_MAP_IMPORT_INFO_ML
public static final int XR_TYPE_LOCALIZATION_MAP_IMPORT_INFO_MLExtendsXrStructureType.Enum values:
- See Also:
-
XR_TYPE_LOCALIZATION_ENABLE_EVENTS_INFO_ML
public static final int XR_TYPE_LOCALIZATION_ENABLE_EVENTS_INFO_MLExtendsXrStructureType.Enum values:
- See Also:
-
XR_ERROR_LOCALIZATION_MAP_INCOMPATIBLE_ML
public static final int XR_ERROR_LOCALIZATION_MAP_INCOMPATIBLE_MLExtendsXrResult.Enum values:
ERROR_LOCALIZATION_MAP_INCOMPATIBLE_MLERROR_LOCALIZATION_MAP_UNAVAILABLE_MLERROR_LOCALIZATION_MAP_FAIL_MLERROR_LOCALIZATION_MAP_IMPORT_EXPORT_PERMISSION_DENIED_MLERROR_LOCALIZATION_MAP_PERMISSION_DENIED_MLERROR_LOCALIZATION_MAP_ALREADY_EXISTS_MLERROR_LOCALIZATION_MAP_CANNOT_EXPORT_CLOUD_MAP_ML
- See Also:
-
XR_ERROR_LOCALIZATION_MAP_UNAVAILABLE_ML
public static final int XR_ERROR_LOCALIZATION_MAP_UNAVAILABLE_MLExtendsXrResult.Enum values:
ERROR_LOCALIZATION_MAP_INCOMPATIBLE_MLERROR_LOCALIZATION_MAP_UNAVAILABLE_MLERROR_LOCALIZATION_MAP_FAIL_MLERROR_LOCALIZATION_MAP_IMPORT_EXPORT_PERMISSION_DENIED_MLERROR_LOCALIZATION_MAP_PERMISSION_DENIED_MLERROR_LOCALIZATION_MAP_ALREADY_EXISTS_MLERROR_LOCALIZATION_MAP_CANNOT_EXPORT_CLOUD_MAP_ML
- See Also:
-
XR_ERROR_LOCALIZATION_MAP_FAIL_ML
public static final int XR_ERROR_LOCALIZATION_MAP_FAIL_MLExtendsXrResult.Enum values:
ERROR_LOCALIZATION_MAP_INCOMPATIBLE_MLERROR_LOCALIZATION_MAP_UNAVAILABLE_MLERROR_LOCALIZATION_MAP_FAIL_MLERROR_LOCALIZATION_MAP_IMPORT_EXPORT_PERMISSION_DENIED_MLERROR_LOCALIZATION_MAP_PERMISSION_DENIED_MLERROR_LOCALIZATION_MAP_ALREADY_EXISTS_MLERROR_LOCALIZATION_MAP_CANNOT_EXPORT_CLOUD_MAP_ML
- See Also:
-
XR_ERROR_LOCALIZATION_MAP_IMPORT_EXPORT_PERMISSION_DENIED_ML
public static final int XR_ERROR_LOCALIZATION_MAP_IMPORT_EXPORT_PERMISSION_DENIED_MLExtendsXrResult.Enum values:
ERROR_LOCALIZATION_MAP_INCOMPATIBLE_MLERROR_LOCALIZATION_MAP_UNAVAILABLE_MLERROR_LOCALIZATION_MAP_FAIL_MLERROR_LOCALIZATION_MAP_IMPORT_EXPORT_PERMISSION_DENIED_MLERROR_LOCALIZATION_MAP_PERMISSION_DENIED_MLERROR_LOCALIZATION_MAP_ALREADY_EXISTS_MLERROR_LOCALIZATION_MAP_CANNOT_EXPORT_CLOUD_MAP_ML
- See Also:
-
XR_ERROR_LOCALIZATION_MAP_PERMISSION_DENIED_ML
public static final int XR_ERROR_LOCALIZATION_MAP_PERMISSION_DENIED_MLExtendsXrResult.Enum values:
ERROR_LOCALIZATION_MAP_INCOMPATIBLE_MLERROR_LOCALIZATION_MAP_UNAVAILABLE_MLERROR_LOCALIZATION_MAP_FAIL_MLERROR_LOCALIZATION_MAP_IMPORT_EXPORT_PERMISSION_DENIED_MLERROR_LOCALIZATION_MAP_PERMISSION_DENIED_MLERROR_LOCALIZATION_MAP_ALREADY_EXISTS_MLERROR_LOCALIZATION_MAP_CANNOT_EXPORT_CLOUD_MAP_ML
- See Also:
-
XR_ERROR_LOCALIZATION_MAP_ALREADY_EXISTS_ML
public static final int XR_ERROR_LOCALIZATION_MAP_ALREADY_EXISTS_MLExtendsXrResult.Enum values:
ERROR_LOCALIZATION_MAP_INCOMPATIBLE_MLERROR_LOCALIZATION_MAP_UNAVAILABLE_MLERROR_LOCALIZATION_MAP_FAIL_MLERROR_LOCALIZATION_MAP_IMPORT_EXPORT_PERMISSION_DENIED_MLERROR_LOCALIZATION_MAP_PERMISSION_DENIED_MLERROR_LOCALIZATION_MAP_ALREADY_EXISTS_MLERROR_LOCALIZATION_MAP_CANNOT_EXPORT_CLOUD_MAP_ML
- See Also:
-
XR_ERROR_LOCALIZATION_MAP_CANNOT_EXPORT_CLOUD_MAP_ML
public static final int XR_ERROR_LOCALIZATION_MAP_CANNOT_EXPORT_CLOUD_MAP_MLExtendsXrResult.Enum values:
ERROR_LOCALIZATION_MAP_INCOMPATIBLE_MLERROR_LOCALIZATION_MAP_UNAVAILABLE_MLERROR_LOCALIZATION_MAP_FAIL_MLERROR_LOCALIZATION_MAP_IMPORT_EXPORT_PERMISSION_DENIED_MLERROR_LOCALIZATION_MAP_PERMISSION_DENIED_MLERROR_LOCALIZATION_MAP_ALREADY_EXISTS_MLERROR_LOCALIZATION_MAP_CANNOT_EXPORT_CLOUD_MAP_ML
- See Also:
-
XR_REFERENCE_SPACE_TYPE_LOCALIZATION_MAP_ML
public static final int XR_REFERENCE_SPACE_TYPE_LOCALIZATION_MAP_MLExtendsXrReferenceSpaceType.- See Also:
-
XR_MAX_LOCALIZATION_MAP_NAME_LENGTH_ML
public static final int XR_MAX_LOCALIZATION_MAP_NAME_LENGTH_MLXR_MAX_LOCALIZATION_MAP_NAME_LENGTH_ML- See Also:
-
XR_LOCALIZATION_MAP_STATE_NOT_LOCALIZED_ML
public static final int XR_LOCALIZATION_MAP_STATE_NOT_LOCALIZED_MLXrLocalizationMapStateML - Localization Map StateDescription
Enum Description LOCALIZATION_MAP_STATE_NOT_LOCALIZED_MLThe system is not localized into a map. Features like Spatial Anchors relying on localization will not work. LOCALIZATION_MAP_STATE_LOCALIZED_MLThe system is localized into a map. LOCALIZATION_MAP_STATE_LOCALIZATION_PENDING_MLThe system is localizing into a map. LOCALIZATION_MAP_STATE_LOCALIZATION_SLEEPING_BEFORE_RETRY_MLInitial localization failed, the system will retry localization. See Also
- See Also:
-
XR_LOCALIZATION_MAP_STATE_LOCALIZED_ML
public static final int XR_LOCALIZATION_MAP_STATE_LOCALIZED_MLXrLocalizationMapStateML - Localization Map StateDescription
Enum Description LOCALIZATION_MAP_STATE_NOT_LOCALIZED_MLThe system is not localized into a map. Features like Spatial Anchors relying on localization will not work. LOCALIZATION_MAP_STATE_LOCALIZED_MLThe system is localized into a map. LOCALIZATION_MAP_STATE_LOCALIZATION_PENDING_MLThe system is localizing into a map. LOCALIZATION_MAP_STATE_LOCALIZATION_SLEEPING_BEFORE_RETRY_MLInitial localization failed, the system will retry localization. See Also
- See Also:
-
XR_LOCALIZATION_MAP_STATE_LOCALIZATION_PENDING_ML
public static final int XR_LOCALIZATION_MAP_STATE_LOCALIZATION_PENDING_MLXrLocalizationMapStateML - Localization Map StateDescription
Enum Description LOCALIZATION_MAP_STATE_NOT_LOCALIZED_MLThe system is not localized into a map. Features like Spatial Anchors relying on localization will not work. LOCALIZATION_MAP_STATE_LOCALIZED_MLThe system is localized into a map. LOCALIZATION_MAP_STATE_LOCALIZATION_PENDING_MLThe system is localizing into a map. LOCALIZATION_MAP_STATE_LOCALIZATION_SLEEPING_BEFORE_RETRY_MLInitial localization failed, the system will retry localization. See Also
- See Also:
-
XR_LOCALIZATION_MAP_STATE_LOCALIZATION_SLEEPING_BEFORE_RETRY_ML
public static final int XR_LOCALIZATION_MAP_STATE_LOCALIZATION_SLEEPING_BEFORE_RETRY_MLXrLocalizationMapStateML - Localization Map StateDescription
Enum Description LOCALIZATION_MAP_STATE_NOT_LOCALIZED_MLThe system is not localized into a map. Features like Spatial Anchors relying on localization will not work. LOCALIZATION_MAP_STATE_LOCALIZED_MLThe system is localized into a map. LOCALIZATION_MAP_STATE_LOCALIZATION_PENDING_MLThe system is localizing into a map. LOCALIZATION_MAP_STATE_LOCALIZATION_SLEEPING_BEFORE_RETRY_MLInitial localization failed, the system will retry localization. See Also
- See Also:
-
XR_LOCALIZATION_MAP_TYPE_ON_DEVICE_ML
public static final int XR_LOCALIZATION_MAP_TYPE_ON_DEVICE_MLXrLocalizationMapTypeML - Localization Map TypeDescription
Enum Description LOCALIZATION_MAP_TYPE_ON_DEVICE_MLThe system is localized into an On-Device map, published anchors are not shared between different devices. LOCALIZATION_MAP_TYPE_CLOUD_MLThe system is localized into a Cloud Map, anchors are shared per cloud account settings. See Also
- See Also:
-
XR_LOCALIZATION_MAP_TYPE_CLOUD_ML
public static final int XR_LOCALIZATION_MAP_TYPE_CLOUD_MLXrLocalizationMapTypeML - Localization Map TypeDescription
Enum Description LOCALIZATION_MAP_TYPE_ON_DEVICE_MLThe system is localized into an On-Device map, published anchors are not shared between different devices. LOCALIZATION_MAP_TYPE_CLOUD_MLThe system is localized into a Cloud Map, anchors are shared per cloud account settings. See Also
- See Also:
-
XR_LOCALIZATION_MAP_CONFIDENCE_POOR_ML
public static final int XR_LOCALIZATION_MAP_CONFIDENCE_POOR_MLXrLocalizationMapConfidenceML - Localization ConfidenceDescription
Enum Description LOCALIZATION_MAP_CONFIDENCE_POOR_MLThe localization map has poor confidence, systems relying on the localization map are likely to have poor performance. LOCALIZATION_MAP_CONFIDENCE_FAIR_MLThe confidence is fair, current environmental conditions may adversely affect localization. LOCALIZATION_MAP_CONFIDENCE_GOOD_MLThe confidence is high, persistent content should be stable. LOCALIZATION_MAP_CONFIDENCE_EXCELLENT_MLThis is a very high-confidence localization, persistent content will be very stable. See Also
- See Also:
-
XR_LOCALIZATION_MAP_CONFIDENCE_FAIR_ML
public static final int XR_LOCALIZATION_MAP_CONFIDENCE_FAIR_MLXrLocalizationMapConfidenceML - Localization ConfidenceDescription
Enum Description LOCALIZATION_MAP_CONFIDENCE_POOR_MLThe localization map has poor confidence, systems relying on the localization map are likely to have poor performance. LOCALIZATION_MAP_CONFIDENCE_FAIR_MLThe confidence is fair, current environmental conditions may adversely affect localization. LOCALIZATION_MAP_CONFIDENCE_GOOD_MLThe confidence is high, persistent content should be stable. LOCALIZATION_MAP_CONFIDENCE_EXCELLENT_MLThis is a very high-confidence localization, persistent content will be very stable. See Also
- See Also:
-
XR_LOCALIZATION_MAP_CONFIDENCE_GOOD_ML
public static final int XR_LOCALIZATION_MAP_CONFIDENCE_GOOD_MLXrLocalizationMapConfidenceML - Localization ConfidenceDescription
Enum Description LOCALIZATION_MAP_CONFIDENCE_POOR_MLThe localization map has poor confidence, systems relying on the localization map are likely to have poor performance. LOCALIZATION_MAP_CONFIDENCE_FAIR_MLThe confidence is fair, current environmental conditions may adversely affect localization. LOCALIZATION_MAP_CONFIDENCE_GOOD_MLThe confidence is high, persistent content should be stable. LOCALIZATION_MAP_CONFIDENCE_EXCELLENT_MLThis is a very high-confidence localization, persistent content will be very stable. See Also
- See Also:
-
XR_LOCALIZATION_MAP_CONFIDENCE_EXCELLENT_ML
public static final int XR_LOCALIZATION_MAP_CONFIDENCE_EXCELLENT_MLXrLocalizationMapConfidenceML - Localization ConfidenceDescription
Enum Description LOCALIZATION_MAP_CONFIDENCE_POOR_MLThe localization map has poor confidence, systems relying on the localization map are likely to have poor performance. LOCALIZATION_MAP_CONFIDENCE_FAIR_MLThe confidence is fair, current environmental conditions may adversely affect localization. LOCALIZATION_MAP_CONFIDENCE_GOOD_MLThe confidence is high, persistent content should be stable. LOCALIZATION_MAP_CONFIDENCE_EXCELLENT_MLThis is a very high-confidence localization, persistent content will be very stable. See Also
- See Also:
-
XR_LOCALIZATION_MAP_ERROR_UNKNOWN_BIT_ML
public static final int XR_LOCALIZATION_MAP_ERROR_UNKNOWN_BIT_MLXrLocalizationMapErrorFlagBitsML - The world meshing detector flags.Description
The flag bits have the following meanings:
Flag Descriptions
LOCALIZATION_MAP_ERROR_UNKNOWN_BIT_ML— Localization failed for an unknown reason.LOCALIZATION_MAP_ERROR_OUT_OF_MAPPED_AREA_BIT_ML— Localization failed because the user is outside of the mapped area.LOCALIZATION_MAP_ERROR_LOW_FEATURE_COUNT_BIT_ML— There are not enough features in the environment to successfully localize.LOCALIZATION_MAP_ERROR_EXCESSIVE_MOTION_BIT_ML— Localization failed due to excessive motion.LOCALIZATION_MAP_ERROR_LOW_LIGHT_BIT_ML— Localization failed because the lighting levels are too low in the environment.LOCALIZATION_MAP_ERROR_HEADPOSE_BIT_ML— A headpose failure caused localization to be unsuccessful.
- See Also:
-
XR_LOCALIZATION_MAP_ERROR_OUT_OF_MAPPED_AREA_BIT_ML
public static final int XR_LOCALIZATION_MAP_ERROR_OUT_OF_MAPPED_AREA_BIT_MLXrLocalizationMapErrorFlagBitsML - The world meshing detector flags.Description
The flag bits have the following meanings:
Flag Descriptions
LOCALIZATION_MAP_ERROR_UNKNOWN_BIT_ML— Localization failed for an unknown reason.LOCALIZATION_MAP_ERROR_OUT_OF_MAPPED_AREA_BIT_ML— Localization failed because the user is outside of the mapped area.LOCALIZATION_MAP_ERROR_LOW_FEATURE_COUNT_BIT_ML— There are not enough features in the environment to successfully localize.LOCALIZATION_MAP_ERROR_EXCESSIVE_MOTION_BIT_ML— Localization failed due to excessive motion.LOCALIZATION_MAP_ERROR_LOW_LIGHT_BIT_ML— Localization failed because the lighting levels are too low in the environment.LOCALIZATION_MAP_ERROR_HEADPOSE_BIT_ML— A headpose failure caused localization to be unsuccessful.
- See Also:
-
XR_LOCALIZATION_MAP_ERROR_LOW_FEATURE_COUNT_BIT_ML
public static final int XR_LOCALIZATION_MAP_ERROR_LOW_FEATURE_COUNT_BIT_MLXrLocalizationMapErrorFlagBitsML - The world meshing detector flags.Description
The flag bits have the following meanings:
Flag Descriptions
LOCALIZATION_MAP_ERROR_UNKNOWN_BIT_ML— Localization failed for an unknown reason.LOCALIZATION_MAP_ERROR_OUT_OF_MAPPED_AREA_BIT_ML— Localization failed because the user is outside of the mapped area.LOCALIZATION_MAP_ERROR_LOW_FEATURE_COUNT_BIT_ML— There are not enough features in the environment to successfully localize.LOCALIZATION_MAP_ERROR_EXCESSIVE_MOTION_BIT_ML— Localization failed due to excessive motion.LOCALIZATION_MAP_ERROR_LOW_LIGHT_BIT_ML— Localization failed because the lighting levels are too low in the environment.LOCALIZATION_MAP_ERROR_HEADPOSE_BIT_ML— A headpose failure caused localization to be unsuccessful.
- See Also:
-
XR_LOCALIZATION_MAP_ERROR_EXCESSIVE_MOTION_BIT_ML
public static final int XR_LOCALIZATION_MAP_ERROR_EXCESSIVE_MOTION_BIT_MLXrLocalizationMapErrorFlagBitsML - The world meshing detector flags.Description
The flag bits have the following meanings:
Flag Descriptions
LOCALIZATION_MAP_ERROR_UNKNOWN_BIT_ML— Localization failed for an unknown reason.LOCALIZATION_MAP_ERROR_OUT_OF_MAPPED_AREA_BIT_ML— Localization failed because the user is outside of the mapped area.LOCALIZATION_MAP_ERROR_LOW_FEATURE_COUNT_BIT_ML— There are not enough features in the environment to successfully localize.LOCALIZATION_MAP_ERROR_EXCESSIVE_MOTION_BIT_ML— Localization failed due to excessive motion.LOCALIZATION_MAP_ERROR_LOW_LIGHT_BIT_ML— Localization failed because the lighting levels are too low in the environment.LOCALIZATION_MAP_ERROR_HEADPOSE_BIT_ML— A headpose failure caused localization to be unsuccessful.
- See Also:
-
XR_LOCALIZATION_MAP_ERROR_LOW_LIGHT_BIT_ML
public static final int XR_LOCALIZATION_MAP_ERROR_LOW_LIGHT_BIT_MLXrLocalizationMapErrorFlagBitsML - The world meshing detector flags.Description
The flag bits have the following meanings:
Flag Descriptions
LOCALIZATION_MAP_ERROR_UNKNOWN_BIT_ML— Localization failed for an unknown reason.LOCALIZATION_MAP_ERROR_OUT_OF_MAPPED_AREA_BIT_ML— Localization failed because the user is outside of the mapped area.LOCALIZATION_MAP_ERROR_LOW_FEATURE_COUNT_BIT_ML— There are not enough features in the environment to successfully localize.LOCALIZATION_MAP_ERROR_EXCESSIVE_MOTION_BIT_ML— Localization failed due to excessive motion.LOCALIZATION_MAP_ERROR_LOW_LIGHT_BIT_ML— Localization failed because the lighting levels are too low in the environment.LOCALIZATION_MAP_ERROR_HEADPOSE_BIT_ML— A headpose failure caused localization to be unsuccessful.
- See Also:
-
XR_LOCALIZATION_MAP_ERROR_HEADPOSE_BIT_ML
public static final int XR_LOCALIZATION_MAP_ERROR_HEADPOSE_BIT_MLXrLocalizationMapErrorFlagBitsML - The world meshing detector flags.Description
The flag bits have the following meanings:
Flag Descriptions
LOCALIZATION_MAP_ERROR_UNKNOWN_BIT_ML— Localization failed for an unknown reason.LOCALIZATION_MAP_ERROR_OUT_OF_MAPPED_AREA_BIT_ML— Localization failed because the user is outside of the mapped area.LOCALIZATION_MAP_ERROR_LOW_FEATURE_COUNT_BIT_ML— There are not enough features in the environment to successfully localize.LOCALIZATION_MAP_ERROR_EXCESSIVE_MOTION_BIT_ML— Localization failed due to excessive motion.LOCALIZATION_MAP_ERROR_LOW_LIGHT_BIT_ML— Localization failed because the lighting levels are too low in the environment.LOCALIZATION_MAP_ERROR_HEADPOSE_BIT_ML— A headpose failure caused localization to be unsuccessful.
- See Also:
-
-
Method Details
-
nxrEnableLocalizationEventsML
Unsafe version of:EnableLocalizationEventsML -
xrEnableLocalizationEventsML
public static int xrEnableLocalizationEventsML(XrSession session, XrLocalizationEnableEventsInfoML info) Retrieve the current localization status.C Specification
The
EnableLocalizationEventsMLfunction is defined as:XrResult xrEnableLocalizationEventsML( XrSession session, const XrLocalizationEnableEventsInfoML * info);Valid Usage (Implicit)
- The
XR_ML_localization_mapextension must be enabled prior to callingEnableLocalizationEventsML sessionmust be a validXrSessionhandleinfomust be a pointer to a validXrLocalizationEnableEventsInfoMLstructure
Return Codes
- On success, this command returns
- On failure, this command returns
See Also
XrEventDataLocalizationChangedML,XrLocalizationEnableEventsInfoML- Parameters:
session- a handle to anXrSessionpreviously created withCreateSession.info- a pointer to anXrLocalizationEnableEventsInfoMLstructure.
- The
-
nxrQueryLocalizationMapsML
public static int nxrQueryLocalizationMapsML(XrSession session, long queryInfo, int mapCapacityInput, long mapCountOutput, long maps) Unsafe version of:QueryLocalizationMapsML- Parameters:
mapCapacityInput- the capacity of the maps array, or 0 to indicate a request to retrieve the required capacity.
-
xrQueryLocalizationMapsML
public static int xrQueryLocalizationMapsML(XrSession session, @Nullable XrLocalizationMapQueryInfoBaseHeaderML queryInfo, IntBuffer mapCountOutput, @Nullable XrLocalizationMapML.Buffer maps) Query the available localization maps.C Specification
The
QueryLocalizationMapsMLfunction is defined as:XrResult xrQueryLocalizationMapsML( XrSession session, const XrLocalizationMapQueryInfoBaseHeaderML* queryInfo, uint32_t mapCapacityInput, uint32_t * mapCountOutput, XrLocalizationMapML* maps);Description
The list of localization maps returned will depend on the current device mapping mode. Only the localization maps associated with the current mapping mode will be returned by this call. Device mapping mode (e.g.
LOCALIZATION_MAP_TYPE_ON_DEVICE_MLorLOCALIZATION_MAP_TYPE_CLOUD_ML) can only be changed via the system application(s).The list of maps known to the runtime may change between the two calls to
QueryLocalizationMapsML. This is however a rare occurrence and the application may retry the call again if it receivesERROR_SIZE_INSUFFICIENT.Valid Usage (Implicit)
- The
XR_ML_localization_mapextension must be enabled prior to callingQueryLocalizationMapsML sessionmust be a validXrSessionhandle- If
queryInfois notNULL,queryInfomust be a pointer to a validXrLocalizationMapQueryInfoBaseHeaderML-based structure mapCountOutputmust be a pointer to auint32_tvalue- If
mapCapacityInputis not 0,mapsmust be a pointer to an array ofmapCapacityInputXrLocalizationMapMLstructures
Return Codes
- On success, this command returns
- On failure, this command returns
See Also
- Parameters:
session- a handle to anXrSessionpreviously created withCreateSession.queryInfo- an optional enumeration filter based onXrLocalizationMapQueryInfoBaseHeaderMLto use.mapCountOutput- filled in by the runtime with the count ofmapswritten or the required capacity in the case thatmapCapacityInputis insufficient.maps- an array ofXrLocalizationMapMLfilled in by the runtime, but can beNULLifmapCapacityInputis 0.
- The
-
nxrRequestMapLocalizationML
Unsafe version of:RequestMapLocalizationML -
xrRequestMapLocalizationML
public static int xrRequestMapLocalizationML(XrSession session, XrMapLocalizationRequestInfoML requestInfo) Requests a localization map.C Specification
The
RequestMapLocalizationMLfunction is defined as:XrResult xrRequestMapLocalizationML( XrSession session, const XrMapLocalizationRequestInfoML* requestInfo);Description
This is an asynchronous request. Listen for
XrEventDataLocalizationChangedMLevents to get the results of the localization. A new request for localization will override all the past requests for localization that are yet to be completed.The runtime must return
ERROR_LOCALIZATION_MAP_UNAVAILABLE_MLif the requested is not a map known to the runtime.Valid Usage (Implicit)
- The
XR_ML_localization_mapextension must be enabled prior to callingRequestMapLocalizationML sessionmust be a validXrSessionhandlerequestInfomust be a pointer to a validXrMapLocalizationRequestInfoMLstructure
Return Codes
- On success, this command returns
- On failure, this command returns
See Also
- Parameters:
session- a handle to anXrSessionpreviously created withCreateSession.requestInfo- containsXrMapLocalizationRequestInfoMLon the localization map to request.
- The
-
nxrImportLocalizationMapML
Unsafe version of:ImportLocalizationMapML -
xrImportLocalizationMapML
public static int xrImportLocalizationMapML(XrSession session, XrLocalizationMapImportInfoML importInfo, @Nullable XrUuidEXT mapUuid) Imports a localization map.C Specification
The
ImportLocalizationMapMLfunction is defined as:XrResult xrImportLocalizationMapML( XrSession session, const XrLocalizationMapImportInfoML* importInfo, XrUuidEXT* mapUuid);Description
The runtime must return
ERROR_LOCALIZATION_MAP_ALREADY_EXISTS_MLif the map that is being imported already exists. The runtime must returnERROR_LOCALIZATION_MAP_INCOMPATIBLE_MLif the map being imported is not compatible.ImportLocalizationMapMLmay take a long time to complete; as such applications should not call this from the frame loop.Valid Usage (Implicit)
- The
XR_ML_localization_mapextension must be enabled prior to callingImportLocalizationMapML sessionmust be a validXrSessionhandleimportInfomust be a pointer to a validXrLocalizationMapImportInfoMLstructure- If
mapUuidis notNULL,mapUuidmust be a pointer to anXrUuidEXTstructure
Return Codes
- On success, this command returns
- On failure, this command returns
See Also
- Parameters:
session- a handle to anXrSessionpreviously created withCreateSession.importInfo- containsXrLocalizationMapImportInfoMLon the localization map to import.mapUuid- theXrUuidEXTof the newly imported localization map filled in by the runtime.
- The
-
nxrCreateExportedLocalizationMapML
Unsafe version of:CreateExportedLocalizationMapML -
xrCreateExportedLocalizationMapML
public static int xrCreateExportedLocalizationMapML(XrSession session, XrUuidEXT mapUuid, org.lwjgl.PointerBuffer map) Creates an exported localization map handle.C Specification
The
CreateExportedLocalizationMapMLfunction is defined as:XrResult xrCreateExportedLocalizationMapML( XrSession session, const XrUuidEXT* mapUuid, XrExportedLocalizationMapML* map);Description
CreateExportedLocalizationMapMLcreates a frozen copy of themapUuidlocalization map that can be exported usingGetExportedLocalizationMapDataML. Applications should callDestroyExportedLocalizationMapMLonce they are done with the data.Valid Usage (Implicit)
- The
XR_ML_localization_mapextension must be enabled prior to callingCreateExportedLocalizationMapML sessionmust be a validXrSessionhandlemapUuidmust be a pointer to a validXrUuidEXTstructuremapmust be a pointer to anXrExportedLocalizationMapMLhandle
Return Codes
- On success, this command returns
- On failure, this command returns
ERROR_FUNCTION_UNSUPPORTEDERROR_VALIDATION_FAILUREERROR_RUNTIME_FAILUREERROR_HANDLE_INVALIDERROR_INSTANCE_LOSTERROR_SESSION_LOSTERROR_OUT_OF_MEMORYERROR_LIMIT_REACHEDERROR_LOCALIZATION_MAP_UNAVAILABLE_MLERROR_LOCALIZATION_MAP_IMPORT_EXPORT_PERMISSION_DENIED_MLERROR_LOCALIZATION_MAP_CANNOT_EXPORT_CLOUD_MAP_ML
See Also
- Parameters:
session- a handle to anXrSessionpreviously created withCreateSession.mapUuid- a pointer to the uuid of the map to export.map- a pointer to a map handle filled in by the runtime.
- The
-
xrDestroyExportedLocalizationMapML
Destroys an exported localization map.C Specification
The
DestroyExportedLocalizationMapMLfunction is defined as:XrResult xrDestroyExportedLocalizationMapML( XrExportedLocalizationMapML map);Valid Usage (Implicit)
- The
XR_ML_localization_mapextension must be enabled prior to callingDestroyExportedLocalizationMapML mapmust be a validXrExportedLocalizationMapMLhandle
Thread Safety
- Access to
map, and any child handles, must be externally synchronized
Return Codes
- On success, this command returns
- On failure, this command returns
See Also
- Parameters:
map- the map to destroy.
- The
-
nxrGetExportedLocalizationMapDataML
public static int nxrGetExportedLocalizationMapDataML(XrExportedLocalizationMapML map, int bufferCapacityInput, long bufferCountOutput, long buffer) Unsafe version of:GetExportedLocalizationMapDataML- Parameters:
bufferCapacityInput- the capacity of the buffer array, or 0 to indicate a request to retrieve the required capacity.
-
xrGetExportedLocalizationMapDataML
public static int xrGetExportedLocalizationMapDataML(XrExportedLocalizationMapML map, IntBuffer bufferCountOutput, @Nullable ByteBuffer buffer) Returns the exported localization map data.C Specification
The
GetExportedLocalizationMapDataMLfunction is defined as:XrResult xrGetExportedLocalizationMapDataML( XrExportedLocalizationMapML map, uint32_t bufferCapacityInput, uint32_t* bufferCountOutput, char* buffer);Description
GetExportedLocalizationMapDataMLmay take a long time to complete; as such applications should not call this from the frame loop.Valid Usage (Implicit)
- The
XR_ML_localization_mapextension must be enabled prior to callingGetExportedLocalizationMapDataML mapmust be a validXrExportedLocalizationMapMLhandlebufferCountOutputmust be a pointer to auint32_tvalue- If
bufferCapacityInputis not 0,buffermust be a pointer to an array ofbufferCapacityInputchar values
Return Codes
- On success, this command returns
- On failure, this command returns
See Also
- Parameters:
map- the map to export.bufferCountOutput- filled in by the runtime with the count of bytes written or the required capacity in the case that bufferCapacityInput is insufficient.buffer- an array of bytes filled in by the runtime.
- The
-