MLSpatialAnchor
Module: Magic Leap Spaces / Spatial Anchor
A structure representing a user-defined Spatial Anchor. More...
#include <ml_spatial_anchor.h>
Public Attributes
Type | Name |
---|---|
uint32_t | version Version of the structure. |
MLUUID | id The anchor's unique ID. |
MLCoordinateFrameUID | cfuid The coordinate frame identifier of the Spatial Anchor. |
uint64_t | expiration_timestamp_s The suggested expiration timestamp for this anchor represented in seconds since the Unix epoch. |
bool | is_persisted Indicates whether or not the anchor has been persisted via a call to MLSpatialAnchorPublish. |
MLUUID | space_id The ID of the space that this anchor belongs to. This is only relevant if is_persisted is true. |
MLSpatialAnchorQuality | quality The quality of the local space that this anchor occupies. This value may change over time. |
Detailed Description
struct MLSpatialAnchor;
A structure representing a user-defined Spatial Anchor.
API Level:
- 31
Public Attributes Documentation
version
uint32_t version;
Version of the structure.
id
MLUUID id;
The anchor's unique ID.
This is a unique identifier for a single Spatial Anchor that is generated and managed by the Spatial Anchor system. The ID is created when MLSpatialAnchorCreate is called.
cfuid
MLCoordinateFrameUID cfuid;
The coordinate frame identifier of the Spatial Anchor.
This should be passed to MLSnapshotGetTransform to get the anchor's transform.
The anchor's transform is set when the anchor is created but may be updated later by the Spatial Anchor system based on factors such as quality of the mapped space and subsequent localizations.
expiration_timestamp_s
uint64_t expiration_timestamp_s;
The suggested expiration timestamp for this anchor represented in seconds since the Unix epoch.
This is implemented as an expiration timestamp in the future after which the associated anchor should be considered no longer valid and may be removed by the Spatial Anchor system.
is_persisted
bool is_persisted;
Indicates whether or not the anchor has been persisted via a call to MLSpatialAnchorPublish.
space_id
MLUUID space_id;
The ID of the space that this anchor belongs to. This is only relevant if is_persisted is true.
quality
MLSpatialAnchorQuality quality;
The quality of the local space that this anchor occupies. This value may change over time.
Type | Description |
---|---|
MLSpatialAnchorQuality | The quality of the local space around the anchor. |