Skip to main content
Version: 20 Mar 2024

MLSpatialAnchorCreateInfo

Module: Magic Leap Spaces / Spatial Anchor

A structure used to populate anchor creation info when creating a new Spatial Anchor. More...

#include <ml_spatial_anchor.h>

Public Attributes

TypeName
uint32_tversion
Version of the structure.
MLTransformtransform
The desired transform of the new Spatial Anchor.
uint64_texpiration_timestamp_s
The suggested expiration timestamp for this anchor represented in seconds since the Unix epoch.

Detailed Description

struct MLSpatialAnchorCreateInfo;

A structure used to populate anchor creation info when creating a new Spatial Anchor.

API Level:

  • 20

Public Attributes Documentation

version

uint32_t version;

Version of the structure.


transform

MLTransform transform;

The desired transform of the new Spatial Anchor.

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. If the timestamp is set to zero in this struct, the anchor will never expire.